Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Annotation of /trunk/gadget/tagptrvector.h
[mareframe] / trunk / gadget / tagptrvector.h Repository:
ViewVC logotype

Annotation of /trunk/gadget/tagptrvector.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef tagptrvector_h
2 :     #define tagptrvector_h
3 :    
4 :     #include "tags.h"
5 :    
6 :     class Tags;
7 :    
8 :     /**
9 :     * \class TagPtrVector
10 :     * \brief This class implements a dynamic vector of Tags values
11 :     */
12 :     class TagPtrVector {
13 :     public:
14 :     /**
15 :     * \brief This is the default TagPtrVector constructor
16 :     */
17 :     TagPtrVector() { size = 0; v = 0; };
18 :     /**
19 :     * \brief This is the TagPtrVector constructor that creates a copy of an existing TagPtrVector
20 :     * \param initial is the TagPtrVector to copy
21 :     */
22 :     TagPtrVector(const TagPtrVector& initial);
23 :     /**
24 :     * \brief This is the TagPtrVector destructor
25 :     * \note This will free all the memory allocated to all the elements of the vector
26 :     */
27 :     ~TagPtrVector();
28 :     /**
29 :     * \brief This will add one new entry to the vector
30 :     * \param value is the value that will be entered for the new entry
31 :     */
32 :     void resize(Tags* value);
33 :     /**
34 :     * \brief This will delete an entry from the vector
35 :     * \param pos is the element of the vector to be deleted
36 :     * \note This will free the memory allocated to the deleted element of the vector
37 :     */
38 :     void Delete(int pos);
39 :     /**
40 :     * \brief This will return the size of the vector
41 :     * \return the size of the vector
42 :     */
43 :     int Size() const { return size; };
44 :     /**
45 :     * \brief This will return the value of an element of the vector
46 :     * \param pos is the element of the vector to be returned
47 :     * \return the value of the specified element
48 :     */
49 :     Tags*& operator [] (int pos) { return v[pos]; };
50 :     /**
51 :     * \brief This will return the value of an element of the vector
52 :     * \param pos is the element of the vector to be returned
53 :     * \return the value of the specified element
54 :     */
55 :     Tags* const& operator [] (int pos) const { return v[pos]; };
56 :     /**
57 :     * \brief This function will update all the elements of the vector for the current timestep
58 :     * \param TimeInfo is the TimeClass for the current model
59 :     */
60 :     void updateTags(const TimeClass* const TimeInfo);
61 :     /**
62 :     * \brief This function will delete all the tagging experiments from the vector that have expired for the current timestep
63 :     * \param TimeInfo is the TimeClass for the current model
64 :     */
65 :     void deleteTags(const TimeClass* const TimeInfo);
66 :     /**
67 :     * \brief This function will delete all the tagging experiments from the vector
68 :     */
69 :     void deleteAllTags();
70 :     /**
71 :     * \brief This function will delete all the elements of the vector
72 :     */
73 :     void deleteAll();
74 :     protected:
75 :     /**
76 :     * \brief This is the vector of Tags values
77 :     */
78 :     Tags** v;
79 :     /**
80 :     * \brief This is the size of the vector
81 :     */
82 :     int size;
83 :     };
84 :    
85 :     #endif

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge