#include <entity.h>
Public Types | |
| using | ComponentList = std::vector< rtti::ObjectPtr< Component > > |
| using | EntityList = std::vector< rtti::ObjectPtr< Entity > > |
Public Member Functions | |
| rtti::ObjectPtr< Component > | findComponent (const rtti::TypeInfo &type) const |
| bool | hasComponent (const rtti::TypeInfo &type) const |
| template<class T > | |
| bool | hasComponent () const |
| const ComponentList & | getComponents () const |
Public Member Functions inherited from Resource | |
| Resource () | |
Public Member Functions inherited from Object | |
| Object () | |
| virtual | ~Object () |
| virtual bool | init (utility::ErrorState &errorState) |
| virtual void | onDestroy () |
| Object (Object &)=delete | |
| Object & | operator= (const Object &)=delete |
| Object (Object &&)=delete | |
| Object & | operator= (Object &&)=delete |
Static Public Member Functions | |
| static constexpr const char * | componentsPropertyName () |
| static constexpr const char * | childrenPropertyName () |
Static Public Member Functions inherited from Object | |
| static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Public Attributes | |
| ComponentList | mComponents |
| EntityList | mChildren |
Public Attributes inherited from Object | |
| std::string | mID |
| Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Resource part of an entity. This represents the static data that is deserialized from json and contains a list of child entities and components This class is used as a blueprint for the creation of an EntityInstance.
| using ComponentList = std::vector<rtti::ObjectPtr<Component> > |
| using EntityList = std::vector<rtti::ObjectPtr<Entity> > |
|
staticconstexpr |
|
staticconstexpr |
| rtti::ObjectPtr<Component> findComponent | ( | const rtti::TypeInfo & | type | ) | const |
Find component of the specified type
| type | The type of component to find |
| const ComponentList& getComponents | ( | ) | const |
| bool hasComponent |
Convenience function to check whether this entity has a component of the specified type
| bool hasComponent | ( | const rtti::TypeInfo & | type | ) | const |
Check whether this Entity has a component of the specified type
| type | The type of component to check for |
| EntityList mChildren |
| ComponentList mComponents |