-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConditions.cpp
52 lines (51 loc) · 879 Bytes
/
Conditions.cpp
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
#include "Common.h"
bool Extension::NodeExists(const TCHAR *Name)
{
return cur->nm.find(Name) != cur->nm.end();
}
bool Extension::NodeExistsByID(int ID)
{
return SDNode::Nodes.find(ID) != SDNode::Nodes.end();
}
bool Extension::IntExists(const TCHAR *Name)
{
return cur->im.find(Name) != cur->im.end();
}
bool Extension::FloatExists(const TCHAR *Name)
{
return cur->fm.find(Name) != cur->fm.end();
}
bool Extension::StringExists(const TCHAR *Name)
{
return cur->sm.find(Name) != cur->sm.end();
}
bool Extension::OnNode()
{
if(Nit)
{
cur = Nit->operator->()->second;
return true;
}
return false;
}
bool Extension::OnSubnode()
{
if(nit.size())
{
cur = nit.back()->operator->()->second;
return true;
}
return false;
}
bool Extension::OnInt()
{
return iit != 0;
}
bool Extension::OnFloat()
{
return fit != 0;
}
bool Extension::OnString()
{
return sit != 0;
}