FunctorActivatorAttribute.cpp
Go to the documentation of this file.
2 
3 namespace iv
4 {
5 
6 FunctorActivatorAttribute::FunctorActivatorAttribute( ClientMarker * cm, std::function< void() > const & on_activated ) :
7  Local_AEP(),
8  Attr< Activator >( cm, this, false ),
9  activator(),
10  _on_activated( on_activated )
11 {
13  this->Notify_Activated();
14 }
15 
17 {
18  this->Notify_Deactivated();
19 }
20 
21 void FunctorActivatorAttribute::on_activated( std::function< void() > const & val )
22 {
23  this->_on_activated = val;
24 }
25 
27 {
29 }
30 
32 {
33  out = this->activator;
34 }
35 
37 {
38  if( val.CopyActivations( this->activator ) && this->_on_activated )
39  this->_on_activated();
40 
42 }
43 
44 }