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

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

#include <TypedData.h>

Public Member Functions

 TypedData (std::auto_ptr< serialization::pimpl::Data > data, serialization::pimpl::SerializationService &serializationService)
 
 TypedData (const boost::shared_ptr< serialization::pimpl::Data > &data, serialization::pimpl::SerializationService &serializationService)
 
const serialization::pimpl::ObjectType getType () const
 
template<typename T >
std::auto_ptr< T > get () const
 Deserializes the underlying binary data and produces the object of type T. More...
 
const boost::shared_ptr< serialization::pimpl::Data > getData () const
 Internal API. More...
 

Detailed Description

TypedData 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 >
std::auto_ptr<T> hazelcast::client::TypedData::get ( ) const
inline

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 getType 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.

◆ getData()

const boost::shared_ptr< serialization::pimpl::Data > hazelcast::client::TypedData::getData ( ) const

Internal API.

Returns
The pointer to the internal binary data.

◆ getType()

const serialization::pimpl::ObjectType hazelcast::client::TypedData::getType ( ) const
Returns
The type of the underlying object for this binary.

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