MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / InfoNode

Class InfoNode

Util/include/Util/InfoTree/InfoNode.h:10–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8class InfoTree;
9
10class InfoNode {
11public:
12 InfoNode(std::size_t index, InfoTree *tree);
13
14 InfoKind GetKind() const;
15
16 bool IsNull() const;
17
18 bool IsObject() const;
19
20 bool IsArray() const;
21
22 bool IsNumber() const;
23
24 bool IsString() const;
25
26 bool IsBool() const;
27
28 void AddChild(InfoNode n);
29
30 void AddChild(std::string s);
31
32 void AddChild(bool b);
33
34 void AddChild(double d);
35
36 void AddChild(std::string_view key, InfoNode n);
37
38 void AddChild(std::string_view key, std::string s);
39
40 void AddChild(std::string_view key, bool b);
41
42 void AddChild(std::string_view key, double d);
43
44 std::string AsString() const;
45
46 double AsDouble() const;
47
48 int AsInt() const;
49
50 bool AsBool() const;
51
52 std::vector<InfoNode> AsArray() const;
53
54 std::unordered_map<std::string, InfoNode> AsMap() const;
55
56 InfoNode GetValue(std::string_view key) const;
57
58private:
59 std::size_t _index;
60 InfoTree *_tree;
61};

Callers 9

CreateNoneMethod · 0.85
CreateObjectMethod · 0.85
CreateArrayMethod · 0.85
CreateStringMethod · 0.85
CreateBoolMethod · 0.85
CreateNumberMethod · 0.85
GetRootMethod · 0.85
AsMapMethod · 0.85
GetValueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected