CSCI 3081 - Drone Delivery System
All Classes Files Functions Variables Friends Pages
entity_console_logger.h
1 #ifndef ENTITY_CONSOLE_LOGGER_H_
2 #define ENTITY_CONSOLE_LOGGER_H_
3 
4 #include <iostream>
5 #include "EntityProject/entity_observer.h"
6 
7 namespace entity_project {
8 
11 public:
12  virtual void OnEvent(const picojson::value& event, const IEntity& entity) {
13  std::cout << "Entity #" << entity.GetId() << ": " << event.serialize() << std::endl;
14  }
15 };
16 
17 }
18 
19 
20 #endif // ENTITY_CONSOLE_LOGGER_H_
The Entity Console Logger outputs entity events to the command line.
Definition: entity_console_logger.h:10
virtual int GetId() const =0
A movable object in a scene. Entities have position, direction and size.
Definition: entity.h:15
virtual void OnEvent(const picojson::value &event, const IEntity &entity)
Callback when an event happens.
Definition: entity_console_logger.h:12
Observers entity events when they occur.
Definition: entity_observer.h:14
Definition: entity.h:7