Public Member Functions | |
| Plan (const Step &step=Step()) | |
| The default constructor. | |
| Plan (const Plan &obj) | |
| The copy constructor. | |
| virtual | ~Plan () |
| The destructor. | |
| Plan & | operator= (const Plan &obj) |
| The assignment operator. | |
| Plan & | addStep (const Step &step) |
| Add a step to the plan. | |
| Step | getNextStep () const |
| Get the first step in the plan. | |
| Plan & | removeNextStep () |
| Remove the first step in the plan. | |
| Step | getLastStep () const |
| Get the last step in the plan. | |
| Plan & | removeLastStep () |
| Remove the last step in the plan. | |
| bool | empty () const |
| Test if the plan contains no steps. | |
| Plan & | makeEmpty () |
| Removes all the steps stored in the plan. | |
Protected Member Functions | |
| bool | invariant () const |
| Test the class invariant. | |
A Plan is a sequence of Step. The steps in the plans are stored in a deque (dubbel ended queu), in order to have fast insertion at the back of the sequence, fast deletion at the top of the sequence and at the same time have random access to all element, for algortihms to work on plans as sequences.
Definition at line 92 of file Plan.h.
|
|
The default constructor. If step is empty then create an empty plan, othwerwise a plan containing the step step. Definition at line 63 of file Plan.cc. References addStep(), and RS_CHECK_INVARIANT. |
|
|
The copy constructor.
Definition at line 71 of file Plan.cc. References RS_CHECK_INVARIANT. |
|
|
The assignment operator.
Definition at line 90 of file Plan.cc. References makeEmpty(), RS_CHECK_INVARIANT, and stepSequence. |
|
|
Add a step to the plan. If the step is empty then the plan is still empty. Definition at line 63 of file Plan.icc. References RS::Step::empty(), and RS_CHECK_INVARIANT. Referenced by Plan(). |
|
|
Get the first step in the plan. If the plan is empty then an empty step is returned. Definition at line 107 of file Plan.cc. References empty(), and RS_CHECK_INVARIANT. Referenced by RS::ActuatorInterface::getNextStep(). |
|
|
Get the last step in the plan. If the plan is empty then an empty step is returned. Definition at line 119 of file Plan.cc. References empty(), and RS_CHECK_INVARIANT. |
|
|
Test if the plan contains no steps.
Definition at line 96 of file Plan.icc. References RS_CHECK_INVARIANT. Referenced by RS::ActuatorInterface::empty(), getLastStep(), getNextStep(), makeEmpty(), removeLastStep(), and removeNextStep(). |
|
|
Test the class invariant. This function implements a test of the class invariant. It should be tested after each constructor, before each destructor, and at the end of methods that change the state of the object.
|
1.3-rc3