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

#include <response_mut.hpp>

Public Member Functions

 ResponseMut (ResponseMut &&rhs) noexcept
 
auto operator= (ResponseMut &&rhs) noexcept -> ResponseMut &
 
 ~ResponseMut () noexcept
 
 ResponseMut (const ResponseMut &)=delete
 
auto operator= (const ResponseMut &) -> ResponseMut &=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 ResponsePayload &
 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 () -> ResponsePayload &
 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.
 

Friends

template<ServiceType , typename , typename >
class ResponseMutUninit
 
template<ServiceType , typename , typename , typename , typename >
class ActiveRequest
 
template<ServiceType S, typename ResponsePayloadT , typename ResponseUserHeaderT >
auto send (ResponseMut< S, ResponsePayloadT, ResponseUserHeaderT > &&response) -> bb::Expected< void, SendError >
 

Detailed Description

template<ServiceType Service, typename ResponsePayload, typename ResponseUserHeader>
class iox2::ResponseMut< 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 [ResponseMut] is not sent it will reelase the loaned memory when going out of scope.

Definition at line 38 of file response_mut.hpp.

Constructor & Destructor Documentation

◆ ResponseMut() [1/2]

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
iox2::ResponseMut< Service, ResponsePayload, ResponseUserHeader >::ResponseMut ( ResponseMut< Service, ResponsePayload, ResponseUserHeader > &&  rhs)
inlinenoexcept

Definition at line 98 of file response_mut.hpp.

◆ ~ResponseMut()

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
iox2::ResponseMut< Service, ResponsePayload, ResponseUserHeader >::~ResponseMut ( )
inlinenoexcept

Definition at line 122 of file response_mut.hpp.

◆ ResponseMut() [2/2]

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

Member Function Documentation

◆ header()

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

Returns a reference to the [ResponseHeader].

Definition at line 127 of file response_mut.hpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
auto iox2::ResponseMut< Service, ResponsePayload, ResponseUserHeader >::operator= ( ResponseMut< Service, ResponsePayload, ResponseUserHeader > &&  rhs) -> ResponseMut&
inlinenoexcept

Definition at line 109 of file response_mut.hpp.

◆ 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::ResponseMut< 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::ResponseMut< Service, ResponsePayload, ResponseUserHeader >::payload ( ) const -> const ResponsePayload&
inline

Returns a reference to the payload of the response.

Definition at line 151 of file response_mut.hpp.

◆ 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::ResponseMut< 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::ResponseMut< Service, ResponsePayload, ResponseUserHeader >::payload_mut ( ) -> ResponsePayload&
inline

Returns a mutable reference to the payload of the response.

Definition at line 177 of file response_mut.hpp.

◆ user_header()

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

Returns a reference to the user header of the response.

Definition at line 135 of file response_mut.hpp.

◆ user_header_mut()

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

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

Definition at line 143 of file response_mut.hpp.

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 82 of file response_mut.hpp.

◆ ResponseMutUninit

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

Definition at line 80 of file response_mut.hpp.

◆ send

template<ServiceType Service, typename ResponsePayload , typename ResponseUserHeader >
template<ServiceType S, typename ResponsePayloadT , typename ResponseUserHeaderT >
auto send ( ResponseMut< S, ResponsePayloadT, ResponseUserHeaderT > &&  response) -> bb::Expected< void, SendError >
friend

Sends a [ResponseMut] to the corresponding [PendingResponse] of the [Client].


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