MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / value

Class value

externals/picojson/picojson.h:137–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135struct null {};
136
137class value {
138public:
139 typedef std::vector<value> array;
140 typedef std::map<std::string, value> object;
141 union _storage {
142 bool boolean_;
143 double number_;
144#ifdef PICOJSON_USE_INT64
145 int64_t int64_;
146#endif
147 std::string *string_;
148 array *array_;
149 object *object_;
150 };
151
152protected:
153 int type_;
154 _storage u_;
155
156public:
157 value();
158 value(int type, bool);
159 explicit value(bool b);
160#ifdef PICOJSON_USE_INT64
161 explicit value(int64_t i);
162#endif
163 explicit value(double n);
164 explicit value(const std::string &s);
165 explicit value(const array &a);
166 explicit value(const object &o);
167#if PICOJSON_USE_RVALUE_REFERENCE
168 explicit value(std::string &&s);
169 explicit value(array &&a);
170 explicit value(object &&o);
171#endif
172 explicit value(const char *s);
173 value(const char *s, size_t len);
174 ~value();
175 value(const value &x);
176 value &operator=(const value &x);
177#if PICOJSON_USE_RVALUE_REFERENCE
178 value(value &&x) PICOJSON_NOEXCEPT;
179 value &operator=(value &&x) PICOJSON_NOEXCEPT;
180#endif
181 void swap(value &x) PICOJSON_NOEXCEPT;
182 template <typename T> bool is() const;
183 template <typename T> const T &get() const;
184 template <typename T> T &get();
185 template <typename T> void set(const T &);
186#if PICOJSON_USE_RVALUE_REFERENCE
187 template <typename T> void set(T &&);
188#endif
189 bool evaluate_as_boolean() const;
190 const value &get(const size_t idx) const;
191 const value &get(const std::string &key) const;
192 value &get(const size_t idx);
193 value &get(const std::string &key);
194

Callers 8

set_nullMethod · 0.70
set_boolMethod · 0.70
set_int64Method · 0.70
set_numberMethod · 0.70
parse_stringMethod · 0.70
parse_array_startMethod · 0.70
parse_array_itemMethod · 0.70
parse_object_startMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected