Pyrogenesis  trunk
Public Member Functions | Public Attributes | List of all members
Grid< T > Class Template Reference

Basic 2D array, intended for storing tile data, plus support for lazy updates by ICmpObstructionManager. More...

#include <ICmpPathfinder.h>

Collaboration diagram for Grid< T >:
Collaboration graph
[legend]

Public Member Functions

 Grid ()
 
 Grid (u16 w, u16 h)
 
 Grid (const Grid &g)
 
Gridoperator= (const Grid &g)
 
void swap (Grid &g)
 
 ~Grid ()
 
void reset ()
 
void add (const Grid &g)
 
void set (int i, int j, const T &value)
 
Tget (int i, int j) const
 

Public Attributes

u16 m_W
 
u16 m_H
 
Tm_Data
 
size_t m_DirtyID
 

Detailed Description

template<typename T>
class Grid< T >

Basic 2D array, intended for storing tile data, plus support for lazy updates by ICmpObstructionManager.

T must be a POD type that can be initialised with 0s.

Constructor & Destructor Documentation

template<typename T>
Grid< T >::Grid ( )
inline
template<typename T>
Grid< T >::Grid ( u16  w,
u16  h 
)
inline
template<typename T>
Grid< T >::Grid ( const Grid< T > &  g)
inline
template<typename T>
Grid< T >::~Grid ( )
inline

Member Function Documentation

template<typename T>
void Grid< T >::add ( const Grid< T > &  g)
inline
template<typename T>
T& Grid< T >::get ( int  i,
int  j 
) const
inline
template<typename T>
Grid& Grid< T >::operator= ( const Grid< T > &  g)
inline
template<typename T>
void Grid< T >::reset ( )
inline
template<typename T>
void Grid< T >::set ( int  i,
int  j,
const T value 
)
inline
template<typename T>
void Grid< T >::swap ( Grid< T > &  g)
inline

Member Data Documentation

template<typename T>
T* Grid< T >::m_Data
template<typename T>
size_t Grid< T >::m_DirtyID
template<typename T>
u16 Grid< T >::m_H
template<typename T>
u16 Grid< T >::m_W

The documentation for this class was generated from the following files: