cesium-native  0.41.0
ExtensionsJsonHandler.h
1 #pragma once
2 
3 #include "IExtensionJsonHandler.h"
4 #include "JsonReaderOptions.h"
5 #include "ObjectJsonHandler.h"
6 
7 #include <CesiumUtility/ExtensibleObject.h>
8 
9 #include <memory>
10 
11 namespace CesiumJsonReader {
12 
14 public:
15  explicit ExtensionsJsonHandler(const JsonReaderOptions& context) noexcept
17  _context(context),
18  _pObject(nullptr),
19  _currentExtensionHandler() {}
20 
21  void reset(
22  IJsonHandler* pParent,
24  const std::string& objectType);
25 
26  virtual IJsonHandler* readObjectKey(const std::string_view& str) override;
27 
28 private:
29  const JsonReaderOptions& _context;
30  CesiumUtility::ExtensibleObject* _pObject = nullptr;
31  std::string _objectType;
32  std::unique_ptr<IExtensionJsonHandler> _currentExtensionHandler;
33 };
34 
35 } // namespace CesiumJsonReader
Holds options for reading statically-typed data structures from JSON.
Classes for reading JSON.
The base class for objects that have extensions and extras.