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/addresskeepervector.h
[mareframe] / trunk / gadget / addresskeepervector.h Repository:
ViewVC logotype

Annotation of /trunk/gadget/addresskeepervector.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef addresskeepervector_h
2 :     #define addresskeepervector_h
3 :    
4 :     #include "addresskeeper.h"
5 :    
6 :     /**
7 :     * \class AddressKeeperVector
8 :     * \brief This class implements a dynamic vector of AddressKeeper values
9 :     */
10 :     class AddressKeeperVector {
11 :     public:
12 :     /**
13 :     * \brief This is the default AddressKeeperVector constructor
14 :     */
15 :     AddressKeeperVector() { size = 0; v = 0; };
16 :     /**
17 :     * \brief This is the AddressKeeperVector destructor
18 :     * \note This will free all the memory allocated to all the elements of the vector
19 :     */
20 :     ~AddressKeeperVector();
21 :     /**
22 :     * \brief This will add one new empty entry to the vector
23 :     * \note The new element of the vector will be created, and set to zero
24 :     */
25 :     void resize();
26 :     /**
27 :     * \brief This will delete an entry from the vector
28 :     * \param pos is the element of the vector to be deleted
29 :     * \note This will free the memory allocated to the deleted element of the vector
30 :     */
31 :     void Delete(int pos);
32 :     /**
33 :     * \brief This will return the size of the vector
34 :     * \return the size of the vector
35 :     */
36 :     int Size() const { return size; };
37 :     /**
38 :     * \brief This will return the value of an element of the vector
39 :     * \param pos is the element of the vector to be returned
40 :     * \return the value of the specified element
41 :     */
42 :     AddressKeeper& operator [] (int pos) { return v[pos]; };
43 :     /**
44 :     * \brief This will return the value of an element of the vector
45 :     * \param pos is the element of the vector to be returned
46 :     * \return the value of the specified element
47 :     */
48 :     const AddressKeeper& operator [] (int pos) const { return v[pos]; };
49 :     protected:
50 :     /**
51 :     * \brief This is the vector of AddressKeeper values
52 :     */
53 :     AddressKeeper* v;
54 :     /**
55 :     * \brief This is the size of the vector
56 :     */
57 :     int size;
58 :     };
59 :    
60 :     #endif

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

Powered By FusionForge