Gadget
charptrmatrix.h
Go to the documentation of this file.
1 #ifndef charptrmatrix_h
2 #define charptrmatrix_h
3 
4 #include "intvector.h"
5 #include "charptrvector.h"
6 
12 public:
16  CharPtrMatrix() { nrow = 0; v = 0; };
26  void resize();
33  int Ncol(int i = 0) const { return v[i]->Size(); };
38  int Nrow() const { return nrow; };
44  CharPtrVector& operator [] (int pos) { return *v[pos]; };
50  const CharPtrVector& operator [] (int pos) const { return *v[pos]; };
51 protected:
55  int nrow;
60 };
61 
62 #endif
This class implements a dynamic vector of CharPtrVector values.
Definition: charptrmatrix.h:11
~CharPtrMatrix()
This is the CharPtrMatrix destructor.
Definition: charptrmatrix.cc:4
int Nrow() const
This will return the number of rows of the vector.
Definition: charptrmatrix.h:38
int Ncol(int i=0) const
This will return the number of columns in row i of the vector.
Definition: charptrmatrix.h:33
CharPtrMatrix()
This is the default CharPtrMatrix constructor.
Definition: charptrmatrix.h:16
CharPtrVector ** v
This is the vector of CharPtrVector values.
Definition: charptrmatrix.h:59
void resize()
This will add one new empty entry to the vector.
Definition: charptrmatrix.cc:14
CharPtrVector & operator[](int pos)
This will return the value of an element of the vector.
Definition: charptrmatrix.h:44
int nrow
This is number of rows of the vector.
Definition: charptrmatrix.h:50
This class implements a dynamic vector of char values.
Definition: charptrvector.h:8
int Size() const
This will return the size of the vector.
Definition: charptrvector.h:44