iMSTK
Interactive Medical Simulation Toolkit
|
Represents a part of an entity, involved in a system. The component system is doubly linked meaning the Entity contains a shared_ptr to Component while the Component keeps a weak_ptr to Entity. Components are able to not exist on an entity as the entity parent is not garunteed to exist. The initialize call cannot be issue'd without a valid entity. More...
#include <imstkComponent.h>
Public Member Functions | |
const std::string & | getName () const |
void | setName (const std::string &name) |
std::weak_ptr< Entity > | getEntity () const |
Get parent entity. | |
void | initialize () |
Initialize the component, called at a later time after all component construction is complete. | |
Protected Member Functions | |
Component (const std::string &name="Component") | |
virtual void | init () |
Initialize the component, called at a later time after all component construction is complete. | |
Protected Attributes | |
std::string | m_name |
std::weak_ptr< Entity > | m_entity |
Parent entity this component exists on. | |
Friends | |
class | Entity |
Represents a part of an entity, involved in a system. The component system is doubly linked meaning the Entity contains a shared_ptr to Component while the Component keeps a weak_ptr to Entity. Components are able to not exist on an entity as the entity parent is not garunteed to exist. The initialize call cannot be issue'd without a valid entity.
Definition at line 27 of file imstkComponent.h.