Bitstream Interpretation Library (BIL)  0.1
Public Member Functions
bil::TileLookup2D Class Reference

A 2-dimensional lookup for tiles. More...

#include <xdlrc/util/TileLookup2D.hpp>

List of all members.

Public Member Functions

 TileLookup2D ()
 Constructs a new TileLookup2D instance.
unsigned rowCount () const
 Gets the number of tile rows.
unsigned columnCount () const
 Gets the number of tile columns.
const Tilelookup (unsigned row, unsigned column) const
 Gets the tile at specified position read only.
void reset (const Device &device)
 Rebuilds the lookup.
void clear ()
 Empties the lookup.

Detailed Description

A 2-dimensional lookup for tiles.

This class helps for fast look up of tiles inside a Device instance by their row and column position. It is a simple read-only lookup, and if the tiles are changed from outside, the lookup must be rebuild in order to work correct.

Definition at line 28 of file TileLookup2D.hpp.


Constructor & Destructor Documentation

TileLookup2D::TileLookup2D ( )

Constructs a new TileLookup2D instance.

Definition at line 12 of file TileLookup2D.cpp.


Member Function Documentation

unsigned TileLookup2D::rowCount ( ) const

Gets the number of tile rows.

Returns:
The row count.

Definition at line 21 of file TileLookup2D.cpp.

unsigned TileLookup2D::columnCount ( ) const

Gets the number of tile columns.

Returns:
The column count.

Definition at line 27 of file TileLookup2D.cpp.

const Tile * TileLookup2D::lookup ( unsigned  row,
unsigned  column 
) const

Gets the tile at specified position read only.

Parameters:
rowRow of tile.
columnColumn of tile.
Returns:
Pointer to tile, if there is a tile at that position.

Definition at line 33 of file TileLookup2D.cpp.

void TileLookup2D::reset ( const Device device)

Rebuilds the lookup.

Parameters:
deviceThe device instance which tiles will be used.

Definition at line 41 of file TileLookup2D.cpp.

void TileLookup2D::clear ( )

Empties the lookup.

Definition at line 65 of file TileLookup2D.cpp.


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