Cogs.Core
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Cogs::Core::EntityStore Class Reference

Stores top level entities for the engine. More...

#include <EntityStore.h>

Public Member Functions

 EntityStore (Context *context)
 Construct the store with the given context instance.
 
void clear ()
 Clear out all top level entities owned by the store.
 
void addEntityDefinition (const EntityDefinition &definition)
 Add the given entity definition to the store.
 
const EntityDefinitiongetEntityDefinition (const StringView &name) const
 Fetch the entity definition with the given name from the store.
 
const EntityDefinitiongetEntityDefinition (size_t id) const
 
void getEntityDefinitions (std::vector< StringView > &names) const
 Get names of currently known entity definitions.
 
void getEntityDefinitionComponents (std::vector< StringView > &components, const StringView &name) const
 Get components of a known entity definition.
 
EntityPtr createEntity (const StringView &name, const StringView &type, bool storeOwnership=true)
 Create a new Entity.
 
void createEntities (size_t count, std::vector< EntityPtr > &entities)
 Allocates and initializes a collection of empty entities.
 
void createEntities (size_t count, std::vector< EntityPtr > &entities, std::function< void(ComponentModel::Entity *)> destructor)
 
EntityPtr createChildEntity (const StringView &type, ComponentModel::Entity *parent, const StringView &name=StringView())
 Create a new Entity, parenting it to the given parent.
 
void removeChild (ComponentModel::Entity *parent, const ComponentModel::Entity *entity)
 Remove the parent-child relationship between parent and entity.
 
void removeChildren (ComponentModel::Entity *entity)
 Removes all children from the given entity.
 
void setEntityParent (ComponentModel::Entity *parent, ComponentModel::Entity *child)
 Move Root entity to a parent: Equal to addChild(parent, child) + destroyEntity(child) Move Child entity to root: Removes child from old parent.
 
void destroyEntity (const EntityId id)
 Destroy the entity with the given id.
 
EntityPtr getEntity (const StringView &name, bool logIfNotFound=true) const
 Retrieve a reference to the shared entity pointer to the Entity with the given name.
 
EntityPtr findEntity (const StringView &name, const ComponentModel::Entity *root=nullptr, EntityFind findOptions=EntityFind::Default) const
 Finds an entity with the given name.
 
Cogs::ComponentModel::EntitygetEntityParent (const ComponentModel::Entity *entity) const
 Gets the parent of the given entity.
 
EntityPtr getEntity (const EntityId entityId, bool logIfNotFound=true, bool onlyRegistered=false) const
 Retrieve a reference to the shared entity pointer to the Entity with the given entityId.
 
void renameEntity (ComponentModel::Entity *entityPtr, StringView name)
 Rename the given entity.
 
bool hasEntityOwnership (const EntityId entityId) const
 Check if the given entityId has global ownership in EntityStore.
 
const std::unordered_map< EntityId, EntityPtr > & getEntities () const
 Return map of entities with global ownership.
 
ComponentModel::EntitygetEntityPtr (const EntityId entityId)
 Get a raw pointer to the entity with the given id.
 
std::string dumpHierarchy () const
 Generates a debug dump of the entire entity hierarchy.
 
std::string dumpHierarchy (const ComponentModel::Entity *parent, const std::string &prefix="") const
 Generates a debug dump of the entity hierarchy from the specified parent entity.
 
void addSystem (const Reflection::TypeId typeId, ComponentCreator creator, ComponentDestroyer destroyer)
 Adds the given creator and destroyer functions for handling components of the given typeId.
 
void addSystem (class ComponentSystemBase *system)
 Adds the given system, creating creator and destroyer functions for the component type handled by the system and registering those using addSystem().
 
void addChild (ComponentModel::Entity *parent, const EntityPtr &entity)
 Add a child to the given parent.
 
void addChild (EntityId parent, EntityId child)
 
ComponentModel::ComponentaddComponent (ComponentModel::Entity *entity, Reflection::TypeId typeId)
 Add a component of the given type to the entity.
 
ComponentModel::ComponentaddComponent (ComponentModel::Entity *entity, const StringView &type)
 
template<typename ComponentType >
ComponentType * addComponent (ComponentModel::Entity *entity)
 
void removeComponent (ComponentModel::Entity *entity, ComponentModel::ComponentHandle handle)
 
const std::unordered_map< size_t, EntityDefinition > & getDefinitions () const
 
size_t getAllocatedEntityCount () const
 Return total number of entities allocated.
 
