-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrefstate.h
More file actions
48 lines (37 loc) · 888 Bytes
/
refstate.h
File metadata and controls
48 lines (37 loc) · 888 Bytes
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
#ifndef REFSTATE_H
#define REFSTATE_H
// ----------------------------------------------------------------------
// Representation of object's in-reference state
#include <iostream>
// TODO: Not sure if we need the classes in classinfo
// * Maybe Method?
// - RLV - 2016-0114
// #include "classinfo.h"
// using namespace std;
// ----------------------------------------------------------------------
// Ref state
enum class RefState {
Start,
Heap,
HeapRoot,
HeapRootFinal,
HeapOnly,
Root,
RootOnly,
Error = 999
};
class ObjectRefState
{
// See diagram:
// function Update --> On event, change state to new state.
// function getstate
// --? set state?
public:
ObjectRefState()
: m_state(RefState::Start) {
}
RefState getState() { return this->m_state; }
private:
RefState m_state;
};
#endif