Eris 1.3.18
|
An entity which is bound to an Eris::View. More...
#include <ViewEntity.h>
Public Member Functions | |
ViewEntity (const std::string &id, TypeInfo *ty, View *view) | |
Ctor. | |
virtual void | shutdown () |
Shuts down the entity. | |
virtual View * | getView () const |
Gets the view to which this entity belongs, if any. | |
Protected Member Functions | |
virtual void | onTalk (const Atlas::Objects::Operation::RootOperation &talk) |
process TALK data - default implementation emits the Say signal. | |
virtual void | onSoundAction (const Atlas::Objects::Operation::RootOperation &op) |
Over-rideable hook when this entity is heard performing an action. | |
virtual void | onVisibilityChanged (bool vis) |
over-rideable hook when the actual (computed) visiblity of this entity changed. | |
virtual void | onTaskAdded (Task *task) |
Over-rideable hook for when tasks are added. | |
virtual void | removeFromMovementPrediction () |
Removes the entity from any movement prediction service. | |
virtual void | addToMovementPredition () |
Adds the entity to any movement prediction service. | |
virtual Entity * | getEntity (const std::string &id) |
Gets an entity with the supplied id from the system. | |
virtual TypeService * | getTypeService () const |
Gets the typeservice used throughout the Eris system. | |
void | task_ProgressRateChanged (Task *task) |
Listen to task progress rates updates and send to the view. | |
Protected Attributes | |
View * | m_view |
The View which owns this Entity. | |
EntityRouter * | m_router |
A router instance which routes messages from the view into this entity. | |
Friends | |
class | EntityRouter |
An entity which is bound to an Eris::View.
This subclass of Eris::Entity is intimately bound to a View. As Atlas messages are received from the server these will be routed into an instance of this class.
In your client this is the class you would want to work with for any entities which represents entities that are on the server. If you however are working with entities that aren't represented on the server (the typical example would be if you're allowing client side authoring where you want to create entities locally) you would instead want to implement a new class which inherits Eris::Entity.
void Eris::ViewEntity::addToMovementPredition | ( | ) | [protected, virtual] |
Adds the entity to any movement prediction service.
This is called when movement has started.
Implements Eris::Entity.
References m_view.
Entity * Eris::ViewEntity::getEntity | ( | const std::string & | id | ) | [protected, virtual] |
Gets an entity with the supplied id from the system.
id | The id of the entity to get. |
Implements Eris::Entity.
References Eris::View::getEntity(), and m_view.
TypeService * Eris::ViewEntity::getTypeService | ( | ) | const [protected, virtual] |
Gets the typeservice used throughout the Eris system.
Implements Eris::Entity.
References m_view.
View * Eris::ViewEntity::getView | ( | ) | const [inline, virtual] |
Gets the view to which this entity belongs, if any.
References m_view.
void Eris::ViewEntity::onSoundAction | ( | const Atlas::Objects::Operation::RootOperation & | op | ) | [protected, virtual] |
Over-rideable hook when this entity is heard performing an action.
Default implementation emits the Noise signal.
Reimplemented from Eris::Entity.
References Eris::Avatar::Hear, and m_view.
void Eris::ViewEntity::onTalk | ( | const Atlas::Objects::Operation::RootOperation & | talk | ) | [protected, virtual] |
process TALK data - default implementation emits the Say signal.
talk | The TALK operation |
Reimplemented from Eris::Entity.
References Eris::Avatar::Hear, and m_view.
void Eris::ViewEntity::onTaskAdded | ( | Task * | task | ) | [protected, virtual] |
Over-rideable hook for when tasks are added.
task | The new task. |
Reimplemented from Eris::Entity.
References task_ProgressRateChanged().
void Eris::ViewEntity::onVisibilityChanged | ( | bool | vis | ) | [protected, virtual] |
over-rideable hook when the actual (computed) visiblity of this entity changed.
The default implementation emits the VisiblityChanged signal.
Reimplemented from Eris::Entity.
References m_view.
void Eris::ViewEntity::removeFromMovementPrediction | ( | ) | [protected, virtual] |
Removes the entity from any movement prediction service.
This is called when movement has stopped.
Implements Eris::Entity.
References m_view.
void Eris::ViewEntity::shutdown | ( | ) | [virtual] |
Shuts down the entity.
A call to this must be made before the entity is deleted. In normal operations, where Eris itself takes care of the entities, it will be called automatically. If you however manually handle instance of this in your code you must call it yourself.
Reimplemented from Eris::Entity.
References Eris::View::entityDeleted(), Eris::Entity::m_id, m_router, and m_view.
void Eris::ViewEntity::task_ProgressRateChanged | ( | Task * | task | ) | [protected] |
Listen to task progress rates updates and send to the view.
task | The task which is changed. |
References m_view, and Eris::View::taskRateChanged().
Referenced by onTaskAdded().