ObjectTransferable Class Reference

Transferable object. More...

#include <ObjectTransferable.h>

Inheritance diagram for ObjectTransferable:

Object List of all members.

Public Member Functions

 ObjectTransferable (const ObjectTransferable::Config &config)
 Constructor - initialize whole object.
virtual ~ObjectTransferable ()
 Destructor.
void Collision (Object *collisionObject)
 Handles collision caused by another object.
virtual Object::ConfigCreateObjectConfig () const
 Returns full object's config (allocated on the heap).
virtual void LoadFromConfig (const Object::Config &config, bool fullLoad=true)
 Loads state (attributes etc.) from the selected config.
virtual void SetAction (const Action &newAction)
 Sets new action.
virtual void SetDirection (const Direction &newDirection)
 Sets a new direction.
virtual const PriorityGetPriority () const
 Returns object's priority.
virtual bool CanAppearMoreThenOnce () const
 Returns true if selected object can appear more then once in the container (in Matrix).
virtual const string & GetClassName () const
 Returns object's name (class name, respectively).
virtual void ChooseNextAction ()
 Object will choose it's new action.
virtual bool IsImaginary () const
 Some kinds of objects are only imaginary and other objects can stand or lay on it. Transferable objects aren't imaginery.
virtual bool IsEditableByUser () const
 Returns true if the object is editable by user (e.g. via graphical window).
virtual bool IsMoveableByUser () const
 Returns true if the object is moveable by user (e.g. moved to another place).

Static Public Attributes

static const string CLASS_NAME = "ObjectTransferable"
 Name of the class.

Static Private Attributes

static const Object::Priority PRIORITY = 10
 Priority of the object.
static const bool CAN_APPEAR_MORE_THEN_ONCE = false
 If true, object can appear more then once in the container (in Matrix).

Classes

class  Config
 Config object for transferable objects in the matrix. More...

Detailed Description

Transferable object.


Constructor & Destructor Documentation

ObjectTransferable::ObjectTransferable ( const ObjectTransferable::Config config  )  [inline]

Constructor - initialize whole object.

Parameters:
config Object with neccessary information to build this object

virtual ObjectTransferable::~ObjectTransferable (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual bool ObjectTransferable::CanAppearMoreThenOnce (  )  const [inline, virtual]

Returns true if selected object can appear more then once in the container (in Matrix).

Implements Object.

virtual void ObjectTransferable::ChooseNextAction (  )  [inline, virtual]

Object will choose it's new action.

Implements Object.

void ObjectTransferable::Collision ( Object collisionObject  )  [inline, virtual]

Handles collision caused by another object.

Parameters:
collisionObject Conflicting object

Implements Object.

Object::Config * ObjectTransferable::CreateObjectConfig (  )  const [virtual]

Returns full object's config (allocated on the heap).

Warning: Config is allocated on the heap in this member function, so explicit deleting after usage is needed!

Implements Object.

virtual const string& ObjectTransferable::GetClassName (  )  const [inline, virtual]

Returns object's name (class name, respectively).

Implements Object.

virtual const Priority& ObjectTransferable::GetPriority (  )  const [inline, virtual]

Returns object's priority.

Implements Object.

virtual bool ObjectTransferable::IsEditableByUser (  )  const [inline, virtual]

Returns true if the object is editable by user (e.g. via graphical window).

Implements Object.

virtual bool ObjectTransferable::IsImaginary (  )  const [inline, virtual]

Some kinds of objects are only imaginary and other objects can stand or lay on it. Transferable objects aren't imaginery.

Implements Object.

virtual bool ObjectTransferable::IsMoveableByUser (  )  const [inline, virtual]

Returns true if the object is moveable by user (e.g. moved to another place).

Implements Object.

void ObjectTransferable::LoadFromConfig ( const Object::Config config,
bool  fullLoad = true 
) [virtual]

Loads state (attributes etc.) from the selected config.

Parameters:
config Object's config
fullLoad Should object load all data from the config, or only some?
If fullLoad is true, object will load all data from the config. If it's false, only some data will be loaded (but doesn't matter in this object - everything will be loaded in both cases).

Reimplemented from Object.

virtual void ObjectTransferable::SetAction ( const Action &  newAction  )  [inline, virtual]

Sets new action.

Parameters:
newAction New action that has to be set

virtual void ObjectTransferable::SetDirection ( const Direction newDirection  )  [inline, virtual]

Sets a new direction.

Parameters:
newDirection New direction that has to be set

Implements Object.


Member Data Documentation

const bool ObjectTransferable::CAN_APPEAR_MORE_THEN_ONCE = false [static, private]

If true, object can appear more then once in the container (in Matrix).

const string ObjectTransferable::CLASS_NAME = "ObjectTransferable" [static]

Name of the class.

const Object::Priority ObjectTransferable::PRIORITY = 10 [static, private]

Priority 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