cesium-native 0.43.0
Loading...
Searching...
No Matches
PropertyTable.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 <CesiumGltf/PropertyTableProperty.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <cstdint>
10#include <optional>
11#include <string>
12#include <unordered_map>
13
14namespace CesiumGltf {
19struct CESIUMGLTF_API PropertyTable final
24 static constexpr const char* TypeName = "PropertyTable";
25
29 std::optional<std::string> name;
30
35 std::string classProperty;
36
40 int64_t count = int64_t();
41
48 std::unordered_map<std::string, CesiumGltf::PropertyTableProperty> properties;
49
56 int64_t getSizeBytes() const {
57 int64_t accum = 0;
58 accum += int64_t(sizeof(PropertyTable));
60 int64_t(sizeof(CesiumUtility::ExtensibleObject));
61 if (this->name) {
62 accum += int64_t(this->name->capacity() * sizeof(char));
63 }
64 accum += int64_t(this->classProperty.capacity() * sizeof(char));
65 accum += int64_t(
66 this->properties.bucket_count() *
67 (sizeof(std::string) + sizeof(CesiumGltf::PropertyTableProperty)));
68 for (const auto& [k, v] : this->properties) {
69 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
70 accum +=
71 v.getSizeBytes() - int64_t(sizeof(CesiumGltf::PropertyTableProperty));
72 }
73 return accum;
74 }
75};
76} // namespace CesiumGltf
Classes for working with glTF models.
An array of binary property values.
Properties conforming to a class, organized as property values stored in binary columnar arrays.
std::unordered_map< std::string, CesiumGltf::PropertyTableProperty > 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,...
std::string classProperty
The class that property values conform to. The value must be a class ID declared in the classes dicti...
std::optional< std::string > name
The name of the property table, 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 ...