FunctorActivatorAttribute.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Local_AEP.hpp"
4 #include <functional>
5 #include "../Types/Activator.hpp"
6 
7 namespace iv
8 {
9 
10 class FunctorActivatorAttribute final : private Local_AEP, public Attr< Activator >
11 {
12 public:
13  FunctorActivatorAttribute( ClientMarker * cm, std::function< void() > const & on_activated = nullptr );
15 
16  void on_activated( std::function< void() > const & );
18 
19 protected:
20  virtual void GetSourceValue( Activator & out ) const override;
21  virtual void ModifySource( Activator const & ) override;
22 
23 private:
24  Activator activator;
25  std::function< void() > _on_activated;
26 };
27 
28 
29 }