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 1526 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 110 of file serialization.cpp.
111 if (is_default_writer_)
112 return default_portable_writer_->get_raw_data_output();
113 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 1618 of file serialization.h.
1619 if (is_default_writer_)
1620 return default_portable_writer_->write_null_portable<T>(field_name);
1621 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 1631 of file serialization.h.
1632 if (is_default_writer_)
1633 return default_portable_writer_->write_portable(field_name, portable);
1634 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 1645 of file serialization.h.
1646 if (is_default_writer_)
1647 return default_portable_writer_->write_portable_array(field_name, values);
1648 return class_definition_writer_->write_portable_array(field_name, values);
The documentation for this class was generated from the following files: