eris 1.4.0
A WorldForge client library.
ViewEntity.h
1#ifndef ERIS_VIEW_ENTITY_H_
2#define ERIS_VIEW_ENTITY_H_
3
4#include "Entity.h"
5
6namespace Eris {
7
21class ViewEntity : public Entity {
22friend class EntityRouter;
23public:
24
31 ViewEntity(std::string id, TypeInfo* ty, View& view);
32
33 ~ViewEntity() override;
34
40 virtual View* getView() const;
41
42protected:
43
48
49 void onTaskAdded(const std::string& id, Task* task) override;
50
51 Entity* getEntity(const std::string& id) override;
52
58
59
60};
61
63{
64 return &m_view;
65}
66}
67
68#endif /* VIEWENTITY_H_ */
Entity is a concrete (instantiable) class representing one game entity.
Definition: Entity.h:56
The representation of an Atlas type (i.e a class or operation definition). This class supports effice...
Definition: TypeInfo.h:33
An entity which is bound to an Eris::View. This subclass of Eris::Entity is intimately bound to a Vie...
Definition: ViewEntity.h:21
Entity * getEntity(const std::string &id) override
Gets an entity with the supplied id from the system.
Definition: ViewEntity.cpp:21
void onTaskAdded(const std::string &id, Task *task) override
Over-rideable hook for when tasks are added.
Definition: ViewEntity.cpp:32
View & m_view
The View which owns this Entity.
Definition: ViewEntity.h:47
virtual View * getView() const
Gets the view to which this entity belongs, if any.
Definition: ViewEntity.h:62
ViewEntity(std::string id, TypeInfo *ty, View &view)
Ctor.
Definition: ViewEntity.cpp:14
void task_ProgressRateChanged(Task *task)
Listen to task progress rates updates and send to the view.
Definition: ViewEntity.cpp:39
Definition: Account.cpp:33