![]() |
GridGain C++
|
Binary writer. More...
#include <binary_writer.h>
Public Member Functions | |
BinaryWriter (impl::binary::BinaryWriterImpl *impl) | |
Constructor. More... | |
void | WriteInt8 (const char *fieldName, int8_t val) |
Write 8-byte signed integer. More... | |
void | WriteInt8Array (const char *fieldName, const int8_t *val, int32_t len) |
Write array of 8-byte signed integers. More... | |
void | WriteBool (const char *fieldName, bool val) |
Write bool. More... | |
void | WriteBoolArray (const char *fieldName, const bool *val, int32_t len) |
Write array of bools. More... | |
void | WriteInt16 (const char *fieldName, int16_t val) |
Write 16-byte signed integer. More... | |
void | WriteInt16Array (const char *fieldName, const int16_t *val, int32_t len) |
Write array of 16-byte signed integers. More... | |
void | WriteUInt16 (const char *fieldName, uint16_t val) |
Write 16-byte unsigned integer. More... | |
void | WriteUInt16Array (const char *fieldName, const uint16_t *val, int32_t len) |
Write array of 16-byte unsigned integers. More... | |
void | WriteInt32 (const char *fieldName, int32_t val) |
Write 32-byte signed integer. More... | |
void | WriteInt32Array (const char *fieldName, const int32_t *val, int32_t len) |
Write array of 32-byte signed integers. More... | |
void | WriteInt64 (const char *fieldName, int64_t val) |
Write 64-byte signed integer. More... | |
void | WriteInt64Array (const char *fieldName, const int64_t *val, int32_t len) |
Write array of 64-byte signed integers. More... | |
void | WriteFloat (const char *fieldName, float val) |
Write float. More... | |
void | WriteFloatArray (const char *fieldName, const float *val, int32_t len) |
Write array of floats. More... | |
void | WriteDouble (const char *fieldName, double val) |
Write double. More... | |
void | WriteDoubleArray (const char *fieldName, const double *val, int32_t len) |
Write array of doubles. More... | |
void | WriteGuid (const char *fieldName, const Guid &val) |
Write Guid. More... | |
void | WriteGuidArray (const char *fieldName, const Guid *val, int32_t len) |
Write array of Guids. More... | |
void | WriteDate (const char *fieldName, const Date &val) |
Write Date. More... | |
void | WriteDateArray (const char *fieldName, const Date *val, int32_t len) |
Write array of Dates. More... | |
void | WriteTimestamp (const char *fieldName, const Timestamp &val) |
Write Timestamp. More... | |
void | WriteTimestampArray (const char *fieldName, const Timestamp *val, int32_t len) |
Write array of Timestamps. More... | |
void | WriteTime (const char *fieldName, const Time &val) |
Write Time. More... | |
void | WriteTimeArray (const char *fieldName, const Time *val, int32_t len) |
Write array of Times. More... | |
void | WriteString (const char *fieldName, const char *val) |
Write string. More... | |
void | WriteString (const char *fieldName, const char *val, int32_t len) |
Write string. More... | |
void | WriteString (const char *fieldName, const std::string &val) |
Write string. More... | |
BinaryStringArrayWriter | WriteStringArray (const char *fieldName) |
Start string array write. More... | |
void | WriteBinaryEnum (const char *fieldName, BinaryEnumEntry entry) |
Write binary enum entry. More... | |
void | WriteNull (const char *fieldName) |
Write NULL value. More... | |
template<typename T > | |
BinaryArrayWriter< T > | WriteArray (const char *fieldName) |
Start array write. More... | |
template<typename T > | |
BinaryCollectionWriter< T > | WriteCollection (const char *fieldName) |
Start collection write. More... | |
template<typename T > | |
BinaryCollectionWriter< T > | WriteCollection (const char *fieldName, CollectionType::Type typ) |
Start collection write. More... | |
template<typename InputIterator > | |
void | WriteCollection (const char *fieldName, InputIterator first, InputIterator last) |
Write values in interval [first, last). More... | |
template<typename InputIterator > | |
void | WriteCollection (const char *fieldName, InputIterator first, InputIterator last, CollectionType::Type typ) |
Write values in interval [first, last). More... | |
template<typename K , typename V > | |
BinaryMapWriter< K, V > | WriteMap (const char *fieldName) |
Start map write. More... | |
template<typename K , typename V > | |
BinaryMapWriter< K, V > | WriteMap (const char *fieldName, MapType::Type typ) |
Start map write. More... | |
template<typename T > | |
void | WriteObject (const char *fieldName, const T &val) |
Write object. More... | |
template<typename T > | |
void | WriteEnum (const char *fieldName, T val) |
Write enum entry. More... | |
BinaryRawWriter | RawWriter () |
Get raw writer for this reader. More... | |
Binary writer.
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::BinaryWriter::BinaryWriter | ( | impl::binary::BinaryWriterImpl * | impl | ) |
Constructor.
Internal method. Should not be used by user.
impl | Implementation. |
BinaryRawWriter ignite::binary::BinaryWriter::RawWriter | ( | ) |
Get raw writer for this reader.
|
inline |
Start array write.
Every time you get a BinaryArrayWriter from BinaryWriter you start writing session. Only one single writing session can be open at a time. So it is not allowed to start new writing session without calling BinaryArrayWriter::Close() method prior on obtained BinaryArrayWriter class instance.
fieldName | Field name. |
void ignite::binary::BinaryWriter::WriteBinaryEnum | ( | const char * | fieldName, |
BinaryEnumEntry | entry | ||
) |
Write binary enum entry.
fieldName | Field name. |
entry | Binary enum entry. |
void ignite::binary::BinaryWriter::WriteBool | ( | const char * | fieldName, |
bool | val | ||
) |
Write bool.
Maps to "short" type in Java.
fieldName | Field name. |
val | Value. |
void ignite::binary::BinaryWriter::WriteBoolArray | ( | const char * | fieldName, |
const bool * | val, | ||
int32_t | len | ||
) |
Write array of bools.
Maps to "bool[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
|
inline |
Start collection write.
Every time you get a BinaryCollectionWriter from BinaryWriter you start writing session. Only one single writing session can be open at a time. So it is not allowed to start new writing session without calling BinaryCollectionWriter::Close() method prior on obtained BinaryCollectionWriter class instance.
fieldName | Field name. |
|
inline |
Start collection write.
Every time you get a BinaryCollectionWriter from BinaryWriter you start writing session. Only one single writing session can be open at a time. So it is not allowed to start new writing session without calling BinaryCollectionWriter::Close() method prior on obtained BinaryCollectionWriter class instance.
fieldName | Field name. |
typ | Collection type. |
|
inline |
Write values in interval [first, last).
fieldName | Field name. |
first | Iterator pointing to the beginning of the interval. |
last | Iterator pointing to the end of the interval. |
|
inline |
Write values in interval [first, last).
fieldName | Field name. |
first | Iterator pointing to the beginning of the interval. |
last | Iterator pointing to the end of the interval. |
typ | Collection type. |
void ignite::binary::BinaryWriter::WriteDate | ( | const char * | fieldName, |
const Date & | val | ||
) |
void ignite::binary::BinaryWriter::WriteDateArray | ( | const char * | fieldName, |
const Date * | val, | ||
int32_t | len | ||
) |
Write array of Dates.
Maps to "Date[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
void ignite::binary::BinaryWriter::WriteDouble | ( | const char * | fieldName, |
double | val | ||
) |
Write double.
Maps to "double" type in Java.
fieldName | Field name. |
val | Value. |
void ignite::binary::BinaryWriter::WriteDoubleArray | ( | const char * | fieldName, |
const double * | val, | ||
int32_t | len | ||
) |
Write array of doubles.
Maps to "double[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
|
inline |
Write enum entry.
fieldName | Field name. |
val | Binary enum entry. |
@trapam T Enum type. BinaryEnum class template should be specialized for the type.
void ignite::binary::BinaryWriter::WriteFloat | ( | const char * | fieldName, |
float | val | ||
) |
Write float.
Maps to "float" type in Java.
fieldName | Field name. |
val | Value. |
void ignite::binary::BinaryWriter::WriteFloatArray | ( | const char * | fieldName, |
const float * | val, | ||
int32_t | len | ||
) |
Write array of floats.
Maps to "float[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
void ignite::binary::BinaryWriter::WriteGuid | ( | const char * | fieldName, |
const Guid & | val | ||
) |
void ignite::binary::BinaryWriter::WriteGuidArray | ( | const char * | fieldName, |
const Guid * | val, | ||
int32_t | len | ||
) |
Write array of Guids.
Maps to "UUID[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
void ignite::binary::BinaryWriter::WriteInt16 | ( | const char * | fieldName, |
int16_t | val | ||
) |
Write 16-byte signed integer.
Maps to "short" type in Java.
fieldName | Field name. |
val | Value. |
void ignite::binary::BinaryWriter::WriteInt16Array | ( | const char * | fieldName, |
const int16_t * | val, | ||
int32_t | len | ||
) |
Write array of 16-byte signed integers.
Maps to "short[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
void ignite::binary::BinaryWriter::WriteInt32 | ( | const char * | fieldName, |
int32_t | val | ||
) |
Write 32-byte signed integer.
Maps to "int" type in Java.
fieldName | Field name. |
val | Value. |
void ignite::binary::BinaryWriter::WriteInt32Array | ( | const char * | fieldName, |
const int32_t * | val, | ||
int32_t | len | ||
) |
Write array of 32-byte signed integers.
Maps to "int[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
void ignite::binary::BinaryWriter::WriteInt64 | ( | const char * | fieldName, |
int64_t | val | ||
) |
Write 64-byte signed integer.
Maps to "long" type in Java.
fieldName | Field name. |
val | Value. |
void ignite::binary::BinaryWriter::WriteInt64Array | ( | const char * | fieldName, |
const int64_t * | val, | ||
int32_t | len | ||
) |
Write array of 64-byte signed integers.
Maps to "long[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
void ignite::binary::BinaryWriter::WriteInt8 | ( | const char * | fieldName, |
int8_t | val | ||
) |
Write 8-byte signed integer.
Maps to "byte" type in Java.
fieldName | Field name. |
val | Value. |
void ignite::binary::BinaryWriter::WriteInt8Array | ( | const char * | fieldName, |
const int8_t * | val, | ||
int32_t | len | ||
) |
Write array of 8-byte signed integers.
Maps to "byte[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
|
inline |
Start map write.
Every time you get a BinaryMapWriter from BinaryWriter you start writing session. Only one single writing session can be open at a time. So it is not allowed to start new writing session without calling BinaryMapWriter::Close() method prior on obtained BinaryMapWriter class instance.
fieldName | Field name. |
|
inline |
Start map write.
Every time you get a BinaryMapWriter from BinaryWriter you start writing session. Only one single writing session can be open at a time. So it is not allowed to start new writing session without calling BinaryMapWriter::Close() method prior on obtained BinaryMapWriter class instance.
fieldName | Field name. |
typ | Map type. |
void ignite::binary::BinaryWriter::WriteNull | ( | const char * | fieldName | ) |
Write NULL value.
fieldName | Field name. |
|
inline |
Write object.
fieldName | Field name. |
val | Value. |
void ignite::binary::BinaryWriter::WriteString | ( | const char * | fieldName, |
const char * | val | ||
) |
Write string.
fieldName | Field name. |
val | Null-terminated character sequence. |
void ignite::binary::BinaryWriter::WriteString | ( | const char * | fieldName, |
const char * | val, | ||
int32_t | len | ||
) |
Write string.
fieldName | Field name. |
val | String. |
len | String length (characters). |
|
inline |
Write string.
fieldName | Field name. |
val | String. |
BinaryStringArrayWriter ignite::binary::BinaryWriter::WriteStringArray | ( | const char * | fieldName | ) |
Start string array write.
Every time you get a BinaryStringArrayWriter from BinaryWriter you start writing session. Only one single writing session can be open at a time. So it is not allowed to start new writing session without calling BinaryStringArrayWriter::Close() method prior on obtained BinaryStringArrayWriter class instance.
fieldName | Field name. |
void ignite::binary::BinaryWriter::WriteTime | ( | const char * | fieldName, |
const Time & | val | ||
) |
void ignite::binary::BinaryWriter::WriteTimeArray | ( | const char * | fieldName, |
const Time * | val, | ||
int32_t | len | ||
) |
Write array of Times.
Maps to "Time[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
void ignite::binary::BinaryWriter::WriteTimestamp | ( | const char * | fieldName, |
const Timestamp & | val | ||
) |
void ignite::binary::BinaryWriter::WriteTimestampArray | ( | const char * | fieldName, |
const Timestamp * | val, | ||
int32_t | len | ||
) |
Write array of Timestamps.
Maps to "Timestamp[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |
void ignite::binary::BinaryWriter::WriteUInt16 | ( | const char * | fieldName, |
uint16_t | val | ||
) |
Write 16-byte unsigned integer.
Maps to "char" type in Java.
fieldName | Field name. |
val | Value. |
void ignite::binary::BinaryWriter::WriteUInt16Array | ( | const char * | fieldName, |
const uint16_t * | val, | ||
int32_t | len | ||
) |
Write array of 16-byte unsigned integers.
Maps to "char[]" type in Java.
fieldName | Field name. |
val | Array. |
len | Array length. |