Mobile API Reference
MicroStrategy 2019
|
Classes | |
class | AutoReadBlockStreamCloser |
class | DataStreamHeader |
class | MultiReadStream |
class | PolymorphicSerializableObject |
class | ReadBlockStream |
class | ReadBlockStreamImpl |
class | ReadByteStream |
class | ReadByteStreamImpl |
class | ReadDataStream |
class | ReadDataStreamImpl |
class | ReadListStream |
class | ReadStreamException |
the exception during read stream operations More... | |
class | ReservedPosition |
class | SerializableObject |
class | SerializationException |
the root class for all exceptions in Serialization namespace More... | |
class | StreamInt32Reserve |
class | StreamInt32ReserveImpl |
class | StreamInt64Reserve |
class | StreamInt64ReserveImpl |
class | WriteBlockStream |
class | WriteBlockStreamImpl |
class | WriteByteStream |
class | WriteByteStreamFileImpl |
class | WriteByteStreamImpl |
class | WriteDataStream |
class | WriteDataStreamImpl |
class | WriteListStream |
class | WriteStreamException |
the exception during write stream operations More... | |
Typedefs | |
typedef MBase::StrongPtr< ReadBlockStream, MBase::DeleteOperatorGeneric< ReadBlockStream > > | ReadBlockStreamPtr |
typedef MBase::StrongPtr< ReadByteStream, MBase::DeleteOperatorGeneric< ReadByteStream > > | ReadByteStreamPtr |
typedef MBase::StrongPtr< ReadDataStream, MBase::DeleteOperatorGeneric< ReadDataStream > > | ReadDataStreamPtr |
Strong pointer to the ReadDataStream. More... | |
typedef MBase::StrongPtr< StreamInt64Reserve, MBase::DeleteOperatorGeneric< StreamInt64Reserve > > | StreamInt64ReservePtr |
typedef MBase::StrongPtr< StreamInt32Reserve, MBase::DeleteOperatorGeneric< StreamInt32Reserve > > | StreamInt32ReservePtr |
typedef MBase::StrongPtr< WriteBlockStream, MBase::DeleteOperatorGeneric< WriteBlockStream > > | WriteBlockStreamPtr |
typedef MBase::StrongPtr< WriteDataStream, MBase::DeleteOperatorGeneric< WriteDataStream > > | WriteDataStreamPtr |
Enumerations | |
enum | TYPE { T_INVALID =0, T_UTF8 =1, T_DOUBLE =2, T_BOOL =3, T_SHORT =4, T_USHORT =5, T_INT =6, T_UINT =7, T_INT64 =8, T_GUID =9, T_DATETIME =10, T_VARIANT =11, T_SAFEINT =12, T_BINARY =13, T_BLOCK =14, T_LIST =15, T_UTF8_CHAR =16, T_DYNAMIC_TIME =17, T_BYTE =18, T_RAWBINARY =19, T_FLOAT =20, T_CHAR =21, T_OBJECT =22, T_CELLFMTDATA = 23, T_ARRAY =0x80, T_SMALLARRAY =0x40 } |
enum | StreamType { ST_MEMORY, ST_FILE, ST_SHM } |
Enumeration of different stream types. More... | |
Variables | |
const unsigned char | GN_Data_Stream_Flag = 0xBE |
const unsigned short | LONG_VERSION = 0x8000 |
const value for specifying the safe version of WriteDataStream More... | |
typedef MBase::StrongPtr<ReadBlockStream, MBase::DeleteOperatorGeneric<ReadBlockStream> > MSerialization::ReadBlockStreamPtr |
typedef MBase::StrongPtr<ReadByteStream, MBase::DeleteOperatorGeneric<ReadByteStream> > MSerialization::ReadByteStreamPtr |
typedef MBase::StrongPtr<ReadDataStream, MBase::DeleteOperatorGeneric<ReadDataStream> > MSerialization::ReadDataStreamPtr |
Strong pointer to the ReadDataStream.
typedef MBase::StrongPtr<StreamInt32Reserve, MBase::DeleteOperatorGeneric<StreamInt32Reserve> > MSerialization::StreamInt32ReservePtr |
typedef MBase::StrongPtr<StreamInt64Reserve, MBase::DeleteOperatorGeneric<StreamInt64Reserve> > MSerialization::StreamInt64ReservePtr |
typedef MBase::StrongPtr<WriteBlockStream, MBase::DeleteOperatorGeneric<WriteBlockStream> > MSerialization::WriteBlockStreamPtr |
typedef MBase::StrongPtr<WriteDataStream, MBase::DeleteOperatorGeneric<WriteDataStream> > MSerialization::WriteDataStreamPtr |
enum MSerialization::TYPE |
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::ConvertBinaries2WriteBlockStream | ( | MDataType::BinaryCollection * | ipBinaries, |
MBase::MemoryContract * | ipMemCon = 0 |
||
) |
Create a WriteBlockStream from a BinaryCollection. The stream header will be decided by the data in the BinaryCollection. If the stream header has safe stream flag, the stream will be serialized using safe format.
ipBins | the pointer to the BinaryCollection which will become the body of the WriteBlockStream. This BinaryCollection must contain header data. Otherwise, serialization exception will be thrown. |
ipMemCon | a pointer to MemoryContract. Its default value is NULL. |
WriteStreamException. |
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::ConvertBinaries2WriteDataStream | ( | MDataType::BinaryCollection * | ipBins, |
MBase::MemoryContract * | ipMemCon = 0 |
||
) |
Create a WriteDataStream from a BinaryCollection. The stream header will be decided by the data in the BinaryCollection. If the stream header has safe stream flag, the stream will be serialized using safe format. The new WriteDataStream will take the ownership of the BinaryCollection.
ipBins | the pointer to the BinaryCollection. This BinaryCollection must contain header data. Otherwise, serialization exception will be thrown. |
ipMemCon | a pointer to MemoryContract. Its default value is NULL. |
WriteStreamException. |
DLL_PDSERIALIZATION_EXIM ReadBlockStream* MSerialization::ConvertBinary2ReadBlockStream | ( | MDataType::Binary * | ipBinary, |
MBase::MemoryContract * | ipMemCon = 0 |
||
) |
Create a ReadBlockStream object from a Binary block. The ReadBlockStream TAKE OVER the ownership of the Binary, so if the caller want to retain the Binary for other purpose beyond the lifetime of the ReadDataStream, it must duplicate the Binary. This also means the caller should not try to delete the Binary once it is given to the ReadBlockStream.
ipBinary | The pointer to the Binary. |
ipMemCon | the pointer to the memeory contractor. Its default value is NULL. |
DLL_PDSERIALIZATION_EXIM ReadDataStream* MSerialization::ConvertBinary2ReadDataStream | ( | MDataType::Binary * | ipB, |
MBase::MemoryContract * | ipMemCon = 0 |
||
) |
The factory function to create ReadDataStream from a Binary. The returned ReadDataStream TAKE OVER the ownership of the Binary, so if the caller want to retain the Binary for other purpose beyond the lifetime of the ReadDataStream, it must duplicate the Binary. This also means the caller should not try to delete the Binary once it is given to the ReadDataStream.
ipB | The pointer to the Binary. |
ipMemCon | the pointer to the memeory contractor. Its default value is NULL. |
DLL_PDSERIALIZATION_EXIM ReadBlockStream* MSerialization::ConvertBinaryCollection2ReadBlockStream | ( | MDataType::BinaryCollection * | ipBinaryCol, |
MBase::MemoryContract * | ipMemCon = 0 |
||
) |
Create a ReadBlockStream object from a BinaryCollection block. The ReadBlockStream TAKE OVER the ownership of the BinaryCollection, so if the caller want to retain the Binary for other purpose beyond the lifetime of the ReadDataStream, it must duplicate the Binary. This also means the caller should not try to delete the Binary once it is given to the ReadBlockStream.
ipBinaryCol | The pointer to the BinaryCollection. |
ipMemCon | the pointer to the memeory contractor. Its default value is NULL. |
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::ConvertFile2WriteBlockStream | ( | MFileSystem::UpdateableFile::Ptr & | iFilePtr, |
unsigned short | header = 1 |
||
) |
Create a WriteBlockStream from a BinaryCollection. The stream header will be decided by the data in the BinaryCollection. If the stream header has safe stream flag, the stream will be serialized using safe format. The new data is writen at the end of the file.
DLL_PDSERIALIZATION_EXIM ReadBlockStream* MSerialization::ConvertWriteBlockStream2ReadBlockStream | ( | WriteBlockStream * | ipWriteStream, |
MBase::MemoryContract * | ipMemCon = 0 |
||
) |
Create a ReadBlockStream from a WriteBlockStream directly. The ReadBlockStream TAKE OVER the ownership of the underlying data in the WriteBlockStream, so the caller cannot use WriteBlockStream::GiveOutBinary() to get those data after calling this function.
ipWriteStream | The pointer to the WriteBlockStream. |
ipMemCon | the pointer to the memeory contractor. Its default value is NULL. |
DLL_PDSERIALIZATION_EXIM ReadDataStream* MSerialization::ConvertWriteDataStream2ReadDataStream | ( | WriteDataStream * | ipWriteStream, |
MBase::MemoryContract * | ipMemCon = 0 |
||
) |
The factory function to create ReadDataStream from a WriteDataStream. The returned ReadDataStream TAKE OVER the ownership of the WriteDataStream. This also means the caller should not try to delete the WriteDataStream once it is given to the ReadDataStream.
ipWriteStream | The pointer to the WriteDataStream. |
ipMemCon | the pointer to the memeory contractor. Its default value is NULL. |
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::CreatePartialEncryptedSafeWriteBlockStream | ( | MBase::MemoryContract * | ipMemCon = 0 , |
unsigned short | iHeader = 1 , |
||
MEncryptor::EncryptionVersion | iEncryptionVersion = MEncryptor::AES , |
||
const char * | ipcKey = NULL |
||
) |
Similar to CreateSafeWriteBlockStream except char* and wchar_t* type data will be encrypted with specified algorithm
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::CreatePartialEncryptedSafeWriteBlockStream | ( | MFileSystem::WriteableFile::Ptr & | iFilePtr, |
unsigned short | iHeader = 1 , |
||
MEncryptor::EncryptionVersion | iEncryptionVersion = MEncryptor::AES , |
||
const char * | ipcKey = NULL |
||
) |
Overloaded method for writing blocks to files instead of memory
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::CreateRawWriteBlockStream | ( | MBase::MemoryContract * | ipMemCon = 0 , |
unsigned short | iHeader = 1 |
||
) |
create a fast but platform-dependent WriteBlockStream, using the specified stream header. This stream won't convert the data type into platform-neutral format. So its usage must be restricted in the same machine.
ipMemCon | the pointer to the memeory contractor. Its default value is NULL. |
iHeader | the stream header, containing the stream version information. |
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::CreateRawWriteBlockStream | ( | MFileSystem::WriteableFile::Ptr & | iFilePtr, |
unsigned short | header = 1 |
||
) |
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::CreateRawWriteDataStream | ( | MBase::MemoryContract * | ipMemCon = 0 , |
unsigned short | header = 1 |
||
) |
create a fast but platform-dependent WriteDataStream, using the specified stream header. This stream won't convert the data type into platform-neutral format. So its usage must be restricted in the same machine.
ipMemCon | a pointer to MemoryContract. Its default value is NULL. |
header | the header of the data stream. Any stream version information should be passed by it. Its default value is 1. |
WriteStreamException. |
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::CreateRawWriteDataStream | ( | MFileSystem::WriteableFile::Ptr & | iFilePtr, |
unsigned short | header = 1 |
||
) |
DLL_PDSERIALIZATION_EXIM ReadByteStream* MSerialization::CreateReadByteStreamFromSharedMem | ( | MMultiProcess::SharedMemory * | ipSharedMemPtr | ) |
DLL_PDSERIALIZATION_EXIM ReadDataStream* MSerialization::CreateReadDataStreamFromSharedMem | ( | MMultiProcess::SharedMemory * | ipSharedMemPtr, |
MBase::MemoryContract * | ipMemCon | ||
) |
The following method is used for reading serialized data from shared memory directly.
ipSharedMemPtr | raw pointer to shared memory instance. |
DLL_PDSERIALIZATION_EXIM ReadDataStream* MSerialization::CreateReadDataStreamFromSharedMemByteStream | ( | ReadByteStream * | ipSharedMemReadBStreamPtr, |
MBase::MemoryContract * | ipMemCon | ||
) |
The following method is used for reading serialized data from shared memory based byte stream directly.
ipSharedMemReadBStreamPtr | raw pointer to shared memory based byte stream instance. |
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::CreateSafeRawWriteBlockStream | ( | MBase::MemoryContract * | ipMemCon = 0 , |
unsigned short | iHeader = 1 |
||
) |
Create a WriteBlockStream with extra safety information, using the specified stream header. This stream will put extra information into the stream to make the stream read safer
This is a fast but platform-dependent WriteBlockStream, using the specified stream header. This stream won't convert the data type into platform-neutral format. So its usage must be restricted in the same machine.
ipMemCon | the pointer to the memeory contractor. Its default value is NULL. |
iHeader | the stream header, containing the stream version information. |
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::CreateSafeRawWriteBlockStream | ( | MFileSystem::WriteableFile::Ptr & | iFilePtr, |
unsigned short | header = 1 |
||
) |
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::CreateSafeRawWriteDataStream | ( | MBase::MemoryContract * | ipMemCon = 0 , |
unsigned short | header = 1 |
||
) |
Create a WriteDataStream using the specified stream header. This stream will put extra information into the stream to make the stream more robust.
This is a fast but platform-dependent WriteDataStream, using the specified stream header. This stream won't convert the data type into platform-neutral format. So its usage must be restricted in the same machine.
ipMemCon | a pointer to MemoryContract. Its default value is NULL. |
header | the header of the data stream. Any stream version information should be passed by it. Its default value is 1. |
WriteStreamException. |
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::CreateSafeRawWriteDataStream | ( | MFileSystem::WriteableFile::Ptr & | iFilePtr, |
unsigned short | header = 1 |
||
) |
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::CreateSafeWriteBlockStream | ( | MBase::MemoryContract * | ipMemCon = 0 , |
unsigned short | iHeader = 1 |
||
) |
Create a WriteBlockStream with extra safety information, using the specified stream header. This stream will put extra information into the stream to make the stream read safer
ipMemCon | the pointer to the memeory contractor. Its default value is NULL. |
iHeader | the stream header, containing the stream version information. |
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::CreateSafeWriteBlockStream | ( | MFileSystem::WriteableFile::Ptr & | iFilePtr, |
unsigned short | header = 1 |
||
) |
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::CreateSafeWriteDataStream | ( | MBase::MemoryContract * | ipMemCon = 0 , |
unsigned short | header = 1 |
||
) |
Create a WriteDataStream using the specified stream header. This stream will put extra information into the stream to make the stream more robust.
ipMemCon | a pointer to MemoryContract. Its default value is NULL. |
header | the header of the data stream. Any stream version information should be passed by it. Its default value is 1. |
WriteStreamException. |
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::CreateSafeWriteDataStream | ( | MFileSystem::WriteableFile::Ptr & | iFilePtr, |
unsigned short | header = 1 |
||
) |
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::CreateWriteBlockStream | ( | MBase::MemoryContract * | ipMemCon = 0 , |
unsigned short | iHeader = 1 |
||
) |
create a WriteBlockStream, using the specified stream header.
ipMemCon | the pointer to the memeory contractor. Its default value is NULL. |
iHeader | the stream header, containing the stream version information. |
DLL_PDSERIALIZATION_EXIM WriteBlockStream* MSerialization::CreateWriteBlockStream | ( | MFileSystem::WriteableFile::Ptr & | iFilePtr, |
unsigned short | header = 1 |
||
) |
We don't have a CreateWriteListStream() function here, because there is no need for a list stream which is not a block stream. Every list stream is a blcok stream too. We separate the interface just for the purpose of clarity. The following are overloaded methods for writing blocks to files instead of memory. Useful when serializing large data.
iFilePtr | Strong pointer to a Writeable file. The caller opens a Writeable file and gives up ownership of the file pointer to the block stream. When all is done the block stream commits and closes the file. |
DLL_PDSERIALIZATION_EXIM WriteByteStream::ReturnPtr MSerialization::CreateWriteByteStream | ( | MDataType::BinaryCollection * | ipBins, |
unsigned Int32 | iBlockSize = 512 , |
||
MBase::MemoryContract * | ipMemoryContract = NULL |
||
) |
DLL_PDSERIALIZATION_EXIM WriteByteStream::ReturnPtr MSerialization::CreateWriteByteStream | ( | MFileSystem::WriteableFile::Ptr & | iFilePtr | ) |
DLL_PDSERIALIZATION_EXIM WriteByteStream::ReturnPtr MSerialization::CreateWriteByteStream | ( | MMultiProcess::SharedMemory * | ipSharedMemPtr, |
unsigned Int32 | iBlockSize = 1024 |
||
) |
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::CreateWriteDataStream | ( | MBase::MemoryContract * | ipMemCon = 0 , |
unsigned short | header = 1 |
||
) |
Create a WriteDataStream using the specified stream header.
ipMemCon | a pointer to MemoryContract. Its default value is NULL. |
header | the header of the data stream. Any stream version information should be passed by it. Its default value is 1. |
WriteStreamException. |
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::CreateWriteDataStream | ( | MFileSystem::WriteableFile::Ptr & | iFilePtr, |
unsigned short | header = 1 |
||
) |
The following are overloaded methods for writing data to file instead of memory. Useful when serializing large data.
iFilePtr | Strong pointer to a Writeable file. The caller opens a Writeable file and gives up ownership of the file pointer to the data stream. When all is done the data stream commits and closes the file. |
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::CreateWriteDataStreamToSharedMem | ( | MMultiProcess::SharedMemory * | ipSharedMemPtr, |
unsigned Int32 | iBlockSize = 1024 |
||
) |
Create a write data stream which writes directly to the shared memory
DLL_PDSERIALIZATION_EXIM WriteDataStream* MSerialization::CreateWriteDataStreamToSharedMemByteStream | ( | MSerialization::WriteByteStream * | ipSharedMemWriteByteStreamPtr | ) |
Create a write data stream which writes directly to the shared memory based byte stream
WriteDataStream* MSerialization::CreateWriteDataStreamWithNoHeader | ( | bool | iRawFormat, |
unsigned | short = 1 , |
||
MBase::MemoryContract * | ipMemCon = 0 |
||
) |
DLL_PDSERIALIZATION_EXIM ReadBlockStream* MSerialization::GetReadBlockStreamFromFile | ( | MFileSystem::ReadableFile::Ptr & | iFilePtr | ) |
We don't have a ConvertBinary2ReadListStream here, because there is no need for a list stream which is not a block stream. Every list stream is a blcok stream too. We separate the interface just for the purpose of clarity. The following method is used for reading serialized data from a file.
iFilePtr | Strong pointer to a Readable file that contains a block stream. The caller opens a Readable file and gives up ownership of the file pointer to the block stream. When all is done the block stream commits and closes the file. |
DLL_PDSERIALIZATION_EXIM ReadDataStream* MSerialization::GetReadDataStreamFromFile | ( | MFileSystem::ReadableFile::Ptr & | iFilePtr | ) |
The following method is used for reading serialized data from a file.
iFilePtr | Strong pointer to a Readable file that contains a data stream. The caller opens a Readable file and gives up ownership of the file pointer to the data stream. When all is done the data stream commits and closes the file. |
bool MSerialization::MoreThan32Bit | ( | Int64 | iData | ) |
const unsigned char MSerialization::GN_Data_Stream_Flag = 0xBE |
const unsigned short MSerialization::LONG_VERSION = 0x8000 |
const value for specifying the safe version of WriteDataStream