00001 00020 #ifndef ARXX_BUFFERREADER_H 00021 #define ARXX_BUFFERREADER_H 00022 00023 #include "Buffer.h" 00024 00031 namespace Arxx 00032 { 00036 class BufferReader 00037 { 00038 public: 00039 BufferReader(const Arxx::Buffer & Buffer, Arxx::Buffer::size_type stPosition = Arxx::Buffer::Marker::BEGIN); 00040 00052 Arxx::Buffer::size_type stRead(Arxx::Buffer::size_type stLength, Arxx::Buffer::pointer Buffer); 00053 00057 const Arxx::Buffer & GetBuffer(void) const; 00058 00062 Arxx::Buffer::size_type stGetPosition(void) const; 00063 00067 void vSetPosition(Arxx::Buffer::size_type stPosition); 00068 private: 00069 const Arxx::Buffer & m_Buffer; 00070 Arxx::Buffer::Marker m_Marker; 00071 }; 00072 00082 Arxx::BufferReader & operator>>(Arxx::BufferReader & BufferReader, std::string & sString); 00083 00092 Arxx::BufferReader & operator>>(Arxx::BufferReader & BufferReader, float & fValue); 00093 00102 Arxx::BufferReader & operator>>(Arxx::BufferReader & BufferReader, Arxx::u4byte & u4Value); 00103 00112 Arxx::BufferReader & operator>>(Arxx::BufferReader & BufferReader, bool & bValue); 00113 } 00114 00115 #endif