cesium-native 0.43.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 <Cesium3DTiles/EnumValue.h>
6#include <Cesium3DTiles/Library.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <optional>
10#include <string>
11#include <vector>
12
13namespace Cesium3DTiles {
17struct CESIUM3DTILES_API Enum final : public CesiumUtility::ExtensibleObject {
21 static constexpr const char* TypeName = "Enum";
22
26 struct ValueType {
28 inline static const std::string INT8 = "INT8";
29
31 inline static const std::string UINT8 = "UINT8";
32
34 inline static const std::string INT16 = "INT16";
35
37 inline static const std::string UINT16 = "UINT16";
38
40 inline static const std::string INT32 = "INT32";
41
43 inline static const std::string UINT32 = "UINT32";
44
46 inline static const std::string INT64 = "INT64";
47
49 inline static const std::string UINT64 = "UINT64";
50 };
51
55 std::optional<std::string> name;
56
60 std::optional<std::string> description;
61
68 std::string valueType = ValueType::UINT16;
69
74 std::vector<Cesium3DTiles::EnumValue> values;
75
82 int64_t getSizeBytes() const {
83 int64_t accum = 0;
84 accum += int64_t(sizeof(Enum));
86 int64_t(sizeof(CesiumUtility::ExtensibleObject));
87 if (this->name) {
88 accum += int64_t(this->name->capacity() * sizeof(char));
89 }
90 if (this->description) {
91 accum += int64_t(this->description->capacity() * sizeof(char));
92 }
93 accum +=
94 int64_t(sizeof(Cesium3DTiles::EnumValue) * this->values.capacity());
95 for (const Cesium3DTiles::EnumValue& value : this->values) {
96 accum += value.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::EnumValue));
97 }
98 return accum;
99 }
100};
101} // namespace Cesium3DTiles
Classes for using 3D Tiles.
Definition Buffer.h:7
Known values for The type of the integer enum value.
Definition Enum.h:26
An object defining the values of an enum.
Definition Enum.h:17
std::vector< Cesium3DTiles::EnumValue > values
An array of enum values. Duplicate names or duplicate integer values are not allowed.
Definition Enum.h:74
std::optional< std::string > description
The description of the enum.
Definition Enum.h:60
std::optional< std::string > name
The name of the enum, e.g. for display purposes.
Definition Enum.h:55
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Enum.h:82
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 ...