Skip to main content

Post-processing tools 2025 R1

GLTFValue

Last update: 16.07.2025
1/*
2 * Copyright 2018-2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
3 *
4 * Restricted Rights Legend
5 *
6 * Use, duplication, or disclosure of this
7 * software and its documentation by the
8 * Government is subject to restrictions as
9 * set forth in subdivision [(b)(3)(ii)] of
10 * the Rights in Technical Data and Computer
11 * Software clause at 52.227-7013.
12 */
13#ifndef __INCLUDED_GLTF_GLTFVALUE__
14#define __INCLUDED_GLTF_GLTFVALUE__
15
16#include "GLTFCommon.h"
17#include "GLTFObject.h"
18
19namespace ANSYS { namespace AVZ { namespace GLTFWriter {
20 class GLTF;
21
25 class Value : public Object
26 {
27 protected:
28 virtual ~Value() {};
29
30 public:
33 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
34 const char *name,
35 const Value *value = 0
36 );
39 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
40 const char *name,
41 unsigned int count,
42 const char **v
43 );
46 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
47 const char *name,
48 unsigned int count,
49 const bool *v
50 );
53 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
54 const char *name,
55 unsigned int count,
56 const char *v
57 );
60 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
61 const char *name,
62 unsigned int count,
63 const short *v
64 );
67 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
68 const char *name,
69 unsigned int count,
70 const unsigned short *v
71 );
74 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
75 const char *name,
76 unsigned int count,
77 const int *v
78 );
81 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
82 const char *name,
83 unsigned int count,
84 const unsigned int *v
85 );
88 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
89 const char *name,
90 unsigned int count,
91 const float *v
92 );
95 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
96 const char *name,
97 unsigned int count,
98 const double *v
99 );
100
103 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
104 const char *name,
105 const char *v1,
106 const char *v2 = 0,
107 const char *v3 = 0,
108 const char *v4 = 0
109 );
112 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
113 const char *name,
114 double v1
115 );
118 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
119 const char *name,
120 double v1,
121 double v2
122 );
125 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
126 const char *name,
127 double v1,
128 double v2,
129 double v3
130 );
133 static GLTFWRITERSPEC Value *Create(GLTF *gltf,
134 const char *name,
135 double v1,
136 double v2,
137 double v3,
138 double v4
139 );
140
143 GLTFWRITERSPEC virtual bool Set(unsigned int count,
144 const char **v
145 ) = 0;
148 GLTFWRITERSPEC virtual bool Set(unsigned int count,
149 const bool *v
150 ) = 0;
153 GLTFWRITERSPEC virtual bool Set(unsigned int count,
154 const char *v
155 ) = 0;
158 GLTFWRITERSPEC virtual bool Set(unsigned int count,
159 const short *v
160 ) = 0;
163 GLTFWRITERSPEC virtual bool Set(unsigned int count,
164 const unsigned short *v
165 ) = 0;
168 GLTFWRITERSPEC virtual bool Set(unsigned int count,
169 const int *v
170 ) = 0;
173 GLTFWRITERSPEC virtual bool Set(unsigned int count,
174 const unsigned int *v
175 ) = 0;
178 GLTFWRITERSPEC virtual bool Set(unsigned int count,
179 const float *v
180 ) = 0;
183 GLTFWRITERSPEC virtual bool Set(unsigned int count,
184 const double *v
185 ) = 0;
186
189 GLTFWRITERSPEC virtual bool Set(const char *v1,
190 const char *v2 = 0,
191 const char *v3 = 0,
192 const char *v4 = 0
193 ) = 0;
196 GLTFWRITERSPEC virtual bool Set(double v1
197 ) = 0;
200 GLTFWRITERSPEC virtual bool Set(double v1,
201 double v2
202 ) = 0;
205 GLTFWRITERSPEC virtual bool Set(double v1,
206 double v2,
207 double v3
208 ) = 0;
211 GLTFWRITERSPEC virtual bool Set(double v1,
212 double v2,
213 double v3,
214 double v4
215 ) = 0;
216
219 GLTFWRITERSPEC virtual bool Append(const char *value
220 ) = 0;
223 GLTFWRITERSPEC virtual bool Append(double value
224 ) = 0;
225
228 GLTFWRITERSPEC virtual unsigned int Size() const = 0;
229
232 GLTFWRITERSPEC virtual const char *elemS(unsigned int pos
233 ) const = 0;
236 GLTFWRITERSPEC virtual double elemD(unsigned int pos
237 ) const = 0;
238 };
239
240} } }
241
242#endif
This is the main class of the GLTFWriter.
Definition GLTFGLTF.h:32
Values are objects for storing single and multiple numbers and strings.
Definition GLTFValue.h:26
virtual double elemD(unsigned int pos) const =0
virtual unsigned int Size() const =0
static Value * Create(GLTF *gltf, const char *name, unsigned int count, const unsigned short *v)
virtual bool Set(double v1, double v2, double v3)=0
virtual bool Append(double value)=0
virtual bool Set(double v1)=0
virtual bool Set(unsigned int count, const char **v)=0
static Value * Create(GLTF *gltf, const char *name, double v1, double v2, double v3, double v4)
virtual bool Append(const char *value)=0
virtual bool Set(double v1, double v2)=0
virtual bool Set(const char *v1, const char *v2=0, const char *v3=0, const char *v4=0)=0
virtual bool Set(unsigned int count, const int *v)=0
virtual bool Set(unsigned int count, const double *v)=0
static Value * Create(GLTF *gltf, const char *name, const Value *value=0)
static Value * Create(GLTF *gltf, const char *name, unsigned int count, const short *v)
static Value * Create(GLTF *gltf, const char *name, unsigned int count, const char **v)
virtual bool Set(unsigned int count, const float *v)=0
static Value * Create(GLTF *gltf, const char *name, unsigned int count, const float *v)
static Value * Create(GLTF *gltf, const char *name, const char *v1, const char *v2=0, const char *v3=0, const char *v4=0)
static Value * Create(GLTF *gltf, const char *name, unsigned int count, const int *v)
static Value * Create(GLTF *gltf, const char *name, unsigned int count, const bool *v)
static Value * Create(GLTF *gltf, const char *name, double v1, double v2, double v3)
virtual const char * elemS(unsigned int pos) const =0
static Value * Create(GLTF *gltf, const char *name, unsigned int count, const double *v)
static Value * Create(GLTF *gltf, const char *name, unsigned int count, const char *v)
virtual bool Set(unsigned int count, const char *v)=0
virtual bool Set(unsigned int count, const short *v)=0
virtual bool Set(double v1, double v2, double v3, double v4)=0
static Value * Create(GLTF *gltf, const char *name, double v1)
virtual bool Set(unsigned int count, const unsigned int *v)=0
virtual bool Set(unsigned int count, const bool *v)=0
virtual bool Set(unsigned int count, const unsigned short *v)=0
static Value * Create(GLTF *gltf, const char *name, unsigned int count, const unsigned int *v)
static Value * Create(GLTF *gltf, const char *name, double v1, double v2)
GLTFWriter API Documentation.

Connect with Ansys