![]() |
GridGain C++
|
Binary reader. More...
#include <binary_reader.h>
Public Member Functions | |
BinaryReader (ignite::impl::binary::BinaryReaderImpl *impl) | |
Constructor. More... | |
bool | IsNull (const char *fieldName) |
Check whether the field is null. More... | |
int8_t | ReadInt8 (const char *fieldName) |
Read 8-byte signed integer. More... | |
int32_t | ReadInt8Array (const char *fieldName, int8_t *res, int32_t len) |
Read array of 8-byte signed integers. More... | |
bool | ReadBool (const char *fieldName) |
Read bool. More... | |
int32_t | ReadBoolArray (const char *fieldName, bool *res, int32_t len) |
Read array of bools. More... | |
int16_t | ReadInt16 (const char *fieldName) |
Read 16-byte signed integer. More... | |
int32_t | ReadInt16Array (const char *fieldName, int16_t *res, int32_t len) |
Read array of 16-byte signed integers. More... | |
uint16_t | ReadUInt16 (const char *fieldName) |
Read 16-byte unsigned integer. More... | |
int32_t | ReadUInt16Array (const char *fieldName, uint16_t *res, int32_t len) |
Read array of 16-byte unsigned integers. More... | |
int32_t | ReadInt32 (const char *fieldName) |
Read 32-byte signed integer. More... | |
int32_t | ReadInt32Array (const char *fieldName, int32_t *res, int32_t len) |
Read array of 32-byte signed integers. More... | |
int64_t | ReadInt64 (const char *fieldName) |
Read 64-byte signed integer. More... | |
int32_t | ReadInt64Array (const char *fieldName, int64_t *res, int32_t len) |
Read array of 64-byte signed integers. More... | |
float | ReadFloat (const char *fieldName) |
Read float. More... | |
int32_t | ReadFloatArray (const char *fieldName, float *res, int32_t len) |
Read array of floats. More... | |
double | ReadDouble (const char *fieldName) |
Read double. More... | |
int32_t | ReadDoubleArray (const char *fieldName, double *res, int32_t len) |
Read array of doubles. More... | |
Guid | ReadGuid (const char *fieldName) |
Read Guid. More... | |
int32_t | ReadGuidArray (const char *fieldName, Guid *res, int32_t len) |
Read array of Guids. More... | |
Date | ReadDate (const char *fieldName) |
Read Date. More... | |
int32_t | ReadDateArray (const char *fieldName, Date *res, int32_t len) |
Read array of Dates. More... | |
Timestamp | ReadTimestamp (const char *fieldName) |
Read Timestamp. More... | |
int32_t | ReadTimestampArray (const char *fieldName, Timestamp *res, int32_t len) |
Read array of Timestamps. More... | |
Time | ReadTime (const char *fieldName) |
Read Time. More... | |
int32_t | ReadTimeArray (const char *fieldName, Time *res, int32_t len) |
Read array of Times. More... | |
int32_t | ReadString (const char *fieldName, char *res, int32_t len) |
Read string. More... | |
std::string | ReadString (const char *fieldName) |
Read string from the stream. More... | |
BinaryStringArrayReader | ReadStringArray (const char *fieldName) |
Start string array read. More... | |
BinaryEnumEntry | ReadBinaryEnum (const char *fieldName) |
Read enum entry. More... | |
template<typename T > | |
BinaryArrayReader< T > | ReadArray (const char *fieldName) |
Start array read. More... | |
template<typename T > | |
BinaryCollectionReader< T > | ReadCollection (const char *fieldName) |
Start collection read. More... | |
template<typename T , typename OutputIterator > | |
int32_t | ReadCollection (const char *fieldName, OutputIterator out) |
Read values and insert them to specified position. More... | |
template<typename K , typename V > | |
BinaryMapReader< K, V > | ReadMap (const char *fieldName) |
Start map read. More... | |
CollectionType::Type | ReadCollectionType (const char *fieldName) |
Read type of the collection. More... | |
int32_t | ReadCollectionSize (const char *fieldName) |
Read type of the collection. More... | |
template<typename T > | |
T | ReadObject (const char *fieldName) |
Read object. More... | |
template<typename T > | |
T | ReadEnum (const char *fieldName) |
Read enum value. More... | |
BinaryRawReader | RawReader () |
Get raw reader for this reader. More... | |
Binary reader.
This class is implemented as a reference to an implementation so copying of this class instance will only create another reference to the same underlying object.
ignite::binary::BinaryReader::BinaryReader | ( | ignite::impl::binary::BinaryReaderImpl * | impl | ) |
Constructor.
Internal method. Should not be used by user.
impl | Implementation. |
bool ignite::binary::BinaryReader::IsNull | ( | const char * | fieldName | ) |
Check whether the field is null.
fieldName | Field name. |
true
if the field is null or isn't present, and false
otherwise. BinaryRawReader ignite::binary::BinaryReader::RawReader | ( | ) |
Get raw reader for this reader.
|
inline |
Start array read.
Every time you get a BinaryArrayReader from BinaryReader you start reading session. Only one single reading session can be open at a time. So it is not allowed to start new reading session until all elements of the collection have been read.
fieldName | Field name. |
BinaryEnumEntry ignite::binary::BinaryReader::ReadBinaryEnum | ( | const char * | fieldName | ) |
Read enum entry.
fieldName | Field name. |
bool ignite::binary::BinaryReader::ReadBool | ( | const char * | fieldName | ) |
Read bool.
Maps to "short" type in Java.
fieldName | Field name. |
int32_t ignite::binary::BinaryReader::ReadBoolArray | ( | const char * | fieldName, |
bool * | res, | ||
int32_t | len | ||
) |
Read array of bools.
Maps to "bool[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
|
inline |
Start collection read.
Every time you get a BinaryCollectionReader from BinaryReader you start reading session. Only one single reading session can be open at a time. So it is not allowed to start new reading session until all elements of the collection have been read.
fieldName | Field name. |
|
inline |
Read values and insert them to specified position.
fieldName | Field name. |
out | Output iterator to the initial position in the destination sequence. |
int32_t ignite::binary::BinaryReader::ReadCollectionSize | ( | const char * | fieldName | ) |
Read type of the collection.
fieldName | Field name. |
CollectionType::Type ignite::binary::BinaryReader::ReadCollectionType | ( | const char * | fieldName | ) |
Read type of the collection.
fieldName | Field name. |
Date ignite::binary::BinaryReader::ReadDate | ( | const char * | fieldName | ) |
int32_t ignite::binary::BinaryReader::ReadDateArray | ( | const char * | fieldName, |
Date * | res, | ||
int32_t | len | ||
) |
Read array of Dates.
Maps to "Date[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
double ignite::binary::BinaryReader::ReadDouble | ( | const char * | fieldName | ) |
Read double.
Maps to "double" type in Java.
fieldName | Field name. |
int32_t ignite::binary::BinaryReader::ReadDoubleArray | ( | const char * | fieldName, |
double * | res, | ||
int32_t | len | ||
) |
Read array of doubles.
Maps to "double[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
|
inline |
Read enum value.
@trapam T Enum type. BinaryEnum class template should be specialized for the type.
float ignite::binary::BinaryReader::ReadFloat | ( | const char * | fieldName | ) |
Read float.
Maps to "float" type in Java.
fieldName | Field name. |
int32_t ignite::binary::BinaryReader::ReadFloatArray | ( | const char * | fieldName, |
float * | res, | ||
int32_t | len | ||
) |
Read array of floats.
Maps to "float[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
Guid ignite::binary::BinaryReader::ReadGuid | ( | const char * | fieldName | ) |
int32_t ignite::binary::BinaryReader::ReadGuidArray | ( | const char * | fieldName, |
Guid * | res, | ||
int32_t | len | ||
) |
Read array of Guids.
Maps to "UUID[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
int16_t ignite::binary::BinaryReader::ReadInt16 | ( | const char * | fieldName | ) |
Read 16-byte signed integer.
Maps to "short" type in Java.
fieldName | Field name. |
int32_t ignite::binary::BinaryReader::ReadInt16Array | ( | const char * | fieldName, |
int16_t * | res, | ||
int32_t | len | ||
) |
Read array of 16-byte signed integers.
Maps to "short[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
int32_t ignite::binary::BinaryReader::ReadInt32 | ( | const char * | fieldName | ) |
Read 32-byte signed integer.
Maps to "int" type in Java.
fieldName | Field name. |
int32_t ignite::binary::BinaryReader::ReadInt32Array | ( | const char * | fieldName, |
int32_t * | res, | ||
int32_t | len | ||
) |
Read array of 32-byte signed integers.
Maps to "int[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
int64_t ignite::binary::BinaryReader::ReadInt64 | ( | const char * | fieldName | ) |
Read 64-byte signed integer.
Maps to "long" type in Java.
fieldName | Field name. |
int32_t ignite::binary::BinaryReader::ReadInt64Array | ( | const char * | fieldName, |
int64_t * | res, | ||
int32_t | len | ||
) |
Read array of 64-byte signed integers.
Maps to "long[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
int8_t ignite::binary::BinaryReader::ReadInt8 | ( | const char * | fieldName | ) |
Read 8-byte signed integer.
Maps to "byte" type in Java.
fieldName | Field name. |
int32_t ignite::binary::BinaryReader::ReadInt8Array | ( | const char * | fieldName, |
int8_t * | res, | ||
int32_t | len | ||
) |
Read array of 8-byte signed integers.
Maps to "byte[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
|
inline |
Start map read.
Every time you get a BinaryMapReader from BinaryReader you start reading session. Only one single reading session can be open at a time. So it is not allowed to start new reading session until all elements of the collection have been read.
fieldName | Field name. |
|
inline |
Read object.
fieldName | Field name. |
@trapam T Object type. BinaryType class template should be specialized for the type.
|
inline |
Read string from the stream.
fieldName | Field name. |
int32_t ignite::binary::BinaryReader::ReadString | ( | const char * | fieldName, |
char * | res, | ||
int32_t | len | ||
) |
Read string.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of string. NULL terminator will be set in case len is greater than real string length. |
BinaryStringArrayReader ignite::binary::BinaryReader::ReadStringArray | ( | const char * | fieldName | ) |
Start string array read.
Every time you get a BinaryStringArrayReader from BinaryReader you start reading session. Only one single reading session can be open at a time. So it is not allowed to start new reading session until all elements of the collection have been read.
fieldName | Field name. |
Time ignite::binary::BinaryReader::ReadTime | ( | const char * | fieldName | ) |
int32_t ignite::binary::BinaryReader::ReadTimeArray | ( | const char * | fieldName, |
Time * | res, | ||
int32_t | len | ||
) |
Read array of Times.
Maps to "Time[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
Timestamp ignite::binary::BinaryReader::ReadTimestamp | ( | const char * | fieldName | ) |
int32_t ignite::binary::BinaryReader::ReadTimestampArray | ( | const char * | fieldName, |
Timestamp * | res, | ||
int32_t | len | ||
) |
Read array of Timestamps.
Maps to "Timestamp[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |
uint16_t ignite::binary::BinaryReader::ReadUInt16 | ( | const char * | fieldName | ) |
Read 16-byte unsigned integer.
Maps to "char" type in Java.
fieldName | Field name. |
int32_t ignite::binary::BinaryReader::ReadUInt16Array | ( | const char * | fieldName, |
uint16_t * | res, | ||
int32_t | len | ||
) |
Read array of 16-byte unsigned integers.
Maps to "char[]" type in Java.
fieldName | Field name. |
res | Array to store data to. |
len | Expected length of array. |