PortObject

Stores game information for a port laying on top of a tile.  Since the only important information for a port is what type of port it is, all other information for the PortObject is retrieved by querying its TileObject.

Derived From

BaseTiledObject

Project

ModelCore

Include

PortObject.h

Summary
Stores game information for a port laying on top of a tile.
The PortObject constructor.
Reads the port type value from the TileObject.
Resets the class name of the PortObject.
Provides the rotation of the PortObject.
Sets the rotation of the PortObject.

Public

Summary
The PortObject constructor.
Reads the port type value from the TileObject.
Resets the class name of the PortObject.
Provides the rotation of the PortObject.
Sets the rotation of the PortObject.

Constructors

PortObject

PortObject(const TileObject * const pTile = NULL)

The PortObject constructor.

Parameters

pTileA pointer to the TileObject the PortObject is built on and will refer to for game data.

Functions

type

const wxString &type() const

Reads the port type value from the TileObject.  The port type is needed for rendering the chip in OpenGL with the right texture.

Returns

A string containing the type of the PortObject.

Virtual Functions

name

virtual wxString name()

Resets the class name of the PortObject.

Returns

A const reference to a string containing the class name of the PortObject.

rotation

virtual float rotation() const

Provides the rotation of the PortObject.

Returns

The rotation of the PortObject.

rotation

virtual void rotation(const float val)

Sets the rotation of the PortObject.  This function is not implemented.  It is only declared to satisfy the requirements of IGameObject.

Parameters

valThe new rotation.
PortObject(const TileObject * const pTile = NULL)
The PortObject constructor.
const wxString &type() const
Reads the port type value from the TileObject.
Represents one hexagonally-shaped tile on the board.
virtual wxString name()
Resets the class name of the PortObject.
virtual float rotation() const
Provides the rotation of the PortObject.
Common base class for objects that lay on top of a tile.
ModelCore provides all of the data classes and associated helper classes and functions required to represent a complete game.
An interface for all game objects.