Zserio C++ runtime library  1.2.0
Built for Zserio 2.16.0
zserio::BasicReflectableServiceData< ALLOC > Class Template Reference

#include <IService.h>

Inheritance diagram for zserio::BasicReflectableServiceData< ALLOC >:
Collaboration diagram for zserio::BasicReflectableServiceData< ALLOC >:

Public Member Functions

 BasicReflectableServiceData (const IBasicReflectableConstPtr< ALLOC > &reflectable, const ALLOC &allocator=ALLOC())
 
IBasicReflectableConstPtr< ALLOC > getReflectable () const override
 
Span< const uint8_t > getData () const override
 
- Public Member Functions inherited from zserio::IBasicServiceData< std::allocator< uint8_t > >
virtual ~IBasicServiceData ()=default
 

Detailed Description

template<typename ALLOC = std::allocator<uint8_t>>
class zserio::BasicReflectableServiceData< ALLOC >

Service data implementation based on reflectable interface.

Holds reference to the reflectable object and lazy-initialized serialized data in case that getData() is used.

Definition at line 51 of file IService.h.

Constructor & Destructor Documentation

◆ BasicReflectableServiceData()

template<typename ALLOC = std::allocator<uint8_t>>
zserio::BasicReflectableServiceData< ALLOC >::BasicReflectableServiceData ( const IBasicReflectableConstPtr< ALLOC > &  reflectable,
const ALLOC &  allocator = ALLOC() 
)
inlineexplicit

Constructor from reflectable.

Parameters
reflectableConstant reflectable created from zserio request object.
allocatorAllocator to use for data allocation.

Definition at line 60 of file IService.h.

Member Function Documentation

◆ getData()

template<typename ALLOC = std::allocator<uint8_t>>
Span<const uint8_t> zserio::BasicReflectableServiceData< ALLOC >::getData ( ) const
inlineoverridevirtual

Lazy initialized data serialized using the reflectable object.

Gets service data as bytes.

Returns
Service data.

Implements zserio::IBasicServiceData< std::allocator< uint8_t > >.

Definition at line 76 of file IService.h.

◆ getReflectable()

template<typename ALLOC = std::allocator<uint8_t>>
IBasicReflectableConstPtr<ALLOC> zserio::BasicReflectableServiceData< ALLOC >::getReflectable ( ) const
inlineoverridevirtual

Gets reflectable representing the service data (if available).

Returns
Reflectable or null when no reflectable is available.

Implements zserio::IBasicServiceData< std::allocator< uint8_t > >.

Definition at line 66 of file IService.h.


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