Hosting courtesy of Sourceforge

SourceForge Logo
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Game::MapLocation Class Reference

#include <MapLocation.h>

Inheritance diagram for Game::MapLocation:

Inheritance graph
[legend]
Collaboration diagram for Game::MapLocation:

Collaboration graph
[legend]
List of all members.

Public Methods

 MapLocation (int x, int y)
int getMapX () const
int getMapY () const
bool operator< (const MapLocation &other) const
bool operator== (const MapLocation &other) const

Detailed Description

Class that stores X and Y coordinate on the map, as well as provides comparasion operators for better suitability for STL-style containers

Definition at line 37 of file MapLocation.h.


Constructor & Destructor Documentation

MapLocation::MapLocation  
 

Definition at line 102 of file MapLocation.cpp.

MapLocation::MapLocation int    x_,
int    y_
 

Parameters:
x  x coordinate of map (not pixel position)
y  y coordinate of map (not pixel position)

Definition at line 107 of file MapLocation.cpp.

MapLocation::MapLocation const MapLocation &    other
 

Definition at line 97 of file MapLocation.cpp.


Member Function Documentation

int MapLocation::getMapX   const
 

Returns:
x component of location on map

Definition at line 123 of file MapLocation.cpp.

int MapLocation::getMapY   const
 

Returns:
y component of location on map

Definition at line 127 of file MapLocation.cpp.

Parse::Parser * MapLocation::makeParserToParseMe std::istream &    input [virtual]
 

Reimplemented from Parse::Parseable.

Definition at line 72 of file MapLocation.cpp.

bool MapLocation::operator< const MapLocation &    other const
 

Compares two MapLocations. Useful for ordering sets of MapLocations. if a == b, then a < b is false, as to be expected

Definition at line 112 of file MapLocation.cpp.

bool MapLocation::operator== const MapLocation &    other const
 

Returns:
other.getMapX() == getMapX() && other.getMapY() == getMapY()

Definition at line 119 of file MapLocation.cpp.


Member Data Documentation

int Game::MapLocation::x [protected]
 

Definition at line 62 of file MapLocation.h.

int Game::MapLocation::y [protected]
 

Definition at line 63 of file MapLocation.h.


The documentation for this class was generated from the following files:
Generated on Tue May 21 07:26:53 2002 for BomberLAN by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001