cesium-native 0.67.0
Loading...
Searching...
No Matches
ClassStatistics.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/PropertyStatistics.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 ClassStatistics final
24 static constexpr const char* TypeName = "ClassStatistics";
25
29 std::optional<int64_t> count;
30
36 std::unordered_map<std::string, CesiumTilesetJson::PropertyStatistics>
38
45 int64_t getSizeBytes() const {
46 int64_t accum = 0;
47 accum += int64_t(sizeof(ClassStatistics));
49 int64_t(sizeof(CesiumUtility::ExtensibleObject));
50 accum += int64_t(
51 this->properties.bucket_count() *
52 (sizeof(std::string) + sizeof(CesiumTilesetJson::PropertyStatistics)));
53 for (const auto& [k, v] : this->properties) {
54 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
55 accum += v.getSizeBytes() -
57 }
58 return accum;
59 }
60};
61} // namespace CesiumTilesetJson
Classes to represent a tileset.json from 3D Tiles 1.1.
Statistics about entities that conform to a class that was defined in a metadata schema.
static constexpr const char * TypeName
The original name of this type.
std::unordered_map< std::string, CesiumTilesetJson::PropertyStatistics > 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< int64_t > count
The number of entities that conform to the class.
Statistics about property values.
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 ...