Simpact Cyan
Population based event driven simulation using mNRM
simpactevent.h
1 #ifndef SIMPACTEVENT_H
2 
3 #define SIMPACTEVENT_H
4 
5 #include "populationevent.h"
6 #include "simpactpopulation.h"
7 #include "person.h"
8 
9 // This just provides some casts towards Person instead of PersonBase
10 class SimpactEvent : public PopulationEvent
11 {
12 public:
13  SimpactEvent() : PopulationEvent() { }
14  SimpactEvent(Person *pPerson) : PopulationEvent(pPerson) { }
15  SimpactEvent(Person *pPerson1, Person *pPerson2) : PopulationEvent(pPerson1, pPerson2) { }
16  ~SimpactEvent() { }
17 
18  Person *getPerson(int idx) const { return static_cast<Person*>(PopulationEvent::getPerson(idx)); }
19 };
20 
21 #endif // SIMPACTEVENT_H
22 
PersonBase * getPerson(int idx) const
Returns a person that was specified when the event was constructed, where idx can range from 0 to Pop...
Definition: populationevent.cpp:74
This is the base class for events in population-based simulations which use the Population class...
Definition: populationevent.h:58