5#include <CesiumGltf/Class.h>
6#include <CesiumGltf/Enum.h>
7#include <CesiumGltf/Library.h>
8#include <CesiumUtility/SharedAsset.h>
12#include <unordered_map>
22 static constexpr const char* TypeName =
"Schema";
33 std::optional<std::string>
name;
50 std::unordered_map<std::string, CesiumGltf::Class>
classes;
57 std::unordered_map<std::string, CesiumGltf::Enum>
enums;
67 accum += int64_t(
sizeof(
Schema));
70 accum += int64_t(this->
id.capacity() *
sizeof(
char));
72 accum += int64_t(this->name->capacity() *
sizeof(
char));
74 if (this->description) {
75 accum += int64_t(this->description->capacity() *
sizeof(
char));
78 accum += int64_t(this->version->capacity() *
sizeof(
char));
81 this->classes.bucket_count() *
83 for (
const auto& [k, v] : this->classes) {
84 accum += int64_t(k.capacity() *
sizeof(
char) -
sizeof(std::string));
88 this->enums.bucket_count() *
90 for (
const auto& [k, v] : this->enums) {
91 accum += int64_t(k.capacity() *
sizeof(
char) -
sizeof(std::string));
An asset that is potentially shared between multiple objects, such as an image shared between multipl...
Classes for working with glTF models.
A class containing a set of properties.
An object defining the values of an enum.
An object defining classes and enums.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
std::string id
Unique identifier for the schema. Schema IDs must be alphanumeric identifiers matching the regular ex...
std::optional< std::string > description
The description of the schema.
std::unordered_map< std::string, CesiumGltf::Enum > enums
A dictionary, where each key is an enum ID and each value is an object defining the values for the en...
std::unordered_map< std::string, CesiumGltf::Class > classes
A dictionary, where each key is a class ID and each value is an object defining the class....
std::optional< std::string > version
Application-specific version of the schema.
std::optional< std::string > name
The name of the schema, e.g. for display purposes.
int64_t getSizeBytes() const
Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including ...