| Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
MMAccessor< MC_t > Class Template Reference#include <MMAccessor.h>
Detailed Descriptiontemplate<class MC_t>
This class allows convenient ways of accessing a motion command.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| MMAccessor (MotionManager::MC_ID id, bool ckout=true) | |
| constructor, checks out by default | |
| MMAccessor (MotionCommand *ptr) | |
| constructor, allows objects to provide uniform access to MotionCommands, regardless of whether they are currently in the MotionManager | |
| MMAccessor (const MMAccessor &a) | |
| copy constructor - will reference the same mc_id - checkin/checkouts are independent between this and a - motman does counting of checkin/checkouts | |
| ~MMAccessor () | |
| destructor, checks in if needed | |
| MMAccessor< MC_t > | operator= (const MMAccessor< MC_t > &a) |
| allows assignment of MMAccessor's, similar to the copy constructor - the two MMAccessor's will control the same MotionCommand | |
| MC_t * | checkout () |
| So you can check out if not done by default (or you checked in already). | |
| MC_t * | mc () const |
| Returns the motion command's address so you can call functions. | |
| void | checkin () |
| Checks in the motion. | |
| template<class Ret_t> Ret_t | checkin (Ret_t ret) |
| Checks in the motion, passing through the value it is passed. | |
| MC_t * | operator-> () |
| smart pointer to the underlying MotionCommand | |
| const MC_t * | operator-> () const |
| smart pointer to the underlying MotionCommand | |
| MC_t & | operator * () |
| smart pointer to the underlying MotionCommand | |
| const MC_t & | operator * () const |
| smart pointer to the underlying MotionCommand | |
| MC_t & | operator[] (int i) |
| smart pointer to the underlying MotionCommand | |
| const MC_t & | operator[] (int i) const |
| smart pointer to the underlying MotionCommand | |
Protected Attributes | |
| MotionManager::MC_ID | mc_id |
| the MC_ID that this Accessor was constructed with | |
| MC_t * | mcptr |
| a pointer to the motion command, should always be valid even when not checked out so you can access member fields (which is reasonably safe) | |
|
||||||||||||||||
|
constructor, checks out by default
Definition at line 55 of file MMAccessor.h. |
|
||||||||||
|
constructor, allows objects to provide uniform access to MotionCommands, regardless of whether they are currently in the MotionManager
Definition at line 63 of file MMAccessor.h. |
|
||||||||||
|
copy constructor - will reference the same mc_id - checkin/checkouts are independent between this and a - motman does counting of checkin/checkouts
Definition at line 66 of file MMAccessor.h. |
|
|||||||||
|
destructor, checks in if needed
Definition at line 72 of file MMAccessor.h. |
|
||||||||||||||
|
Checks in the motion, passing through the value it is passed.
MMAccessor<myMC> mine(myMC_id); if(mine.mc()->foo()) //do something with motman here bool cond; {MMAccessor<myMC> mine(myMC_id); cond=mine.mc()->foo();} if(cond) //do something with motman here MMAccessor<myMC> mine(myMC_id); if(mine.checkin(mine.mc()->foo())) //do something with motman here Definition at line 129 of file MMAccessor.h. |
|
|||||||||
|
Checks in the motion. Don't forget, you can also just limit the scope using extra { }'s Definition at line 97 of file MMAccessor.h. Referenced by MMAccessor< MC_t >::checkin(), EStopControllerBehavior::runCommand(), and MMAccessor< MC_t >::~MMAccessor(). |
|
|||||||||
|
So you can check out if not done by default (or you checked in already).
Definition at line 86 of file MMAccessor.h. Referenced by MMAccessor< MC_t >::MMAccessor(), and MMAccessor< MC_t >::operator=(). |
|
|||||||||
|
Returns the motion command's address so you can call functions.
Definition at line 93 of file MMAccessor.h. Referenced by BehaviorSwitchActivatorControl::activate(), ControlBase::deactivate(), ControlBase::doReadStdIn(), ControlBase::doSelect(), MMAccessor< MC_t >::operator *(), MMAccessor< MC_t >::operator->(), MMAccessor< MC_t >::operator[](), FollowHeadBehavior::processEvent(), and ControlBase::refresh(). |
|
|||||||||
|
smart pointer to the underlying MotionCommand
Definition at line 137 of file MMAccessor.h. |
|
|||||||||
|
smart pointer to the underlying MotionCommand
Definition at line 136 of file MMAccessor.h. |
|
|||||||||
|
smart pointer to the underlying MotionCommand
Definition at line 135 of file MMAccessor.h. |
|
|||||||||
|
smart pointer to the underlying MotionCommand
Definition at line 134 of file MMAccessor.h. |
|
||||||||||
|
allows assignment of MMAccessor's, similar to the copy constructor - the two MMAccessor's will control the same MotionCommand
Definition at line 77 of file MMAccessor.h. |
|
||||||||||
|
smart pointer to the underlying MotionCommand
Definition at line 139 of file MMAccessor.h. |
|
||||||||||
|
smart pointer to the underlying MotionCommand
Definition at line 138 of file MMAccessor.h. |
|
|||||
|
the MC_ID that this Accessor was constructed with
Definition at line 142 of file MMAccessor.h. Referenced by MMAccessor< MC_t >::checkin(), MMAccessor< MC_t >::checkout(), MMAccessor< MC_t >::MMAccessor(), and MMAccessor< MC_t >::operator=(). |
|
|||||
|
a pointer to the motion command, should always be valid even when not checked out so you can access member fields (which is reasonably safe)
Definition at line 143 of file MMAccessor.h. Referenced by MMAccessor< MC_t >::checkin(), MMAccessor< MC_t >::checkout(), MMAccessor< MC_t >::mc(), MMAccessor< MC_t >::MMAccessor(), and MMAccessor< MC_t >::operator=(). |
|
Tekkotsu v2.0.1+Doc |
Generated Mon Feb 9 22:19:49 2004 by Doxygen 1.3.5 |