Components should inherit from this class rather than (. More...
#include <BaseComponent.h>
Inherits AbstractComponent.
Inherited by MultiPhysicsToMultiVisualComponent, PhysicalComponent, PlayerComponent, and VisualComponent.
Public Member Functions | |
BaseComponent (const std::string &componentName, const std::string familyName) | |
The BaseComponent constructor. | |
virtual void | Attach (GameEntity *pGameEntity) |
This function simply stores a pointer to the creating entity. | |
virtual void | Detach () |
Empty implementation. | |
virtual void | ToStream (std::ostream &stream) const |
Empty implementation. | |
virtual void | FromStream (std::istream &stream) |
Empty implementation. | |
virtual const std::string & | GetComponentName () const |
virtual const std::string & | GetFamilyName () const |
GameEntity * | GetGameEntity () const |
Protected Attributes | |
GameEntity * | m_pGameEntity |
std::string | m_componentName |
std::string | m_familyName |
Components should inherit from this class rather than (.
BaseComponent::BaseComponent | ( | const std::string & | componentName, | |
const std::string | familyName | |||
) | [inline] |
The BaseComponent constructor.
This should not be called directly, components should [i]only[/i] be created using the ComponentFactory.
componentName | The textual name of this component. | |
familyName | The textual family of this component. |
virtual void BaseComponent::Attach | ( | GameEntity * | pGameEntity | ) | [inline, virtual] |
This function simply stores a pointer to the creating entity.
pGameEntity | A pointer to the entity that is stored. |
Implements AbstractComponent.
virtual const std::string& BaseComponent::GetComponentName | ( | ) | const [inline, virtual] |
Implements AbstractComponent.
virtual const std::string& BaseComponent::GetFamilyName | ( | ) | const [inline, virtual] |
Implements AbstractComponent.
GameEntity* BaseComponent::GetGameEntity | ( | ) | const [inline] |