iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
imstk::Component Class Reference

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>

Inheritance diagram for imstk::Component:
Inheritance graph
[legend]

Public Member Functions

const std::string & getName () const
 
void setName (const std::string &name)
 
std::weak_ptr< EntitygetEntity () 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< Entitym_entity
 Parent entity this component exists on.
 

Friends

class Entity
 

Detailed Description

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.


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