CARLA
Public Types | Static Public Member Functions | Private Types | Static Private Member Functions | List of all members
carla::sensor::CompositeSerializer< Items > Class Template Reference

Compile-time map for mapping sensor objects to serializers. More...

#include <CompositeSerializer.h>

+ Inheritance diagram for carla::sensor::CompositeSerializer< Items >:
+ Collaboration diagram for carla::sensor::CompositeSerializer< Items >:

Public Types

using interpreted_type = SharedPtr< SensorData >
 
- Public Types inherited from carla::sensor::CompileTimeTypeMap< Items... >
using get = typename detail::CompileTimeTypeMapImpl< sizeof...(Items), Items... >::template get< InKey >
 
using get_by_index = typename detail::CompileTimeTypeMapImpl< sizeof...(Items), Items... >::template get_by_index< Index >
 

Static Public Member Functions

static interpreted_type Deserialize (Buffer &&data)
 Deserializes a Buffer by calling the "Deserialize" function of the serializer that generated the Buffer. More...
 
template<typename Sensor , typename... Args>
static Buffer Serialize (Sensor &sensor, Args &&... args)
 Serialize the arguments provided into a Buffer by calling to the serializer registered for the given Sensor type. More...
 
- Static Public Member Functions inherited from carla::sensor::CompileTimeTypeMap< Items... >
static constexpr size_t size ()
 

Private Types

using Super = CompileTimeTypeMap< Items... >
 

Static Private Member Functions

template<typename Data >
static interpreted_type Deserialize (size_t index, Data &&data)
 
template<size_t Index, typename Data >
static interpreted_type Deserialize_impl (Data &&data)
 
template<typename Data , size_t... Is>
static interpreted_type Deserialize_impl (size_t i, Data &&data, std::index_sequence< Is... >)
 

Detailed Description

template<typename... Items>
class carla::sensor::CompositeSerializer< Items >

Compile-time map for mapping sensor objects to serializers.

The appropriate serializer is called for each sensor to serialize and deserialize its data.

Do not use directly, use the SensorRegistry instantiation.

Definition at line 29 of file CompositeSerializer.h.

Member Typedef Documentation

◆ interpreted_type

template<typename... Items>
using carla::sensor::CompositeSerializer< Items >::interpreted_type = SharedPtr<SensorData>

Definition at line 34 of file CompositeSerializer.h.

◆ Super

template<typename... Items>
using carla::sensor::CompositeSerializer< Items >::Super = CompileTimeTypeMap<Items...>
private

Definition at line 30 of file CompositeSerializer.h.

Member Function Documentation

◆ Deserialize() [1/2]

template<typename... Items>
CompositeSerializer< Items... >::interpreted_type carla::sensor::CompositeSerializer< Items >::Deserialize ( Buffer &&  data)
inlinestatic

Deserializes a Buffer by calling the "Deserialize" function of the serializer that generated the Buffer.

Definition at line 88 of file CompositeSerializer.h.

References carla::sensor::RawData::GetSensorTypeId().

Referenced by carla::sensor::Deserializer::Deserialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Deserialize() [2/2]

template<typename... Items>
template<typename Data >
static interpreted_type carla::sensor::CompositeSerializer< Items >::Deserialize ( size_t  index,
Data &&  data 
)
inlinestaticprivate

Definition at line 66 of file CompositeSerializer.h.

References carla::sensor::CompositeSerializer< Items >::Deserialize_impl(), and carla::sensor::CompileTimeTypeMap< Items... >::size().

+ Here is the call graph for this function:

◆ Deserialize_impl() [1/2]

template<typename... Items>
template<size_t Index, typename Data >
static interpreted_type carla::sensor::CompositeSerializer< Items >::Deserialize_impl ( Data &&  data)
inlinestaticprivate

Definition at line 48 of file CompositeSerializer.h.

Referenced by carla::sensor::CompositeSerializer< Items >::Deserialize().

+ Here is the caller graph for this function:

◆ Deserialize_impl() [2/2]

template<typename... Items>
template<typename Data , size_t... Is>
static interpreted_type carla::sensor::CompositeSerializer< Items >::Deserialize_impl ( size_t  i,
Data &&  data,
std::index_sequence< Is... >   
)
inlinestaticprivate

Definition at line 54 of file CompositeSerializer.h.

◆ Serialize()

template<typename... Items>
template<typename Sensor , typename... Args>
Buffer carla::sensor::CompositeSerializer< Items >::Serialize ( Sensor &  sensor,
Args &&...  args 
)
inlinestatic

Serialize the arguments provided into a Buffer by calling to the serializer registered for the given Sensor type.

Definition at line 80 of file CompositeSerializer.h.

Referenced by FAsyncDataStreamTmpl< T >::Send().

+ Here is the caller graph for this function:

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