25 #include <queso/Defines.h>
26 #include <queso/2dArrayOfStuff.h>
35 m_data (m_numRows,NULL)
37 for (
unsigned int i = 0; i <
m_numRows; ++i) {
46 for (
unsigned int i = 0; i < m_numRows; ++i) {
47 for (
unsigned int j = 0; j < m_numCols; ++j) {
48 if ((*(m_data[i]))[j] != NULL)
delete (*(m_data[i]))[j];
70 queso_require_msg(!((i >= m_numRows) || (j >= m_numCols) || (m_data[i] == NULL)),
"invalid situation");
71 (*(m_data[i]))[j] = info;
85 return *(*(m_data[i]))[j];
97 return *(*(m_data[i]))[j];
TwoDArray(unsigned int numRows, unsigned int numCols)
Default constructor.
unsigned int numCols() const
Number of columns in the array.
#define queso_require_msg(asserted, msg)
#define queso_require(asserted)
std::vector< std::vector< T * > * > m_data
#define queso_require_less(expr1, expr2)
T & operator()(unsigned int i, unsigned int j)
Returns data stored in a specific location (non-const).
void setLocation(unsigned int i, unsigned int j, T *info)
Sets the data in a specific location.
unsigned int numRows() const
Number of rows in the array.