Mobile API Reference  MicroStrategy 2019
ReadBlockStream.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : ReadBlockStream.h
3 // AUTHOR : Yi Luo
4 // PROJECT : PDSerialization
5 //
6 // CREATION : 2002-07-15
7 // Copyright (C) MicroStrategy, Inc. 2002
8 //==============================================================================================
9 #ifndef Serialization_ReadBlockStream_H
10 #define Serialization_ReadBlockStream_H
11 
12 #include "PDSerialization.h"
15 
16 namespace MSerialization
17 {
18  class WriteBlockStream;
19 
33  {
34  public:
35 
41  virtual void StartReadList()=0;
42 
48  virtual bool MoreElement() throw() =0;
49 
50  protected:
51  virtual ~ReadListStream(){};
52 
53  };
54 
55 
60  {
61  public:
62 
72  virtual unsigned short ReadBlockHeader()=0;
73 
76  virtual void FinishReadBlock()=0;
77 
81  virtual bool MoreDataInBlock()=0;
82 
83 
84  protected:
85  virtual ~ReadBlockStream(){};
86 
87  };
88 
104  {
105  public:
107  ~AutoReadBlockStreamCloser() throw();
108 
109  private:
110  // pointer to the ReadBlockStream
111  ReadBlockStream* mpReadStream;
112  };
113 
114 
116 
117  // factory function to create a ReadBlockStream from a Binary.
118 
133  MBase::MemoryContract * ipMemCon = 0);
134 
149  MBase::MemoryContract * ipMemCon = 0);
150 
164  WriteBlockStream* ipWriteStream, MBase::MemoryContract * ipMemCon = 0);
165 
179 }
180 
181 #endif // Serialization_ReadBlockStream_H
Definition: BaseMemoryContract.h:40
virtual ~ReadBlockStream()
Definition: ReadBlockStream.h:85
DLL_PDSERIALIZATION_EXIM ReadBlockStream * GetReadBlockStreamFromFile(MFileSystem::ReadableFile::Ptr &iFilePtr)
MDataType::Binary represents binary data.
Definition: Binary.h:33
Definition: BinaryCollection.h:23
DLL_PDSERIALIZATION_EXIM ReadBlockStream * ConvertWriteBlockStream2ReadBlockStream(WriteBlockStream *ipWriteStream, MBase::MemoryContract *ipMemCon=0)
Definition: ReadBlockStream.h:32
Definition: ReadBlockStream.h:103
Definition: ReadDataStream.h:51
Definition: WriteBlockStream.h:63
Definition: ReadBlockStream.h:59
MBase::StrongPtr< ReadBlockStream, MBase::DeleteOperatorGeneric< ReadBlockStream > > ReadBlockStreamPtr
Definition: ReadBlockStream.h:115
DLL_PDSERIALIZATION_EXIM ReadBlockStream * ConvertBinaryCollection2ReadBlockStream(MDataType::BinaryCollection *ipBinaryCol, MBase::MemoryContract *ipMemCon=0)
Definition: StrongPtr.h:50
#define DLL_PDSERIALIZATION_EXIM
Definition: PDSerialization.h:21
virtual ~ReadListStream()
Definition: ReadBlockStream.h:51
Definition: MultiReadStream.h:23
DLL_PDSERIALIZATION_EXIM ReadBlockStream * ConvertBinary2ReadBlockStream(MDataType::Binary *ipBinary, MBase::MemoryContract *ipMemCon=0)