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

typed_data class is a wrapper class for the serialized binary data. More...

#include <serialization.h>

Public Member Functions

 typed_data (serialization::pimpl::data d, serialization::pimpl::SerializationService &serialization_service)
 
serialization::pimpl::object_type get_type () const
 
template<typename T >
boost::optional< T > get () const
 Deserializes the underlying binary data and produces the object of type T. More...
 
const serialization::pimpl::data & get_data () const
 Internal API. More...
 

Detailed Description

typed_data class is a wrapper class for the serialized binary data.

It does late deserialization of the data only when the get method is called.

Member Function Documentation

◆ get()

template<typename T >
boost::optional< T > hazelcast::client::typed_data::get ( ) const

Deserializes the underlying binary data and produces the object of type T.

CAUTION: The type that you provide should be compatible with what object type is returned with the get_type API, otherwise you will either get an exception of incorrectly try deserialize the binary data.

Template Parameters
TThe type to be used for deserialization
Returns
The object instance of type T.

◆ get_data()

const serialization::pimpl::data & hazelcast::client::typed_data::get_data ( ) const

Internal API.

Returns
The pointer to the internal binary data.

◆ get_type()

serialization::pimpl::object_type hazelcast::client::typed_data::get_type ( ) const
Returns
The type of the underlying object for this binary.

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