cesium-native 0.67.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 <CesiumTilesetJson/Library.h>
6#include <CesiumTilesetJson/PropertyTableProperty.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <cstdint>
10#include <optional>
11#include <string>
12#include <unordered_map>
13
14namespace CesiumTilesetJson {
19struct CESIUMTILESETJSON_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, CesiumTilesetJson::PropertyTableProperty>
50
57 int64_t getSizeBytes() const {
58 int64_t accum = 0;
59 accum += int64_t(sizeof(PropertyTable));
61 int64_t(sizeof(CesiumUtility::ExtensibleObject));
62 if (this->name) {
63 accum += int64_t(this->name->capacity() * sizeof(char));
64 }
65 accum += int64_t(this->classProperty.capacity() * sizeof(char));
66 accum += int64_t(
67 this->properties.bucket_count() *
68 (sizeof(std::string) +
70 for (const auto& [k, v] : this->properties) {
71 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
72 accum += v.getSizeBytes() -
74 }
75 return accum;
76 }
77};
78} // namespace CesiumTilesetJson
Classes to represent a tileset.json from 3D Tiles 1.1.
An array of binary property values. This represents one column of a property table,...
Properties conforming to a class, organized as property values stored in binary columnar arrays.
std::string classProperty
The class that property values conform to. The value shall be a class ID declared in the classes dict...
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
int64_t count
The number of elements in each property array.
std::optional< std::string > name
The name of the property table, e.g. for display purposes.
std::unordered_map< std::string, CesiumTilesetJson::PropertyTableProperty > properties
A dictionary, where each key corresponds to a property ID in the class' properties dictionary and eac...
static constexpr const char * TypeName
The original name of this type.
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 ...