#include <trilobot.h>
Definition at line 193 of file trilobot.h.
Public Member Functions | |
std::string | Id () const |
Gets the component ID. | |
IComponent & | Handle (ICommand &command) |
double | Speed () |
double | Speed (const DateTime &at) |
double | Radius () |
double | Radius (const DateTime &at) |
struct Position | Position () |
struct Position | Position (const DateTime &at) |
double | Size () |
double | Size (const DateTime &at) |
IObject & | Serialize (std::ostream &output) |
IObject & | Deserialize (std::istream &input) |
Protected Member Functions | |
BaseComponent (const char *id, TrilobotPtr robot) | |
virtual std::string | ImplId () const |
TrilobotPtr | Robot () const |
BaseComponent & | SaveCurrentState (StatePtr) |
BaseComponent & | SaveNextState (StatePtr) |
StatePtr | GetCurrentState (const DateTime &now) |
virtual | ~BaseComponent () |
virtual void | ImplSerialize (std::ostream &) |
virtual void | ImplDeserialize (std::istream &) |
virtual void | ImplHandle (ICommand &command)=0 |
virtual double | ImplSpeed (const DateTime &)=0 |
virtual double | ImplRadius (const DateTime &)=0 |
virtual struct Position | ImplPosition (const DateTime &)=0 |
virtual double | ImplSize (const DateTime &)=0 |
Private Attributes | |
Members * | pimpl |
BaseComponent | ( | const char * | id, | |
TrilobotPtr | robot | |||
) | [protected] |
virtual ~BaseComponent | ( | ) | [protected, virtual] |
virtual std::string ImplId | ( | ) | const [protected, virtual] |
Implements IComponent.
TrilobotPtr Robot | ( | ) | const [protected] |
BaseComponent& SaveCurrentState | ( | StatePtr | ) | [protected] |
BaseComponent& SaveNextState | ( | StatePtr | ) | [protected] |
virtual void ImplSerialize | ( | std::ostream & | ) | [protected, virtual] |
virtual void ImplDeserialize | ( | std::istream & | ) | [protected, virtual] |
std::string Id | ( | ) | const [inline, inherited] |
Gets the component ID.
Definition at line 167 of file trilobot.h.
References IComponent::ImplId().
IComponent& Handle | ( | ICommand & | command | ) | [inline, inherited] |
Tries handle command. If can handle and do this the set command value Handled to true
Definition at line 178 of file trilobot.h.
References IComponent::ImplHandle().
Referenced by Core::dispatch().
virtual void ImplHandle | ( | ICommand & | command | ) | [protected, pure virtual, inherited] |
Implemented in Compass, SoundSensor, and Trilobot.
Referenced by IComponent::Handle().
double Speed | ( | ) | [inline, inherited] |
Gets the object speed
Definition at line 101 of file physics.h.
References DateTime::Now().
Referenced by readCoreInfo().
double Radius | ( | ) | [inline, inherited] |
Gets the object turn angle
Definition at line 113 of file physics.h.
References DateTime::Now().
Referenced by readCoreInfo().
virtual double ImplSpeed | ( | const DateTime & | ) | [protected, pure virtual, inherited] |
Implemented in BaseMovingObject, Compass, SoundSensor, and Trilobot.
virtual double ImplRadius | ( | const DateTime & | ) | [protected, pure virtual, inherited] |
Implemented in BaseMovingObject, Compass, SoundSensor, and Trilobot.
Gets the object center
Definition at line 40 of file physics.h.
References IObject::ImplPosition(), and DateTime::Now().
Referenced by Core::dispatch(), Arena::Private::drawCircle(), and readCoreInfo().
Definition at line 46 of file physics.h.
References IObject::ImplPosition().
double Size | ( | ) | [inline, inherited] |
Gets the object radius
Definition at line 52 of file physics.h.
References IObject::ImplSize(), and DateTime::Now().
Referenced by Arena::Private::drawCircle(), and Arena::Private::renderBot().
double Size | ( | const DateTime & | at | ) | [inline, inherited] |
Definition at line 58 of file physics.h.
References IObject::ImplSize().
IObject& Serialize | ( | std::ostream & | output | ) | [inline, inherited] |
Definition at line 63 of file physics.h.
References IObject::ImplSerialize().
Referenced by Core::Export().
IObject& Deserialize | ( | std::istream & | input | ) | [inline, inherited] |
Definition at line 68 of file physics.h.
References IObject::ImplDeserialize().
Referenced by Core::Import().
virtual struct Position ImplPosition | ( | const DateTime & | ) | [read, protected, pure virtual, inherited] |
Implemented in BaseObject, Compass, SoundSensor, and Trilobot.
Referenced by IObject::Position().
virtual double ImplSize | ( | const DateTime & | ) | [protected, pure virtual, inherited] |
Implemented in BaseObject, Compass, SoundSensor, and Trilobot.
Referenced by IObject::Size().
Members* pimpl [private] |