Gadget
tagptrvector.h
Go to the documentation of this file.
1 #ifndef tagptrvector_h
2 #define tagptrvector_h
3 
4 #include "tags.h"
5 
6 class Tags;
7 
12 class TagPtrVector {
13 public:
17  TagPtrVector() { size = 0; v = 0; };
22  TagPtrVector(const TagPtrVector& initial);
27  ~TagPtrVector();
32  void resize(Tags* value);
38  void Delete(int pos);
43  int Size() const { return size; };
49  Tags*& operator [] (int pos) { return v[pos]; };
55  Tags* const& operator [] (int pos) const { return v[pos]; };
60  void updateTags(const TimeClass* const TimeInfo);
65  void deleteTags(const TimeClass* const TimeInfo);
69  void deleteAllTags();
73  void deleteAll();
74 protected:
78  Tags** v;
82  int size;
83 };
84 
85 #endif
This class implements a dynamic vector of Tags values.
Definition: tagptrvector.h:12
TagPtrVector()
This is the default TagPtrVector constructor.
Definition: tagptrvector.h:17
int size
This is the size of the vector.
Definition: tagptrvector.h:82
int Size() const
This will return the size of the vector.
Definition: tagptrvector.h:43
void deleteTags(const TimeClass *const TimeInfo)
This function will delete all the tagging experiments from the vector that have expired for the curre...
Definition: tagptrvector.cc:64
void Delete(int pos)
This will delete an entry from the vector.
Definition: tagptrvector.cc:37
Tags *& operator[](int pos)
This will return the value of an element of the vector.
Definition: tagptrvector.h:49
void deleteAllTags()
This function will delete all the tagging experiments from the vector.
Definition: tagptrvector.cc:73
void updateTags(const TimeClass *const TimeInfo)
This function will update all the elements of the vector for the current timestep.
Definition: tagptrvector.cc:55
~TagPtrVector()
This is the TagPtrVector destructor.
Definition: tagptrvector.cc:15
Tags ** v
This is the vector of Tags values.
Definition: tagptrvector.h:78
void deleteAll()
This function will delete all the elements of the vector.
Definition: tagptrvector.cc:79
void resize(Tags *value)
This will add one new entry to the vector.
Definition: tagptrvector.cc:22
Definition: tags.h:17
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87