Mobile API Reference  MicroStrategy 2019
MultiReadStream.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : MultiReadStream.h
3 // AUTHOR : Hurwood
4 // PROJECT : PDSerialization
5 //
6 // CREATION : 2005-09-08
7 // Copyright (C) MicroStrategy, Inc. 2005
8 //==============================================================================================
9 #ifndef MSerialization_MultiReadStream_h
10 #define MSerialization_MultiReadStream_h
11 
12 #include "PDSerialization.h"
13 #include "ReadDataStream.h"
14 #include "WriteDataStream.h"
15 #include "ReadBlockStream.h"
17 #include "Base/Defines/SmartPtrI.h"
22 
23 namespace MSerialization
24 {
25 
42  {
43  public:
46 
54  static ReturnPtr Create(MDataType::BinaryCollection* ipCollection);
55 
63  static ReturnPtr Create(WriteDataStream* ipWriteStream);
64 
79  ReadDataStream* GetAsReadDataStream(MBase::MemoryContract* ipMemCon = 0);
80 
95  ReadBlockStream* GetAsReadBlockStream(MBase::MemoryContract* ipMemCon = 0);
96 
106  void WriteBinaryToStream(WriteDataStream* ipWriteStream);
107 
108  /*
109  return the number of binary
110  */
111  unsigned Int32 GetBinaryCount();
112 
113  /*
114  caller does not assume ownership of this binary
115  */
116  const MDataType::Binary* GetBinaryByIndex(unsigned Int32 iIndex);
117 
118  protected:
119 
121  virtual ~MultiReadStream() throw() {}
122 
123  private:
124 
130 
132  MDataType::BinaryCollectionPtr mBinaryCollectionPtr;
133 
134  // Support reference counting
136  };
137 
138 }
139 
140 #endif // MSerialization_MultiReadStream_h
Definition: BaseMemoryContract.h:40
MDataType::Binary represents binary data.
Definition: Binary.h:33
Definition: BinaryCollection.h:23
MBase::ReturnPtrI< MultiReadStream > ReturnPtr
Definition: MultiReadStream.h:45
#define Int32
Definition: BasicTypes.h:20
Definition: ReadDataStream.h:51
virtual ~MultiReadStream()
Ensure the object cannot be deleted directly.
Definition: MultiReadStream.h:121
Definition: ReadBlockStream.h:59
MBase::SmartPtrI< MultiReadStream > Ptr
Definition: MultiReadStream.h:44
Definition: ReturnPtrI.h:47
#define DLL_PDSERIALIZATION_EXIM
Definition: PDSerialization.h:21
#define REFERENCE_COUNTED_IMPLEMENTATION
Definition: ReferenceCountedImplementation.h:21
Definition: WriteDataStream.h:55
Definition: MultiReadStream.h:23
Definition: MultiReadStream.h:40
Definition: ReferenceCounted.h:58