|
queso-0.51.1
|
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 80 of file 2dArrayOfStuff.C.
References UQ_FATAL_TEST_MACRO, and QUESO::UQ_UNAVAILABLE_RANK.
| 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 93 of file 2dArrayOfStuff.C.
References UQ_FATAL_TEST_MACRO, and QUESO::UQ_UNAVAILABLE_RANK.
| 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 UQ_FATAL_TEST_MACRO, and QUESO::UQ_UNAVAILABLE_RANK.
|
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().