iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader > Class Template Reference

#include <response_mut_uninit.hpp>

Public Member Functions

 ResponseMutUninit (ResponseMutUninit &&rhs) noexcept=default
 
auto operator= (ResponseMutUninit &&rhs) noexcept -> ResponseMutUninit &=default
 
 ~ResponseMutUninit () noexcept=default
 
 ResponseMutUninit (const ResponseMutUninit &)=delete
 
auto operator= (const ResponseMutUninit &) -> ResponseMutUninit &=delete
 
auto header () const -> ResponseHeader
 Returns a reference to the [ResponseHeader].
 
template<typename T = ResponseUserHeader, typename = std::enable_if_t<!std::is_same<void, ResponseUserHeader>::value, T>>
auto user_header () const -> const T &
 Returns a reference to the user header of the response.
 
template<typename T = ResponseUserHeader, typename = std::enable_if_t<!std::is_same<void, ResponseUserHeader>::value, T>>
auto user_header_mut () -> T &
 Returns a mutable reference to the user header of the response.
 
template<typename T = ResponsePayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>>
auto payload () const -> const T &
 Returns a reference to the payload of the response.
 
template<typename T = ResponsePayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>>
auto payload () const -> bb::ImmutableSlice< ValueType >
 Returns a reference to the payload of the response.
 
template<typename T = ResponsePayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>>
auto payload_mut () -> T &
 Returns a mutable reference to the payload of the response.
 
template<typename T = ResponsePayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>>
auto payload_mut () -> bb::MutableSlice< ValueType >
 Returns a mutable reference to the payload of the response.
 
template<typename T = ResponsePayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, T>>
auto write_payload (ResponsePayload &&payload) -> ResponseMut< Service, T, ResponseUserHeader >
 
template<typename T = ResponsePayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, T>>
auto write_from_slice (bb::ImmutableSlice< ValueType > &value) -> ResponseMut< Service, T, ResponseUserHeader >
 
template<typename T = ResponsePayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, T>>
auto write_from_fn (const iox2::bb::StaticFunction< typename T::ValueType(uint64_t)> &initializer) -> ResponseMut< Service, T, ResponseUserHeader >
 

Friends

template<ServiceType , typename , typename , typename , typename >
class ActiveRequest
 
template<ServiceType S, typename ResponsePayloadT , typename ResponseUserHeaderT >
auto assume_init (ResponseMutUninit< S, ResponsePayloadT, ResponseUserHeaderT > &&self) -> ResponseMut< S, ResponsePayloadT, ResponseUserHeaderT >
 

Detailed Description

template<ServiceType Service, typename ResponsePayload, typename ResponseUserHeader>
class iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >

Acquired by a [ActiveRequest] with

It stores the payload of the response that will be sent to the corresponding [PendingResponse] of the [Client].

If the [ResponseMutUninit] is not sent it will reelase the loaned memory when going out of scope.

Definition at line 33 of file response_mut_uninit.hpp.

Constructor & Destructor Documentation

◆ ResponseMutUninit() [1/2]

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::ResponseMutUninit ( ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader > &&  rhs)
defaultnoexcept

◆ ~ResponseMutUninit()

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::~ResponseMutUninit ( )
defaultnoexcept

◆ ResponseMutUninit() [2/2]

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::ResponseMutUninit ( const ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader > &  )
delete

Member Function Documentation

◆ header()

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::header ( ) const -> ResponseHeader
inline

Returns a reference to the [ResponseHeader].

Definition at line 103 of file response_mut_uninit.hpp.

◆ operator=() [1/2]

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::operator= ( const ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader > &  ) -> ResponseMutUninit &=delete
delete

◆ operator=() [2/2]

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::operator= ( ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader > &&  rhs) -> ResponseMutUninit &=default
defaultnoexcept

◆ payload() [1/2]

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<typename T = ResponsePayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>>
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::payload ( ) const -> bb::ImmutableSlice< ValueType >

Returns a reference to the payload of the response.

◆ payload() [2/2]

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<typename T , typename >
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::payload ( ) const -> const T&
inline

Returns a reference to the payload of the response.

Definition at line 121 of file response_mut_uninit.hpp.

Referenced by iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::write_payload().

◆ payload_mut() [1/2]

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<typename T = ResponsePayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>>
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::payload_mut ( ) -> bb::MutableSlice< ValueType >

Returns a mutable reference to the payload of the response.

◆ payload_mut() [2/2]

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<typename T , typename >
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::payload_mut ( ) -> T&
inline

◆ user_header()

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<typename T , typename >
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::user_header ( ) const -> const T&
inline

Returns a reference to the user header of the response.

Definition at line 109 of file response_mut_uninit.hpp.

◆ user_header_mut()

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<typename T , typename >
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::user_header_mut ( ) -> T&
inline

Returns a mutable reference to the user header of the response.

Definition at line 115 of file response_mut_uninit.hpp.

◆ write_from_fn()

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<typename T , typename >
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::write_from_fn ( const iox2::bb::StaticFunction< typename T::ValueType(uint64_t)> &  initializer) -> ResponseMut<Service, T, ResponseUserHeader>
inline

Writes the provided payload into the [ResponseMutUninit] and returns an initialized [ResponseMut] that is ready to be sent.

Definition at line 167 of file response_mut_uninit.hpp.

References iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::payload_mut().

◆ write_from_slice()

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<typename T , typename >
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::write_from_slice ( bb::ImmutableSlice< ValueType > &  value) -> ResponseMut<Service, T, ResponseUserHeader>
inline

Writes the provided payload into the [ResponseMutUninit] and returns an initialized [ResponseMut] that is ready to be sent.

Definition at line 156 of file response_mut_uninit.hpp.

References IOX2_ASSERT, and iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::payload_mut().

◆ write_payload()

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<typename T , typename >
auto iox2::ResponseMutUninit< Service, ResponsePayload, ResponseUserHeader >::write_payload ( ResponsePayload &&  payload) -> ResponseMut<Service, T, ResponseUserHeader>
inline

Friends And Related Symbol Documentation

◆ ActiveRequest

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<ServiceType , typename , typename , typename , typename >
friend class ActiveRequest
friend

Definition at line 91 of file response_mut_uninit.hpp.

◆ assume_init

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<ServiceType S, typename ResponsePayloadT , typename ResponseUserHeaderT >
auto assume_init ( ResponseMutUninit< S, ResponsePayloadT, ResponseUserHeaderT > &&  self) -> ResponseMut< S, ResponsePayloadT, ResponseUserHeaderT >
friend

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