Gadget
optinfoptrvector.h
Go to the documentation of this file.
1 #ifndef optinfoptrvector_h
2 #define optinfoptrvector_h
3 
4 class OptInfo;
5 
11 public:
15  OptInfoPtrVector() { size = 0; v = 0; };
20  OptInfoPtrVector(const OptInfoPtrVector& initial);
30  void resize(OptInfo* value);
36  void Delete(int pos);
41  int Size() const { return size; };
47  OptInfo*& operator [] (int pos) { return v[pos]; };
53  OptInfo* const& operator [] (int pos) const { return v[pos]; };
54 protected:
62  int size;
63 };
64 
65 #endif
This class implements a dynamic vector of OptInfo values.
Definition: optinfoptrvector.h:10
OptInfoPtrVector()
This is the default OptInfoPtrVector constructor.
Definition: optinfoptrvector.h:15
void resize(OptInfo *value)
This will add one new entry to the vector.
Definition: optinfoptrvector.cc:22
OptInfo *& operator[](int pos)
This will return the value of an element of the vector.
Definition: optinfoptrvector.h:47
void Delete(int pos)
This will delete an entry from the vector.
Definition: optinfoptrvector.cc:37
OptInfo ** v
This is the vector of OptInfo values.
Definition: optinfoptrvector.h:53
int Size() const
This will return the size of the vector.
Definition: optinfoptrvector.h:41
int size
This is the size of the vector.
Definition: optinfoptrvector.h:62
~OptInfoPtrVector()
This is the OptInfoPtrVector destructor.
Definition: optinfoptrvector.cc:15
This is the base class used to perform the optimisation calculation for the model.
Definition: optinfo.h:17