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