初始提交: UE5.3项目基础框架
This commit is contained in:
58
Plugins/CesiumForUnreal/Source/ThirdParty/include/CesiumJsonReader/ExtensibleObjectJsonHandler.h
vendored
Normal file
58
Plugins/CesiumForUnreal/Source/ThirdParty/include/CesiumJsonReader/ExtensibleObjectJsonHandler.h
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include "DictionaryJsonHandler.h"
|
||||
#include "ExtensionsJsonHandler.h"
|
||||
#include "JsonObjectJsonHandler.h"
|
||||
#include "JsonReaderOptions.h"
|
||||
#include "ObjectJsonHandler.h"
|
||||
|
||||
#include <CesiumUtility/ExtensibleObject.h>
|
||||
#include <CesiumUtility/JsonValue.h>
|
||||
|
||||
namespace CesiumJsonReader {
|
||||
|
||||
/**
|
||||
* @brief An \ref IJsonHandler for reading \ref CesiumUtility::ExtensibleObject
|
||||
* "ExtensibleObject" types.
|
||||
*/
|
||||
class ExtensibleObjectJsonHandler : public CesiumJsonReader::ObjectJsonHandler {
|
||||
public:
|
||||
/**
|
||||
* @brief Creates an \ref ExtensibleObjectJsonHandler with the specified
|
||||
* options.
|
||||
*
|
||||
* @param context Options to configure how the JSON is parsed.
|
||||
*/
|
||||
explicit ExtensibleObjectJsonHandler(
|
||||
const JsonReaderOptions& context) noexcept;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Resets the current parent of this handler, and the current object
|
||||
* being handled.
|
||||
*/
|
||||
void reset(IJsonHandler* pParent, CesiumUtility::ExtensibleObject* pObject);
|
||||
/**
|
||||
* @brief Reads a property of an \ref CesiumUtility::ExtensibleObject
|
||||
* "ExtensibleObject" from the JSON.
|
||||
*
|
||||
* @param objectType The name of the ExtensibleObject's type.
|
||||
* @param str The object key being read.
|
||||
* @param o The \ref CesiumUtility::ExtensibleObject "ExtensibleObject" we're
|
||||
* currently reading into.
|
||||
*/
|
||||
IJsonHandler* readObjectKeyExtensibleObject(
|
||||
const std::string& objectType,
|
||||
const std::string_view& str,
|
||||
CesiumUtility::ExtensibleObject& o);
|
||||
|
||||
private:
|
||||
CesiumJsonReader::DictionaryJsonHandler<
|
||||
CesiumUtility::JsonValue,
|
||||
CesiumJsonReader::JsonObjectJsonHandler>
|
||||
_extras;
|
||||
ExtensionsJsonHandler _extensions;
|
||||
JsonObjectJsonHandler _unknownProperties;
|
||||
bool _captureUnknownProperties;
|
||||
};
|
||||
} // namespace CesiumJsonReader
|
||||
Reference in New Issue
Block a user