Mobile API Reference  MicroStrategy 2019
ReadByteStream.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : ReadByteStream.h
3 // AUTHOR : Yuan Wei
4 // CREATION : 12/31/2007
5 // Copyright (C) MicroStrategy, Inc. 2007
6 //==============================================================================================
7 
8 #ifndef Serialization_ReadByteStream_H
9 #define Serialization_ReadByteStream_H
10 
15 #include <stack>
16 #if !defined(WIN32) && !defined(__ANDROID__)
18 #endif
20 
21 namespace MDataType
22 {
23  class BinaryCollection;
24 }
25 
26 
27 namespace MSerialization
28 {
29 
31 {
32 public:
33  virtual void Read(unsigned char * pData, unsigned Int32 cb) = 0;
34  virtual void Read(unsigned char * pData, Int64 cb) = 0;
35 
36  virtual void Rewind() = 0;
37 
38  virtual void Peek(unsigned char * pData, unsigned Int32 cb) = 0;
39  virtual void Peek(unsigned char * pData, Int64 iRequestedBytes) = 0;
40  virtual void Skip(unsigned Int32 cb) = 0;
41  virtual void Skip(Int64 cb)= 0;
42 
43  virtual Int64 Get64BitSize() throw() = 0;
44  virtual Int64 GetNumberOfUnreadBytes() throw() = 0;
45 
46  virtual MDataType::BinaryCollection* GiveOutBinaryCollection() = 0;
47  virtual MDataType::BinaryCollection* CopyOutBinaryCollection(Int32 iStartPosition=0) const = 0;
48 
49  virtual void StartCount() = 0;
50  virtual Int64 GetCount() = 0;
51  virtual void StopCount() = 0;
52 
53  virtual void Delete() throw() = 0;
54 
55  virtual bool WaitForData(unsigned Int32 iTimeOut) = 0;
56 
57  virtual void SetTimeout(Int64 iTimeoutInMilliseconds) = 0;
58 
59  virtual ~ReadByteStream() throw() {};
60 };
61 
62 // Strong pointer to ReadByteStream
64 
65 #if !defined(WIN32) && !defined(__ANDROID__)
67 #endif
68 };
69 
70 #endif // Serialization_ReadByteStream_H
Definition: ReadByteStream.h:30
Definition: BinaryCollection.h:23
#define Int64
Definition: BasicTypes.h:36
Definition: BigDecimal.h:18
MBase::StrongPtr< ReadByteStream, MBase::DeleteOperatorGeneric< ReadByteStream > > ReadByteStreamPtr
Definition: ReadByteStream.h:63
#define Int32
Definition: BasicTypes.h:20
Definition: StrongPtr.h:50
DLL_PDSERIALIZATION_EXIM ReadByteStream * CreateReadByteStreamFromSharedMem(MMultiProcess::SharedMemory *ipSharedMemPtr)
ULONG cb
Definition: Msi_objbase.h:25
#define DLL_PDSERIALIZATION_EXIM
Definition: PDSerialization.h:21
virtual ~ReadByteStream()
Definition: ReadByteStream.h:59
Definition: SharedMemory.h:59
Definition: MultiReadStream.h:23