Public Types | Public Member Functions | List of all members
can::StateInterface Class Referenceabstract

#include <interface.h>

Inheritance diagram for can::StateInterface:
Inheritance graph
[legend]

Public Types

using instead = DelegateHelper< StateFunc >
 
using StateFunc = std::function< void(const State &)>
 
using StateListener = Listener< const StateFunc, const State & >
 
using StateListenerConstSharedPtr = StateListener::ListenerConstSharedPtr
 

Public Member Functions

virtual StateListenerConstSharedPtr createStateListener (const StateFunc &delegate)=0
 
template<typename Instance , typename Callable >
StateListenerConstSharedPtr createStateListenerM (Instance inst, Callable callable)
 
virtual ~StateInterface ()
 

Detailed Description

Definition at line 112 of file interface.h.

Member Typedef Documentation

◆ instead

Definition at line 115 of file interface.h.

◆ StateFunc

using can::StateInterface::StateFunc = std::function<void(const State&)>

Definition at line 114 of file interface.h.

◆ StateListener

Definition at line 116 of file interface.h.

◆ StateListenerConstSharedPtr

Definition at line 117 of file interface.h.

Constructor & Destructor Documentation

◆ ~StateInterface()

virtual can::StateInterface::~StateInterface ( )
inlinevirtual

Definition at line 130 of file interface.h.

Member Function Documentation

◆ createStateListener()

virtual StateListenerConstSharedPtr can::StateInterface::createStateListener ( const StateFunc delegate)
pure virtual

acquire a listener for the specified delegate, that will get called for all state changes

Parameters
[in]delegatedelegate to be bound by the listener
Returns
managed pointer to listener

Implemented in can::AsioDriver< Socket >, can::AsioDriver< boost::asio::posix::stream_descriptor >, and can::DummyInterface.

◆ createStateListenerM()

template<typename Instance , typename Callable >
StateListenerConstSharedPtr can::StateInterface::createStateListenerM ( Instance  inst,
Callable  callable 
)
inline

Definition at line 126 of file interface.h.


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


socketcan_interface
Author(s): Mathias Lüdtke
autogenerated on Mon Feb 28 2022 23:28:00