| 8 | class InfoTree; |
| 9 | |
| 10 | class InfoNode { |
| 11 | public: |
| 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 | |
| 58 | private: |
| 59 | std::size_t _index; |
| 60 | InfoTree *_tree; |
| 61 | }; |
no outgoing calls
no test coverage detected