Inheritance diagram for RS::AgentStep:


Public Member Functions | |
| AgentStep () | |
| The default constructor. | |
| AgentStep (const AgentStep &obj) | |
| The copy constructor. | |
| virtual | ~AgentStep () |
| The destructor. | |
| AgentStep & | operator= (const AgentStep &obj) |
| The assignment operator. | |
| void | addMiscellaneousCommand (const Command *const command) |
| Adds a miscellaneous command to the step. | |
| void | setBodyCommand (const TurnCommand *const command) |
| Adds a body command to the step, only one body command can be executed in a step. | |
| void | setBodyCommand (const DashCommand *const command) |
| void | setBodyCommand (const KickCommand *const command) |
| void | setBodyCommand (const CatchCommand *const command) |
| void | setBodyCommand (const TackleCommand *const command) |
| void | setBodyCommand (const MoveCommand *const command) |
| ServerCommand * | getBodyCommand () const |
| The AgentStep will still own the command, so do not delete. | |
| void | setNeckCommand (const TurnNeckCommand *const command) |
| Adds a neck command to the step, it will replace prior neck commands. | |
| TurnNeckCommand * | getNeckCommand () const |
| Gets the neck command as set in this object. | |
| void | setSayCommand (const SayCommand *const command) |
| Adds a say command to the step, it will replace prior say commands. | |
| void | setPointToCommand (const PointToCommand *const command) |
| Adds a point to command to the step, it will replace prior point to commands. | |
| void | setChangeViewCommand (const ChangeViewCommand *const command) |
| Adds a change mode command to the step, it will replace prior change mode commands. | |
| void | setChangeModeCommand (const ChangeModeCommand *const command) |
| Adds a change view command to the step, it will replace prior change view commands. | |
| void | merge (const AgentStep &agentStep) |
| Merges this object with the supplied agentStep, all variables supplied with agentStep will override variables defined in this object. | |
| Command * | getNextCommand () const |
| Get a copy of the first command in the sequence. | |
| AgentStep & | removeNextCommand () |
| Remove the first command in the sequence, if the step is not empty. | |
| bool | empty () const |
| Test if the step contains no commands. | |
| AgentStep & | makeEmpty () |
| Removes all the commands stored in the step. | |
| void | print () const |
| Prints the AgentStep to std::cout. | |
Protected Attributes | |
| ServerCommand * | mBodyCommand |
| TurnNeckCommand * | mNeckCommand |
| SayCommand * | mSayCommand |
| PointToCommand * | mPointToCommand |
| ChangeModeCommand * | mChangeModeCommand |
| ChangeViewCommand * | mChangeViewCommand |
A step is a set of commands that should and could be executed by the soccer server and the agent in a single simulator cycle.
Definition at line 104 of file AgentStep.h.
|
|
The default constructor. The step will take control of the command so don't delete it. If command is NULL the create an empty step, otherwise create a step with the command command. Definition at line 80 of file AgentStep.cc. |
|
|
The assignment operator.
Definition at line 116 of file AgentStep.cc. References RS::ChangeViewCommand::clone(), RS::ChangeModeCommand::clone(), RS::PointToCommand::clone(), RS::SayCommand::clone(), RS::TurnNeckCommand::clone(), RS::ServerCommand::clone(), RS::Step::commandSequence, makeEmpty(), mBodyCommand, mChangeModeCommand, mChangeViewCommand, mNeckCommand, mPointToCommand, and mSayCommand. |
|
|
Adds a body command to the step, only one body command can be executed in a step. The command will replace prior body commands. Definition at line 232 of file AgentStep.cc. References RS::TurnCommand::clone(). Referenced by RS::TurnBodyToPoint::generateStep(), RS::TurnBodyToAbsoluteDirection::generateStep(), RS::TurnBackToPoint::generateStep(), RS::SearchBall::generateStep(), RS::KickBallCloseToBody::generateStep(), RS::FreezeBall::generateStep(), RS::DashToPoint::generateStep(), RS::CatchBall::generateStep(), and RS::AccelerateBallToVelocity::generateStep(). |
|
|
Gets the neck command as set in this object. 0 if no command has been set. Definition at line 77 of file AgentStep.icc. |
|
|
Get a copy of the first command in the sequence. Remember to delete the command object otherwise you will have a memory leak. If the step is empty then NULL is returned. Reimplemented from RS::Step. Definition at line 158 of file AgentStep.cc. References RS::ChangeViewCommand::clone(), RS::ChangeModeCommand::clone(), RS::PointToCommand::clone(), RS::SayCommand::clone(), RS::TurnNeckCommand::clone(), RS::ServerCommand::clone(), and RS::Step::commandSequence. Referenced by RS::ActuatorInterface::addToPlan(). |
|
|
Test if the step contains no commands.
Reimplemented from RS::Step. Definition at line 61 of file AgentStep.icc. References RS::Step::commandSequence. Referenced by RS::ActuatorInterface::addToPlan(), and makeEmpty(). |
1.3-rc3