uint32_t getRevision () const
 Returns a number that changes every time an entity is created or destroyed.
 
void getEntitiesWithComponent (std::vector< EntityId > &entities, Reflection::TypeId typeId)
 
ContextgetContext () const
 

Private Member Functions

EntityId getNextEntityId ()
 
EntityPtr findEntity (EntityId entityId, const ComponentModel::Entity *parent) const
 
void createEntityComponents (EntityDefinition &entityDefinition, const EntityPtr &entity)
 
void destroyEntityComponents (ComponentModel::Entity *entity)
 
void compileEntityDefinition (EntityDefinition &entityDefinition)
 
void storeNamedEntity (const EntityPtr &entity, StringView name)
 

Private Attributes

std::unordered_map< size_t, EntityDefinitionentityDefinitions
 
std::unordered_map< Reflection::TypeId, ComponentCreator > creators
 
std::unordered_map< Reflection::TypeId, ComponentDestroyer > destroyers
 
std::unordered_map< Reflection::TypeId, ComponentSystemBase * > systems
 
Collections::Pool< ComponentModel::EntityentityPool
 
Collections::Pool< EntityDataentityDataPool
 
std::unordered_map< EntityId, EntityPtrentities
 
std::unordered_map< size_t, WeakEntityPtrentitiesByName
 
Contextcontext
 
uint32_t revision = 1
 

Detailed Description

Stores top level entities for the engine.

The entity store stores all top level entities in a context instance and provides functionality for creating, destroying and connecting entities.

Definition at line 49 of file EntityStore.h.

Constructor & Destructor Documentation

◆ EntityStore()

Cogs::Core::EntityStore::EntityStore ( Context context)

Construct the store with the given context instance.

Parameters
contextPointer to a valid context instance.

Definition at line 30 of file EntityStore.cpp.

References Cogs::Core::createDefaultEntityDefinitions().

Member Function Documentation

◆ addChild() [1/2]

void Cogs::Core::EntityStore::addChild ( ComponentModel::Entity parent,
const EntityPtr entity 
)

◆ addChild() [2/2]

void Cogs::Core::EntityStore::addChild ( EntityId  parent,
EntityId  child 
)

Definition at line 264 of file EntityStore.cpp.

◆ addComponent() [1/3]

template<typename ComponentType >
ComponentType * Cogs::Core::EntityStore::addComponent ( ComponentModel::Entity entity)
inline

Definition at line 338 of file EntityStore.h.

◆ addComponent() [2/3]

Cogs::ComponentModel::Component * Cogs::Core::EntityStore::addComponent ( ComponentModel::Entity entity,
const StringView type 
)

Definition at line 286 of file EntityStore.cpp.

◆ addComponent() [3/3]

Cogs::ComponentModel::Component * Cogs::Core::EntityStore::addComponent ( ComponentModel::Entity entity,
Reflection::TypeId  typeId 
)

Add a component of the given type to the entity.

Parameters
entityPointer to an existing entity.
typeIdType id of the desired component type.

Definition at line 269 of file EntityStore.cpp.

References Cogs::ComponentModel::Entity::addComponent(), and Cogs::ComponentModel::ComponentHandle::Empty().

Referenced by Cogs::Core::applyFieldValues().

◆ addEntityDefinition()

void Cogs::Core::EntityStore::addEntityDefinition ( const EntityDefinition definition)

Add the given entity definition to the store.

After adding a definition, entities with the same name as the definitions name can be created by calls to createEntity().

Parameters
definitionDefinition to use when users request entities of the type from the definitions name.

Definition at line 59 of file EntityStore.cpp.

References Cogs::hash(), and Cogs::Core::EntityDefinition::name.

Referenced by Cogs::Core::createEntityDefinition(), Cogs::Core::CurtainView::CurtainViewExtension::initialize(), Cogs::Core::VectorField::VectorFieldExtension::initialize(), and Cogs::VideoExtension::VideoExtension::initialize().

◆ addSystem() [1/2]

void Cogs::Core::EntityStore::addSystem ( class ComponentSystemBase system)

Adds the given system, creating creator and destroyer functions for the component type handled by the system and registering those using addSystem().

Parameters
systemPointer to a component system to add handling for.

Definition at line 704 of file EntityStore.cpp.

References Cogs::Core::ComponentSystemBase::createComponent(), Cogs::Core::ComponentSystemBase::destroyComponent(), Cogs::Core::ComponentSystemBase::getComponentType(), and Cogs::Reflection::NoType.

