Gadget
suitfuncptrvector.h
Go to the documentation of this file.
1 #ifndef suitfuncptrvector_h
2 #define suitfuncptrvector_h
3 
4 #include "suitfunc.h"
5 
6 class SuitFunc;
7 
13 public:
17  SuitFuncPtrVector() { size = 0; v = 0; };
27  void resize(SuitFunc* value);
34  void Delete(int pos, Keeper* const keeper);
39  int Size() const { return size; };
45  SuitFunc*& operator [] (int pos) { return v[pos]; };
51  SuitFunc* const& operator [] (int pos) const { return v[pos]; };
59  void readSuitFunction(CommentStream& infile, const char* suitname,
60  const TimeClass* const TimeInfo, Keeper* const keeper);
61 protected:
69  int size;
70 };
71 
72 #endif
This is the class used to strip comments (and whitespace) from any input stream.
Definition: commentstream.h:40
This is the class used to store information about the variables that are used in model simulation.
Definition: keeper.h:17
This class implements a dynamic vector of SuitFunc values.
Definition: suitfuncptrvector.h:12
void Delete(int pos, Keeper *const keeper)
This will delete an entry from the vector.
Definition: suitfuncptrvector.cc:28
int size
This is the size of the vector.
Definition: suitfuncptrvector.h:69
~SuitFuncPtrVector()
This is the SuitFuncPtrVector destructor.
Definition: suitfuncptrvector.cc:6
SuitFunc *& operator[](int pos)
This will return the value of an element of the vector.
Definition: suitfuncptrvector.h:45
SuitFuncPtrVector()
This is the default SuitFuncPtrVector constructor.
Definition: suitfuncptrvector.h:17
SuitFunc ** v
This is the vector of SuitFunc values.
Definition: suitfuncptrvector.h:65
void readSuitFunction(CommentStream &infile, const char *suitname, const TimeClass *const TimeInfo, Keeper *const keeper)
This function will read SuitFunc data from the input file.
Definition: suitfuncptrvector.cc:48
void resize(SuitFunc *value)
This will add one new entry to the vector.
Definition: suitfuncptrvector.cc:13
int Size() const
This will return the size of the vector.
Definition: suitfuncptrvector.h:39
This is the base class used to calculate the predator prey suitability value.
Definition: suitfunc.h:14
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87