Coverage Report

Created: 2025-08-26 06:41

/src/assimp/code/AssetLib/glTFCommon/glTFCommon.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
Open Asset Import Library (assimp)
3
----------------------------------------------------------------------
4
5
Copyright (c) 2006-2025, assimp team
6
7
All rights reserved.
8
9
Redistribution and use of this software in source and binary forms,
10
with or without modification, are permitted provided that the
11
following conditions are met:
12
13
* Redistributions of source code must retain the above
14
copyright notice, this list of conditions and the
15
following disclaimer.
16
17
* Redistributions in binary form must reproduce the above
18
copyright notice, this list of conditions and the
19
following disclaimer in the documentation and/or other
20
materials provided with the distribution.
21
22
* Neither the name of the assimp team, nor the names of its
23
contributors may be used to endorse or promote products
24
derived from this software without specific prior
25
written permission of the assimp team.
26
27
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
39
----------------------------------------------------------------------
40
*/
41
#ifndef AI_GLFTCOMMON_H_INC
42
#define AI_GLFTCOMMON_H_INC
43
44
#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER
45
46
#include <assimp/Exceptional.h>
47
#include <assimp/DefaultLogger.hpp>
48
49
#include <algorithm>
50
#include <list>
51
#include <map>
52
#include <stdexcept>
53
#include <string>
54
#include <vector>
55
56
#include <rapidjson/document.h>
57
#include <rapidjson/error/en.h>
58
#include <rapidjson/rapidjson.h>
59
60
// clang-format off
61
62
#ifdef ASSIMP_API
63
#   include <assimp/ByteSwapper.h>
64
#   include <assimp/DefaultIOSystem.h>
65
#   include <memory>
66
#else
67
#   include <memory>
68
#   define AI_SWAP4(p)
69
#   define ai_assert
70
#endif
71
72
#if _MSC_VER > 1500 || (defined __GNUC___)
73
#   define ASSIMP_GLTF_USE_UNORDERED_MULTIMAP
74
#else
75
#   define gltf_unordered_map map
76
#endif
77
78
#ifdef ASSIMP_GLTF_USE_UNORDERED_MULTIMAP
79
#   include <unordered_map>
80
#   if defined(_MSC_VER) && _MSC_VER <= 1600
81
#       define gltf_unordered_map tr1::unordered_map
82
#   else
83
#       define gltf_unordered_map unordered_map
84
#   endif
85
#endif
86
// clang-format on
87
88
89
namespace glTFCommon {
90
91
using rapidjson::Document;
92
using rapidjson::Value;
93
94
#ifdef ASSIMP_API
95
using Assimp::IOStream;
96
using Assimp::IOSystem;
97
using std::shared_ptr;
98
#else
99
using std::shared_ptr;
100
101
typedef std::runtime_error DeadlyImportError;
102
typedef std::runtime_error DeadlyExportError;
103
104
enum aiOrigin {
105
    aiOrigin_SET = 0,
106
    aiOrigin_CUR = 1,
107
    aiOrigin_END = 2
108
};
109
110
class IOSystem;
111
112
class IOStream {
113
public:
114
    IOStream(FILE *file) :
115
            f(file) {}
116
    ~IOStream() {
117
        fclose(f);
118
    }
119
120
    size_t Read(void *b, size_t sz, size_t n) { return fread(b, sz, n, f); }
121
    size_t Write(const void *b, size_t sz, size_t n) { return fwrite(b, sz, n, f); }
122
    int Seek(size_t off, aiOrigin orig) { return fseek(f, off, int(orig)); }
123
    size_t Tell() const { return ftell(f); }
124
125
    size_t FileSize() {
126
        long p = Tell(), len = (Seek(0, aiOrigin_END), Tell());
127
        return size_t((Seek(p, aiOrigin_SET), len));
128
    }
129
130
private:
131
    FILE *f;
132
};
133
#endif
134
135
// Vec/matrix types, as raw float arrays
136
typedef float(vec3)[3];
137
typedef float(vec4)[4];
138
typedef float(mat4)[16];
139
140
0
inline void CopyValue(const glTFCommon::vec3 &v, aiColor4D &out) {
141
0
    out.r = v[0];
142
0
    out.g = v[1];
143
0
    out.b = v[2];
144
0
    out.a = 1.0;
145
0
}
146
147
0
inline void CopyValue(const glTFCommon::vec4 &v, aiColor4D &out) {
148
0
    out.r = v[0];
149
0
    out.g = v[1];
150
0
    out.b = v[2];
151
0
    out.a = v[3];
152
0
}
153
154
0
inline void CopyValue(const glTFCommon::vec4 &v, aiColor3D &out) {
155
0
    out.r = v[0];
156
0
    out.g = v[1];
157
0
    out.b = v[2];
158
0
}
159
160
0
inline void CopyValue(const glTFCommon::vec3 &v, aiColor3D &out) {
161
0
    out.r = v[0];
162
0
    out.g = v[1];
163
0
    out.b = v[2];
164
0
}
165
166
0
inline void CopyValue(const glTFCommon::vec3 &v, aiVector3D &out) {
167
0
    out.x = v[0];
168
0
    out.y = v[1];
169
0
    out.z = v[2];
170
0
}
171
172
0
inline void CopyValue(const glTFCommon::vec4 &v, aiQuaternion &out) {
173
0
    out.x = v[0];
174
0
    out.y = v[1];
175
0
    out.z = v[2];
176
0
    out.w = v[3];
177
0
}
178
179
0
inline void CopyValue(const glTFCommon::mat4 &v, aiMatrix4x4 &o) {
180
0
    o.a1 = v[0];
181
0
    o.b1 = v[1];
182
0
    o.c1 = v[2];
183
0
    o.d1 = v[3];
184
0
    o.a2 = v[4];
185
0
    o.b2 = v[5];
186
0
    o.c2 = v[6];
187
0
    o.d2 = v[7];
188
0
    o.a3 = v[8];
189
0
    o.b3 = v[9];
190
0
    o.c3 = v[10];
191
0
    o.d3 = v[11];
192
0
    o.a4 = v[12];
193
0
    o.b4 = v[13];
194
0
    o.c4 = v[14];
195
0
    o.d4 = v[15];
196
0
}
197
198
#if _MSC_VER
199
#    pragma warning(push)
200
#    pragma warning(disable : 4310)
201
#endif // _MSC_VER
202
203
0
inline std::string getCurrentAssetDir(const std::string &pFile) {
204
0
    int pos = std::max(int(pFile.rfind('/')), int(pFile.rfind('\\')));
205
0
    if (pos == int(std::string::npos)) {
206
0
        return std::string();
207
0
    }
208
209
0
    return pFile.substr(0, pos + 1);
210
0
}
211
#if _MSC_VER
212
#    pragma warning(pop)
213
#endif // _MSC_VER
214
215
namespace Util {
216
217
void EncodeBase64(const uint8_t *in, size_t inLength, std::string &out);
218
219
size_t DecodeBase64(const char *in, size_t inLength, uint8_t *&out);
220
221
0
inline size_t DecodeBase64(const char *in, uint8_t *&out) {
222
0
    return DecodeBase64(in, strlen(in), out);
223
0
}
224
225
struct DataURI {
226
    const char *mediaType;
227
    const char *charset;
228
    bool base64;
229
    const char *data;
230
    size_t dataLength;
231
};
232
233
//! Check if a uri is a data URI
234
bool ParseDataURI(const char *const_uri, size_t uriLen, DataURI &out);
235
236
} // namespace Util
237
238
#define CHECK_EXT(EXT) \
239
0
    if (exts.find(#EXT) != exts.end()) extensionsUsed.EXT = true;
240
241
//! Helper struct to represent values that might not be present
242
template <class T>
243
struct Nullable {
244
    T value;
245
    bool isPresent;
246
247
    Nullable() :
248
0
            isPresent(false) {}
Unexecuted instantiation: glTFCommon::Nullable<float [16]>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<float [3]>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<float [4]>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<double>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<unsigned long>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<long>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<bool>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<std::__1::vector<glTF2::CustomExtension, std::__1::allocator<glTF2::CustomExtension> > >::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<glTF2::PbrSpecularGlossiness>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialSpecular>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialSheen>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialClearcoat>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialTransmission>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialVolume>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialIOR>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialEmissiveStrength>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialAnisotropy>::Nullable()
Unexecuted instantiation: glTFCommon::Nullable<float>::Nullable()
249
    Nullable(T &val) :
250
0
            value(val),
251
0
            isPresent(true) {}
Unexecuted instantiation: glTFCommon::Nullable<glTF2::PbrSpecularGlossiness>::Nullable(glTF2::PbrSpecularGlossiness&)
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialSpecular>::Nullable(glTF2::MaterialSpecular&)
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialSheen>::Nullable(glTF2::MaterialSheen&)
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialClearcoat>::Nullable(glTF2::MaterialClearcoat&)
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialTransmission>::Nullable(glTF2::MaterialTransmission&)
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialVolume>::Nullable(glTF2::MaterialVolume&)
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialIOR>::Nullable(glTF2::MaterialIOR&)
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialEmissiveStrength>::Nullable(glTF2::MaterialEmissiveStrength&)
Unexecuted instantiation: glTFCommon::Nullable<glTF2::MaterialAnisotropy>::Nullable(glTF2::MaterialAnisotropy&)
252
};
253
254
//! A reference to one top-level object, which is valid
255
//! until the Asset instance is destroyed
256
template <class T>
257
class Ref {
258
    std::vector<T *> *vector;
259
    unsigned int index;
260
261
public:
262
    Ref() :
263
148
            vector(nullptr),
264
148
            index(0) {}
glTFCommon::Ref<glTF::Buffer>::Ref()
Line
Count
Source
263
37
            vector(nullptr),
264
37
            index(0) {}
Unexecuted instantiation: glTFCommon::Ref<glTF::Accessor>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF::BufferView>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF::Material>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF::Camera>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF::Light>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF::Texture>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF::Sampler>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF::Image>::Ref()
glTFCommon::Ref<glTF::Scene>::Ref()
Line
Count
Source
263
37
            vector(nullptr),
264
37
            index(0) {}
Unexecuted instantiation: glTFCommon::Ref<glTF::Node>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF::Skin>::Ref()
glTFCommon::Ref<glTF2::Scene>::Ref()
Line
Count
Source
263
37
            vector(nullptr),
264
37
            index(0) {}
glTFCommon::Ref<glTF2::Buffer>::Ref()
Line
Count
Source
263
37
            vector(nullptr),
264
37
            index(0) {}
Unexecuted instantiation: glTFCommon::Ref<glTF2::Texture>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF2::BufferView>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Accessor>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Node>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Material>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Sampler>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Image>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Skin>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Camera>::Ref()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Light>::Ref()
265
    Ref(std::vector<T *> &vec, unsigned int idx) :
266
0
            vector(&vec),
267
0
            index(idx) {}
Unexecuted instantiation: glTFCommon::Ref<glTF::Buffer>::Ref(std::__1::vector<glTF::Buffer*, std::__1::allocator<glTF::Buffer*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::BufferView>::Ref(std::__1::vector<glTF::BufferView*, std::__1::allocator<glTF::BufferView*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Accessor>::Ref(std::__1::vector<glTF::Accessor*, std::__1::allocator<glTF::Accessor*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Node>::Ref(std::__1::vector<glTF::Node*, std::__1::allocator<glTF::Node*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Mesh>::Ref(std::__1::vector<glTF::Mesh*, std::__1::allocator<glTF::Mesh*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Material>::Ref(std::__1::vector<glTF::Material*, std::__1::allocator<glTF::Material*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Texture>::Ref(std::__1::vector<glTF::Texture*, std::__1::allocator<glTF::Texture*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Image>::Ref(std::__1::vector<glTF::Image*, std::__1::allocator<glTF::Image*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Sampler>::Ref(std::__1::vector<glTF::Sampler*, std::__1::allocator<glTF::Sampler*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Camera>::Ref(std::__1::vector<glTF::Camera*, std::__1::allocator<glTF::Camera*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Light>::Ref(std::__1::vector<glTF::Light*, std::__1::allocator<glTF::Light*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Skin>::Ref(std::__1::vector<glTF::Skin*, std::__1::allocator<glTF::Skin*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Scene>::Ref(std::__1::vector<glTF::Scene*, std::__1::allocator<glTF::Scene*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Animation>::Ref(std::__1::vector<glTF::Animation*, std::__1::allocator<glTF::Animation*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Buffer>::Ref(std::__1::vector<glTF2::Buffer*, std::__1::allocator<glTF2::Buffer*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::BufferView>::Ref(std::__1::vector<glTF2::BufferView*, std::__1::allocator<glTF2::BufferView*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Accessor>::Ref(std::__1::vector<glTF2::Accessor*, std::__1::allocator<glTF2::Accessor*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Sampler>::Ref(std::__1::vector<glTF2::Sampler*, std::__1::allocator<glTF2::Sampler*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Texture>::Ref(std::__1::vector<glTF2::Texture*, std::__1::allocator<glTF2::Texture*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Image>::Ref(std::__1::vector<glTF2::Image*, std::__1::allocator<glTF2::Image*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Material>::Ref(std::__1::vector<glTF2::Material*, std::__1::allocator<glTF2::Material*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Node>::Ref(std::__1::vector<glTF2::Node*, std::__1::allocator<glTF2::Node*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Skin>::Ref(std::__1::vector<glTF2::Skin*, std::__1::allocator<glTF2::Skin*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Mesh>::Ref(std::__1::vector<glTF2::Mesh*, std::__1::allocator<glTF2::Mesh*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Scene>::Ref(std::__1::vector<glTF2::Scene*, std::__1::allocator<glTF2::Scene*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Animation>::Ref(std::__1::vector<glTF2::Animation*, std::__1::allocator<glTF2::Animation*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Camera>::Ref(std::__1::vector<glTF2::Camera*, std::__1::allocator<glTF2::Camera*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF2::Light>::Ref(std::__1::vector<glTF2::Light*, std::__1::allocator<glTF2::Light*> >&, unsigned int)
268
269
0
    inline unsigned int GetIndex() const { return index; }
Unexecuted instantiation: glTFCommon::Ref<glTF::Texture>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Node>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Texture>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Mesh>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Node>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Image>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Material>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Mesh>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Camera>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Light>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Image>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Material>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Camera>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Light>::GetIndex() const
270
271
0
    operator bool() const { return vector != nullptr && index < vector->size(); }
Unexecuted instantiation: glTFCommon::Ref<glTF::Scene>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Buffer>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Node>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::BufferView>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Mesh>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Camera>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Accessor>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Texture>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Material>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Skin>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Image>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Sampler>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::BufferView>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Material>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Skin>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Image>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Scene>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Buffer>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Node>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Texture>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Accessor>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Sampler>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Mesh>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Camera>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF2::Light>::operator bool() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Light>::operator bool() const
272
273
0
    T *operator->() { return (*vector)[index]; }
Unexecuted instantiation: glTFCommon::Ref<glTF::BufferView>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Accessor>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Buffer>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Camera>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Node>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Texture>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Material>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Skin>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Image>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Sampler>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Scene>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Mesh>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF::Animation>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Buffer>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::BufferView>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Scene>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Node>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Accessor>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Texture>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Material>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Mesh>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Skin>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Image>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Sampler>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Animation>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Camera>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Light>::operator->()
274
275
0
    T &operator*() { return *((*vector)[index]); }
Unexecuted instantiation: glTFCommon::Ref<glTF::Node>::operator*()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Node>::operator*()
276
};
277
278
//
279
// JSON Value reading helpers
280
//
281
282
template <class T>
283
struct ReadHelper {
284
0
    static bool Read(Value &val, T &out) {
285
0
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
286
0
    }
Unexecuted instantiation: glTFCommon::ReadHelper<glTF::PrimitiveMode>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::PrimitiveMode&)
Unexecuted instantiation: glTFCommon::ReadHelper<unsigned int>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, unsigned int&)
Unexecuted instantiation: glTFCommon::ReadHelper<int>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, int&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTF::SamplerMagFilter>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::SamplerMagFilter&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTF::SamplerMinFilter>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::SamplerMinFilter&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTF::SamplerWrap>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::SamplerWrap&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTF::ComponentType>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::ComponentType&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTF::Camera::Type>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::Camera::Type&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTF2::ComponentType>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF2::ComponentType&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTF2::SamplerMagFilter>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF2::SamplerMagFilter&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTF2::SamplerMinFilter>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF2::SamplerMinFilter&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTF2::SamplerWrap>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF2::SamplerWrap&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTF2::PrimitiveMode>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF2::PrimitiveMode&)
287
};
288
289
template <>
290
struct ReadHelper<bool> {
291
0
    static bool Read(Value &val, bool &out) {
292
0
        return val.IsBool() ? out = val.GetBool(), true : false;
293
0
    }
294
};
295
296
template <>
297
struct ReadHelper<float> {
298
0
    static bool Read(Value &val, float &out) {
299
0
        return val.IsNumber() ? out = static_cast<float>(val.GetDouble()), true : false;
300
0
    }
301
};
302
303
template <unsigned int N>
304
struct ReadHelper<float[N]> {
305
0
    static bool Read(Value &val, float (&out)[N]) {
306
0
        if (!val.IsArray() || val.Size() != N) return false;
307
0
        for (unsigned int i = 0; i < N; ++i) {
308
0
            if (val[i].IsNumber())
309
0
                out[i] = static_cast<float>(val[i].GetDouble());
310
0
        }
311
0
        return true;
312
0
    }
Unexecuted instantiation: glTFCommon::ReadHelper<float [16]>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, float (&) [16])
Unexecuted instantiation: glTFCommon::ReadHelper<float [3]>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, float (&) [3])
Unexecuted instantiation: glTFCommon::ReadHelper<float [4]>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, float (&) [4])
313
};
314
315
template <>
316
struct ReadHelper<const char *> {
317
0
    static bool Read(Value &val, const char *&out) {
318
0
        return val.IsString() ? (out = val.GetString(), true) : false;
319
0
    }
320
};
321
322
template <>
323
struct ReadHelper<std::string> {
324
0
    static bool Read(Value &val, std::string &out) {
325
0
        return val.IsString() ? (out = std::string(val.GetString(), val.GetStringLength()), true) : false;
326
0
    }
327
};
328
329
template <class T>
330
struct ReadHelper<Nullable<T>> {
331
0
    static bool Read(Value &val, Nullable<T> &out) {
332
0
        return out.isPresent = ReadHelper<T>::Read(val, out.value);
333
0
    }
Unexecuted instantiation: glTFCommon::ReadHelper<glTFCommon::Nullable<float [16]> >::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [16]>&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTFCommon::Nullable<float [3]> >::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [3]>&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTFCommon::Nullable<float [4]> >::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [4]>&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTFCommon::Nullable<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&)
Unexecuted instantiation: glTFCommon::ReadHelper<glTFCommon::Nullable<float> >::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float>&)
334
};
335
336
template <>
337
struct ReadHelper<uint64_t> {
338
0
    static bool Read(Value &val, uint64_t &out) {
339
0
        return val.IsUint64() ? out = val.GetUint64(), true : false;
340
0
    }
341
};
342
343
template <>
344
struct ReadHelper<int64_t> {
345
0
    static bool Read(Value &val, int64_t &out) {
346
0
        return val.IsInt64() ? out = val.GetInt64(), true : false;
347
0
    }
348
};
349
350
template <class T>
351
0
inline static bool ReadValue(Value &val, T &out) {
352
0
    return ReadHelper<T>::Read(val, out);
353
0
}
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadValue<glTFCommon::Nullable<float [16]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [16]>&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadValue<float [4]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, float (&) [4])
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadValue<glTFCommon::Nullable<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadValue<glTFCommon::Nullable<float [16]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [16]>&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadValue<glTFCommon::Nullable<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadValue<glTFCommon::Nullable<float [16]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [16]>&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadValue<glTFCommon::Nullable<float [16]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [16]>&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadValue<float [4]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, float (&) [4])
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadValue<glTFCommon::Nullable<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadValue<glTFCommon::Nullable<float [16]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [16]>&)
354
355
template <class T>
356
0
inline static bool ReadMember(Value &obj, const char *id, T &out) {
357
0
    if (!obj.IsObject()) {
358
0
        return false;
359
0
    }
360
0
    Value::MemberIterator it = obj.FindMember(id);
361
0
    if (it != obj.MemberEnd()) {
362
0
        return ReadHelper<T>::Read(it->value, out);
363
0
    }
364
0
    return false;
365
0
}
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [3]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [3]>&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [4]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [4]>&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<glTF::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::PrimitiveMode&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, int&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<glTF::SamplerMagFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::SamplerMagFilter&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<glTF::SamplerMinFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::SamplerMinFilter&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<glTF::SamplerWrap>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::SamplerWrap&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<bool>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, bool&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<glTF::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::ComponentType&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<glTF::Camera::Type>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::Camera::Type&)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::ReadMember<float [4]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float (&) [4])
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<glTF2::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::ComponentType&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<glTF2::SamplerMagFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerMagFilter&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<glTF2::SamplerMinFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerMinFilter&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<glTF2::SamplerWrap>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerWrap&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<float [4]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float (&) [4])
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<float [3]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float (&) [3])
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<bool>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, bool&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<glTF2::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::PrimitiveMode&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float>&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [3]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [3]>&)
Unexecuted instantiation: glTF2Exporter.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [4]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [4]>&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<glTF2::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::ComponentType&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<glTF2::SamplerMagFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerMagFilter&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<glTF2::SamplerMinFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerMinFilter&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<glTF2::SamplerWrap>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerWrap&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<float [4]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float (&) [4])
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<float [3]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float (&) [3])
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<bool>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, bool&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<glTF2::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::PrimitiveMode&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float>&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [3]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [3]>&)
Unexecuted instantiation: ImporterRegistry.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [4]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [4]>&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<bool>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, bool&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [3]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [3]>&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [4]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [4]>&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::PrimitiveMode&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, int&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::SamplerMagFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::SamplerMagFilter&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::SamplerMinFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::SamplerMinFilter&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::SamplerWrap>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::SamplerWrap&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::ComponentType&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::Camera::Type>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::Camera::Type&)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<float [4]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float (&) [4])
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [3]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [3]>&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [4]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [4]>&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<glTF2::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::PrimitiveMode&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<glTF2::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::ComponentType&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<float [4]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float (&) [4])
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<glTF2::SamplerMagFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerMagFilter&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<glTF2::SamplerMinFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerMinFilter&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<glTF2::SamplerWrap>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerWrap&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<float [3]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float (&) [3])
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<bool>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, bool&)
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float>&)
366
367
template <class T>
368
0
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
369
0
    T out;
370
0
    return ReadMember(obj, id, out) ? out : defaultValue;
371
0
}
Unexecuted instantiation: glTFExporter.cpp:glTF::PrimitiveMode glTFCommon::MemberOrDefault<glTF::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::PrimitiveMode)
Unexecuted instantiation: glTFExporter.cpp:char const* glTFCommon::MemberOrDefault<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*)
Unexecuted instantiation: glTFExporter.cpp:unsigned long glTFCommon::MemberOrDefault<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long)
Unexecuted instantiation: glTFExporter.cpp:unsigned int glTFCommon::MemberOrDefault<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int)
Unexecuted instantiation: glTFExporter.cpp:glTF::ComponentType glTFCommon::MemberOrDefault<glTF::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::ComponentType)
Unexecuted instantiation: glTFExporter.cpp:int glTFCommon::MemberOrDefault<int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, int)
Unexecuted instantiation: glTFExporter.cpp:glTF::Camera::Type glTFCommon::MemberOrDefault<glTF::Camera::Type>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::Camera::Type)
Unexecuted instantiation: glTFExporter.cpp:float glTFCommon::MemberOrDefault<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float)
Unexecuted instantiation: glTFExporter.cpp:bool glTFCommon::MemberOrDefault<bool>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, bool)
Unexecuted instantiation: glTF2Exporter.cpp:unsigned long glTFCommon::MemberOrDefault<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long)
Unexecuted instantiation: glTF2Exporter.cpp:unsigned int glTFCommon::MemberOrDefault<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int)
Unexecuted instantiation: glTF2Exporter.cpp:glTF2::ComponentType glTFCommon::MemberOrDefault<glTF2::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::ComponentType)
Unexecuted instantiation: glTF2Exporter.cpp:glTF2::PrimitiveMode glTFCommon::MemberOrDefault<glTF2::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::PrimitiveMode)
Unexecuted instantiation: glTF2Exporter.cpp:char const* glTFCommon::MemberOrDefault<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*)
Unexecuted instantiation: glTF2Exporter.cpp:float glTFCommon::MemberOrDefault<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float)
Unexecuted instantiation: ImporterRegistry.cpp:unsigned long glTFCommon::MemberOrDefault<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long)
Unexecuted instantiation: ImporterRegistry.cpp:unsigned int glTFCommon::MemberOrDefault<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int)
Unexecuted instantiation: ImporterRegistry.cpp:glTF2::ComponentType glTFCommon::MemberOrDefault<glTF2::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::ComponentType)
Unexecuted instantiation: ImporterRegistry.cpp:glTF2::PrimitiveMode glTFCommon::MemberOrDefault<glTF2::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::PrimitiveMode)
Unexecuted instantiation: ImporterRegistry.cpp:char const* glTFCommon::MemberOrDefault<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*)
Unexecuted instantiation: ImporterRegistry.cpp:float glTFCommon::MemberOrDefault<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float)
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::MemberOrDefault<bool>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, bool)
Unexecuted instantiation: glTFImporter.cpp:glTF::PrimitiveMode glTFCommon::MemberOrDefault<glTF::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::PrimitiveMode)
Unexecuted instantiation: glTFImporter.cpp:char const* glTFCommon::MemberOrDefault<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*)
Unexecuted instantiation: glTFImporter.cpp:unsigned long glTFCommon::MemberOrDefault<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long)
Unexecuted instantiation: glTFImporter.cpp:unsigned int glTFCommon::MemberOrDefault<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int)
Unexecuted instantiation: glTFImporter.cpp:glTF::ComponentType glTFCommon::MemberOrDefault<glTF::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::ComponentType)
Unexecuted instantiation: glTFImporter.cpp:int glTFCommon::MemberOrDefault<int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, int)
Unexecuted instantiation: glTFImporter.cpp:glTF::Camera::Type glTFCommon::MemberOrDefault<glTF::Camera::Type>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::Camera::Type)
Unexecuted instantiation: glTFImporter.cpp:float glTFCommon::MemberOrDefault<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float)
Unexecuted instantiation: glTF2Importer.cpp:glTF2::PrimitiveMode glTFCommon::MemberOrDefault<glTF2::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::PrimitiveMode)
Unexecuted instantiation: glTF2Importer.cpp:unsigned int glTFCommon::MemberOrDefault<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int)
Unexecuted instantiation: glTF2Importer.cpp:unsigned long glTFCommon::MemberOrDefault<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long)
Unexecuted instantiation: glTF2Importer.cpp:glTF2::ComponentType glTFCommon::MemberOrDefault<glTF2::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::ComponentType)
Unexecuted instantiation: glTF2Importer.cpp:char const* glTFCommon::MemberOrDefault<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*)
Unexecuted instantiation: glTF2Importer.cpp:float glTFCommon::MemberOrDefault<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float)
372
373
0
inline Value *FindMember(Value &val, const char *id) {
374
0
    if (!val.IsObject()) {
375
0
        return nullptr;
376
0
    }
377
0
    Value::MemberIterator it = val.FindMember(id);
378
0
    return (it != val.MemberEnd()) ? &it->value : nullptr;
379
0
}
380
381
template <int N>
382
0
inline void throwUnexpectedTypeError(const char (&expectedTypeName)[N], const char *memberId, const char *context, const char *extraContext) {
383
0
    std::string fullContext = context;
384
0
    if (extraContext && (strlen(extraContext) > 0)) {
385
0
        fullContext = fullContext + " (" + extraContext + ")";
386
0
    }
387
0
    throw DeadlyImportError("Member \"", memberId, "\" was not of type \"", expectedTypeName, "\" when reading ", fullContext);
388
0
}
Unexecuted instantiation: void glTFCommon::throwUnexpectedTypeError<7>(char const (&) [7], char const*, char const*, char const*)
Unexecuted instantiation: void glTFCommon::throwUnexpectedTypeError<5>(char const (&) [5], char const*, char const*, char const*)
Unexecuted instantiation: void glTFCommon::throwUnexpectedTypeError<6>(char const (&) [6], char const*, char const*, char const*)
389
390
// Look-up functions with type checks. Context and extra context help the user identify the problem if there's an error.
391
392
0
inline Value *FindStringInContext(Value &val, const char *memberId, const char *context, const char *extraContext = nullptr) {
393
0
    if (!val.IsObject()) {
394
0
        return nullptr;
395
0
    }
396
0
    Value::MemberIterator it = val.FindMember(memberId);
397
0
    if (it == val.MemberEnd()) {
398
0
        return nullptr;
399
0
    }
400
0
    if (!it->value.IsString()) {
401
0
        throwUnexpectedTypeError("string", memberId, context, extraContext);
402
0
    }
403
0
    return &it->value;
404
0
}
405
406
0
inline Value *FindNumberInContext(Value &val, const char *memberId, const char *context, const char *extraContext = nullptr) {
407
0
    if (!val.IsObject()) {
408
0
        return nullptr;
409
0
    }
410
0
    Value::MemberIterator it = val.FindMember(memberId);
411
0
    if (it == val.MemberEnd()) {
412
0
        return nullptr;
413
0
    }
414
0
    if (!it->value.IsNumber()) {
415
0
        throwUnexpectedTypeError("number", memberId, context, extraContext);
416
0
    }
417
0
    return &it->value;
418
0
}
419
420
0
inline Value *FindUIntInContext(Value &val, const char *memberId, const char *context, const char *extraContext = nullptr) {
421
0
    if (!val.IsObject()) {
422
0
        return nullptr;
423
0
    }
424
0
    Value::MemberIterator it = val.FindMember(memberId);
425
0
    if (it == val.MemberEnd()) {
426
0
        return nullptr;
427
0
    }
428
0
    if (!it->value.IsUint()) {
429
0
        throwUnexpectedTypeError("uint", memberId, context, extraContext);
430
0
    }
431
0
    return &it->value;
432
0
}
433
434
0
inline Value *FindArrayInContext(Value &val, const char *memberId, const char *context, const char *extraContext = nullptr) {
435
0
    if (!val.IsObject()) {
436
0
        return nullptr;
437
0
    }
438
0
    Value::MemberIterator it = val.FindMember(memberId);
439
0
    if (it == val.MemberEnd()) {
440
0
        return nullptr;
441
0
    }
442
0
    if (!it->value.IsArray()) {
443
0
        throwUnexpectedTypeError("array", memberId, context, extraContext);
444
0
    }
445
0
    return &it->value;
446
0
}
447
448
0
inline Value *FindObjectInContext(Value &val, const char * memberId, const char *context, const char *extraContext = nullptr) {
449
0
    if (!val.IsObject()) {
450
0
        return nullptr;
451
0
    }
452
0
    Value::MemberIterator it = val.FindMember(memberId);
453
0
    if (it == val.MemberEnd()) {
454
0
        return nullptr;
455
0
    }
456
0
    if (!it->value.IsObject()) {
457
0
        ASSIMP_LOG_ERROR("Member \"", memberId, "\" was not of type \"", context, "\" when reading ", extraContext);
458
0
        return nullptr;
459
0
   }
460
0
    return &it->value;
461
0
}
462
463
0
inline Value *FindExtensionInContext(Value &val, const char *extensionId, const char *context, const char *extraContext = nullptr) {
464
0
    if (Value *extensionList = FindObjectInContext(val, "extensions", context, extraContext)) {
465
0
        if (Value *extension = FindObjectInContext(*extensionList, extensionId, context, extraContext)) {
466
0
            return extension;
467
0
        }
468
0
    }
469
0
    return nullptr;
470
0
}
471
472
// Overloads when the value is the document.
473
474
0
inline Value *FindString(Document &doc, const char *memberId) {
475
0
    return FindStringInContext(doc, memberId, "the document");
476
0
}
477
478
0
inline Value *FindNumber(Document &doc, const char *memberId) {
479
0
    return FindNumberInContext(doc, memberId, "the document");
480
0
}
481
482
0
inline Value *FindUInt(Document &doc, const char *memberId) {
483
0
    return FindUIntInContext(doc, memberId, "the document");
484
0
}
485
486
0
inline Value *FindArray(Document &val, const char *memberId) {
487
0
    return FindArrayInContext(val, memberId, "the document");
488
0
}
489
490
0
inline Value *FindObject(Document &doc, const char *memberId) {
491
0
    return FindObjectInContext(doc, memberId, "the document");
492
0
}
493
494
0
inline Value *FindExtension(Value &val, const char *extensionId) {
495
0
    return FindExtensionInContext(val, extensionId, "the document");
496
0
}
497
498
0
inline Value *FindString(Value &val, const char *id) {
499
0
    Value::MemberIterator it = val.FindMember(id);
500
0
    return (it != val.MemberEnd() && it->value.IsString()) ? &it->value : nullptr;
501
0
}
502
503
0
inline Value *FindObject(Value &val, const char *id) {
504
0
    Value::MemberIterator it = val.FindMember(id);
505
0
    return (it != val.MemberEnd() && it->value.IsObject()) ? &it->value : nullptr;
506
0
}
507
508
0
inline Value *FindArray(Value &val, const char *id) {
509
0
    Value::MemberIterator it = val.FindMember(id);
510
0
    return (it != val.MemberEnd() && it->value.IsArray()) ? &it->value : nullptr;
511
0
}
512
513
0
inline Value *FindNumber(Value &val, const char *id) {
514
0
    Value::MemberIterator it = val.FindMember(id);
515
0
    return (it != val.MemberEnd() && it->value.IsNumber()) ? &it->value : nullptr;
516
0
}
517
518
} // namespace glTFCommon
519
520
#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER
521
522
#endif // AI_GLFTCOMMON_H_INC