cesium-native 0.67.0
Loading...
Searching...
No Matches
MetadataQuery.h
1#pragma once
2
3#include <CesiumTilesetJson/MetadataEntity.h>
4#include <CesiumTilesetJson/Schema.h>
5#include <CesiumUtility/JsonValue.h>
6
7#include <string>
8#include <unordered_map>
9
10namespace CesiumTilesetJson {
11
20struct CESIUMTILESETJSON_API FoundMetadataProperty {
25 const std::string& classIdentifier;
26
32
37 const std::string& propertyIdentifier;
38
44
50};
51
55class CESIUMTILESETJSON_API MetadataQuery {
56public:
68 static std::optional<FoundMetadataProperty> findFirstPropertyWithSemantic(
69 const Schema& schema,
70 const MetadataEntity& entity,
71 const std::string& semantic);
72};
73
74} // namespace CesiumTilesetJson
Convenience functions for querying MetadataEntity instances.
static std::optional< FoundMetadataProperty > findFirstPropertyWithSemantic(const Schema &schema, const MetadataEntity &entity, const std::string &semantic)
Gets the first property with a given ClassProperty::semantic.
A generic implementation of a value in a JSON structure.
Definition JsonValue.h:53
Classes to represent a tileset.json from 3D Tiles 1.1.
A single property of a metadata class.
A class containing a set of properties.
Definition Class.h:18
Holds the details of a found property in a MetadataEntity.
const ClassProperty & propertyDefinition
A reference to the ClassProperty describing the found property within the Schema.
const std::string & propertyIdentifier
A reference to the identifier of the found property within the Schema.
const Class & classDefinition
A reference to the Class that contains the found property within the Schema.
const CesiumUtility::JsonValue & propertyValue
A reference to the value of the found property within the MetadataEntity.
const std::string & classIdentifier
A reference to the identifier of the class that contains the found property within the Schema.
An object containing a reference to a class from a metadata schema, and property values that conform ...
An object defining classes and enums.
Definition Schema.h:19