Class ComponentExporter

Inheritance Relationships

Base Types

  • public Cacao::Resource (Class Resource)

  • private std::enable_shared_from_this< ComponentExporter >

Class Documentation

class ComponentExporter : public Cacao::Resource, private std::enable_shared_from_this<ComponentExporter>

A wrapper object for component creation used for exporting components from game code to make them visible to the engine.

Public Functions

std::shared_ptr<Component> Instantiate()

Create a new instance of the component.

Returns:

Component instance pointer

Public Members

const std::type_index type

Public Static Functions

template<typename T>
static inline ComponentExporter Create(std::function<std::shared_ptr<T>> factory, const std::string &addr)

Create a new exporter.

Parameters:
  • factory – A function that constructs the component on demand

  • addr – The resource address identifier to associate with the component exporter