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 <Cesium3DTiles/Library.h>
6#include <Cesium3DTiles/PropertyTableProperty.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <cstdint>
10#include <optional>
11#include <string>
12#include <unordered_map>
13
14namespace Cesium3DTiles {
19struct CESIUM3DTILES_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, Cesium3DTiles::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) + sizeof(Cesium3DTiles::PropertyTableProperty)));
69 for (const auto& [k, v] : this->properties) {
70 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
71 accum += v.getSizeBytes() -
73 }
74 return accum;
75 }
76};
77} // namespace Cesium3DTiles
Classes for using 3D Tiles.
Definition Buffer.h:7
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...
std::unordered_map< std::string, Cesium3DTiles::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::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 ...