cesium-native 0.43.0
Loading...
Searching...
No Matches
ExtensionExtStructuralMetadata.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <CesiumGltf/Library.h>
6#include <CesiumUtility/ExtensibleObject.h>
7#include <CesiumUtility/JsonValue.h>
8
9#include <optional>
10#include <string>
11#include <unordered_map>
12
13namespace CesiumGltf {
17struct CESIUMGLTF_API ExtensionExtStructuralMetadata final
22 static constexpr const char* TypeName = "ExtensionExtStructuralMetadata";
25 static constexpr const char* ExtensionName = "EXT_structural_metadata";
26
31 std::optional<std::string> classProperty;
32
43 std::unordered_map<std::string, CesiumUtility::JsonValue> properties;
44
51 int64_t getSizeBytes() const {
52 int64_t accum = 0;
53 accum += int64_t(sizeof(ExtensionExtStructuralMetadata));
55 int64_t(sizeof(CesiumUtility::ExtensibleObject));
56 if (this->classProperty) {
57 accum += int64_t(this->classProperty->capacity() * sizeof(char));
58 }
59 accum += int64_t(
60 this->properties.bucket_count() *
61 (sizeof(std::string) + sizeof(CesiumUtility::JsonValue)));
62 for (const auto& [k, v] : this->properties) {
63 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
64 accum += int64_t(sizeof(CesiumUtility::JsonValue));
65 }
66 return accum;
67 }
68};
69} // namespace CesiumGltf
A generic implementation of a value in a JSON structure.
Definition JsonValue.h:75
Classes for working with glTF models.
Structural metadata about a glTF element.
std::optional< std::string > classProperty
The class that property values conform to. The value shall be a class ID declared in the classes dict...
std::unordered_map< std::string, CesiumUtility::JsonValue > properties
A dictionary, where each key corresponds to a property ID in the class' properties dictionary and eac...
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
The base class for objects that have extensions and extras.
int64_t getSizeBytes() const
Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including ...