OSDL::Rendering::TileMap Class Reference

A tilemap is a (rectangular) array of index to tile definitions. More...

#include <OSDLTileMap.h>

List of all members.

Public Member Functions

 TileMap (TileCount width, TileCount height, Ceylan::System::File &mapFile)
 Constructs a new tilemap with specified dimensions, the map itself being read from specified file.
virtual ~TileMap () throw ()
 Virtual destructor.
virtual const std::string toString (Ceylan::VerbosityLevels level=Ceylan::high) const
 Returns an user-friendly description of the state of this object.

Protected Attributes

TileCount _width
 The width, in tiles, of this rectangular tile map.
TileCount _height
 The height, in tiles, of this rectangular tile map.
TileNumber _size
 Number of tile index for this map.
TileIndex_map
 The internal tile map (1D array of tile index).

Private Member Functions

 TileMap (const TileMap &source)
 Copy constructor made private to ensure that it will never be called.
TileMapoperator= (const TileMap &source)
 Assignment operator made private to ensure that it will never be called.

Detailed Description

A tilemap is a (rectangular) array of index to tile definitions.

Definition at line 126 of file OSDLTileMap.h.


Constructor & Destructor Documentation

TileMap::TileMap ( TileCount  width,
TileCount  height,
Ceylan::System::File &  mapFile 
)

Constructs a new tilemap with specified dimensions, the map itself being read from specified file.

Parameters:
width the width, in tiles, of the map.
height the height, in tiles, of the map.
mapFile a file whose read pointer is set at the beginning of a serialized tile map of the specified dimensions. Ownership is not taken, after this constructor the file read pointer will just be advanced just after the read tilemap.
Exceptions:
TileMapException if the operation failed, including if the appropriate data could not be read from file.

Definition at line 71 of file OSDLTileMap.cc.

References _map, and _size.

TileMap::~TileMap (  )  throw () [virtual]

Virtual destructor.

Definition at line 104 of file OSDLTileMap.cc.

References _map.

OSDL::Rendering::TileMap::TileMap ( const TileMap source  )  [private]

Copy constructor made private to ensure that it will never be called.

The compiler should complain whenever this undefined constructor is called, implicitly or not.


Member Function Documentation

TileMap& OSDL::Rendering::TileMap::operator= ( const TileMap source  )  [private]

Assignment operator made private to ensure that it will never be called.

The compiler should complain whenever this undefined operator is called, implicitly or not.

const string TileMap::toString ( Ceylan::VerbosityLevels  level = Ceylan::high  )  const [virtual]

Returns an user-friendly description of the state of this object.

Parameters:
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
Ceylan::TextDisplayable

Definition at line 114 of file OSDLTileMap.cc.

References _height, and _width.


Member Data Documentation

The height, in tiles, of this rectangular tile map.

Definition at line 193 of file OSDLTileMap.h.

Referenced by toString().

The internal tile map (1D array of tile index).

Definition at line 206 of file OSDLTileMap.h.

Referenced by TileMap(), and ~TileMap().

Number of tile index for this map.

Note:
Cached value for better performance.

Definition at line 202 of file OSDLTileMap.h.

Referenced by TileMap().

The width, in tiles, of this rectangular tile map.

Definition at line 189 of file OSDLTileMap.h.

Referenced by toString().


The documentation for this class was generated from the following files:
Generated on Mon Nov 29 14:05:58 2010 for OSDL by  doxygen 1.6.3