All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Radiant::GridNoMemT< T > Class Template Reference

Grid base class without memory management This class will simply share the memory pointers with other objects. More...

#include <Radiant/Grid.hpp>

Public Member Functions

void clear ()
 Clears the internal variables. Does not release memory.
 
 GridNoMemT (T *data=0, unsigned w=0, unsigned h=0)
 Constructs a new grid with the given size. More...
 
template<class S >
 GridNoMemT (S &that)
 Constructs a shallow copy of the grid. More...
 
template<class S >
GridNoMemToperator= (S &that)
 Makes a shallow copy of the grid. More...
 

Protected Attributes

T * m_data
 Pointer to raw data.
 
unsigned m_height
 Height of the grid.
 
unsigned m_width
 Width of the grid.
 

Detailed Description

template<class T>
class Radiant::GridNoMemT< T >

Grid base class without memory management This class will simply share the memory pointers with other objects.

It is up the the user to ensure that the memory area is not invalidated while this object is being used.

Constructor & Destructor Documentation

template<class T >
Radiant::GridNoMemT< T >::GridNoMemT ( T *  data = 0,
unsigned  w = 0,
unsigned  h = 0 
)
inline

Constructs a new grid with the given size.

Parameters
dataGrid data
wWidth of the grid
hHeight of the grid
template<class T >
template<class S >
Radiant::GridNoMemT< T >::GridNoMemT ( S &  that)
inline

Constructs a shallow copy of the grid.

Parameters
thatObject to copy
Template Parameters
SType of target object

Member Function Documentation

template<class T >
template<class S >
GridNoMemT& Radiant::GridNoMemT< T >::operator= ( S &  that)
inline

Makes a shallow copy of the grid.

Parameters
thatObject to copy
Template Parameters
SType of target object