9 #include <EntityProject/entity_observer.h> 10 #include <EntityProject/entity.h> 11 #include "json_helper.h" 40 std::vector <entity_project::IEntityObserver*>
GetList();
71 virtual void Update(
float dt) = 0;
77 std::vector <entity_project::IEntityObserver*>
list;
std::vector< entity_project::IEntityObserver * > GetList()
Getter function for the list of observers (mostly used in testing)
Definition: asubject.cc:10
void Detach(entity_project::IEntityObserver *observer)
Deletes an observer from the list of observers for this subject.
Definition: asubject.cc:7
virtual void GetStatus()=0
Pure virtual function GetStatus that needs to implemented by derived class based on their types of no...
void Notify(picojson::value &event, const entity_project::IEntity &entity)
Sends out Notification to the observer watching this subject.
Definition: asubject.cc:13
Definition: asubject.cc:3
virtual void Update(float dt)=0
Pure virtual function Update that needs to implemented by derived class based on their entity type...
void Attach(entity_project::IEntityObserver *observer)
Adds an observer to the list of observers for this subject.
Definition: asubject.cc:4
A movable object in a scene. Entities have position, direction and size.
Definition: entity.h:15
Observers entity events when they occur.
Definition: entity_observer.h:14
std::vector< entity_project::IEntityObserver * > list
List of pointers to the observers for this subject.
Definition: asubject.h:77
This is the Abstract Subject class from which our subjects will inherit Implements the Observer/subje...
Definition: asubject.h:22