ObjectAgent::Config Class Reference

Config object for agents in the matrix. More...

#include <ObjectAgent.h>

Inheritance diagram for ObjectAgent::Config:

Object::Config EditableInWindowConfig BaseConfig List of all members.

Public Member Functions

 Config (const string &imageFile, const Direction &objectDirection, const Action &objectAction, const string &objectName, const string &objectDescription, ObjectTransferable::Config *carryingObjectConfig, const string &trailImageFileName, const ObjectTrail::DurationSize &trailDuration, ObjectAgent::Behavior behavior)
 Constructor - initialize whole object.
 Config (TiXmlElement *node)
 Constructs object using data from XML node.
virtual ~Config ()
 Destructor.
virtual void ShowEditationWindow (wxWindow *parent, bool waitUntilClosed=true)
 Shows editation window where the user can edit the config.
virtual TiXmlElement * CreateXmlNode () const
 Creates node representing the config.
const ObjectTransferable::ConfigGetCarryingObjectConfig () const
 Returns config of the carrying Object.
virtual const string & GetObjectClassName () const
 Returns name of the class, object is supposed to construct.
const string & GetTrailImageFileName () const
 Returns image file name of the trail.
void ChangeTrailImage (const string &newTrailImageFileName)
 Changes image of the agent's trail according to the selected filename.
ObjectTrail::DurationSize GetTrailDuration () const
 Returns trail duration.
void SetTrailDuration (ObjectTrail::DurationSize newDuration)
 Sets new trail duration.
const ObjectAgent::BehaviorGetBehavior () const
 Returns agent's behavior.
void ChangeBehavior (const ObjectAgent::Behavior &newBehavior)
 Returns agent's behavior.
virtual const wxColour * GetObjectTextColour () const
 Returns text colour of the object.

Static Public Member Functions

static ObjectTrail::DurationSize GetDurationSizeMin ()
 Returns minimal duration size.
static ObjectTrail::DurationSize GetDurationSizeMax ()
 Returns max duration size.

Private Attributes

ObjectTransferable::ConfigcarryingObjConfig
 Config with the object agent is carrying.
GUI::Image trailImage
 Picture of the trail.
ObjectTrail::DurationSize trailDurat
 Trail duration.
ObjectAgent::Behavior agentBehavior
 Agent's behavior.

Detailed Description

Config object for agents in the matrix.


Constructor & Destructor Documentation

ObjectAgent::Config::Config ( const string &  imageFile,
const Direction objectDirection,
const Action &  objectAction,
const string &  objectName,
const string &  objectDescription,
ObjectTransferable::Config carryingObjectConfig,
const string &  trailImageFileName,
const ObjectTrail::DurationSize trailDuration,
ObjectAgent::Behavior  behavior 
) [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
trailImageFileName File name of the trail image (that puts an agent)
carryingObjectConfig Carrying object's config (if it's not carrying, pass 0 here)
trailDuration Duration of the trail
behavior Behavior of the agent
Warning: carryingObjectConfig must be allocated on the heap and it will be deleted in the destructor

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

Constructs object using data from XML node.

Reimplemented from Object::Config.

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

Destructor.

Reimplemented from Object::Config.


Member Function Documentation

void ObjectAgent::Config::ChangeBehavior ( const ObjectAgent::Behavior newBehavior  )  [inline]

Returns agent's behavior.

Parameters:
newBehavior New agent's behavior that has to be changed

void ObjectAgent::Config::ChangeTrailImage ( const string &  newTrailImageFileName  )  [inline]

Changes image of the agent's trail according to the selected filename.

Parameters:
newTrailImageFileName File name of the file containing new trail image

TiXmlElement * ObjectAgent::Config::CreateXmlNode (  )  const [virtual]

Creates node representing the config.

Implements Object::Config.

const ObjectAgent::Behavior& ObjectAgent::Config::GetBehavior (  )  const [inline]

Returns agent's behavior.

const ObjectTransferable::Config* ObjectAgent::Config::GetCarryingObjectConfig (  )  const [inline]

Returns config of the carrying Object.

static ObjectTrail::DurationSize ObjectAgent::Config::GetDurationSizeMax (  )  [inline, static]

Returns max duration size.

static ObjectTrail::DurationSize ObjectAgent::Config::GetDurationSizeMin (  )  [inline, static]

Returns minimal duration size.

virtual const string& ObjectAgent::Config::GetObjectClassName (  )  const [inline, virtual]

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

Implements Object::Config.

virtual const wxColour* ObjectAgent::Config::GetObjectTextColour (  )  const [inline, virtual]

Returns text colour of the object.

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

Implements Object::Config.

ObjectTrail::DurationSize ObjectAgent::Config::GetTrailDuration (  )  const [inline]

Returns trail duration.

const string& ObjectAgent::Config::GetTrailImageFileName (  )  const [inline]

Returns image file name of the trail.

void ObjectAgent::Config::SetTrailDuration ( ObjectTrail::DurationSize  newDuration  )  [inline]

Sets new trail duration.

Parameters:
newDuration New duration that has to be set

void ObjectAgent::Config::ShowEditationWindow ( wxWindow *  parent,
bool  waitUntilClosed = true 
) [virtual]

Shows editation window where the user can edit the config.

Parameters:
parent Parent window
waitUntilClosed If true, application will be stopped until the window is closed

Implements EditableInWindowConfig.


Member Data Documentation

ObjectAgent::Behavior ObjectAgent::Config::agentBehavior [private]

Agent's behavior.

ObjectTransferable::Config* ObjectAgent::Config::carryingObjConfig [private]

Config with the object agent is carrying.

ObjectTrail::DurationSize ObjectAgent::Config::trailDurat [private]

Trail duration.

GUI::Image ObjectAgent::Config::trailImage [private]

Picture of the trail.


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