acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
handler_context.h
1
#pragma once
2
3
4
#include "acme/handler/topic.h"
5
6
7
class
CLASS_DECL_ACME handler_context :
8
virtual
public
::subparticle
9
{
10
public
:
11
12
13
// 0 update serial is not ok
14
::u64 m_uUpdateSerial;
15
16
17
handler_context() { m_uUpdateSerial = 0; }
18
~handler_context()
override
;
19
20
21
virtual
void
start_task();
22
23
24
virtual
void
set_up_to_date(const ::topic * ptopic);
25
26
inline
bool
is_up_to_date(const ::topic * ptopic)
const
27
{
28
29
if
(!m_uUpdateSerial)
30
{
31
32
return
false
;
33
34
}
35
36
if
(!ptopic->m_uUpdateSerial)
37
{
38
39
return
false
;
40
41
}
42
43
return
m_uUpdateSerial == ptopic->m_uUpdateSerial;
44
45
}
46
47
};
48
49
50
using
handler_context_pointer = ::pointer<handler_context>;
51
52
53
54
55
handler
handler_context.h
Generated by
1.17.0