-
Notifications
You must be signed in to change notification settings - Fork 1
/
Notify.as
77 lines (61 loc) · 1.3 KB
/
Notify.as
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
class NotifyNod
{
private CMwNod@ m_value;
NotifyNod() { @m_value = null; }
NotifyNod(CMwNod@ value) { @m_value = value; }
CMwNod@ opImplConv() const { return m_value; }
bool opEquals(const CMwNod@ value) const { return m_value is value; }
NotifyNod@ opAssign(CMwNod@ value)
{
if (m_value !is value) {
@m_value = value;
g_updateQueued = true;
}
return this;
}
}
class NotifyInt
{
private int64 m_value;
NotifyInt() { m_value = 0; }
NotifyInt(int64 value) { m_value = value; }
int64 opImplConv() const { return m_value; }
NotifyInt@ opAssign(int64 value)
{
if (m_value != value) {
m_value = value;
g_updateQueued = true;
}
return this;
}
}
class NotifyBool
{
private bool m_value;
NotifyBool() { m_value = false; }
NotifyBool(bool value) { m_value = value; }
bool opImplConv() const { return m_value; }
NotifyBool@ opAssign(bool value)
{
if (m_value != value) {
m_value = value;
g_updateQueued = true;
}
return this;
}
}
class NotifyString
{
private string m_value;
NotifyString() { m_value = ""; }
NotifyString(const string &in value) { m_value = value; }
string opImplConv() const { return m_value; }
NotifyString@ opAssign(const string &in value)
{
if (m_value != value) {
m_value = value;
g_updateQueued = true;
}
return this;
}
}