Hazelcast C++ Client
Public Member Functions | List of all members
hazelcast::client::serialization::portable_writer Class Reference

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>

Public Member Functions

 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_outputget_raw_data_output ()
 After writing portable fields, one can write remaining fields in old fashioned way consecutively at the end of stream. More...
 

Detailed Description

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.

Member Function Documentation

◆ 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
io_exception

◆ 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
typeof the portable field
Parameters
fieldNamename of the field
Exceptions
io_exception

◆ write_portable()

template<typename T >
void hazelcast::client::serialization::portable_writer::write_portable ( const std::string &  field_name,
const T *  portable 
)
Template Parameters
typeof the portable class
Parameters
fieldNamename of the field
portablePortable to be written
Exceptions
io_exception

◆ 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
typeof the portable class
Parameters
fieldNamename of the field
valuesportable array to be written
Exceptions
io_exception

The documentation for this class was generated from the following files: