cesium-native 0.43.0
Loading...
Searching...
No Matches
MetadataEntity.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <Cesium3DTiles/Library.h>
6#include <CesiumUtility/ExtensibleObject.h>
7#include <CesiumUtility/JsonValue.h>
8
9#include <string>
10#include <unordered_map>
11
12namespace Cesium3DTiles {
17struct CESIUM3DTILES_API MetadataEntity
22 static constexpr const char* TypeName = "MetadataEntity";
23
28 std::string classProperty;
29
40 std::unordered_map<std::string, CesiumUtility::JsonValue> properties;
41
48 int64_t getSizeBytes() const {
49 int64_t accum = 0;
50 accum += int64_t(sizeof(MetadataEntity));
52 int64_t(sizeof(CesiumUtility::ExtensibleObject));
53 accum += int64_t(this->classProperty.capacity() * sizeof(char));
54 accum += int64_t(
55 this->properties.bucket_count() *
56 (sizeof(std::string) + sizeof(CesiumUtility::JsonValue)));
57 for (const auto& [k, v] : this->properties) {
58 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
59 accum += int64_t(sizeof(CesiumUtility::JsonValue));
60 }
61 return accum;
62 }
63};
64} // namespace Cesium3DTiles
A generic implementation of a value in a JSON structure.
Definition JsonValue.h:75
Classes for using 3D Tiles.
Definition Buffer.h:7
An object containing a reference to a class from a metadata schema, and property values that conform ...
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
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...
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 ...