◆ addSystem() [2/2]

void Cogs::Core::EntityStore::addSystem ( const Reflection::TypeId  typeId,
ComponentCreator  creator,
ComponentDestroyer  destroyer 
)

Adds the given creator and destroyer functions for handling components of the given typeId.

The creator and destroyer functions are used when creating or destroying entities. The EntityDefinition used to create the entity contains a list of component types which will have their respective creators called.

Upon destruction, destroyers are called for all components in an Entity based on their types.

Parameters
typeIdType id for the type of Component these functions are used for.
creatorCreator function used to instantiate components of the given type.
destroyerDestroyer function used to destruct components of the given type.

Definition at line 698 of file EntityStore.cpp.

Referenced by Cogs::Core::Engine::registerSystem().

◆ clear()

void Cogs::Core::EntityStore::clear ( )

Clear out all top level entities owned by the store.

This will in turn destroy all components held by top level entities which should lead to the deletion of all entities in the scene.

A check will be performed for components still alive after the execution of this method.

Definition at line 45 of file EntityStore.cpp.

◆ compileEntityDefinition()

void Cogs::Core::EntityStore::compileEntityDefinition ( EntityDefinition entityDefinition)
private

Definition at line 201 of file EntityStore.cpp.

◆ createChildEntity()

Cogs::Core::EntityPtr Cogs::Core::EntityStore::createChildEntity ( const StringView type,
ComponentModel::Entity parent,
const StringView name = StringView() 
)

Create a new Entity, parenting it to the given parent.

See createEntity() for details on Entity creation.

Parenting is performed by adding the newly created entity to the parents SceneComponent set of children. The TransformComponent of the child has its parent set to the TransformComponent of the parent.

Parameters
typeString containing entity type name.
parentPointer to a parent entity to add the child entity to.
nameString containing an optional entity name.
Returns
A shared entity pointer to the newly constructed Entity.
See also
createEntity

Definition at line 728 of file EntityStore.cpp.

Referenced by Cogs::Core::CreateEntityCommand::apply(), Cogs::Core::EchoSounder::UniformGridSystem::preUpdate(), Cogs::Core::VariableExtrusionSystem::update(), Cogs::Core::EchoSounder::SwathBottomSystem::update(), Cogs::Core::EchoSounder::SwathIsoSystem::update(), Cogs::Core::OceanSystem::update(), Cogs::Core::BasicOceanSystem::update(), and Cogs::Core::AdaptivePlanarGridSystem::update().

◆ createEntities()

void Cogs::Core::EntityStore::createEntities ( size_t  count,
std::vector< EntityPtr > &  entities 
)

Allocates and initializes a collection of empty entities.

The entities have no global ownership stored, the caller must manage lifetime by handling EntityPtr instances locally.

Parameters
countNumber of entities to allocate.
entitiesCollection to place owning pointers to the entities in. The collection will be cleared and resized to count.

Definition at line 156 of file EntityStore.cpp.

References Cogs::ComponentModel::Entity::getUserData(), and Cogs::ComponentModel::Entity::setId().

Referenced by Cogs::Core::InstancedModelSystem::update().

◆ createEntity()

Cogs::Core::EntityPtr Cogs::Core::EntityStore::createEntity ( const StringView name,
const StringView type,
bool  storeOwnership = true 
)

Create a new Entity.

An entity is created using the given type name to lookup an entity definition to use as template for creation. If no EntityDefinition is found, the resulting entity will be empty.

If name is non-empty the entity will be given a name, and registered so that lookup using the name can be performed later. Registering two entities with the same name results in the second entity being impossible to retrieve by name at a later stage.

The parameter storeOwnership is used to determine if the entity store should treat the entity as a top level entity and keep an owning reference to the entity, thus preventing it from being deleted if the return value from this function is not kept alive.

Parameters
nameString containing a name to give the entity, or an empty string. Non-empty strings can be used to look up the entity at a later time using the string.
typeString containing an entity type name. This is used to lookup a corresponding entity definition.
storeOwnershipIf the entity should be considered top level and an owning reference kept by the store.
Returns
A shared entity pointer to the newly constructed Entity.

Definition at line 104 of file EntityStore.cpp.

References Cogs::Core::applyFieldValues(), Cogs::ComponentModel::Entity::getUserData(), Cogs::hash(), Cogs::ComponentModel::Entity::setId(), and Cogs::StringView::size().

Referenced by Cogs::Core::OGC3DTilesSystem::addModelToScene(), Cogs::Core::CreateEntityCommand::apply(), and Cogs::Core::Scene::setup().

