cesium-native 0.66.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 <CesiumGltf/ClassStatistics.h>
6#include <CesiumGltf/Library.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <string>
10#include <unordered_map>
11
12namespace CesiumGltf {
16struct CESIUMGLTF_API Statistics final
21 static constexpr const char* TypeName = "Statistics";
22
29 std::unordered_map<std::string, CesiumGltf::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(CesiumGltf::ClassStatistics)));
45 for (const auto& [k, v] : this->classes) {
46 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
47 accum += v.getSizeBytes() - int64_t(sizeof(CesiumGltf::ClassStatistics));
48 }
49 return accum;
50 }
51};
52} // namespace CesiumGltf
Classes for working with glTF models.
Statistics about entities that conform to a class that was defined in a metadata schema.
Statistics about entities.
Definition Statistics.h:17
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Statistics.h:37
std::unordered_map< std::string, CesiumGltf::ClassStatistics > classes
A dictionary, where each key corresponds to a class ID in the classes dictionary of the metatata sche...
Definition Statistics.h:29
static constexpr const char * TypeName
The original name of this type.
Definition Statistics.h:21
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 ...