Implementations of DefaultEntityFactory can be found in default_entity_factory.inc
.
|
virtual | ~DefaultEntityFactory () |
| Destructor for DefaultEntityFactory.
|
|
virtual bool | ReadEntityList (const void *entity_list, std::vector< const void * > *entity_defs) |
| Handles reading an Entity list and extracting the individual Entity data definitions. More...
|
|
virtual bool | ReadEntityDefinition (const void *entity_definition, std::vector< const void * > *component_defs) |
| Handles reading an Entity definition and extracting the individual Component data definitions. More...
|
|
virtual bool | CreatePrototypeRequest (const char *prototype_name, std::vector< uint8_t > *request) |
| Creates an Entity list that contains a single Entity definition, which contains a single Component definition (a MetaDef with prototype set to the requested prototype name). More...
|
|
virtual bool | CreateEntityDefinition (const std::vector< const void * > &component_data, std::vector< uint8_t > *entity_definition) |
| Handles building a single Entity definition flatbuffer from a list of an Entity's Component definitions. More...
|
|
virtual bool | CreateEntityList (const std::vector< const void * > &entity_defs, std::vector< uint8_t > *entity_list) |
| Handles building an Entity list flatbuffer from a collection of individual Entity flatbuffers. More...
|
|
| EntityFactory () |
| The default constructor for an empty EntityFactory.
|
|
bool | AddEntityLibrary (const char *entity_library_file) |
| Add a file from which you can load Entity prototype definitions. More...
|
|
bool | WillBeKeptInMemory (const void *pointer) |
| Check if the given pointer points to something that will be kept in memory for the lifetime of the EntityFactory. More...
|
|
virtual int | LoadEntitiesFromFile (const char *filename, corgi::EntityManager *entity_manager) |
| Load Entities from a given Entity list file. More...
|
|
int | LoadEntityListFromMemory (const void *raw_entity_list, corgi::EntityManager *entity_manager, std::vector< corgi::EntityRef > *entities_loaded) |
| Loads a list of Entities from an in-memory buffer. More...
|
|
void | OverrideCachedFile (const char *filename, std::unique_ptr< std::string > new_data) |
| Override a cached file with data from memory that will persist until exit. More...
|
|
corgi::EntityRef | CreateEntityFromData (const void *data, corgi::EntityManager *entity_manager) |
| Initialize an Entity from an Entity definition. More...
|
|
virtual corgi::EntityRef | CreateEntityFromPrototype (const char *prototype_name, corgi::EntityManager *entity_manager) |
| Initialize an entity from a given prototype. More...
|
|
void | SetComponentType (corgi::ComponentId component_id, unsigned int data_type, const char *table_name) |
| When you register each Component with the Entity system, it will get a component ID. This factory needs to know the Component ID assigned for each Component data type (the data_type() in the flatbuffer union). More...
|
|
corgi::ComponentId | DataTypeToComponentId (unsigned int data_type) |
| Get the Component Id for a given data type specifier. More...
|
|
unsigned int | ComponentIdToDataType (corgi::ComponentId component_id) |
| Get the data type specifier for a Component, given a Component ID. More...
|
|
const char * | ComponentIdToTableName (corgi::ComponentId component_id) |
| Get the table name for a Component, given a Component ID. More...
|
|
virtual bool | SerializeEntity (corgi::EntityRef &entity, corgi::EntityManager *entity_manager, std::vector< uint8_t > *entity_serialized_output) |
| Serialize an Entity into whatever binary type you are using for them. More...
|
|
virtual bool | SerializeEntityList (const std::vector< std::vector< uint8_t >> &entity_definitions, std::vector< uint8_t > *entity_list_serialized) |
| After you call SerializeEntity on a few Entities, you may call this method to put them into a proper list. More...
|
|
corgi::ComponentId | max_component_id () |
| Get the maximum component ID. More...
|
|
bool | debug_entity_creation () const |
| Check if debug logging is enabled. More...
|
|
void | set_debug_entity_creation (bool b) |
| Enable debug logging during Entity creation. More...
|
|
virtual void | LoadEntityData (const void *def, corgi::EntityManager *entity_manager, corgi::EntityRef &entity, bool is_prototype) |
| Creates an Entity from the Entity definition, recursively building up from the prototypes. More...
|
|
void | SetFlatbufferSchema (const char *binary_schema_filename) |
| This factory and its subclasses need to know how to parse the Entity FlatBuffers using reflection. More...
|
|
const std::string & | flatbuffer_binary_schema_data () const |
| Get the FlatBuffer binary schema that you loaded with SetFlatbufferSchema() . More...
|
|
const std::unordered_map
< std::string, const void * > & | prototype_data () const |
| Get the map with all the current prototypes. More...
|
|
virtual | ~EntityFactoryInterface () |
| A destructor of the entity factory interface.
|
|