1 #ifndef ZSERIO_ISERVICE_H_INC
2 #define ZSERIO_ISERVICE_H_INC
21 template <
typename ALLOC = std::allocator<u
int8_t>>
44 template <
typename ALLOC = std::allocator<u
int8_t>>
53 template <
typename ZSERIO_OBJECT,
typename ALLOC = std::allocator<u
int8_t>>
64 m_response(
std::move(response)),
71 return m_introspectable;
81 if (m_introspectable && m_data.getBitSize() == 0)
84 m_data = m_introspectable->serialize(m_data.get_allocator());
86 return m_data.getData();
90 ZSERIO_OBJECT m_response;
98 template <
typename ALLOC = std::allocator<u
int8_t>>
108 template <
typename ZSERIO_OBJECT>
120 return m_data.getData();
130 template <
typename ALLOC = std::allocator<u
int8_t>>
149 m_data(
std::move(rawData))
171 template <
typename ALLOC = std::allocator<u
int8_t>>
201 template <
typename ALLOC = std::allocator<u
int8_t>>
225 template <
typename ALLOC = std::allocator<u
int8_t>>
256 template <
typename ZSERIO_OBJECT>
BasicIntrospectableServiceData(ZSERIO_OBJECT &&response, const ALLOC &allocator=ALLOC())
Span< const uint8_t > getData() const override
IBasicIntrospectableViewConstPtr< ALLOC > getIntrospectable() const override
BasicObjectServiceData(const ZSERIO_OBJECT &object, const ALLOC &allocator=ALLOC())
Span< const uint8_t > getData() const override
IBasicIntrospectableViewConstPtr< ALLOC > getIntrospectable() const override
Span< const uint8_t > getData() const override
BasicRawServiceDataHolder(Vector< uint8_t, ALLOC > &&rawData)
BasicRawServiceDataHolder(const Vector< uint8_t, ALLOC > &rawData)
IBasicIntrospectableViewConstPtr< ALLOC > getIntrospectable() const override
IBasicIntrospectableViewConstPtr< ALLOC > getIntrospectable() const override
Span< const uint8_t > getData() const override
BasicRawServiceDataView(zserio::Span< const uint8_t > rawData)
virtual Vector< uint8_t, ALLOC > callMethod(std::string_view methodName, const IBasicServiceData< ALLOC > &requestData, void *context)=0
virtual ~IBasicServiceClient()=default
virtual IBasicIntrospectableViewConstPtr< ALLOC > getIntrospectable() const =0
virtual Span< const uint8_t > getData() const =0
virtual ~IBasicServiceData()=default
virtual ~IBasicService()=default
virtual IBasicServiceDataPtr< ALLOC > callMethod(std::string_view methodName, Span< const uint8_t > requestData, void *context)=0
IBasicIntrospectableViewConstPtr< ALLOC > introspectable(const View< T > &view, const ALLOC &allocator=ALLOC())
std::vector< T, ALLOC > Vector
BasicBitBuffer< ALLOC > serialize(const T &data, const ALLOC &allocator, ARGS &&... arguments)
IBasicServiceDataPtr<> IServiceDataPtr
typename IBasicIntrospectableView< ALLOC >::ConstPtr IBasicIntrospectableViewConstPtr
std::shared_ptr< IBasicServiceData< ALLOC > > IBasicServiceDataPtr