Stride Reference Manual  1.0
stride::util::SimplePlanner< T > Class Template Reference

You can see this class as a kind of planner that stores events in the near future. More...

#include <SimplePlanner.h>

Inheritance diagram for stride::util::SimplePlanner< T >:
Inheritance graph
Collaboration diagram for stride::util::SimplePlanner< T >:
Collaboration graph

Public Types

using Block = vector< unique_ptr< T >>
 
using Agenda = list< unique_ptr< Block >>
 

Public Member Functions

BlockgetModifiableDay (unsigned int days)
 
const BlockgetDay (unsigned int days) const
 
const Blocktoday () const
 
void add (unsigned int days, T thing)
 
void nextDay ()
 
unsigned int days () const
 
AgendagetAgenda ()
 
const AgendagetAgenda () const
 
unsigned int size () const
 

Private Attributes

Agenda m_agenda
 

Static Private Attributes

static Block g_empty_day = SimplePlanner<T>::Block()
 

Detailed Description

template<typename T>
class stride::util::SimplePlanner< T >

You can see this class as a kind of planner that stores events in the near future.

You can then ask the planner what you should 'do' that day. (Internally, it just saves a list of vectors of 'events' and does some management to make sure there are enough vectors.)

Used by Simulator for remembering when people have to return home from their travels. (The 'event' is a traveller.)

Definition at line 23 of file SimplePlanner.h.

Member Typedef Documentation

template<typename T>
using stride::util::SimplePlanner< T >::Block = vector<unique_ptr<T>>

Definition at line 25 of file SimplePlanner.h.

template<typename T>
using stride::util::SimplePlanner< T >::Agenda = list<unique_ptr<Block>>

Definition at line 26 of file SimplePlanner.h.

Member Function Documentation

template<typename T>
Block* stride::util::SimplePlanner< T >::getModifiableDay ( unsigned int  days)
inline

Definition at line 28 of file SimplePlanner.h.

template<typename T>
const Block* stride::util::SimplePlanner< T >::getDay ( unsigned int  days) const
inline

Definition at line 43 of file SimplePlanner.h.

template<typename T>
const Block* stride::util::SimplePlanner< T >::today ( ) const
inline

Definition at line 52 of file SimplePlanner.h.

template<typename T>
void stride::util::SimplePlanner< T >::add ( unsigned int  days,
thing 
)
inline

Definition at line 56 of file SimplePlanner.h.

template<typename T>
void stride::util::SimplePlanner< T >::nextDay ( )
inline

Definition at line 62 of file SimplePlanner.h.

template<typename T>
unsigned int stride::util::SimplePlanner< T >::days ( ) const
inline

Definition at line 66 of file SimplePlanner.h.

template<typename T>
Agenda& stride::util::SimplePlanner< T >::getAgenda ( )
inline

Definition at line 70 of file SimplePlanner.h.

template<typename T>
const Agenda& stride::util::SimplePlanner< T >::getAgenda ( ) const
inline

Definition at line 74 of file SimplePlanner.h.

template<typename T>
unsigned int stride::util::SimplePlanner< T >::size ( ) const
inline

Definition at line 78 of file SimplePlanner.h.

Member Data Documentation

template<typename T>
Agenda stride::util::SimplePlanner< T >::m_agenda
private

Definition at line 89 of file SimplePlanner.h.

template<typename T>
SimplePlanner< T >::Block stride::util::SimplePlanner< T >::g_empty_day = SimplePlanner<T>::Block()
staticprivate

Definition at line 90 of file SimplePlanner.h.


The documentation for this class was generated from the following file: