dnp3 (C++ API) 1.1.0
dnp3::functional Namespace Reference

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

Classes

class  AssociationHandlerLambda
 class that implements AssociationHandler in terms of a lambda expression More...
 
class  ClientStateListenerLambda
 class that implements ClientStateListener in terms of a lambda expression More...
 
class  ConnectionStateListenerLambda
 class that implements ConnectionStateListener in terms of a lambda expression More...
 
class  DatabaseTransactionLambda
 class that implements DatabaseTransaction 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< PortStateListenerport_state_listener (const T &lambda)
 construct an implementation of PortStateListener 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< AssociationHandlerassociation_handler (const T &lambda)
 construct an implementation of AssociationHandler based on a lambda expression More...
 
template<class T >
DatabaseTransactionLambda< T > database_transaction (const T &lambda)
 construct an implementation of DatabaseTransaction based on a lambda expression More...
 
template<class T >
std::unique_ptr< ConnectionStateListenerconnection_state_listener (const T &lambda)
 construct an implementation of ConnectionStateListener based on a lambda expression More...
 

Detailed Description

helpers functions to create interface implementations using lambdas

Function Documentation

◆ association_handler()

template<class T >
std::unique_ptr< AssociationHandler > dnp3::functional::association_handler ( const T &  lambda)

construct an implementation of AssociationHandler 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

◆ client_state_listener()

template<class T >
std::unique_ptr< ClientStateListener > dnp3::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

◆ connection_state_listener()

template<class T >
std::unique_ptr< ConnectionStateListener > dnp3::functional::connection_state_listener ( const T &  lambda)

construct an implementation of ConnectionStateListener 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_transaction()

template<class T >
DatabaseTransactionLambda< T > dnp3::functional::database_transaction ( const T &  lambda)

construct an implementation of DatabaseTransaction 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 > dnp3::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 > dnp3::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