rodbus (C++ API) 1.3.1
Loading...
Searching...
No Matches
rodbus::functional Namespace Reference

helpers functions to create interface implementations using lambdas More...

Classes

class  ClientStateListenerLambda
 class that implements ClientStateListener in terms of a lambda expression More...
 
class  DatabaseCallbackLambda
 class that implements DatabaseCallback in terms of a lambda expression More...
 
class  LoggerLambda
 class that implements Logger in terms of a lambda expression More...
 
class  PortStateListenerLambda
 class that implements PortStateListener in terms of a lambda expression More...
 

Functions

template<class T >
std::unique_ptr< Loggerlogger (const T &lambda)
 construct an implementation of Logger based on a lambda expression More...
 
template<class T >
std::unique_ptr< ClientStateListenerclient_state_listener (const T &lambda)
 construct an implementation of ClientStateListener based on a lambda expression More...
 
template<class T >
std::unique_ptr< PortStateListenerport_state_listener (const T &lambda)
 construct an implementation of PortStateListener based on a lambda expression More...
 
template<class T >
DatabaseCallbackLambda< T > database_callback (const T &lambda)
 construct an implementation of DatabaseCallback based on a lambda expression More...
 

Detailed Description

helpers functions to create interface implementations using lambdas

Function Documentation

◆ client_state_listener()

template<class T >
std::unique_ptr< ClientStateListener > rodbus::functional::client_state_listener ( const T &  lambda)

construct an implementation of ClientStateListener based on a lambda expression

Note
T must be copy-constructible to use this function
Parameters
lambdafunctor value on which to base the interface implementation
Returns
abstract implementation of the interface in a unique_ptr

◆ database_callback()

template<class T >
DatabaseCallbackLambda< T > rodbus::functional::database_callback ( const T &  lambda)

construct an implementation of DatabaseCallback based on a lambda expression

Note
T must be copy-constructible to use this function
Parameters
lambdafunctor value on which to base the interface implementation
Returns
concrete implementation of the interface

◆ logger()

template<class T >
std::unique_ptr< Logger > rodbus::functional::logger ( const T &  lambda)

construct an implementation of Logger based on a lambda expression

Note
T must be copy-constructible to use this function
Parameters
lambdafunctor value on which to base the interface implementation
Returns
abstract implementation of the interface in a unique_ptr

◆ port_state_listener()

template<class T >
std::unique_ptr< PortStateListener > rodbus::functional::port_state_listener ( const T &  lambda)

construct an implementation of PortStateListener based on a lambda expression

Note
T must be copy-constructible to use this function
Parameters
lambdafunctor value on which to base the interface implementation
Returns
abstract implementation of the interface in a unique_ptr