Eris  1.3.23
ViewEntity.h
1 #ifndef ERIS_VIEW_ENTITY_H_
2 #define ERIS_VIEW_ENTITY_H_
3 
4 #include <Eris/Entity.h>
5 
6 namespace Eris {
7 
21 class ViewEntity : public Entity {
22 friend class EntityRouter;
23 public:
24 
31  ViewEntity(const std::string& id, TypeInfo* ty, View* view);
32 
33  virtual ~ViewEntity();
34 
35  virtual void shutdown();
36 
42  virtual View* getView() const;
43 
44 protected:
45 
50 
56 
57  virtual void onTalk(const Atlas::Objects::Operation::RootOperation& talk);
58 
59  virtual void onSoundAction(
60  const Atlas::Objects::Operation::RootOperation& op);
61 
62  virtual void onVisibilityChanged(bool vis);
63 
64  virtual void onTaskAdded(Task* task);
65 
66  virtual void removeFromMovementPrediction();
67 
68  virtual void addToMovementPredition();
69 
70  virtual Entity* getEntity(const std::string& id);
71 
72  virtual TypeService* getTypeService() const;
73 
78  void task_ProgressRateChanged(Task* task);
79 
80 
81 };
82 
83 inline View* ViewEntity::getView() const
84 {
85  return m_view;
86 }
87 }
88 
89 #endif /* VIEWENTITY_H_ */
Eris::ViewEntity::addToMovementPredition
virtual void addToMovementPredition()
Adds the entity to any movement prediction service.
Definition: ViewEntity.cpp:57
Eris::ViewEntity::m_router
EntityRouter * m_router
A router instance which routes messages from the view into this entity.
Definition: ViewEntity.h:55
Eris::ViewEntity
An entity which is bound to an Eris::View.
Definition: ViewEntity.h:21
Eris::ViewEntity::m_view
View * m_view
The View which owns this Entity.
Definition: ViewEntity.h:49
Eris::Entity::onSoundAction
virtual void onSoundAction(const Atlas::Objects::Operation::RootOperation &op)
Over-rideable hook when this entity is heard performing an action.
Definition: Entity.cpp:332
Eris::ViewEntity::onVisibilityChanged
virtual void onVisibilityChanged(bool vis)
over-rideable hook when the actual (computed) visiblity of this entity changed.
Definition: ViewEntity.cpp:47
Eris::ViewEntity::task_ProgressRateChanged
void task_ProgressRateChanged(Task *task)
Listen to task progress rates updates and send to the view.
Definition: ViewEntity.cpp:78
Eris::Entity
Entity is a concrete (instantiable) class representing one game entity.
Definition: Entity.h:57
Eris::Entity::m_id
const std::string m_id
the Atlas object ID
Definition: Entity.h:549
Eris::ViewEntity::shutdown
virtual void shutdown()
Shuts down the entity.
Definition: ViewEntity.cpp:24
Eris::ViewEntity::getTypeService
virtual TypeService * getTypeService() const
Gets the typeservice used throughout the Eris system.
Definition: ViewEntity.cpp:32
Eris::TypeService
A service class querying and caching types.
Definition: TypeService.h:24
Eris::ViewEntity::onSoundAction
virtual void onSoundAction(const Atlas::Objects::Operation::RootOperation &op)
Over-rideable hook when this entity is heard performing an action.
Definition: ViewEntity.cpp:41
Eris::ViewEntity::getView
virtual View * getView() const
Gets the view to which this entity belongs, if any.
Definition: ViewEntity.h:83
Eris::View::taskRateChanged
void taskRateChanged(Task *)
Method to register and unregister tasks with with view, so they can have their progress updated autom...
Definition: View.cpp:126
Eris::Entity::onVisibilityChanged
virtual void onVisibilityChanged(bool vis)
over-rideable hook when the actual (computed) visiblity of this entity changed.
Definition: Entity.cpp:822
Eris::Avatar::Hear
sigc::signal< void, Entity *, const Atlas::Objects::Operation::RootOperation & > Hear
emitted when this Avatar hears something.
Definition: Avatar.h:185
Eris::View::entityDeleted
void entityDeleted(Entity *ent)
this is a hook that Entity's destructor calls to remove itself from the View's content map.
Definition: View.cpp:444
Eris::Entity::onTaskAdded
virtual void onTaskAdded(Task *task)
Over-rideable hook for when tasks are added.
Definition: Entity.cpp:372
Eris::ViewEntity::getEntity
virtual Entity * getEntity(const std::string &id)
Gets an entity with the supplied id from the system.
Definition: ViewEntity.cpp:61
Eris::ViewEntity::onTalk
virtual void onTalk(const Atlas::Objects::Operation::RootOperation &talk)
process TALK data - default implementation emits the Say signal.
Definition: ViewEntity.cpp:36
Eris::ViewEntity::onTaskAdded
virtual void onTaskAdded(Task *task)
Over-rideable hook for when tasks are added.
Definition: ViewEntity.cpp:72
Eris::TypeInfo
The representation of an Atlas type (i.e a class or operation definition).
Definition: TypeInfo.h:37
Eris::ViewEntity::removeFromMovementPrediction
virtual void removeFromMovementPrediction()
Removes the entity from any movement prediction service.
Definition: ViewEntity.cpp:53
Eris::View::getEntity
Entity * getEntity(const std::string &eid) const
Retrieve an entity in the view by id.
Definition: View.cpp:53
Eris::Entity::onTalk
virtual void onTalk(const Atlas::Objects::Operation::RootOperation &talk)
process TALK data - default implementation emits the Say signal.
Definition: Entity.cpp:304
Eris::Task
Definition: Task.h:25
Eris::View
View encapsulates the set of entities currently visible to an Avatar, as well as those that have rece...
Definition: View.h:33
Eris::Entity::shutdown
virtual void shutdown()
Shuts down the entity.
Definition: Entity.cpp:65
Eris::ViewEntity::ViewEntity
ViewEntity(const std::string &id, TypeInfo *ty, View *view)
Ctor.
Definition: ViewEntity.cpp:14
Eris::EntityRouter
Definition: EntityRouter.h:9