class Core::IO::BinaryStreamAccessor
Overview
Access typed data from stream. More…
#include <corestreamaccessor.h> class BinaryStreamAccessor: public Core::IO::BinaryAccessor { public: // construction BinaryStreamAccessor ( IByteStream& stream, int byteOrder = CORE_NATIVE_BYTEORDER ); // methods IByteStream& getStream (); virtual int read (void* buffer, int size); virtual int write (const void* buffer, int size); virtual int read (void* buffer, int size); bool read (int8& c); bool read (uint8& uc); bool read (int16& s); bool read (uint16& us); bool read (int32& l); bool read (uint32& ul); bool read (int64& ll); bool read (uint64& ull); bool read (float& f); bool read (double& f); bool read (char& c); virtual int write (const void* buffer, int size); bool write (int8 c); bool write (uint8 uc); bool write (int16 s); bool write (uint16 us); bool write (int32 l); bool write (uint32 ul); bool write (int64 ll); bool write (uint64 ull); bool write (float f); bool write (double f); bool write (char c); };
Inherited Members
public: // fields static const uint16 kByteOrderMark = 0xFEFF; // methods bool isByteSwap () const; int getByteOrder () const; void setByteOrder (int byteOrder); bool writeByteOrder (); bool readByteOrder (); virtual int read (void* buffer, int size) = 0; virtual int write (const void* buffer, int size) = 0; template <typename T> int readElements (T buffer [], int count); template <typename T> int writeElements (const T buffer [], int count); bool write (int8 c); bool read (int8& c); bool write (uint8 uc); bool read (uint8& uc); bool write (int16 s); bool read (int16& s); bool write (uint16 us); bool read (uint16& us); bool write (int32 l); bool read (int32& l); bool write (uint32 ul); bool read (uint32& ul); bool write (int64 ll); bool read (int64& ll); bool write (uint64 ull); bool read (uint64& ull); bool writeVarLen (uint32 value); bool readVarLen (uint32& value); bool write (float f); bool read (float& f); bool write (double f); bool read (double& f); bool write (char c); bool read (char& c); bool writeCString (CStringPtr string, bool terminate = true); bool readCStringBuffer (char* charBuffer, int bufferSize); bool writeFCC (int32 fcc); bool readFCC (int32& fcc);
Detailed Documentation
Access typed data from stream.
Methods
virtual int read (void* buffer, int size)
Read data from underlying storage, to be implemented by derived class.
virtual int write (const void* buffer, int size)
Write data to underlying storage, to be implemented by derived class.
virtual int read (void* buffer, int size)
Read data from underlying storage, to be implemented by derived class.
virtual int write (const void* buffer, int size)
Write data to underlying storage, to be implemented by derived class.