Cogs.Core
|
Defines how to construct entities of a certain type by a list of components to instantiate and default values to apply to fields in these components. More...
#include <EntityDefinition.h>
Public Attributes | |
std::string | name |
std::string | description |
Description of the entity. For in-line documentation. | |
std::vector< std::string > | components |
Names of the component types to instantiate when creating an entity from this definition. | |
bool | compiled = false |
std::vector< ComponentCreator * > | creators |
std::vector< FieldValue > | defaultValues |
Set of default values to apply after constructing entities from this definition. | |
Defines how to construct entities of a certain type by a list of components to instantiate and default values to apply to fields in these components.
Definition at line 159 of file EntityDefinition.h.
bool Cogs::Core::EntityDefinition::compiled = false |
If the definition is compiled. Compiled definitions have performed component type name lookup and stored creator functions in creators.
Definition at line 175 of file EntityDefinition.h.
std::vector<std::string> Cogs::Core::EntityDefinition::components |
Names of the component types to instantiate when creating an entity from this definition.
Definition at line 171 of file EntityDefinition.h.
Referenced by Cogs::Core::createEntityDefinition(), Cogs::Core::CurtainView::CurtainViewExtension::initialize(), Cogs::Core::VectorField::VectorFieldExtension::initialize(), and Cogs::VideoExtension::VideoExtension::initialize().
std::vector<ComponentCreator *> Cogs::Core::EntityDefinition::creators |
Creator functions to call when constructing an entity from this definition. All creators will return component handles, which can then be added to the entity.
Definition at line 179 of file EntityDefinition.h.
std::vector<FieldValue> Cogs::Core::EntityDefinition::defaultValues |
Set of default values to apply after constructing entities from this definition.
Definition at line 182 of file EntityDefinition.h.
std::string Cogs::Core::EntityDefinition::description |
Description of the entity. For in-line documentation.
Definition at line 168 of file EntityDefinition.h.
std::string Cogs::Core::EntityDefinition::name |
Name of the entity. This is used to uniquely identify an entity class and instantiate from this class making sure contained components and behavior of the entities of a given class are the same.
Definition at line 165 of file EntityDefinition.h.
Referenced by Cogs::Core::EntityStore::addEntityDefinition(), Cogs::Core::createEntityDefinition(), Cogs::Core::CurtainView::CurtainViewExtension::initialize(), Cogs::Core::VectorField::VectorFieldExtension::initialize(), Cogs::VideoExtension::VideoExtension::initialize(), and Cogs::Core::writeEntity().