5#include <CesiumTilesetJson/Class.h>
6#include <CesiumTilesetJson/Enum.h>
7#include <CesiumTilesetJson/Library.h>
8#include <CesiumUtility/ExtensibleObject.h>
12#include <unordered_map>
18struct CESIUMTILESETJSON_API
Schema final
23 static constexpr const char*
TypeName =
"Schema";
34 std::optional<std::string>
name;
51 std::unordered_map<std::string, CesiumTilesetJson::Class>
classes;
58 std::unordered_map<std::string, CesiumTilesetJson::Enum>
enums;
68 accum += int64_t(
sizeof(
Schema));
71 accum += int64_t(this->
id.capacity() *
sizeof(
char));
73 accum += int64_t(this->name->capacity() *
sizeof(
char));
75 if (this->description) {
76 accum += int64_t(this->description->capacity() *
sizeof(
char));
79 accum += int64_t(this->version->capacity() *
sizeof(
char));
82 this->classes.bucket_count() *
84 for (
const auto& [k, v] : this->classes) {
85 accum += int64_t(k.capacity() *
sizeof(
char) -
sizeof(std::string));
89 this->enums.bucket_count() *
91 for (
const auto& [k, v] : this->enums) {
92 accum += int64_t(k.capacity() *
sizeof(
char) -
sizeof(std::string));
Classes to represent a tileset.json from 3D Tiles 1.1.
A class containing a set of properties.
An object defining the values of an enum.
An object defining classes and enums.
std::unordered_map< std::string, CesiumTilesetJson::Enum > enums
A dictionary, where each key is an enum ID and each value is an object defining the values for the en...
std::optional< std::string > description
The description of the schema.
std::string id
Unique identifier for the schema. Schema IDs shall be alphanumeric identifiers matching the regular e...
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
static constexpr const char * TypeName
The original name of this type.
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.
std::unordered_map< std::string, CesiumTilesetJson::Class > classes
A dictionary, where each key is a class ID and each value is an object defining the class....
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 ...