Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_core
Attribute
Attributes
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
);
14
~FunctorActivatorAttribute
();
15
16
void
on_activated
( std::function<
void
() >
const
& );
17
void
SetAttributeMode
(
Attribute::ValueMode
mode );
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
}