HBTRecorder.h

Go to the documentation of this file.
00001 #ifndef HBT_RECORDER_H
00002 #define HBT_RECORDER_H
00003 
00004 //-----------------------------------------------------------------------------
00005 #include "HBTDataTypes.h"
00006 #include <fstream>
00007 
00008 namespace HBT
00009 {
00010   
00011 //-----------------------------------------------------------------------------
00039 class HBT_API Recorder
00040 {
00041 public:
00044   Recorder() ;
00049   Recorder( const std::string& fileName ) ;
00052   virtual ~Recorder() ;
00055   void open( const std::string& fileName ) ;
00059   operator bool() const { return _initRecorded ; }
00065   Recorder& write( const InitialisationSequence& intialisationSequence ) ;
00072   Recorder& write( unsigned int date, const PostureData& posture ) ;
00074   static const std::string HEADER ;
00075 protected:
00077   bool _initRecorded ;
00079   std::ofstream _file ;
00081 
00082 
00083   void write( const std::string& txt ) ;
00085   void write( const bool& flag ) ;
00087   void write( const Ogre::Vector3& vect ) ;
00089   void write( const Ogre::Quaternion& quat ) ;
00091   template< typename T >
00092   void write( const std::vector< T >& tab ) ;
00094   template< typename T >
00095   void write( const T& val ) ;
00097 } ;
00098 
00099 } // namespace OMK
00100 #endif // defined HBT_RECORDER_H
00101 
00102 

logo OpenMask

Documentation generated on Mon Jun 9 11:45:55 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007