cesium-native 0.43.0
Loading...
Searching...
No Matches
Statistics.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <Cesium3DTiles/ClassStatistics.h>
6#include <Cesium3DTiles/Library.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <string>
10#include <unordered_map>
11
12namespace Cesium3DTiles {
16struct CESIUM3DTILES_API Statistics final
21 static constexpr const char* TypeName = "Statistics";
22
29 std::unordered_map<std::string, Cesium3DTiles::ClassStatistics> classes;
30
37 int64_t getSizeBytes() const {
38 int64_t accum = 0;
39 accum += int64_t(sizeof(Statistics));
41 int64_t(sizeof(CesiumUtility::ExtensibleObject));
42 accum += int64_t(
43 this->classes.bucket_count() *
44 (sizeof(std::string) + sizeof(Cesium3DTiles::ClassStatistics)));
45 for (const auto& [k, v] : this->classes) {
46 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
47 accum +=
48 v.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::ClassStatistics));
49 }
50 return accum;
51 }
52};
53} // 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.
Statistics about entities.
Definition Statistics.h:17
std::unordered_map< std::string, Cesium3DTiles::ClassStatistics > classes
A dictionary, where each key corresponds to a class ID in the classes dictionary of the metatata sche...
Definition Statistics.h:29
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Statistics.h:37
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 ...