cesium-native  0.41.0
MetadataQuery.h
1 #pragma once
2 
3 #include <Cesium3DTiles/MetadataEntity.h>
4 #include <Cesium3DTiles/Schema.h>
5 #include <CesiumUtility/JsonValue.h>
6 
7 #include <string>
8 #include <unordered_map>
9 
10 namespace Cesium3DTiles {
11 
20 struct CESIUM3DTILES_API FoundMetadataProperty {
25  const std::string& classIdentifier;
26 
32 
37  const std::string& propertyIdentifier;
38 
44 
50 };
51 
55 class CESIUM3DTILES_API MetadataQuery {
56 public:
68  static std::optional<FoundMetadataProperty> findFirstPropertyWithSemantic(
69  const Schema& schema,
70  const MetadataEntity& entity,
71  const std::string& semantic);
72 };
73 
74 } // namespace Cesium3DTiles
Convenience functions for querying MetadataEntity instances.
Definition: MetadataQuery.h:55
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:67
Classes for using 3D Tiles.
Definition: Buffer.h:7
A single property of a metadata class.
Definition: ClassProperty.h:19
A class containing a set of properties.
Definition: Class.h:18
Holds the details of a found property in a MetadataEntity.
Definition: MetadataQuery.h:20
const std::string & classIdentifier
A reference to the identifier of the class that contains the found property within the Schema.
Definition: MetadataQuery.h:25
const Class & classDefinition
A reference to the Class that contains the found property within the Schema.
Definition: MetadataQuery.h:31
const std::string & propertyIdentifier
A reference to the identifier of the found property within the Schema.
Definition: MetadataQuery.h:37
const ClassProperty & propertyDefinition
A reference to the ClassProperty describing the found property within the {@lnik Schema}.
Definition: MetadataQuery.h:43
const CesiumUtility::JsonValue & propertyValue
A reference to the value of the found property within the MetadataEntity.
Definition: MetadataQuery.h:49
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