5#include <CesiumGltf/ClassProperty.h>
6#include <CesiumGltf/Library.h>
7#include <CesiumUtility/ExtensibleObject.h>
11#include <unordered_map>
21 static constexpr const char* TypeName =
"Class";
26 std::optional<std::string>
name;
38 std::unordered_map<std::string, CesiumGltf::ClassProperty>
properties;
48 accum += int64_t(
sizeof(
Class));
52 accum += int64_t(this->name->capacity() *
sizeof(
char));
54 if (this->description) {
55 accum += int64_t(this->description->capacity() *
sizeof(
char));
58 this->properties.bucket_count() *
60 for (
const auto& [k, v] : this->properties) {
61 accum += int64_t(k.capacity() *
sizeof(
char) -
sizeof(std::string));
Classes for working with glTF models.
A class containing a set of properties.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
std::optional< std::string > description
The description of the class.
std::unordered_map< std::string, CesiumGltf::ClassProperty > properties
A dictionary, where each key is a property ID and each value is an object defining the property....
std::optional< std::string > name
The name of the class, e.g. for display purposes.
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 ...