◆ createEntityComponents()

void Cogs::Core::EntityStore::createEntityComponents ( EntityDefinition entityDefinition,
const EntityPtr entity 
)
private

Definition at line 184 of file EntityStore.cpp.

◆ destroyEntity()

void Cogs::Core::EntityStore::destroyEntity ( const EntityId  id)

Destroy the entity with the given id.

The Entity must be a top level entity owned by the entity store.

Parameters
idEntityId of the entity to destroy.

Definition at line 407 of file EntityStore.cpp.

References Cogs::ComponentModel::Entity::getId(), Cogs::ComponentModel::Entity::getName(), Cogs::hash(), and Cogs::StringView::size().

Referenced by Cogs::Core::OGC3DTilesSystem::destroyComponent(), Cogs::Core::OGC3DTilesSystem::update(), and Cogs::Core::BasicOceanSystem::update().

◆ destroyEntityComponents()

void Cogs::Core::EntityStore::destroyEntityComponents ( ComponentModel::Entity entity)
private

Definition at line 429 of file EntityStore.cpp.

◆ dumpHierarchy() [1/2]

std::string Cogs::Core::EntityStore::dumpHierarchy ( ) const

Generates a debug dump of the entire entity hierarchy.

Returns
A string containing the entity hierarchy.

Definition at line 637 of file EntityStore.cpp.

◆ dumpHierarchy() [2/2]

std::string Cogs::Core::EntityStore::dumpHierarchy ( const ComponentModel::Entity parent,
const std::string &  prefix = "" 
) const

◆ findEntity() [1/2]

Cogs::Core::EntityPtr Cogs::Core::EntityStore::findEntity ( const StringView name,
const ComponentModel::Entity root = nullptr,
EntityFind  findOptions = EntityFind::Default 
) const

Finds an entity with the given name.

Searches all entities in the context, using depth-first traversal of the trees formed by all root level entities in the context.

Optionally takes a root entity, constraining search to the trees formed by its descendants. The root is not included in the search.

Optionally takes a flag, determining whether the exact name string has to match or can be a substring of the name of the entity being compared against.

Parameters
nameString name of the entity to find.
rootOptional pointer to a root entity, limiting the search scope to the tree formed by its descendants.
findOptionsSearch options, defaults to EntityFind::Default.
Returns
A pointer to the found entity,

Definition at line 497 of file EntityStore.cpp.

References Cogs::Core::SceneComponent::children, Cogs::ComponentModel::Entity::getComponent(), Cogs::Core::NonRecursive, and Cogs::Core::PartialNameMatch.

Referenced by Cogs::Core::OGC3DTilesSystem::addModelToScene(), and Cogs::Core::applyFieldValues().

◆ findEntity() [2/2]

Cogs::Core::EntityPtr Cogs::Core::EntityStore::findEntity ( EntityId  entityId,
const ComponentModel::Entity parent 
) const
private

Definition at line 570 of file EntityStore.cpp.

◆ getAllocatedEntityCount()

size_t Cogs::Core::EntityStore::getAllocatedEntityCount ( ) const
inline

Return total number of entities allocated.

Definition at line 351 of file EntityStore.h.

◆ getContext()

Context * Cogs::Core::EntityStore::getContext ( ) const
inline

Definition at line 363 of file EntityStore.h.

◆ getDefinitions()

const std::unordered_map< size_t, EntityDefinition > & Cogs::Core::EntityStore::getDefinitions ( ) const
inline

Definition at line 345 of file EntityStore.h.

◆ getEntities()

const std::unordered_map< EntityId, EntityPtr > & Cogs::Core::EntityStore::getEntities ( ) const
inline

◆ getEntitiesWithComponent()

void Cogs::Core::EntityStore::getEntitiesWithComponent ( std::vector< EntityId > &  entities,
Reflection::TypeId  typeId 
)

Definition at line 737 of file EntityStore.cpp.

◆ getEntity() [1/2]

Cogs::Core::EntityPtr Cogs::Core::EntityStore::getEntity ( const EntityId  entityId,
bool  logIfNotFound = true,
bool  onlyRegistered = false 
) const

Retrieve a reference to the shared entity pointer to the Entity with the given entityId.

This method will only find entities created by user. Use

See also
getEntityPtr to find any entity.

Trying to get an entity which does not exist in the store is an error.

