-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExtension.h
88 lines (70 loc) · 2.33 KB
/
Extension.h
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
78
79
80
81
82
83
84
85
86
87
88
#include "StructuredData.hpp"
class Extension
{
public:
LPRDATA rdPtr;
LPRH rhPtr;
Edif::Runtime Runtime;
static const int MinimumBuild = 255;
static const int Version = 1;
static const int OEFLAGS = OEFLAG_VALUES|OEFLAG_RUNBEFOREFADEIN|OEFLAG_NEVERKILL;
static const int OEPREFS = 0;
static const int WindowProcPriority = 0;
Extension(LPRDATA rdPtr, LPEDATA edPtr, fpcob cobPtr);
~Extension();
SDNode *root, *cur;
SDNode::Nodes_t::const_iterator *Nit; //All Nodes iterator
std::vector<SDNode::nmt::iterator *> nit; //Subnodes iterator
SDNode::imt::iterator *iit; //Ints iterator
SDNode::fmt::iterator *fit; //Floats iterator
SDNode::smt::iterator *sit; //Strings iterator
//Actions
void ReturnToRoot();
void EnterSubnode(const TCHAR *Name);
void GotoNodeByID(int ID);
void CreateSubnode(const TCHAR *Name);
void AddNodeByID(int ID, const TCHAR *Name);
void SetInt(const TCHAR *Name, int Value);
void SetFloat(const TCHAR *Name, float Value);
void SetString(const TCHAR *Name, const TCHAR *String);
void IterateNodes();
void IterateSubnodes();
void IterateInts();
void IterateFloats();
void IterateStrings();
void RemoveSubnode(const TCHAR *Name);
void RemoveNodeByID(int ID);
void RemoveInt(const TCHAR *Name);
void RemoveFloat(const TCHAR *Name);
void RemoveString(const TCHAR *Name);
void ClearAll();
//Conditions
bool NodeExists(const TCHAR *Name);
bool NodeExistsByID(int ID);
bool IntExists(const TCHAR *Name);
bool FloatExists(const TCHAR *Name);
bool StringExists(const TCHAR *Name);
bool OnNode(); const static unsigned TOnNode = 5;
bool OnSubnode(); const static unsigned TOnSubnode= 6;
bool OnInt(); const static unsigned TOnInt = 7;
bool OnFloat(); const static unsigned TOnFloat = 8;
bool OnString(); const static unsigned TOnString = 9;
//Expressions
int NodeID();
int Int(const TCHAR *Name);
float Float(const TCHAR *Name);
const TCHAR *String(const TCHAR *Name);
const TCHAR *SubnodeName();
const TCHAR *IntName();
const TCHAR *FloatName();
const TCHAR *StringName();
void Action(int ID, LPRDATA rdPtr, long param1, long param2);
long Condition(int ID, LPRDATA rdPtr, long param1, long param2);
long Expression(int ID, LPRDATA rdPtr, long param);
short Handle();
short Display();
short Pause();
short Continue();
bool Save(HANDLE File);
bool Load(HANDLE File);
};