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

Annotation of /trunk/gadget/addresskeepermatrix.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

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

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

Powered By FusionForge