Parameters
entityIdEntityId of the entity to look up.
onlyRegisteredtrue if only searching registered entities in 'entities' map. Use getEntityPtr to find any entity if EntityPtr not required.
Returns
Shared entity pointer for the entity with the given id.

Definition at line 449 of file EntityStore.cpp.

◆ getEntity() [2/2]

Cogs::Core::EntityPtr Cogs::Core::EntityStore::getEntity ( const StringView name,
bool  logIfNotFound = true 
) const

Retrieve a reference to the shared entity pointer to the Entity with the given name.

Trying to get an entity which does not exist in the store is an error.

Parameters
nameString name of the Entity to look up.
logIfNotFoundtrue if method shall log if not found (default=true)
Returns
A reference to the shared entity pointer for the named entity.

Definition at line 472 of file EntityStore.cpp.

References Cogs::hash().

Referenced by Cogs::Core::PackMeshCommand::apply(), Cogs::Core::OGC3DTilesSystem::destroyComponent(), Cogs::Core::OGC3DTilesSystem::pruneTileCache(), Cogs::Core::Scene::setup(), Cogs::Core::VariableExtrusionSystem::update(), Cogs::Core::GhostSystem::update(), Cogs::Core::RigidBodySystem::update(), Cogs::Core::TriggerSystem::update(), and Cogs::Core::EchoSounder::SwathBottomSystem::update().

◆ getEntityDefinition() [1/2]

const Cogs::Core::EntityDefinition * Cogs::Core::EntityStore::getEntityDefinition ( const StringView name) const

Fetch the entity definition with the given name from the store.

If no such named definition is available, returns nullptr.

Parameters
nameName of the entity definition to retrieve.
Returns
Pointer to a valid entity definition, or nullptr if name does not exist.

Definition at line 92 of file EntityStore.cpp.

References Cogs::hash().

Referenced by Cogs::Core::writeEntity().

◆ getEntityDefinition() [2/2]

const Cogs::Core::EntityDefinition * Cogs::Core::EntityStore::getEntityDefinition ( size_t  id) const

Definition at line 97 of file EntityStore.cpp.

◆ getEntityDefinitionComponents()

void Cogs::Core::EntityStore::getEntityDefinitionComponents ( std::vector< StringView > &  components,
const StringView name 
) const

Get components of a known entity definition.

Definition at line 80 of file EntityStore.cpp.

◆ getEntityDefinitions()

void Cogs::Core::EntityStore::getEntityDefinitions ( std::vector< StringView > &  names) const

Get names of currently known entity definitions.

Definition at line 71 of file EntityStore.cpp.

◆ getEntityParent()

Cogs::ComponentModel::Entity * Cogs::Core::EntityStore::getEntityParent ( const ComponentModel::Entity entity) const

Gets the parent of the given entity.

Can only find parant for entities with TransformComponent, but all(?) entities with children (SceneComponent) also have xform.

Parameters
entityEntity to find parent of.
Returns
A pointer to the found entity, nullptr if no parent,

Definition at line 591 of file EntityStore.cpp.

References Cogs::ComponentModel::Entity::getComponent(), Cogs::Core::TransformComponent::parent, and Cogs::ComponentModel::ComponentHandle::resolve().

Referenced by Cogs::Core::Editor::isUserRootEntity().

◆ getEntityPtr()

Cogs::ComponentModel::Entity * Cogs::Core::EntityStore::getEntityPtr ( const EntityId  entityId)

◆ getNextEntityId()

EntityId Cogs::Core::EntityStore::getNextEntityId ( )
private

Definition at line 440 of file EntityStore.cpp.

◆ getRevision()

uint32_t Cogs::Core::EntityStore::getRevision ( ) const
inline

Returns a number that changes every time an entity is created or destroyed.

Intent is to be used for detecting when cached scene structure needs to be updated.

Definition at line 358 of file EntityStore.h.

◆ hasEntityOwnership()

bool Cogs::Core::EntityStore::hasEntityOwnership ( const EntityId  entityId) const
inline

Check if the given entityId has global ownership in EntityStore.

Parameters
entityPtrPointer to the entity to rename.
entityIdEntityId of the entity.
Returns
true if found in global ownership map. false if created by createEntities (or unknown).

Definition at line 260 of file EntityStore.h.

Referenced by Cogs::Core::writeEntity().

◆ removeChild()

void Cogs::Core::EntityStore::removeChild ( ComponentModel::Entity parent,
const ComponentModel::Entity entity 
)

Remove the parent-child relationship between parent and entity.

