queso-0.53.0
|
Class for handling arrays of generic data. More...
#include <2dArrayOfStuff.h>
Public Member Functions | |
Constructor/Destructor methods | |
TwoDArray (unsigned int numRows, unsigned int numCols) | |
Default constructor. More... | |
~TwoDArray () | |
Destructor. More... | |
Attribute methods | |
unsigned int | numRows () const |
Number of rows in the array. More... | |
unsigned int | numCols () const |
Number of columns in the array. More... | |
void | setLocation (unsigned int i, unsigned int j, T *info) |
Sets the data in a specific location. More... | |
Accessor methods | |
T & | operator() (unsigned int i, unsigned int j) |
Returns data stored in a specific location (non-const). More... | |
const T & | operator() (unsigned int i, unsigned int j) const |
Returns data stored in a specific location (const). More... | |
Private Attributes | |
unsigned int | m_numRows |
unsigned int | m_numCols |
std::vector< std::vector< T * > * > | m_data |
Class for handling arrays of generic data.
This class handles array of generic data (doubles, ints, strings, structs, etc.).
Definition at line 39 of file 2dArrayOfStuff.h.
QUESO::TwoDArray< T >::TwoDArray | ( | unsigned int | numRows, |
unsigned int | numCols | ||
) |
Default constructor.
Definition at line 32 of file 2dArrayOfStuff.C.
References QUESO::TwoDArray< T >::m_data, QUESO::TwoDArray< T >::m_numCols, and QUESO::TwoDArray< T >::m_numRows.
QUESO::TwoDArray< T >::~TwoDArray | ( | ) |
unsigned int QUESO::TwoDArray< T >::numCols | ( | ) | const |
unsigned int QUESO::TwoDArray< T >::numRows | ( | ) | const |
T & QUESO::TwoDArray< T >::operator() | ( | unsigned int | i, |
unsigned int | j | ||
) |
Returns data stored in a specific location (non-const).
This non-const method returns the generic (templated) data that is stored the position (i,j)
of the array.
Definition at line 77 of file 2dArrayOfStuff.C.
References queso_require, and queso_require_less.
const T & QUESO::TwoDArray< T >::operator() | ( | unsigned int | i, |
unsigned int | j | ||
) | const |
Returns data stored in a specific location (const).
This const method returns the generic (templated) data that is stored the position (i,j)
of the array.
Definition at line 89 of file 2dArrayOfStuff.C.
References queso_require, and queso_require_less.
void QUESO::TwoDArray< T >::setLocation | ( | unsigned int | i, |
unsigned int | j, | ||
T * | info | ||
) |
Sets the data in a specific location.
This method sets the generic (templated) data info
, in the position (i,j)
of the array.
Definition at line 68 of file 2dArrayOfStuff.C.
References queso_require_msg.
|
private |
Definition at line 81 of file 2dArrayOfStuff.h.
Referenced by QUESO::TwoDArray< T >::TwoDArray().
|
private |
Definition at line 79 of file 2dArrayOfStuff.h.
Referenced by QUESO::TwoDArray< T >::TwoDArray().
|
private |
Definition at line 78 of file 2dArrayOfStuff.h.
Referenced by QUESO::TwoDArray< T >::TwoDArray().