cesium-native 0.61.0
Loading...
Searching...
No Matches
ConditionalContentItem.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <Cesium3DTiles/Content.h>
6#include <Cesium3DTiles/Library.h>
7#include <CesiumUtility/JsonValue.h>
8
9#include <string>
10#include <unordered_map>
11
12namespace Cesium3DTiles {
17struct CESIUM3DTILES_API ConditionalContentItem final : public Content {
21 static constexpr const char* TypeName = "ConditionalContentItem";
22
28 std::unordered_map<std::string, CesiumUtility::JsonValue> keys;
29
36 int64_t getSizeBytes() const {
37 int64_t accum = 0;
38 accum += int64_t(sizeof(ConditionalContentItem));
39 accum += Content::getSizeBytes() - int64_t(sizeof(Content));
40 accum += int64_t(
41 this->keys.bucket_count() *
42 (sizeof(std::string) + sizeof(CesiumUtility::JsonValue)));
43 for (const auto& [k, v] : this->keys) {
44 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
45 accum += int64_t(sizeof(CesiumUtility::JsonValue));
46 }
47 return accum;
48 }
49};
50} // namespace Cesium3DTiles
A generic implementation of a value in a JSON structure.
Definition JsonValue.h:53
Classes for using 3D Tiles.
Definition Buffer.h:7
Defines the structure of a single content item in 3DTILES_content_conditional.
std::unordered_map< std::string, CesiumUtility::JsonValue > keys
Properties that define the conditions based on which the item can become active. The names of these p...
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
static constexpr const char * TypeName
The original name of this type.
Metadata about the tile's content and a link to the content.
Definition Content.h:18
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Content.h:55