cesium-native 0.67.0
Loading...
Searching...
No Matches
Enum.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <CesiumTilesetJson/EnumValue.h>
6#include <CesiumTilesetJson/Library.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <optional>
10#include <string>
11#include <vector>
12
13namespace CesiumTilesetJson {
17struct CESIUMTILESETJSON_API Enum final
22 static constexpr const char* TypeName = "Enum";
23
27 struct ValueType {
29 inline static const std::string INT8 = "INT8";
30
32 inline static const std::string UINT8 = "UINT8";
33
35 inline static const std::string INT16 = "INT16";
36
38 inline static const std::string UINT16 = "UINT16";
39
41 inline static const std::string INT32 = "INT32";
42
44 inline static const std::string UINT32 = "UINT32";
45
47 inline static const std::string INT64 = "INT64";
48
50 inline static const std::string UINT64 = "UINT64";
51 };
52
56 std::optional<std::string> name;
57
61 std::optional<std::string> description;
62
70
75 std::vector<CesiumTilesetJson::EnumValue> values;
76
83 int64_t getSizeBytes() const {
84 int64_t accum = 0;
85 accum += int64_t(sizeof(Enum));
87 int64_t(sizeof(CesiumUtility::ExtensibleObject));
88 if (this->name) {
89 accum += int64_t(this->name->capacity() * sizeof(char));
90 }
91 if (this->description) {
92 accum += int64_t(this->description->capacity() * sizeof(char));
93 }
94 accum +=
95 int64_t(sizeof(CesiumTilesetJson::EnumValue) * this->values.capacity());
96 for (const CesiumTilesetJson::EnumValue& value : this->values) {
97 accum +=
98 value.getSizeBytes() - int64_t(sizeof(CesiumTilesetJson::EnumValue));
99 }
100 return accum;
101 }
102};
103} // namespace CesiumTilesetJson
Classes to represent a tileset.json from 3D Tiles 1.1.
Known values for The type of the integer enum value.
Definition Enum.h:27
static const std::string INT32
INT32
Definition Enum.h:41
static const std::string INT16
INT16
Definition Enum.h:35
static const std::string UINT16
UINT16
Definition Enum.h:38
static const std::string UINT8
UINT8
Definition Enum.h:32
static const std::string INT8
INT8
Definition Enum.h:29
static const std::string UINT64
UINT64
Definition Enum.h:50
static const std::string UINT32
UINT32
Definition Enum.h:44
static const std::string INT64
INT64
Definition Enum.h:47
An object defining the values of an enum.
Definition Enum.h:18
std::optional< std::string > description
The description of the enum.
Definition Enum.h:61
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Enum.h:83
std::string valueType
The type of the integer enum value.
Definition Enum.h:69
static constexpr const char * TypeName
The original name of this type.
Definition Enum.h:22
std::optional< std::string > name
The name of the enum, e.g. for display purposes.
Definition Enum.h:56
std::vector< CesiumTilesetJson::EnumValue > values
An array of enum values. Duplicate names or duplicate integer values are not allowed.
Definition Enum.h:75
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 ...