Gadget
actionattimes.h
Go to the documentation of this file.
1 #ifndef actionattimes_h
2 #define actionattimes_h
3 
4 #include "commentstream.h"
5 #include "areatime.h"
6 #include "intvector.h"
7 
15 public:
30  int readFromFile(CommentStream& infile, const TimeClass* const TimeInfo);
37  void addActions(const IntVector& years, const IntVector& steps, const TimeClass* const TimeInfo);
43  void addActionsAllYears(const IntVector& steps, const TimeClass* const TimeInfo);
49  void addActionsAllSteps(const IntVector& years, const TimeClass* const TimeInfo);
55  int atCurrentTime(const TimeClass* const TimeInfo) const;
56 protected:
60  int everyStep;
73 };
74 
75 #endif
This is the class used to associate actions with specific timesteps within the model.
Definition: actionattimes.h:14
void addActionsAllYears(const IntVector &steps, const TimeClass *const TimeInfo)
This is the function used to add the action on all years for a set of steps.
Definition: actionattimes.cc:95
IntVector Steps
This is the IntVector of the steps on which the action takes place.
Definition: actionattimes.h:72
IntVector TimeSteps
This is the IntVector of the timesteps on which the action takes place.
Definition: actionattimes.h:64
void addActionsAllSteps(const IntVector &years, const TimeClass *const TimeInfo)
This is the function used to add the action on all steps for a set of years.
Definition: actionattimes.cc:106
int atCurrentTime(const TimeClass *const TimeInfo) const
This is the function used to check whether an action takes place on the current timestep.
Definition: actionattimes.cc:121
int readFromFile(CommentStream &infile, const TimeClass *const TimeInfo)
This is the function used to read in the action at times parameters.
Definition: actionattimes.cc:7
~ActionAtTimes()
This is the ActionAtTimes destructor.
Definition: actionattimes.h:23
IntVector Years
This is the IntVector of the years on which the action takes place.
Definition: actionattimes.h:68
ActionAtTimes()
This is the ActionAtTimes constructor.
Definition: actionattimes.h:19
int everyStep
This is the flag if the action takes place on every timestep.
Definition: actionattimes.h:60
void addActions(const IntVector &years, const IntVector &steps, const TimeClass *const TimeInfo)
This is the function used to add the action for a set of steps and years.
Definition: actionattimes.cc:82
This is the class used to strip comments (and whitespace) from any input stream.
Definition: commentstream.h:40
This class implements a dynamic vector of int values.
Definition: intvector.h:11
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87