Vault  4.1
vbinaryiostream.h
Go to the documentation of this file.
00001 /*
00002 Copyright c1997-2014 Trygve Isaacson. All rights reserved.
00003 This file is part of the Code Vault version 4.1
00004 http://www.bombaydigital.com/
00005 License: MIT. See LICENSE.md in the Vault top level directory.
00006 */
00007 
00008 #ifndef vbinaryiostream_h
00009 #define vbinaryiostream_h
00010 
00013 #include "viostream.h"
00014 
00015 class VString;
00016 class VInstant;
00017 class VDuration;
00018 
00181 class VBinaryIOStream : public VIOStream {
00182     public:
00183 
00188         VBinaryIOStream(VStream& rawStream);
00192         virtual ~VBinaryIOStream() {}
00193 
00198         Vs8 readS8();
00203         Vu8 readU8();
00208         Vs16 readS16();
00213         Vu16 readU16();
00218         Vs32 readS32();
00225         int readInt32();
00230         Vu32 readU32();
00235         Vs64 readS64();
00240         Vu64 readU64();
00246         VFloat readFloat();
00252         VDouble readDouble();
00257         bool readBool();
00263         void readString(VString& s);
00271         VString readString();
00277         void readString32(VString& s);
00286         VString readString32();
00291         void readInstant(VInstant& i);
00299         VInstant readInstant();
00304         void readDuration(VDuration& d);
00312         VDuration readDuration();
00318         Vs64 readDynamicCount();
00319 
00324         void writeS8(Vs8 i);
00329         void writeU8(Vu8 i);
00334         void writeS16(Vs16 i);
00339         void writeU16(Vu16 i);
00344         void writeS32(Vs32 i);
00351         void writeInt32(int i);
00359         void writeSize32(VSizeType i);
00364         void writeU32(Vu32 i);
00369         void writeS64(Vs64 i);
00374         void writeU64(Vu64 i);
00379         void writeFloat(VFloat f);
00384         void writeDouble(VDouble d);
00389         void writeBool(bool i);
00396         void writeString(const VString& s);
00401         void writeString32(const VString& s);
00406         void writeInstant(const VInstant& i);
00411         void writeDuration(const VDuration& d);
00419         void writeDynamicCount(Vs64 count);
00420 
00427         static int getDynamicCountLength(Vs64 count);
00428 
00429     private:
00430 
00431         // Prevent copy construction and assignment since there is no provision for sharing a raw stream.
00432         VBinaryIOStream(const VBinaryIOStream& other);
00433         VBinaryIOStream& operator=(const VBinaryIOStream& other);
00434 
00435 };
00436 
00437 #endif /* vbinaryiostream_h */

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.