cesium-native  0.41.0
JsonObjectJsonHandler.h
1 #pragma once
2 
3 #include "JsonHandler.h"
4 #include "Library.h"
5 
6 #include <CesiumUtility/JsonValue.h>
7 
8 namespace CesiumJsonReader {
9 
10 class CESIUMJSONREADER_API JsonObjectJsonHandler : public JsonHandler {
11 public:
12  JsonObjectJsonHandler() noexcept;
13 
14  void reset(IJsonHandler* pParent, CesiumUtility::JsonValue* pValue);
15 
16  virtual IJsonHandler* readNull() override;
17  virtual IJsonHandler* readBool(bool b) override;
18  virtual IJsonHandler* readInt32(int32_t i) override;
19  virtual IJsonHandler* readUint32(uint32_t i) override;
20  virtual IJsonHandler* readInt64(int64_t i) override;
21  virtual IJsonHandler* readUint64(uint64_t i) override;
22  virtual IJsonHandler* readDouble(double d) override;
23  virtual IJsonHandler* readString(const std::string_view& str) override;
24  virtual IJsonHandler* readObjectStart() override;
25  virtual IJsonHandler* readObjectKey(const std::string_view& str) override;
26  virtual IJsonHandler* readObjectEnd() override;
27  virtual IJsonHandler* readArrayStart() override;
28  virtual IJsonHandler* readArrayEnd() override;
29 
30 private:
31  IJsonHandler* doneElement();
32 
33  std::vector<CesiumUtility::JsonValue*> _stack;
34  std::string_view _currentKey;
35 };
36 
37 } // namespace CesiumJsonReader
A generic implementation of a value in a JSON structure.
Definition: JsonValue.h:67
Classes for reading JSON.