cesium-native 0.43.0
Loading...
Searching...
No Matches
IgnoreValueJsonHandler.h
1#pragma once
2
3#include "IJsonHandler.h"
4#include "Library.h"
5
6#include <cstdint>
7
8namespace CesiumJsonReader {
16class CESIUMJSONREADER_API IgnoreValueJsonHandler : public IJsonHandler {
17public:
21 void reset(IJsonHandler* pParent) noexcept;
22
24 virtual IJsonHandler* readNull() override;
26 virtual IJsonHandler* readBool(bool b) override;
28 virtual IJsonHandler* readInt32(int32_t i) override;
30 virtual IJsonHandler* readUint32(uint32_t i) override;
32 virtual IJsonHandler* readInt64(int64_t i) override;
34 virtual IJsonHandler* readUint64(uint64_t i) override;
36 virtual IJsonHandler* readDouble(double d) override;
38 virtual IJsonHandler* readString(const std::string_view& str) override;
40 virtual IJsonHandler* readObjectStart() override;
42 virtual IJsonHandler* readObjectKey(const std::string_view& str) override;
44 virtual IJsonHandler* readObjectEnd() override;
46 virtual IJsonHandler* readArrayStart() override;
48 virtual IJsonHandler* readArrayEnd() override;
49
51 virtual void reportWarning(
52 const std::string& warning,
53 std::vector<std::string>&& context = std::vector<std::string>()) override;
54
59 IJsonHandler* parent() noexcept;
60
61private:
62 IJsonHandler* _pParent = nullptr;
63 int32_t _depth = 0;
64};
65} // namespace CesiumJsonReader
Base interface for all JSON handlers. Types that need to be deserialized from JSON should implement I...
IJsonHandler that does nothing but ignore the next value.
virtual IJsonHandler * readArrayEnd() override
Called when the JSON parser encounters the end of an array.
virtual IJsonHandler * readNull() override
Called when the JSON parser encounters a null.
virtual IJsonHandler * readString(const std::string_view &str) override
Called when the JSON parser encounters a string value.
virtual void reportWarning(const std::string &warning, std::vector< std::string > &&context=std::vector< std::string >()) override
Report a warning while reading JSON.
virtual IJsonHandler * readObjectKey(const std::string_view &str) override
Called when the JSON parser encounters a key while reading an object.
void reset(IJsonHandler *pParent) noexcept
Resets the parent of this IJsonHandler.
IJsonHandler * parent() noexcept
Obtains the currently set parent of this handler, or nullptr if reset hasn't yet been called.
virtual IJsonHandler * readBool(bool b) override
Called when the JSON parser encounters a boolean value.
virtual IJsonHandler * readObjectEnd() override
Called when the JSON parser encounters the end of an object.
virtual IJsonHandler * readInt64(int64_t i) override
Called when the JSON parser encounters an int64 value.
virtual IJsonHandler * readUint32(uint32_t i) override
Called when the JSON parser encounters a uint32 value.
virtual IJsonHandler * readObjectStart() override
Called when the JSON parser encounters the beginning of an object.
virtual IJsonHandler * readArrayStart() override
Called when the JSON parser encounters the start of an array.
virtual IJsonHandler * readDouble(double d) override
Called when the JSON parser encounters a double value.
virtual IJsonHandler * readInt32(int32_t i) override
Called when the JSON parser encounters an int32 value.
virtual IJsonHandler * readUint64(uint64_t i) override
Called when the JSON parser encounters a uint64 value.
Classes for reading JSON.