cesium-native 0.43.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 <Cesium3DTiles/Library.h>
6#include <Cesium3DTiles/PropertyStatistics.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 ClassStatistics final
24 static constexpr const char* TypeName = "ClassStatistics";
25
29 std::optional<int64_t> count;
30
36 std::unordered_map<std::string, Cesium3DTiles::PropertyStatistics> properties;
37
44 int64_t getSizeBytes() const {
45 int64_t accum = 0;
46 accum += int64_t(sizeof(ClassStatistics));
48 int64_t(sizeof(CesiumUtility::ExtensibleObject));
49 accum += int64_t(
50 this->properties.bucket_count() *
51 (sizeof(std::string) + sizeof(Cesium3DTiles::PropertyStatistics)));
52 for (const auto& [k, v] : this->properties) {
53 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
54 accum +=
55 v.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::PropertyStatistics));
56 }
57 return accum;
58 }
59};
60} // namespace Cesium3DTiles
Classes for using 3D Tiles.
Definition Buffer.h:7
Statistics about entities that conform to a class that was defined in a metadata schema.
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.
std::unordered_map< std::string, Cesium3DTiles::PropertyStatistics > properties
A dictionary, where each key corresponds to a property ID in the class' properties dictionary and eac...
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 ...