Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

SavePostureControl.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_SavePostureControl_h_
00003 #define INCLUDED_SavePostureControl_h_
00004 
00005 #include "StringInputControl.h"
00006 #include "Motion/PostureEngine.h"
00007 
00008 //! Upon activation, saves the current position to a file name read from user (stored in /ms/data/motion/...)
00009 class SavePostureControl : public StringInputControl {
00010  public:
00011   //! Constructor
00012   SavePostureControl() : StringInputControl("Save Posture","Saves current posture to filename read from user","Please enter name for posture file (in /ms/data/motion)...") {}
00013   //! Constructor
00014   SavePostureControl(const std::string& n) : StringInputControl(n,"Saves current posture to filename read from user","Please enter name for posture file (in /ms/data/motion)...") {}
00015 
00016   virtual ControlBase * takeInput(const std::string& msg) {
00017     std::string filename;
00018     if(msg[0]=='/')
00019       filename=msg;
00020     else
00021       filename="/ms/data/motion/"+msg;
00022     PostureEngine post;
00023     post.takeSnapshot();
00024     post.SaveFile(filename.c_str());
00025     return StringInputControl::takeInput(msg);
00026   }
00027 };
00028 
00029 /*! @file
00030  * @brief Defines SavePostureControl, which when activated, saves the current position to a file name read from user (stored in /ms/data/motion/...)
00031  * @author ejt (Creator)
00032  *
00033  * $Author: ejt $
00034  * $Name: tekkotsu-1_4_1 $
00035  * $Revision: 1.6 $
00036  * $State: Exp $
00037  * $Date: 2003/06/12 18:06:10 $
00038  */
00039 
00040 #endif

Tekkotsu v1.4
Generated Sat Jul 19 00:06:31 2003 by Doxygen 1.3.2