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

#include <IService.h>

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

Public Member Functions

 BasicRawServiceDataView (zserio::Span< const uint8_t > rawData)
 
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::BasicRawServiceDataView< ALLOC >

Service data implementation which only keeps pointer to the raw data buffer.

Must be used with caution only when the proper life-time of the data is ensured.

Definition at line 173 of file IService.h.

Constructor & Destructor Documentation

◆ BasicRawServiceDataView()

template<typename ALLOC = std::allocator<uint8_t>>
zserio::BasicRawServiceDataView< ALLOC >::BasicRawServiceDataView ( zserio::Span< const uint8_t >  rawData)
inlineexplicit

Constructor from span.

Parameters
rawDataSpan as a pointer to the raw data buffer.

Definition at line 181 of file IService.h.

Member Function Documentation

◆ getData()

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

Gets service data as bytes.

Returns
Service data.

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

Definition at line 190 of file IService.h.

◆ getReflectable()

template<typename ALLOC = std::allocator<uint8_t>>
IBasicReflectableConstPtr<ALLOC> zserio::BasicRawServiceDataView< 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 185 of file IService.h.


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