Public Member Functions | Private Member Functions | Private Attributes

util::Compact2D< T, DEBUG > Class Template Reference

Provides a 2D array of T which is compact in memory to optimize caches and memory allocations. More...

#include <util/compact.hpp>


Detailed Description

template<typename T, bool DEBUG = false>
class util::Compact2D< T, DEBUG >

Provides a 2D array of T which is compact in memory to optimize caches and memory allocations.

Parameters:
T type of the data stored
DEBUG if set to true, the bounds on the primary dimension will be checked

List of all members.

Public Member Functions

 Compact2D (int x, int y)
 build an array of size x times y
Toperator[] (int x)
const Toperator[] (int x) const
 ~Compact2D ()

Private Member Functions

 Compact2D ()
 this function is deactivated since it does not make sense
 Compact2D (const Compact2D &)
 this function is deactivated
const Compact2Doperator= (const Compact2D &)
 this function is deactivated

Private Attributes

int sizeX
int sizeY
Tdata

Constructor & Destructor Documentation

template<typename T , bool DEBUG = false>
util::Compact2D< T, DEBUG >::Compact2D (  )  [private]

this function is deactivated since it does not make sense

template<typename T , bool DEBUG = false>
util::Compact2D< T, DEBUG >::Compact2D ( const Compact2D< T, DEBUG > &   )  [private]

this function is deactivated

template<typename T , bool DEBUG>
util::Compact2D< T, DEBUG >::Compact2D ( int  x,
int  y 
)

build an array of size x times y

template<typename T , bool DEBUG>
util::Compact2D< T, DEBUG >::~Compact2D (  ) 

Member Function Documentation

template<typename T , bool DEBUG = false>
const Compact2D& util::Compact2D< T, DEBUG >::operator= ( const Compact2D< T, DEBUG > &   )  [private]

this function is deactivated

template<typename T , bool DEBUG>
const T * util::Compact2D< T, DEBUG >::operator[] ( int  x  )  const
template<typename T , bool DEBUG>
T * util::Compact2D< T, DEBUG >::operator[] ( int  x  ) 

Member Data Documentation

template<typename T , bool DEBUG = false>
T* util::Compact2D< T, DEBUG >::data [private]
template<typename T , bool DEBUG = false>
int util::Compact2D< T, DEBUG >::sizeX [private]
template<typename T , bool DEBUG = false>
int util::Compact2D< T, DEBUG >::sizeY [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines