9#ifndef CMatrixTemplateObjects_H
10#define CMatrixTemplateObjects_H
48 for (
size_t i=0; i < CMatrixTemplate<T*>::getRowCount(); i++)
49 for (
size_t j=0; j < CMatrixTemplate<T*>::getColCount(); j++)
55 virtual void setSize(
size_t row,
size_t col)
73 for (
size_t i=0; i < CMatrixTemplate<T*>::getRowCount(); i++)
74 for (
size_t j=0; j < CMatrixTemplate<T*>::getColCount(); j++)
88 for (
size_t i=0; i < CMatrixTemplate<T*>::getRowCount(); i++)
89 for (
size_t j=0; j < CMatrixTemplate<T*>::getColCount(); j++)
107 for (
size_t i=0; i < CMatrixTemplate<T*>::getRowCount(); i++)
108 for (
size_t j=0; j < CMatrixTemplate<T*>::getColCount(); j++)
This template class provides the basic functionality for a general 2D any-size, resizable container o...
void realloc(size_t row, size_t col, bool newElementsToZero=false)
Internal use only: It reallocs the memory for the 2D matrix, maintaining the previous contents if pos...
size_t getColCount() const
Number of columns in the matrix.
size_t getRowCount() const
Number of rows in the matrix.
This template class extends the class "CMatrixTemplate" for storing "objects" at each matrix entry.
void freeAllObjects()
Delete all the objects in the matrix and set all entries to NULL pointers.
CMatrixTemplateObjects(const CMatrixTemplate< T > &m)
Copy constructor.
void setDestroyBehavior(bool freeObjects=true)
Sets the behavior on matrix destroy.
void allocAllObjects()
Alloc memory for all the non-NULL entries in the matrix.
virtual ~CMatrixTemplateObjects()
Destructor.
CMatrixTemplateObjects & operator=(const CMatrixTemplateObjects &m)
Assignment operator.
CMatrixTemplateObjects(size_t row=3, size_t col=3)
Constructor.
virtual void setSize(size_t row, size_t col)
Changes the size of matrix.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.