Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_core
Attribute
Attributes
PrivValAttr.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "../Attribute.hpp"
4
5
namespace
iv
6
{
7
8
template
<
class
T >
9
class
PrivValAttr_I
;
10
13
class
PrivValAttr_Owner
14
{
15
public
:
16
virtual
void
PrivValAttr_Modified
(
Attribute
* ){}
17
18
protected
:
19
template
<
class
T >
20
void
Attribute_Set
(
PrivValAttr_I< T >
*, T
const
& );
21
template
<
class
T >
22
void
Attribute_SetMode
(
PrivValAttr_I< T >
*,
Attribute::ValueMode
);
23
};
24
27
template
<
class
T >
28
class
PrivValAttr_I :
public
Attr< T >
29
{
30
public
:
31
friend
class
PrivValAttr_Owner
;
32
33
PrivValAttr_I
(
ClientMarker
* cm,
AttributeEventProcessor
*,
PrivValAttr_Owner
* owner, T
const
& initial_value = T() );
34
35
protected
:
36
virtual
void
GetSourceValue
( T & out )
const override
;
37
virtual
void
ModifySource
( T
const
& )
override
;
38
void
Set
( T
const
& value );
39
40
private
:
41
PrivValAttr_Owner
* owner;
42
T value;
43
};
44
47
template
<
class
T >
48
class
PrivValAttr
final:
private
Local_AEP
,
public
PrivValAttr_I
< T >
49
{
50
public
:
51
PrivValAttr
(
ClientMarker
* cm,
PrivValAttr_Owner
* owner, T
const
& initial_value = T() );
52
~PrivValAttr
();
53
};
54
55
}
56
57
#include "
PrivValAttr.inl
"