00001 #ifndef HBT_PLAYER_H 00002 #define HBT_PLAYER_H 00003 00004 //----------------------------------------------------------------------------- 00005 #include "HBTDataTypes.h" 00006 #include <fstream> 00007 00008 namespace HBT 00009 { 00010 00011 //----------------------------------------------------------------------------- 00035 class HBT_API Player 00036 { 00037 public: 00040 Player() ; 00045 Player( const std::string& fileName ) ; 00048 virtual ~Player() ; 00051 void open( const std::string& fileName ) ; 00055 operator bool() const { return _initRead ; } 00059 Player& read( InitialisationSequence& intialisationSequence ) ; 00065 Player& read( unsigned int& date, PostureData& posture ) ; 00075 void setLoop( bool loop = true ) { _loop = loop ; } 00076 protected: 00078 bool _initRead ; 00081 bool _loop ; 00083 std::ifstream _file ; 00086 PostureData _lastPosture ; 00089 unsigned int _lastDate ; 00091 00092 00093 void read( std::string& txt ) ; 00095 void read( bool& flag ) ; 00097 void read( Ogre::Vector3& vect ) ; 00099 void read( Ogre::Quaternion& quat ) ; 00101 template< typename T > 00102 void read( std::vector< T >& tab ) ; 00104 template< typename T > 00105 void read( T& val ) ; 00107 } ; 00108 00109 } // namespace OMK 00110 #endif // defined HBT_PLAYER_H 00111 00112
Documentation generated on Mon Jun 9 11:45:55 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |