15#ifndef DRACO_METADATA_PROPERTY_TABLE_H_
16#define DRACO_METADATA_PROPERTY_TABLE_H_
20#ifdef DRACO_TRANSCODER_SUPPORTED
41 enum Type { OBJECT, ARRAY, STRING, INTEGER, BOOLEAN };
44 Object() : Object(
"") {}
45 explicit Object(
const std::string&
name)
46 : name_(
name), type_(OBJECT), integer_(0), boolean_(false) {}
47 Object(
const std::string&
name,
const std::string& value) : Object(
name) {
50 Object(
const std::string&
name,
const char* value) : Object(
name) {
53 Object(
const std::string&
name,
int value) : Object(
name) {
56 Object(
const std::string&
name,
bool value) : Object(
name) {
62 bool operator!=(
const Object& other)
const {
return !(*
this == other); }
65 void Copy(
const Object&
src);
68 const std::string& GetName()
const {
return name_; }
69 Type GetType()
const {
return type_; }
72 const std::vector<Object>& GetObjects()
const {
return objects_; }
73 const std::vector<Object>& GetArray()
const {
return array_; }
74 const std::string& GetString()
const {
return string_; }
75 int GetInteger()
const {
return integer_; }
76 bool GetBoolean()
const {
return boolean_; }
79 std::vector<Object>& SetObjects() {
83 std::vector<Object>& SetArray() {
87 void SetString(
const std::string& value) {
91 void SetInteger(
int value) {
95 void SetBoolean(
bool value) {
103 std::vector<Object> objects_;
104 std::vector<Object> array_;
111 Schema() :
json(
"schema") {}
114 bool operator==(
const Schema& other)
const {
return json == other.json; }
115 bool operator!=(
const Schema& other)
const {
return !(*
this == other); }
118 bool Empty()
const {
return json.GetObjects().empty(); }
131 bool operator!=(
const Data& other)
const {
return !(*
this == other); }
134 std::vector<uint8_t>
data;
147 bool operator!=(
const Offsets& other)
const {
return !(*
this == other); }
161 bool operator!=(
const Property& other)
const {
return !(*
this == other); }
164 void Copy(
const Property&
src);
167 void SetName(
const std::string&
name);
168 const std::string& GetName()
const;
175 const Data& GetData()
const;
183 const Offsets& GetArrayOffsets()
const;
184 Offsets& GetArrayOffsets();
191 const Offsets& GetStringOffsets()
const;
192 Offsets& GetStringOffsets();
197 Offsets array_offsets_;
198 Offsets string_offsets_;
206 bool operator==(
const PropertyTable& other)
const;
207 bool operator!=(
const PropertyTable& other)
const {
208 return !(*
this == other);
212 void Copy(
const PropertyTable&
src);
215 void SetName(
const std::string& value);
216 const std::string& GetName()
const;
219 void SetClass(
const std::string& value);
220 const std::string& GetClass()
const;
223 void SetCount(
int count);
224 int GetCount()
const;
227 int AddProperty(std::unique_ptr<Property> property);
228 int NumProperties()
const;
229 const Property& GetProperty(
int index)
const;
230 Property& GetProperty(
int index);
231 void RemoveProperty(
int index);
237 std::vector<std::unique_ptr<Property>> properties_;
Type
Definition Database.hh:9
iVBORw0KGgoAAAANSUhEUgAAANcAAAB5CAMAAACdtUQZAAAA51BMVEX</div ></div >< div style="padding: 0px 0px; width: 1324px;">< div style="height: 400px; width: 1324px;"></div >< div itemscope itemtype="https: </div><div itemscope itemtype="https:</div >< div itemscope itemtype="https: </div></div><p><div style="padding:0px 0px;width:1324px;"><div></div><div itemscope itemtype="https:< ul >< li >< b > Application name
8AkrcAgqgAs9wqQ0ey2tkAo8gAuuQfeI4hPUH09fXHy8z4+fng4uNKXF/Lz9BzfoAcgpkQMTUAKjAbOT4Qr9AXhJ8Rl7ktMCwTosA...
Definition meshpage.php:1610
lazy data
Definition meshpage.php:1583
tag src
Definition meshpage.php:1786
Definition attribute_octahedron_transform.cc:21
basic_json<> json
default JSON class
Definition json.hpp:111
bool operator==(const short_alloc< T, N, A1 > &x, const short_alloc< U, M, A2 > &y) noexcept
Definition short_alloc.hpp:145
bool operator!=(const short_alloc< T, N, A1 > &x, const short_alloc< U, M, A2 > &y) noexcept
Definition short_alloc.hpp:153