Hazelcast C++ Client
Hazelcast C++ Client Library
hazelcast::client::serialization::object_data_input Class Reference
+ Inheritance diagram for hazelcast::client::serialization::object_data_input:

Public Member Functions

 object_data_input (boost::endian::order byte_order, const std::vector< byte > &buffer, int offset, pimpl::PortableSerializer &portable_ser, pimpl::compact_stream_serializer &compact_ser, pimpl::DataSerializer &data_ser, std::shared_ptr< serialization::global_serializer > global_serializer)
 Internal API. More...
 
template<typename T >
std::enable_if< !(std::is_array< T >::value &&std::is_same< typename std::remove_all_extents< T >::type, char >::value), boost::optional< T > >::type read_object ()
 
template<typename T >
std::enable_if< std::is_array< T >::value &&std::is_same< typename std::remove_all_extents< T >::type, char >::value, boost::optional< std::string > >::type read_object ()
 
template<typename T >
std::enable_if< std::is_base_of< identified_data_serializer, hz_serializer< T > >::value, boost::optional< T > >::type read_object (int32_t type_id)
 
template<typename T >
std::enable_if< std::is_base_of< portable_serializer, hz_serializer< T > >::value, boost::optional< T > >::type read_object (int32_t type_id)
 
template<typename T >
std::enable_if< std::is_base_of< compact_serializer, hz_serializer< T > >::value, boost::optional< T > >::type read_object (int32_t type_id)
 
template<typename T >
std::enable_if< std::is_base_of< builtin_serializer, hz_serializer< T > >::value, boost::optional< T > >::type read_object (int32_t type_id)
 
template<typename T >
std::enable_if< std::is_base_of< custom_serializer, hz_serializer< T > >::value, boost::optional< T > >::type read_object (int32_t type_id)
 
template<typename T >
std::enable_if< !(std::is_base_of< identified_data_serializer, hz_serializer< T >>::value||std::is_base_of< portable_serializer, hz_serializer< T >>::value||std::is_base_of< compact_serializer, hz_serializer< T >>::value||std::is_base_of< builtin_serializer, hz_serializer< T >>::value||std::is_base_of< custom_serializer, hz_serializer< T >>::value), boost::optional< T > >::type read_object (int32_t type_id)
 Global serialization. More...
 

Friends

class compact_reader
 
class portable_reader
 
template<typename OFFSET_TYPE >
int32_t pimpl::offset_reader::get_offset (object_data_input &in, uint32_t variable_offsets_pos, uint32_t index)
 

Detailed Description

Definition at line 749 of file serialization.h.

Constructor & Destructor Documentation

◆ object_data_input()

hazelcast::client::serialization::object_data_input::object_data_input ( boost::endian::order  byte_order,
const std::vector< byte > &  buffer,
int  offset,
pimpl::PortableSerializer &  portable_ser,
pimpl::compact_stream_serializer &  compact_ser,
pimpl::DataSerializer &  data_ser,
std::shared_ptr< serialization::global_serializer global_serializer 
)

Internal API.

Constructor

Definition at line 367 of file serialization.cpp.

375  : pimpl::data_input<std::vector<byte>>(byte_order, buffer, offset)
376  , portable_serializer_(portable_ser)
377  , compact_serializer_(compact_ser)
378  , data_serializer_(data_ser)
379  , global_serializer_(std::move(global_serializer))
380 {}

Member Function Documentation

◆ read_object() [1/2]

template<typename T >
std::enable_if< std::is_array< T >::value &&std::is_same< typename std::remove_all_extents< T >::type, char >::value, boost::optional< std::string > >::type hazelcast::client::serialization::object_data_input::read_object
inline
Returns
the object read
Exceptions
ioif it reaches end of file before finish reading

Definition at line 2383 of file serialization.h.

2384 {
2385  int32_t typeId = read(boost::endian::order::big);
2386  if (static_cast<int32_t>(
2387  pimpl::serialization_constants::CONSTANT_TYPE_NULL) == typeId) {
2388  return boost::none;
2389  }
2390  return read_object<T>(typeId);
2391 }

◆ read_object() [2/2]

template<typename T >
std::enable_if< !(std::is_base_of<identified_data_serializer, hz_serializer<T>>::value || std::is_base_of<portable_serializer, hz_serializer<T>>::value || std::is_base_of<compact_serializer, hz_serializer<T>>::value || std::is_base_of<builtin_serializer, hz_serializer<T>>::value || std::is_base_of<custom_serializer, hz_serializer<T>>::value), boost::optional<T> >::type hazelcast::client::serialization::object_data_input::read_object ( int32_t  type_id)
inline

Global serialization.

Template Parameters
TThe type to be deserialized to
Parameters
typeIdthe type id of the serilizer
Returns
the deserialized object

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