RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
rtctk::componentFramework::RequestDispatcher< Adapter, Args > Class Template Referencefinal

#include <requestDispatcher.hpp>

Classes

class  TableEntries
 

Public Types

using DispatchFunction = std::function<void(Adapter*, std::any&, Args... args)>
 
using LookupTable = std::unordered_map<std::type_index, DispatchFunction>
 
using TableEntry = typename LookupTable::value_type
 

Public Member Functions

 RequestDispatcher ()=default
 
 RequestDispatcher (const RequestDispatcher &rhs)=default
 
 RequestDispatcher (RequestDispatcher &&rhs) noexcept=default
 
 ~RequestDispatcher ()=default
 
RequestDispatcheroperator= (const RequestDispatcher &rhs)=default
 
RequestDispatcheroperator= (RequestDispatcher &&rhs) noexcept=default
 
 RequestDispatcher (std::initializer_list< TableEntries > table_entries)
 
void Dispatch (Adapter *adapter, std::any &request, Args... args) const
 
RequestDispatcheroperator+= (const RequestDispatcher &rhs)
 
RequestDispatcheroperator+= (RequestDispatcher &&rhs)
 
RequestDispatcher operator+ (const RequestDispatcher &rhs) const
 
RequestDispatcher operator+ (RequestDispatcher &&rhs) const
 

Static Public Member Functions

template<typename T >
static TableEntries Bind (void(Adapter::*method)(T &, Args...))
 

Member Typedef Documentation

◆ DispatchFunction

template<class Adapter , typename... Args>
using rtctk::componentFramework::RequestDispatcher< Adapter, Args >::DispatchFunction = std::function<void(Adapter*, std::any&, Args... args)>

◆ LookupTable

template<class Adapter , typename... Args>
using rtctk::componentFramework::RequestDispatcher< Adapter, Args >::LookupTable = std::unordered_map<std::type_index, DispatchFunction>

◆ TableEntry

template<class Adapter , typename... Args>
using rtctk::componentFramework::RequestDispatcher< Adapter, Args >::TableEntry = typename LookupTable::value_type

Constructor & Destructor Documentation

◆ RequestDispatcher() [1/4]

template<class Adapter , typename... Args>
rtctk::componentFramework::RequestDispatcher< Adapter, Args >::RequestDispatcher ( )
default

◆ RequestDispatcher() [2/4]

template<class Adapter , typename... Args>
rtctk::componentFramework::RequestDispatcher< Adapter, Args >::RequestDispatcher ( const RequestDispatcher< Adapter, Args > & rhs)
default

◆ RequestDispatcher() [3/4]

template<class Adapter , typename... Args>
rtctk::componentFramework::RequestDispatcher< Adapter, Args >::RequestDispatcher ( RequestDispatcher< Adapter, Args > && rhs)
defaultnoexcept

◆ ~RequestDispatcher()

◆ RequestDispatcher() [4/4]

template<class Adapter , typename... Args>
rtctk::componentFramework::RequestDispatcher< Adapter, Args >::RequestDispatcher ( std::initializer_list< TableEntries > table_entries)
inline

Member Function Documentation

◆ Bind()

template<class Adapter , typename... Args>
template<typename T >
static TableEntries rtctk::componentFramework::RequestDispatcher< Adapter, Args >::Bind ( void(Adapter::*)(T &, Args...) method)
inlinestatic

◆ Dispatch()

template<class Adapter , typename... Args>
void rtctk::componentFramework::RequestDispatcher< Adapter, Args >::Dispatch ( Adapter * adapter,
std::any & request,
Args... args ) const
inline

◆ operator+() [1/2]

template<class Adapter , typename... Args>
RequestDispatcher rtctk::componentFramework::RequestDispatcher< Adapter, Args >::operator+ ( const RequestDispatcher< Adapter, Args > & rhs) const
inline

◆ operator+() [2/2]

template<class Adapter , typename... Args>
RequestDispatcher rtctk::componentFramework::RequestDispatcher< Adapter, Args >::operator+ ( RequestDispatcher< Adapter, Args > && rhs) const
inline

◆ operator+=() [1/2]

template<class Adapter , typename... Args>
RequestDispatcher & rtctk::componentFramework::RequestDispatcher< Adapter, Args >::operator+= ( const RequestDispatcher< Adapter, Args > & rhs)
inline

◆ operator+=() [2/2]

template<class Adapter , typename... Args>
RequestDispatcher & rtctk::componentFramework::RequestDispatcher< Adapter, Args >::operator+= ( RequestDispatcher< Adapter, Args > && rhs)
inline

◆ operator=() [1/2]

template<class Adapter , typename... Args>
RequestDispatcher & rtctk::componentFramework::RequestDispatcher< Adapter, Args >::operator= ( const RequestDispatcher< Adapter, Args > & rhs)
default

◆ operator=() [2/2]

template<class Adapter , typename... Args>
RequestDispatcher & rtctk::componentFramework::RequestDispatcher< Adapter, Args >::operator= ( RequestDispatcher< Adapter, Args > && rhs)
defaultnoexcept

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