Homepage Demos Overview Downloads Tutorials Reference
Credits

MCValueEditControl.h

Go to the documentation of this file.
00001 #ifndef INCLUDED_MCValueEditControl_h
00002 #define INCLUDED_MCValueEditControl_h
00003 
00004 #include "ValueEditControl.h"
00005 
00006 //!allows you to modify a value in memory, much like ValueEditControl, but will check out a MotionCommand first to maintain proper mutual exclusion.
00007 template<class T>
00008 class MCValueEditControl : public ValueEditControl<T> {
00009  public:
00010   //!constructor
00011   MCValueEditControl(const std::string& n, T* t, MotionManager::MC_ID id)
00012     : ValueEditControl<T>(n,t), mcid(id) {}
00013   //!destructor
00014   virtual ~MCValueEditControl() {}
00015 
00016   virtual ControlBase* doSelect() {
00017     motman->checkoutMotion(mcid);
00018     ControlBase * ans = ValueEditControl<T>::doSelect();
00019     motman->checkinMotion(mcid);
00020     return ans;
00021   }
00022 
00023  protected:
00024   MotionManager::MC_ID mcid; //!< the id of the MotionCommand which should be checked out
00025 };
00026 
00027 /*! @file
00028  * @brief Defines MCValueEditControl, which allows you to modify a value in memory, much like ValueEditControl, but will check out a MotionCommand first to maintain proper mutual exclusion.
00029  * @author ejt (Creator)
00030  *
00031  * $Author: ejt $
00032  * $Name: tekkotsu-2_1 $
00033  * $Revision: 1.3 $
00034  * $State: Rel $
00035  * $Date: 2003/09/25 15:26:11 $
00036  */
00037 
00038 #endif

Tekkotsu v2.1
Generated Tue Mar 16 23:19:14 2004 by Doxygen 1.3.5