CARLA
Public Types | Public Member Functions | Private Attributes | List of all members
carla::rpc::Response< T > Class Template Reference

#include <Response.h>

+ Collaboration diagram for carla::rpc::Response< T >:

Public Types

using error_type = ResponseError
 
using value_type = T
 

Public Member Functions

value_typeGet ()
 
const value_typeGet () const
 
const error_typeGetError () const
 
bool HasError () const
 
 operator bool () const
 
template<typename TValue >
void Reset (TValue &&value)
 
 Response ()=default
 
template<typename TValue >
 Response (TValue &&value)
 
template<typename... Ts>
void SetError (Ts &&... args)
 

Private Attributes

boost::variant2::variant< error_type, value_type_data
 

Detailed Description

template<typename T>
class carla::rpc::Response< T >

Definition at line 52 of file Response.h.

Member Typedef Documentation

◆ error_type

template<typename T>
using carla::rpc::Response< T >::error_type = ResponseError

Definition at line 57 of file Response.h.

◆ value_type

template<typename T>
using carla::rpc::Response< T >::value_type = T

Definition at line 55 of file Response.h.

Constructor & Destructor Documentation

◆ Response() [1/2]

template<typename T>
carla::rpc::Response< T >::Response ( )
default

◆ Response() [2/2]

template<typename T>
template<typename TValue >
carla::rpc::Response< T >::Response ( TValue &&  value)
inline

Definition at line 62 of file Response.h.

Member Function Documentation

◆ Get() [1/2]

template<typename T>
value_type& carla::rpc::Response< T >::Get ( )
inline

Definition at line 83 of file Response.h.

References DEBUG_ASSERT.

Referenced by carla::client::detail::Get(), and TEST().

+ Here is the caller graph for this function:

◆ Get() [2/2]

template<typename T>
const value_type& carla::rpc::Response< T >::Get ( ) const
inline

Definition at line 88 of file Response.h.

References DEBUG_ASSERT.

◆ GetError()

template<typename T>
const error_type& carla::rpc::Response< T >::GetError ( ) const
inline

Definition at line 78 of file Response.h.

References DEBUG_ASSERT.

Referenced by TEST().

+ Here is the caller graph for this function:

◆ HasError()

template<typename T>
bool carla::rpc::Response< T >::HasError ( ) const
inline

Definition at line 69 of file Response.h.

Referenced by TEST().

+ Here is the caller graph for this function:

◆ operator bool()

template<typename T>
carla::rpc::Response< T >::operator bool ( ) const
inline

Definition at line 93 of file Response.h.

◆ Reset()

template<typename T>
template<typename TValue >
void carla::rpc::Response< T >::Reset ( TValue &&  value)
inline

Definition at line 65 of file Response.h.

Referenced by TEST().

+ Here is the caller graph for this function:

◆ SetError()

template<typename T>
template<typename... Ts>
void carla::rpc::Response< T >::SetError ( Ts &&...  args)
inline

Definition at line 74 of file Response.h.

Referenced by TEST().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _data

template<typename T>
boost::variant2::variant<error_type, value_type> carla::rpc::Response< T >::_data
private

Definition at line 101 of file Response.h.


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