HexObject

A base class for objects that sit on hexes directly.  There are several GameObjects such as the robber, pirate, merchant, etc., which sit on a hex directly.  HexObject provides a base class for them all since they share much in common.

Derived From

GameObject

Project

ModelCore

Include

HexObject.h

Summary
A base class for objects that sit on hexes directly.
The HexObject destructor.
Sets the tile the object is on.
Returns the tile the object is on.
Loads a HexObject from an input stream.
Writes a HexObject to an output stream.
The HexObject constructor.
The tile the object is on.

Public

Summary
The HexObject destructor.
Sets the tile the object is on.
Returns the tile the object is on.
Loads a HexObject from an input stream.
Writes a HexObject to an output stream.

Destructor

~HexObject

virtual ~HexObject()=0

The HexObject destructor.  It is pure virtual because this class must be derived from to be used.

Functions

tile

void tile(wxInt32 tile)

Sets the tile the object is on.

Parameters

tileThe new tile for the object.

tile

wxInt32 tile() const

Returns the tile the object is on.

Returns

The tile the object is on.

Virtual Functions

load

virtual void load(wxDataInputStream &stream)

Loads a HexObject from an input stream.

Parameters

streamThe input stream.

save

virtual void save(wxDataOutputStream &stream) const

Writes a HexObject to an output stream.

Parameters

streamThe output stream.

Protected

Summary
The HexObject constructor.

Constructor

HexObject

HexObject(const wxInt32 tile)

The HexObject constructor.  Sets the tile the object is on to the given tile.

Parameters

tileThe tile the object is on.

Private

Summary
The tile the object is on.

Variables

mTile

wxInt32 mTile

The tile the object is on.

virtual ~HexObject()=0
The HexObject destructor.
void tile(wxInt32 tile)
Sets the tile the object is on.
virtual void load(wxDataInputStream &stream)
Loads a HexObject from an input stream.
virtual void save(wxDataOutputStream &stream) const
Writes a HexObject to an output stream.
HexObject(const wxInt32 tile)
The HexObject constructor.
wxInt32 mTile
The tile the object is on.
A default implementation of the IGameObject interface.
ModelCore provides all of the data classes and associated helper classes and functions required to represent a complete game.