Class StateInterface

Inheritance Relationships

Derived Type

Class Documentation

class StateInterface

Subclassed by can::DriverInterface

Public Types

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

Public Functions

virtual StateListenerConstSharedPtr createStateListener(const StateFunc &delegate) = 0

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

Parameters:

delegate[in] delegate to be bound by the listener

Returns:

managed pointer to listener

template<typename Instance, typename Callable>
inline StateListenerConstSharedPtr createStateListenerM(Instance inst, Callable callable)
inline virtual ~StateInterface()