Direction Class Reference

#include <Direction.h>

List of all members.


Detailed Description

Definition at line 6 of file Direction.h.

Public Member Functions

bool isCardinal () const
const Pointoffset () const
bool operator< (const Direction &dir) const
bool operator== (const Direction &dir) const
const Directionopposite () const
 ~Direction ()

Static Public Member Functions

static vector< const Direction * > getAllDirections ()

Static Public Attributes

static Direction E
static Direction N
static Direction NE
static Direction NW
static Direction S
static Direction SE
static Direction SW
static Direction W

Private Member Functions

 Direction (int x, int y, Direction &opp, bool cardinal)

Private Attributes

bool _cardinal
Point _offset
Direction_opposite


Constructor & Destructor Documentation

Direction::~Direction (  ) 

Definition at line 21 of file Direction.cpp.

Direction::Direction ( int  x,
int  y,
Direction opp,
bool  cardinal 
) [private]

Definition at line 12 of file Direction.cpp.


Member Function Documentation

vector< const Direction * > Direction::getAllDirections (  )  [static]

Definition at line 25 of file Direction.cpp.

References E, N, NE, NW, S, SE, SW, and W.

Referenced by Unit::computeMovePathHelper(), Map::populateTileNeighbors(), and Unit::updatePossibleMoves().

Here is the caller graph for this function:

bool Direction::isCardinal (  )  const

Definition at line 53 of file Direction.cpp.

References _cardinal.

const Point & Direction::offset (  )  const

Definition at line 43 of file Direction.cpp.

References _offset.

Referenced by operator<().

Here is the caller graph for this function:

bool Direction::operator< ( const Direction dir  )  const

Definition at line 58 of file Direction.cpp.

References offset().

Here is the call graph for this function:

bool Direction::operator== ( const Direction dir  )  const

Definition at line 74 of file Direction.cpp.

References _offset.

const Direction & Direction::opposite (  )  const

Definition at line 48 of file Direction.cpp.

References _opposite.


Member Data Documentation

bool Direction::_cardinal [private]

Definition at line 34 of file Direction.h.

Referenced by isCardinal().

Point Direction::_offset [private]

Definition at line 32 of file Direction.h.

Referenced by offset(), and operator==().

Direction* Direction::_opposite [private]

Definition at line 33 of file Direction.h.

Referenced by opposite().

Direction Direction::E [static]

Definition at line 13 of file Direction.h.

Referenced by Unit::canMoveInDirection(), getAllDirections(), and MainGameState::processSDLEvent().

Direction Direction::N [static]

Definition at line 11 of file Direction.h.

Referenced by Unit::canMoveInDirection(), getAllDirections(), and MainGameState::processSDLEvent().

Direction Direction::NE [static]

Definition at line 12 of file Direction.h.

Referenced by Unit::canMoveInDirection(), Wall::draw(), getAllDirections(), Map::load(), and MainGameState::processSDLEvent().

Direction Direction::NW [static]

Definition at line 18 of file Direction.h.

Referenced by Unit::canMoveInDirection(), Wall::draw(), getAllDirections(), Map::load(), and MainGameState::processSDLEvent().

Direction Direction::S [static]

Definition at line 15 of file Direction.h.

Referenced by Unit::canMoveInDirection(), getAllDirections(), and MainGameState::processSDLEvent().

Direction Direction::SE [static]

Definition at line 14 of file Direction.h.

Referenced by Unit::canMoveInDirection(), Wall::draw(), getAllDirections(), Map::load(), and MainGameState::processSDLEvent().

Direction Direction::SW [static]

Definition at line 16 of file Direction.h.

Referenced by Unit::canMoveInDirection(), Wall::draw(), getAllDirections(), Map::load(), and MainGameState::processSDLEvent().

Direction Direction::W [static]

Definition at line 17 of file Direction.h.

Referenced by Unit::canMoveInDirection(), getAllDirections(), and MainGameState::processSDLEvent().


The documentation for this class was generated from the following files:
Generated on Fri Sep 22 06:00:26 2006 for X-CLONE by  doxygen 1.4.7