Gadget
parametervector.h
Go to the documentation of this file.
1 #ifndef parametervector_h
2 #define parametervector_h
3 
4 #include "commentstream.h"
5 #include "parameter.h"
6 #include "gadget.h"
7 
13 public:
17  ParameterVector() { size = 0; v = 0; };
23  ParameterVector(int sz);
28  ParameterVector(const ParameterVector& initial);
38  void resize(Parameter& value);
44  void Delete(int pos);
49  int Size() const { return size; };
55  Parameter& operator [] (int pos) { return v[pos]; };
61  Parameter const& operator [] (int pos) const { return v[pos]; };
67 protected:
75  int size;
76 };
77 
78 #endif
This class implements a dynamic vector of Parameter values.
Definition: parametervector.h:12
Parameter * v
This is the vector of Parameter values.
Definition: parametervector.h:71
ParameterVector & operator=(const ParameterVector &pv)
This operator will set the vector equal to an existing ParameterVector.
Definition: parametervector.cc:63
void resize(Parameter &value)
This will add one new entry to the vector.
Definition: parametervector.cc:30
~ParameterVector()
This is the ParameterVector destructor.
Definition: parametervector.cc:23
void Delete(int pos)
This will delete an entry from the vector.
Definition: parametervector.cc:45
Parameter & operator[](int pos)
This will return the value of an element of the vector.
Definition: parametervector.h:55
ParameterVector()
This is the default ParameterVector constructor.
Definition: parametervector.h:17
int size
This is the size of the vector.
Definition: parametervector.h:75
int Size() const
This will return the size of the vector.
Definition: parametervector.h:49
This is the class used to store the name of a variable used in the model simulation.
Definition: parameter.h:11