Object::Config Class Reference

Base config object for the objects in the matrix. More...

#include <Object.h>

Inheritance diagram for Object::Config:

EditableInWindowConfig BaseConfig ObjectAgent::Config ObjectFixed::Config ObjectTrail::Config ObjectTransferable::Config List of all members.

Public Member Functions

 Config (const string &imageFile, const Direction &objectDirection, const Object::Action &objectAction, const string &objectName, const string &objectDescription)
 Constructor - initialize whole object.
 Config (TiXmlElement *node)
 Constructs object using data from XML node.
virtual ~Config ()
 Destructor.
virtual TiXmlElement * CreateXmlNode () const =0
 Creates node representing the config.
virtual const string & GetObjectClassName () const =0
 Returns name of the class, object is supposed to construct.
const ActionGetAction () const
 Returns config's action.
void SetAction (Action newAction)
 Sets new config's action.
const DirectionGetDirection () const
 Returns config's direction.
void SetDirection (Direction newDirection)
 Sets new config's direction.
const GUI::ImageGetImage () const
 Gets config's image.
void ChangeImage (const string &newImageFileName)
 Changes config's image according to the selected filename.
const string & GetObjectName () const
 Gets config's name.
void SetObjectName (string newName)
 Sets new config's name.
const string & GetObjectDescription () const
 Gets config's description.
void SetObjectDescription (string newDescription)
 Sets new config's description.
virtual const wxColour * GetObjectTextColour () const =0
 Returns text colour of the object.

Protected Attributes

Direction direction
 Direction of the object.
Action action
 Action of the object.

Private Attributes

GUI::Image image
 Image that represents the object.
string name
 Name of the object.
string description
 Description of the object.

Detailed Description

Base config object for the objects in the matrix.

Every config that describes object in the matrix has to be derived from this class


Constructor & Destructor Documentation

Object::Config::Config ( const string &  imageFile,
const Direction objectDirection,
const Object::Action objectAction,
const string &  objectName,
const string &  objectDescription 
) [inline]

Constructor - initialize whole object.

Parameters:
imageFile File containing image
objectDirection Starting direction
objectAction Starting action
objectName contains name of the object
objectDescription contains description of the object

Object::Config::Config ( TiXmlElement *  node  )  [explicit]

Constructs object using data from XML node.

Reimplemented in ObjectAgent::Config, ObjectFixed::Config, ObjectTrail::Config, and ObjectTransferable::Config.

virtual Object::Config::~Config (  )  [inline, virtual]

Destructor.

Reimplemented in ObjectAgent::Config, ObjectFixed::Config, ObjectTrail::Config, and ObjectTransferable::Config.


Member Function Documentation

void Object::Config::ChangeImage ( const string &  newImageFileName  )  [inline]

Changes config's image according to the selected filename.

Parameters:
newImageFileName File name of the file containing new image

virtual TiXmlElement* Object::Config::CreateXmlNode (  )  const [pure virtual]

Creates node representing the config.

Implements BaseConfig.

Implemented in ObjectAgent::Config, ObjectFixed::Config, ObjectTrail::Config, and ObjectTransferable::Config.

const Action& Object::Config::GetAction (  )  const [inline]

Returns config's action.

const Direction& Object::Config::GetDirection (  )  const [inline]

Returns config's direction.

const GUI::Image& Object::Config::GetImage (  )  const [inline]

Gets config's image.

virtual const string& Object::Config::GetObjectClassName (  )  const [pure virtual]

Returns name of the class, object is supposed to construct.

Implemented in ObjectAgent::Config, ObjectFixed::Config, ObjectTrail::Config, and ObjectTransferable::Config.

const string& Object::Config::GetObjectDescription (  )  const [inline]

Gets config's description.

const string& Object::Config::GetObjectName (  )  const [inline]

Gets config's name.

virtual const wxColour* Object::Config::GetObjectTextColour (  )  const [pure virtual]

Returns text colour of the object.

This can be used to make differences between objects on the text level.

Implemented in ObjectAgent::Config, ObjectFixed::Config, ObjectTrail::Config, and ObjectTransferable::Config.

void Object::Config::SetAction ( Action  newAction  )  [inline]

Sets new config's action.

Parameters:
newAction New action that has to be set

void Object::Config::SetDirection ( Direction  newDirection  )  [inline]

Sets new config's direction.

Parameters:
newDirection New direction that has to be set

void Object::Config::SetObjectDescription ( string  newDescription  )  [inline]

Sets new config's description.

Parameters:
newDescription New description that has to be set

void Object::Config::SetObjectName ( string  newName  )  [inline]

Sets new config's name.

Parameters:
newName New name that has to be set


Member Data Documentation

Action Object::Config::action [protected]

Action of the object.

string Object::Config::description [private]

Description of the object.

Direction Object::Config::direction [protected]

Direction of the object.

GUI::Image Object::Config::image [private]

Image that represents the object.

string Object::Config::name [private]

Name of the object.


The documentation for this class was generated from the following files:
Generated on Sun Apr 29 11:46:11 2007 for IPP/ICP2007 by  doxygen 1.4.7