- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Utils::Containers::Vector2D< T > Class Template Reference

List of all members.

## Public Member Functions
| Vector2D ()
| constructor
| ~Vector2D ()
| destructor
| Vector2D (const Vector2D< T > &other)
| copy constructor
Vector2D< T > & | operator= (const Vector2D< T > &other)
| assignement operator
void | clear ()
| deletes all elements
unsigned int | addRow ()
unsigned int | addRows (unsigned int rcount)
void | deleteRow (unsigned int rrindex)
void | deleteRows (unsigned int fromindex, unsigned int thruindex)
unsigned int | size () const
| effects: Returns the number of rows (= number of columns) of this.
void | setSize (unsigned int size)
std::vector< T * > & | operator[] (unsigned int rrindex) const
## Protected Attributes
std::vector< std::vector< T * > * > | elements
| 2d vector of class pointers

## Detailed Description

### template<class T>
class Mers::Utils::Containers::Vector2D< T >

Definition at line 35 of file Vector2D.h.

## Member Function Documentation

template<class T>

unsigned int Mers::Utils::Containers::Vector2D< T >::addRow | ( |  | ) |

Appends an additional "row" of elements, and appends an additional element to each row (i.e. adds an additional "column").

Returns:
  the index corresponding the added row modifies: elements

Definition at line 179 of file Vector2D.h.

References Mers::Utils::Containers::Vector2D< T >::elements.

template<class T>

unsigned int Mers::Utils::Containers::Vector2D< T >::addRows | ( | unsigned int | rcount | ) |

requires: count > 0 effects: Appends count additional "rows" of elements, and appends count additional elements to each row (i.e. "columns"). Returns the index corresponding the last added row. modifies: elements

Definition at line 203 of file Vector2D.h.

References Mers::Utils::Containers::Vector2D< T >::elements.

template<class T>

void Mers::Utils::Containers::Vector2D< T >::deleteRow | ( | unsigned int | rrindex | ) |

requires: 0 <= index <= (# rows - 1) effects: Deletes the index-th row and the index-th element of every other row. modifies: elements

Definition at line 256 of file Vector2D.h.

References Mers::Utils::Containers::Vector2D< T >::elements, and Mers::Utils::Containers::Vector2D< T >::size().

Referenced by Mers::Utils::Containers::Vector2D< T >::deleteRows().

Here is the call graph for this function:

template<class T>

void Mers::Utils::Containers::Vector2D< T >::deleteRows | ( | unsigned int | fromindex,
|  | unsigned int | thruindex |
| ) |  |  |

requires: 0 <= fromindex <= thruindex <= (# rows - 1) effects: Deletes multiple rows and columns corresponding to the indices from fromindex through thruindex modifies: elements

Definition at line 314 of file Vector2D.h.

References Mers::Utils::Containers::Vector2D< T >::deleteRow(), and Mers::Utils::Containers::Vector2D< T >::elements.

Referenced by Mers::Utils::Containers::Vector2D< T >::clear().

Here is the call graph for this function:

template<class T>

void Mers::Utils::Containers::Vector2D< T >::setSize | ( | unsigned int | size | ) |

requires: 0 <= size effects: Increases or reduces this so that this becomes a size x size matrix; Rows and columns are added or deleted starting from the highest index first; modifies: elements

Definition at line 347 of file Vector2D.h.

References Mers::Utils::Containers::Vector2D< T >::elements.

Referenced by Mers::Utils::Containers::Vector2D< T >::operator=().

template<class T>

std::vector< T * > & Mers::Utils::Containers::Vector2D< T >::operator[] | ( | unsigned int | rrindex | ) | const

requires: 0 <= index <= (# rows - 1), and the returned reference is not used to modify this. effects: returns the index-th row of this (reference to).

Definition at line 393 of file Vector2D.h.

References Mers::Utils::Containers::Vector2D< T >::elements.

The documentation for this class was generated from the following file:

- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Containers/Vector2D.h