#include <ObjectTrail.h>
Inheritance diagram for ObjectTrail:
Public Types | |
typedef int | DurationSize |
Duration size type. | |
Public Member Functions | |
ObjectTrail (const ObjectTrail::Config &config) | |
Constructor - initialize whole object. | |
virtual | ~ObjectTrail () |
Destructor. | |
virtual void | Collision (Object *collisionObject) |
Handles collision caused by another object. | |
virtual Object::Config * | CreateObjectConfig () 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 a new action. | |
virtual void | SetDirection (const Direction &newDirection) |
Sets a new direction. | |
virtual const Priority & | GetPriority () 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. Trails are only 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 Member Functions | |
static DurationSize | GetDurationSizeMin () |
Returns minimal duration size. | |
static DurationSize | GetDurationSizeMax () |
Returns max duration size. | |
Static Public Attributes | |
static const string | CLASS_NAME = "ObjectTrail" |
Name of the class. | |
Protected Member Functions | |
ObjectTrail::DurationSize | GetDuration () const |
Returns trail's duration. | |
Private Attributes | |
DurationSize | duration |
Duration (if it's less then zero the trail disappears). | |
Static Private Attributes | |
static const DurationSize | DURATION_MIN = 0 |
Minimal duration size. | |
static const DurationSize | DURATION_MAX |
Maximal duration size. | |
static const Object::Priority | PRIORITY = 0 |
Priority of the object. | |
static const bool | CAN_APPEAR_MORE_THEN_ONCE = true |
If true, object can appear more then once in the container (in Matrix). | |
Classes | |
class | Config |
Config object for trails in the matrix. More... |
typedef int ObjectTrail::DurationSize |
Duration size type.
ObjectTrail::ObjectTrail | ( | const ObjectTrail::Config & | config | ) | [inline] |
Constructor - initialize whole object.
config | Object with neccessary information to build this object |
virtual ObjectTrail::~ObjectTrail | ( | ) | [inline, virtual] |
Destructor.
virtual bool ObjectTrail::CanAppearMoreThenOnce | ( | ) | const [inline, virtual] |
virtual void ObjectTrail::ChooseNextAction | ( | ) | [inline, virtual] |
virtual void ObjectTrail::Collision | ( | Object * | collisionObject | ) | [inline, virtual] |
Handles collision caused by another object.
collisionObject | Conflicting object |
Implements Object.
Object::Config * ObjectTrail::CreateObjectConfig | ( | ) | const [virtual] |
virtual const string& ObjectTrail::GetClassName | ( | ) | const [inline, virtual] |
ObjectTrail::DurationSize ObjectTrail::GetDuration | ( | ) | const [inline, protected] |
Returns trail's duration.
static DurationSize ObjectTrail::GetDurationSizeMax | ( | ) | [inline, static] |
Returns max duration size.
static DurationSize ObjectTrail::GetDurationSizeMin | ( | ) | [inline, static] |
Returns minimal duration size.
virtual const Priority& ObjectTrail::GetPriority | ( | ) | const [inline, virtual] |
virtual bool ObjectTrail::IsEditableByUser | ( | ) | const [inline, virtual] |
virtual bool ObjectTrail::IsImaginary | ( | ) | const [inline, virtual] |
Some kinds of objects are only imaginary and other objects can stand or lay on it. Trails are only imaginery.
Implements Object.
virtual bool ObjectTrail::IsMoveableByUser | ( | ) | const [inline, virtual] |
void ObjectTrail::LoadFromConfig | ( | const Object::Config & | config, | |
bool | fullLoad = true | |||
) | [virtual] |
Loads state (attributes etc.) from the selected config.
config | Object's config | |
fullLoad | Should object load all data from the config, or only some? |
Reimplemented from Object.
virtual void ObjectTrail::SetAction | ( | const Action & | newAction | ) | [inline, virtual] |
Sets a new action.
newAction | New action that has to be set |
virtual void ObjectTrail::SetDirection | ( | const Direction & | newDirection | ) | [inline, virtual] |
const bool ObjectTrail::CAN_APPEAR_MORE_THEN_ONCE = true [static, private] |
If true, object can appear more then once in the container (in Matrix).
const string ObjectTrail::CLASS_NAME = "ObjectTrail" [static] |
Name of the class.
DurationSize ObjectTrail::duration [private] |
Duration (if it's less then zero the trail disappears).
const ObjectTrail::DurationSize ObjectTrail::DURATION_MAX [static, private] |
Initial value:
std::numeric_limits<ObjectTrail::DurationSize>::max()
const ObjectTrail::DurationSize ObjectTrail::DURATION_MIN = 0 [static, private] |
Minimal duration size.
const Object::Priority ObjectTrail::PRIORITY = 0 [static, private] |
Priority of the object.