BWAPI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Util::RectangleArray< Type > Class Template Reference

#include <RectangleArray.h>

List of all members.

Public Member Functions

 RectangleArray (unsigned int width=1, unsigned int height=1, Type *data=NULL)
 RectangleArray (const RectangleArray< Type > &rectangleArray)
 ~RectangleArray (void)
unsigned int getWidth (void) const
unsigned int getHeight (void) const
Type * getItem (unsigned int x, unsigned int y)
Type * operator[] (int i)
Type const *const operator[] (int i) const
void setItem (unsigned int x, unsigned int y, Type *item)
void resize (unsigned int width, unsigned int height)
void printToFile (FILE *f)
void saveToFile (const std::string &fileName)
void setTo (const Type &value)
void setBorderTo (const Type &value)

Detailed Description

template<class Type>
class Util::RectangleArray< Type >

Template used for work with dynamically initialized array with dimension 2.


Constructor & Destructor Documentation

template<class Type>
Util::RectangleArray< Type >::RectangleArray ( unsigned int  width = 1,
unsigned int  height = 1,
Type *  data = NULL 
)

Creates the array with the specified proportions.

Parameters:
widthWidth of the new array.
heightHeight of the new array.
template<class Type>
Util::RectangleArray< Type >::RectangleArray ( const RectangleArray< Type > &  rectangleArray)

Copy constructor

Here is the call graph for this function:

template<class Type >
Util::RectangleArray< Type >::~RectangleArray ( void  )

Destorys the array and deletes all content of array.


Member Function Documentation

template<class Type >
unsigned int Util::RectangleArray< Type >::getHeight ( void  ) const

Gets the height of the array.

Returns:
height of the array.

Here is the caller graph for this function:

template<class Type >
Type * Util::RectangleArray< Type >::getItem ( unsigned int  x,
unsigned int  y 
)

Gets item of the array on the specified position.

Parameters:
xhorizontal index of the array position.
yvertical index of the array position.
Returns:
item on the specified position.
template<class Type >
unsigned int Util::RectangleArray< Type >::getWidth ( void  ) const

Gets the width of the array.

Returns:
width of the array.

Here is the caller graph for this function:

template<class Type>
Type* Util::RectangleArray< Type >::operator[] ( int  i) [inline]
template<class Type>
Type const* const Util::RectangleArray< Type >::operator[] ( int  i) const [inline]
template<class Type >
void Util::RectangleArray< Type >::printToFile ( FILE *  f)
template<class Type >
void Util::RectangleArray< Type >::resize ( unsigned int  width,
unsigned int  height 
)

Here is the caller graph for this function:

template<class Type >
void Util::RectangleArray< Type >::saveToFile ( const std::string &  fileName)
template<class Type>
void Util::RectangleArray< Type >::setBorderTo ( const Type &  value)
template<class Type>
void Util::RectangleArray< Type >::setItem ( unsigned int  x,
unsigned int  y,
Type *  item 
)

Sets item of the array on the specified position.

Parameters:
xhorizontal index of the array position.
yvertical index of the array position.
itemnew value of the field.
template<class Type>
void Util::RectangleArray< Type >::setTo ( const Type &  value)

Sets all fields of the array to the specified value

Here is the caller graph for this function:


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