// This file was generated by generate-classes. // DO NOT EDIT THIS FILE! #pragma once #include #include #include #include #include namespace Cesium3DTiles { /** * @brief Statistics about entities. */ struct CESIUM3DTILES_API Statistics final : public CesiumUtility::ExtensibleObject { /** * @brief The original name of this type. */ static constexpr const char* TypeName = "Statistics"; /** * @brief A dictionary, where each key corresponds to a class ID in the * `classes` dictionary of the metatata schema that was defined for the * tileset that contains these statistics. Each value is an object containing * statistics about entities that conform to the class. */ std::unordered_map classes; /** * @brief Calculates the size in bytes of this object, including the contents * of all collections, pointers, and strings. This will NOT include the size * of any extensions attached to the object. Calling this method may be slow * as it requires traversing the object's entire structure. */ int64_t getSizeBytes() const { int64_t accum = 0; accum += int64_t(sizeof(Statistics)); accum += CesiumUtility::ExtensibleObject::getSizeBytes() - int64_t(sizeof(CesiumUtility::ExtensibleObject)); accum += int64_t( this->classes.bucket_count() * (sizeof(std::string) + sizeof(Cesium3DTiles::ClassStatistics))); for (const auto& [k, v] : this->classes) { accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string)); accum += v.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::ClassStatistics)); } return accum; } }; } // namespace Cesium3DTiles