SignalControl.hpp
The SignalControl class manages all of the signals and actions, linking them together upon request (by name, base class, or derived class).
Developer notes:
Right now SignalControl can only link to signals that it creates. Ideally, external signals should also be able to be added to it. The question is, how should this be done?
They could be copied. But should we copy existing actions? How do we provide keys?
They could use a smart pointer style, so only deleted with final version (slow down?)
-
class SignalControl : public internal::SignalControl_Base
- #include <SignalControl.hpp>
Public Functions
-
inline SignalControl()
-
inline ~SignalControl()
-
inline size_t GetNumActions() const
-
inline size_t GetNumSignals() const
-
inline const ActionBase &GetAction(const std::string &name) const
-
inline const SignalBase &GetSignal(const std::string &name) const
-
inline ActionManager &GetActionManager()
-
inline SignalManager &GetSignalManager() override
-
template<typename ...ARGS>
inline auto Link(SignalBase &s, const std::function<void(ARGS...)> &f)
-
inline auto Link(SignalBase &s, const std::string &a)
-
inline auto Link(SignalBase &s, ActionBase &a)
-
inline void NotifyConstruct(SignalBase *sig_ptr) override
Private Members
-
ActionManager action_m
-
SignalManager signal_m
-
std::unordered_map<uint32_t, SignalBase*> id_to_signal
-
inline SignalControl()