Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
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, 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   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 
00032 #endif

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:44 2016 by Doxygen 1.6.3