Parameters
parentA pointer to the current parent Entity of the given child entity.
entityA pointer to the child entity to remove from the parents list of children.

Definition at line 307 of file EntityStore.cpp.

References Cogs::ComponentModel::ComponentHandle::Empty(), Cogs::ComponentModel::Entity::getComponent(), and Cogs::Core::TransformComponent::parent.

Referenced by Cogs::Core::EchoSounder::UniformGridSystem::preUpdate(), and Cogs::Core::OGC3DTilesSystem::update().

◆ removeChildren()

void Cogs::Core::EntityStore::removeChildren ( ComponentModel::Entity entity)

Removes all children from the given entity.

Parameters
entityPointer to a valid entity to remove all children from.

Definition at line 344 of file EntityStore.cpp.

References Cogs::ComponentModel::ComponentHandle::Empty(), Cogs::ComponentModel::Component::getComponent(), Cogs::ComponentModel::Entity::getComponent(), Cogs::Core::SceneComponent::parent, and Cogs::Core::TransformComponent::parent.

Referenced by Cogs::Core::AssetSystem::update().

◆ removeComponent()

void Cogs::Core::EntityStore::removeComponent ( ComponentModel::Entity entity,
ComponentModel::ComponentHandle  handle 
)

Definition at line 291 of file EntityStore.cpp.

◆ renameEntity()

void Cogs::Core::EntityStore::renameEntity ( ComponentModel::Entity entityPtr,
StringView  name 
)

Rename the given entity.

The entity may have global ownership in EntityStore or be created in client collection using

See also
createEntities. Entities with global ownership will also update the entitiesByName map.

Clients should call renameEntity instead of Entity::setName to ensure name lookup consistency.

Parameters
entityPtrPointer to the entity to rename.
nameNew entity name.

Definition at line 606 of file EntityStore.cpp.

References Cogs::StringView::empty(), Cogs::ComponentModel::Entity::getId(), Cogs::ComponentModel::Entity::getName(), Cogs::hash(), and Cogs::ComponentModel::Entity::setName().

◆ setEntityParent()

void Cogs::Core::EntityStore::setEntityParent ( ComponentModel::Entity parent,
ComponentModel::Entity child 
)

Move Root entity to a parent: Equal to addChild(parent, child) + destroyEntity(child) Move Child entity to root: Removes child from old parent.

Adds child to global entities (+name lookup if unique). Move Child entity to other parent: Removes child from old parent. Adds child to new parent.

Definition at line 377 of file EntityStore.cpp.

References Cogs::ComponentModel::Entity::getId(), and Cogs::ComponentModel::Entity::getName().

◆ storeNamedEntity()

void Cogs::Core::EntityStore::storeNamedEntity ( const EntityPtr entity,
StringView  name 
)
private

Definition at line 745 of file EntityStore.cpp.

Member Data Documentation

◆ context

Context* Cogs::Core::EntityStore::context
private

Definition at line 389 of file EntityStore.h.

◆ creators

std::unordered_map<Reflection::TypeId, ComponentCreator> Cogs::Core::EntityStore::creators
private

Definition at line 380 of file EntityStore.h.

◆ destroyers

std::unordered_map<Reflection::TypeId, ComponentDestroyer> Cogs::Core::EntityStore::destroyers
private

Definition at line 381 of file EntityStore.h.

◆ entities

std::unordered_map<EntityId, EntityPtr> Cogs::Core::EntityStore::entities
private

Definition at line 386 of file EntityStore.h.

◆ entitiesByName

std::unordered_map<size_t, WeakEntityPtr> Cogs::Core::EntityStore::entitiesByName
private

Definition at line 387 of file EntityStore.h.

◆ entityDataPool

Collections::Pool<EntityData> Cogs::Core::EntityStore::entityDataPool
private

Definition at line 385 of file EntityStore.h.

◆ entityDefinitions

std::unordered_map<size_t, EntityDefinition> Cogs::Core::EntityStore::entityDefinitions
private

Definition at line 378 of file EntityStore.h.

◆ entityPool

Collections::Pool<ComponentModel::Entity> Cogs::Core::EntityStore::entityPool
private

Definition at line 384 of file EntityStore.h.

◆ revision

uint32_t Cogs::Core::EntityStore::revision = 1
private

Definition at line 390 of file EntityStore.h.

◆ systems

std::unordered_map<Reflection::TypeId, ComponentSystemBase*> Cogs::Core::EntityStore::systems
private

Definition at line 382 of file EntityStore.h.


The documentation for this class was generated from the following files: