Provides a mean of writing portable fields to a binary in form of java primitives arrays of java primitives , nested portable fields and array of portable fields.
More...
#include <serialization.h>
|
| portable_writer (pimpl::DefaultPortableWriter *default_portable_writer) |
| Internal api constructor.
|
|
| portable_writer (pimpl::ClassDefinitionWriter *class_definition_writer) |
| Internal api constructor.
|
|
template<typename T > |
void | write (const std::string &field_name, T value) |
|
void | end () |
| Internal api , should not be called by end user.
|
|
template<typename T > |
void | write_null_portable (const std::string &field_name) |
| To write a null portable value. More...
|
|
template<typename T > |
void | write_portable (const std::string &field_name, const T *portable) |
|
template<typename T > |
void | write_portable_array (const std::string &field_name, const std::vector< T > *values) |
|
object_data_output & | get_raw_data_output () |
| After writing portable fields, one can write remaining fields in old fashioned way consecutively at the end of stream. More...
|
|
Provides a mean of writing portable fields to a binary in form of java primitives arrays of java primitives , nested portable fields and array of portable fields.
Definition at line 2091 of file serialization.h.
◆ get_raw_data_output()
object_data_output & hazelcast::client::serialization::portable_writer::get_raw_data_output |
( |
| ) |
|
After writing portable fields, one can write remaining fields in old fashioned way consecutively at the end of stream.
User should not that after getting rawDataOutput trying to write portable fields will result in io_exception
- Returns
- object_data_output
- Exceptions
-
Definition at line 125 of file serialization.cpp.
127 if (is_default_writer_)
128 return default_portable_writer_->get_raw_data_output();
129 return class_definition_writer_->get_raw_data_output();
◆ write_null_portable()
template<typename T >
void hazelcast::client::serialization::portable_writer::write_null_portable |
( |
const std::string & |
field_name | ) |
|
To write a null portable value.
- Template Parameters
-
type | of the portable field |
- Parameters
-
fieldName | name of the field |
- Exceptions
-
Definition at line 2192 of file serialization.h.
2194 if (is_default_writer_)
2195 return default_portable_writer_->write_null_portable<T>(field_name);
2196 return class_definition_writer_->write_null_portable<T>(field_name);
◆ write_portable()
template<typename T >
void hazelcast::client::serialization::portable_writer::write_portable |
( |
const std::string & |
field_name, |
|
|
const T * |
portable |
|
) |
| |
- Template Parameters
-
type | of the portable class |
- Parameters
-
fieldName | name of the field |
portable | Portable to be written |
- Exceptions
-
Definition at line 2207 of file serialization.h.
2210 if (is_default_writer_)
2211 return default_portable_writer_->write_portable(field_name, portable);
2212 return class_definition_writer_->write_portable(field_name, portable);
◆ write_portable_array()
template<typename T >
void hazelcast::client::serialization::portable_writer::write_portable_array |
( |
const std::string & |
field_name, |
|
|
const std::vector< T > * |
values |
|
) |
| |
- Template Parameters
-
type | of the portable class |
- Parameters
-
fieldName | name of the field |
values | portable array to be written |
- Exceptions
-
Definition at line 2223 of file serialization.h.
2226 if (is_default_writer_)
2227 return default_portable_writer_->write_portable_array(field_name,
2229 return class_definition_writer_->write_portable_array(field_name, values);
The documentation for this class was generated from the following files: