GoPxL SDK

- Home
- Files
- Namespace

GoJsonIterator.h
Go to the documentation of this file.
1
9 #ifndef GO_PXL_SDK_JSON_ITERATOR_H
10 #define GO_PXL_SDK_JSON_ITERATOR_H
11
12 #include <GoPxLSdk/Def.h>
13 #include <GoPxLSdk/GoJsonError.h>
14
15 namespace GoPxLSdk
16 {
17
18 /* GoJson forward declaration - needed to avoid circular dependency. */
19 class GoJson;
20
24 class GoPxLSdkClass GoJsonIterator
25 {
26 public:
27 using RawIterator = nlohmann::detail::iter_impl<const nlohmann::json>;
28
36 explicit GoJsonIterator(const RawIterator iterator);
37
46 std::string Key();
47
56 const std::string Key() const;
57
66 GoJson Value();
67
76 const GoJson Value() const;
77
86 void SetValue(const GoJson& value);
87
94 std::shared_ptr<RawIterator>& GetHandle();
95 const std::shared_ptr<RawIterator>& GetHandle() const;
96
97 GoJsonIterator& operator=(const GoJsonIterator& other);
98
99 bool operator==(const GoJsonIterator other) const;
100 bool operator!=(const GoJsonIterator other) const;
101
102 bool operator<(const GoJsonIterator other) const;
103 bool operator<=(const GoJsonIterator other) const;
104
105 bool operator>(const GoJsonIterator other) const;
106 bool operator>=(const GoJsonIterator other) const;
107
108 GoJson operator*() const;
109
110 GoJsonIterator& operator+(int val);
111 GoJsonIterator& operator+=(int val);
112 GoJsonIterator& operator++(int);
113
114 GoJsonIterator& operator-(int val);
115 GoJsonIterator& operator-=(int val);
116 GoJsonIterator& operator--(int);
117
118 private:
119 std::shared_ptr<RawIterator> iterator;
120 };
121
122 }
123
124 #endif
GoPxLSdk::GoJson
Simplify working with json data.
Definition: GoJson.h:38
GoPxLSdkClass
#define GoPxLSdkClass
Definition: Def.h:35
GoPxLSdk::GoJsonIterator
Represents json iterator.
Definition: GoJsonIterator.h:24
nlohmann::detail::iter_impl
Definition: Def.h:63
Def.h
Declares the general SDK definitions.
GoJsonError.h
GoPxLSdk
Definition: Def.h:46