Coverage Report

Created: 2026-05-16 07:26

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/assimp/code/AssetLib/glTFCommon/glTFCommon.h
Line
Count
Source
1
/*
2
Open Asset Import Library (assimp)
3
----------------------------------------------------------------------
4
5
Copyright (c) 2006-2026, 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
#include <assimp/Exceptional.h>
45
#include <assimp/DefaultLogger.hpp>
46
47
#include <algorithm>
48
#include <list>
49
#include <map>
50
#include <stdexcept>
51
#include <string>
52
#include <vector>
53
54
#include <rapidjson/document.h>
55
#include <rapidjson/error/en.h>
56
#include <rapidjson/rapidjson.h>
57
58
// clang-format off
59
60
#ifdef ASSIMP_API
61
#   include <assimp/ByteSwapper.h>
62
#   include <assimp/DefaultIOSystem.h>
63
#   include <memory>
64
#else
65
#   include <memory>
66
#   define AI_SWAP4(p)
67
#   define ai_assert
68
#endif
69
70
#if _MSC_VER > 1500 || (defined __GNUC__)
71
#   define ASSIMP_GLTF_USE_UNORDERED_MULTIMAP
72
#else
73
#   define gltf_unordered_map map
74
#endif
75
76
#ifdef ASSIMP_GLTF_USE_UNORDERED_MULTIMAP
77
#   include <unordered_map>
78
#   if defined(_MSC_VER) && _MSC_VER <= 1600
79
#       define gltf_unordered_map tr1::unordered_map
80
#   else
81
#       define gltf_unordered_map unordered_map
82
#   endif
83
#endif
84
// clang-format on
85
86
87
namespace glTFCommon {
88
89
using rapidjson::Document;
90
using rapidjson::Value;
91
92
#ifdef ASSIMP_API
93
using Assimp::IOStream;
94
using Assimp::IOSystem;
95
using std::shared_ptr;
96
#else
97
using std::shared_ptr;
98
99
typedef std::runtime_error DeadlyImportError;
100
typedef std::runtime_error DeadlyExportError;
101
102
enum aiOrigin {
103
    aiOrigin_SET = 0,
104
    aiOrigin_CUR = 1,
105
    aiOrigin_END = 2
106
};
107
108
class IOSystem;
109
110
class IOStream {
111
public:
112
    IOStream(FILE *file) :
113
            f(file) {}
114
    ~IOStream() {
115
        fclose(f);
116
    }
117
118
    size_t Read(void *b, size_t sz, size_t n) { return fread(b, sz, n, f); }
119
    size_t Write(const void *b, size_t sz, size_t n) { return fwrite(b, sz, n, f); }
120
    int Seek(size_t off, aiOrigin orig) { return fseek(f, off, int(orig)); }
121
    size_t Tell() const { return ftell(f); }
122
123
    size_t FileSize() {
124
        long p = Tell(), len = (Seek(0, aiOrigin_END), Tell());
125
        return size_t((Seek(p, aiOrigin_SET), len));
126
    }
127
128
private:
129
    FILE *f;
130
};
131
#endif
132
133
// Vec/matrix types, as raw float arrays
134
typedef float(vec3)[3];
135
typedef float(vec4)[4];
136
typedef float(mat4)[16];
137
138
8.49k
inline void CopyValue(const glTFCommon::vec3 &v, aiColor4D &out) {
139
8.49k
    out.r = v[0];
140
8.49k
    out.g = v[1];
141
8.49k
    out.b = v[2];
142
8.49k
    out.a = 1.0;
143
8.49k
}
144
145
17.0k
inline void CopyValue(const glTFCommon::vec4 &v, aiColor4D &out) {
146
17.0k
    out.r = v[0];
147
17.0k
    out.g = v[1];
148
17.0k
    out.b = v[2];
149
17.0k
    out.a = v[3];
150
17.0k
}
151
152
0
inline void CopyValue(const glTFCommon::vec4 &v, aiColor3D &out) {
153
0
    out.r = v[0];
154
0
    out.g = v[1];
155
0
    out.b = v[2];
156
0
}
157
158
0
inline void CopyValue(const glTFCommon::vec3 &v, aiColor3D &out) {
159
0
    out.r = v[0];
160
0
    out.g = v[1];
161
0
    out.b = v[2];
162
0
}
163
164
649
inline void CopyValue(const glTFCommon::vec3 &v, aiVector3D &out) {
165
649
    out.x = v[0];
166
649
    out.y = v[1];
167
649
    out.z = v[2];
168
649
}
169
170
311
inline void CopyValue(const glTFCommon::vec4 &v, aiQuaternion &out) {
171
311
    out.x = v[0];
172
311
    out.y = v[1];
173
311
    out.z = v[2];
174
311
    out.w = v[3];
175
311
}
176
177
18.5k
inline void CopyValue(const glTFCommon::mat4 &v, aiMatrix4x4 &o) {
178
18.5k
    o.a1 = v[0];
179
18.5k
    o.b1 = v[1];
180
18.5k
    o.c1 = v[2];
181
18.5k
    o.d1 = v[3];
182
18.5k
    o.a2 = v[4];
183
18.5k
    o.b2 = v[5];
184
18.5k
    o.c2 = v[6];
185
18.5k
    o.d2 = v[7];
186
18.5k
    o.a3 = v[8];
187
18.5k
    o.b3 = v[9];
188
18.5k
    o.c3 = v[10];
189
18.5k
    o.d3 = v[11];
190
18.5k
    o.a4 = v[12];
191
18.5k
    o.b4 = v[13];
192
18.5k
    o.c4 = v[14];
193
18.5k
    o.d4 = v[15];
194
18.5k
}
195
196
#if _MSC_VER
197
#    pragma warning(push)
198
#    pragma warning(disable : 4310)
199
#endif // _MSC_VER
200
201
0
inline std::string getCurrentAssetDir(const std::string &pFile) {
202
0
    int pos = std::max(int(pFile.rfind('/')), int(pFile.rfind('\\')));
203
0
    if (pos == int(std::string::npos)) {
204
0
        return std::string();
205
0
    }
206
207
0
    return pFile.substr(0, pos + 1);
208
0
}
209
#if _MSC_VER
210
#    pragma warning(pop)
211
#endif // _MSC_VER
212
213
namespace Util {
214
215
void EncodeBase64(const uint8_t *in, size_t inLength, std::string &out);
216
217
size_t DecodeBase64(const char *in, size_t inLength, uint8_t *&out);
218
219
0
inline size_t DecodeBase64(const char *in, uint8_t *&out) {
220
0
    return DecodeBase64(in, strlen(in), out);
221
0
}
222
223
struct DataURI {
224
    const char *mediaType;
225
    const char *charset;
226
    bool base64;
227
    const char *data;
228
    size_t dataLength;
229
};
230
231
//! Check if a uri is a data URI
232
bool ParseDataURI(const char *const_uri, size_t uriLen, DataURI &out);
233
234
} // namespace Util
235
236
#define CHECK_EXT(EXT) \
237
16.7k
    if (exts.find(#EXT) != exts.end()) extensionsUsed.EXT = true;
238
239
//! Helper struct to represent values that might not be present
240
template <class T>
241
struct Nullable {
242
    T value;
243
    bool isPresent;
244
245
    Nullable() :
246
1.13M
            isPresent(false) {}
glTFCommon::Nullable<float [16]>::Nullable()
Line
Count
Source
246
33.5k
            isPresent(false) {}
glTFCommon::Nullable<float [3]>::Nullable()
Line
Count
Source
246
57.7k
            isPresent(false) {}
glTFCommon::Nullable<float [4]>::Nullable()
Line
Count
Source
246
28.8k
            isPresent(false) {}
glTFCommon::Nullable<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::Nullable()
Line
Count
Source
246
155k
            isPresent(false) {}
glTFCommon::Nullable<double>::Nullable()
Line
Count
Source
246
155k
            isPresent(false) {}
glTFCommon::Nullable<unsigned long>::Nullable()
Line
Count
Source
246
155k
            isPresent(false) {}
glTFCommon::Nullable<long>::Nullable()
Line
Count
Source
246
155k
            isPresent(false) {}
glTFCommon::Nullable<bool>::Nullable()
Line
Count
Source
246
155k
            isPresent(false) {}
glTFCommon::Nullable<std::__1::vector<glTF2::CustomExtension, std::__1::allocator<glTF2::CustomExtension> > >::Nullable()
Line
Count
Source
246
155k
            isPresent(false) {}
glTFCommon::Nullable<glTF2::PbrSpecularGlossiness>::Nullable()
Line
Count
Source
246
9.30k
            isPresent(false) {}
glTFCommon::Nullable<glTF2::MaterialSpecular>::Nullable()
Line
Count
Source
246
9.30k
            isPresent(false) {}
glTFCommon::Nullable<glTF2::MaterialSheen>::Nullable()
Line
Count
Source
246
9.30k
            isPresent(false) {}
glTFCommon::Nullable<glTF2::MaterialClearcoat>::Nullable()
Line
Count
Source
246
9.30k
            isPresent(false) {}
glTFCommon::Nullable<glTF2::MaterialTransmission>::Nullable()
Line
Count
Source
246
9.30k
            isPresent(false) {}
glTFCommon::Nullable<glTF2::MaterialVolume>::Nullable()
Line
Count
Source
246
9.30k
            isPresent(false) {}
glTFCommon::Nullable<glTF2::MaterialIOR>::Nullable()
Line
Count
Source
246
9.30k
            isPresent(false) {}
glTFCommon::Nullable<glTF2::MaterialEmissiveStrength>::Nullable()
Line
Count
Source
246
9.30k
            isPresent(false) {}
glTFCommon::Nullable<glTF2::MaterialAnisotropy>::Nullable()
Line
Count
Source
246
9.30k
            isPresent(false) {}
Unexecuted instantiation: glTFCommon::Nullable<float>::Nullable()
247
    Nullable(T &val) :
248
0
            value(val),
249
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&)
250
};
251
252
//! A reference to one top-level object, which is valid
253
//! until the Asset instance is destroyed
254
template <class T>
255
class Ref {
256
    std::vector<T *> *vector;
257
    unsigned int index;
258
259
public:
260
    Ref() :
261
407k
            vector(nullptr),
262
407k
            index(0) {}
glTFCommon::Ref<glTF::Buffer>::Ref()
Line
Count
Source
261
12.1k
            vector(nullptr),
262
12.1k
            index(0) {}
glTFCommon::Ref<glTF::Scene>::Ref()
Line
Count
Source
261
11.5k
            vector(nullptr),
262
11.5k
            index(0) {}
glTFCommon::Ref<glTF::Camera>::Ref()
Line
Count
Source
261
2.01k
            vector(nullptr),
262
2.01k
            index(0) {}
glTFCommon::Ref<glTF::Light>::Ref()
Line
Count
Source
261
2.01k
            vector(nullptr),
262
2.01k
            index(0) {}
glTFCommon::Ref<glTF::Skin>::Ref()
Line
Count
Source
261
2.01k
            vector(nullptr),
262
2.01k
            index(0) {}
glTFCommon::Ref<glTF::Node>::Ref()
Line
Count
Source
261
2.01k
            vector(nullptr),
262
2.01k
            index(0) {}
glTFCommon::Ref<glTF::Accessor>::Ref()
Line
Count
Source
261
2.43k
            vector(nullptr),
262
2.43k
            index(0) {}
glTFCommon::Ref<glTF::Material>::Ref()
Line
Count
Source
261
1.06k
            vector(nullptr),
262
1.06k
            index(0) {}
glTFCommon::Ref<glTF::BufferView>::Ref()
Line
Count
Source
261
1.02k
            vector(nullptr),
262
1.02k
            index(0) {}
glTFCommon::Ref<glTF::Texture>::Ref()
Line
Count
Source
261
616
            vector(nullptr),
262
616
            index(0) {}
glTFCommon::Ref<glTF::Sampler>::Ref()
Line
Count
Source
261
104
            vector(nullptr),
262
104
            index(0) {}
glTFCommon::Ref<glTF::Image>::Ref()
Line
Count
Source
261
104
            vector(nullptr),
262
104
            index(0) {}
glTFCommon::Ref<glTF2::Scene>::Ref()
Line
Count
Source
261
16.8k
            vector(nullptr),
262
16.8k
            index(0) {}
glTFCommon::Ref<glTF2::Buffer>::Ref()
Line
Count
Source
261
31.5k
            vector(nullptr),
262
31.5k
            index(0) {}
glTFCommon::Ref<glTF2::Texture>::Ref()
Line
Count
Source
261
158k
            vector(nullptr),
262
158k
            index(0) {}
glTFCommon::Ref<glTF2::Camera>::Ref()
Line
Count
Source
261
26.8k
            vector(nullptr),
262
26.8k
            index(0) {}
glTFCommon::Ref<glTF2::Light>::Ref()
Line
Count
Source
261
26.8k
            vector(nullptr),
262
26.8k
            index(0) {}
glTFCommon::Ref<glTF2::Skin>::Ref()
Line
Count
Source
261
26.8k
            vector(nullptr),
262
26.8k
            index(0) {}
glTFCommon::Ref<glTF2::Node>::Ref()
Line
Count
Source
261
27.4k
            vector(nullptr),
262
27.4k
            index(0) {}
glTFCommon::Ref<glTF2::Accessor>::Ref()
Line
Count
Source
261
27.7k
            vector(nullptr),
262
27.7k
            index(0) {}
glTFCommon::Ref<glTF2::Material>::Ref()
Line
Count
Source
261
6.71k
            vector(nullptr),
262
6.71k
            index(0) {}
glTFCommon::Ref<glTF2::BufferView>::Ref()
Line
Count
Source
261
20.8k
            vector(nullptr),
262
20.8k
            index(0) {}
glTFCommon::Ref<glTF2::Sampler>::Ref()
Line
Count
Source
261
269
            vector(nullptr),
262
269
            index(0) {}
glTFCommon::Ref<glTF2::Image>::Ref()
Line
Count
Source
261
269
            vector(nullptr),
262
269
            index(0) {}
263
    Ref(std::vector<T *> &vec, unsigned int idx) :
264
125k
            vector(&vec),
265
125k
            index(idx) {}
glTFCommon::Ref<glTF::Buffer>::Ref(std::__1::vector<glTF::Buffer*, std::__1::allocator<glTF::Buffer*> >&, unsigned int)
Line
Count
Source
264
4.58k
            vector(&vec),
265
4.58k
            index(idx) {}
glTFCommon::Ref<glTF::Scene>::Ref(std::__1::vector<glTF::Scene*, std::__1::allocator<glTF::Scene*> >&, unsigned int)
Line
Count
Source
264
140
            vector(&vec),
265
140
            index(idx) {}
glTFCommon::Ref<glTF::Node>::Ref(std::__1::vector<glTF::Node*, std::__1::allocator<glTF::Node*> >&, unsigned int)
Line
Count
Source
264
2.35k
            vector(&vec),
265
2.35k
            index(idx) {}
glTFCommon::Ref<glTF::Mesh>::Ref(std::__1::vector<glTF::Mesh*, std::__1::allocator<glTF::Mesh*> >&, unsigned int)
Line
Count
Source
264
1.15k
            vector(&vec),
265
1.15k
            index(idx) {}
glTFCommon::Ref<glTF::Accessor>::Ref(std::__1::vector<glTF::Accessor*, std::__1::allocator<glTF::Accessor*> >&, unsigned int)
Line
Count
Source
264
1.02k
            vector(&vec),
265
1.02k
            index(idx) {}
glTFCommon::Ref<glTF::BufferView>::Ref(std::__1::vector<glTF::BufferView*, std::__1::allocator<glTF::BufferView*> >&, unsigned int)
Line
Count
Source
264
796
            vector(&vec),
265
796
            index(idx) {}
glTFCommon::Ref<glTF::Material>::Ref(std::__1::vector<glTF::Material*, std::__1::allocator<glTF::Material*> >&, unsigned int)
Line
Count
Source
264
66
            vector(&vec),
265
66
            index(idx) {}
glTFCommon::Ref<glTF::Texture>::Ref(std::__1::vector<glTF::Texture*, std::__1::allocator<glTF::Texture*> >&, unsigned int)
Line
Count
Source
264
32
            vector(&vec),
265
32
            index(idx) {}
glTFCommon::Ref<glTF::Image>::Ref(std::__1::vector<glTF::Image*, std::__1::allocator<glTF::Image*> >&, unsigned int)
Line
Count
Source
264
40
            vector(&vec),
265
40
            index(idx) {}
glTFCommon::Ref<glTF::Sampler>::Ref(std::__1::vector<glTF::Sampler*, std::__1::allocator<glTF::Sampler*> >&, unsigned int)
Line
Count
Source
264
22
            vector(&vec),
265
22
            index(idx) {}
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)
glTFCommon::Ref<glTF2::Buffer>::Ref(std::__1::vector<glTF2::Buffer*, std::__1::allocator<glTF2::Buffer*> >&, unsigned int)
Line
Count
Source
264
22.0k
            vector(&vec),
265
22.0k
            index(idx) {}
glTFCommon::Ref<glTF2::Scene>::Ref(std::__1::vector<glTF2::Scene*, std::__1::allocator<glTF2::Scene*> >&, unsigned int)
Line
Count
Source
264
4.27k
            vector(&vec),
265
4.27k
            index(idx) {}
glTFCommon::Ref<glTF2::Node>::Ref(std::__1::vector<glTF2::Node*, std::__1::allocator<glTF2::Node*> >&, unsigned int)
Line
Count
Source
264
33.1k
            vector(&vec),
265
33.1k
            index(idx) {}
glTFCommon::Ref<glTF2::Mesh>::Ref(std::__1::vector<glTF2::Mesh*, std::__1::allocator<glTF2::Mesh*> >&, unsigned int)
Line
Count
Source
264
7.68k
            vector(&vec),
265
7.68k
            index(idx) {}
glTFCommon::Ref<glTF2::Accessor>::Ref(std::__1::vector<glTF2::Accessor*, std::__1::allocator<glTF2::Accessor*> >&, unsigned int)
Line
Count
Source
264
20.9k
            vector(&vec),
265
20.9k
            index(idx) {}
glTFCommon::Ref<glTF2::BufferView>::Ref(std::__1::vector<glTF2::BufferView*, std::__1::allocator<glTF2::BufferView*> >&, unsigned int)
Line
Count
Source
264
15.0k
            vector(&vec),
265
15.0k
            index(idx) {}
glTFCommon::Ref<glTF2::Material>::Ref(std::__1::vector<glTF2::Material*, std::__1::allocator<glTF2::Material*> >&, unsigned int)
Line
Count
Source
264
4.74k
            vector(&vec),
265
4.74k
            index(idx) {}
glTFCommon::Ref<glTF2::Texture>::Ref(std::__1::vector<glTF2::Texture*, std::__1::allocator<glTF2::Texture*> >&, unsigned int)
Line
Count
Source
264
293
            vector(&vec),
265
293
            index(idx) {}
glTFCommon::Ref<glTF2::Image>::Ref(std::__1::vector<glTF2::Image*, std::__1::allocator<glTF2::Image*> >&, unsigned int)
Line
Count
Source
264
201
            vector(&vec),
265
201
            index(idx) {}
glTFCommon::Ref<glTF2::Sampler>::Ref(std::__1::vector<glTF2::Sampler*, std::__1::allocator<glTF2::Sampler*> >&, unsigned int)
Line
Count
Source
264
178
            vector(&vec),
265
178
            index(idx) {}
glTFCommon::Ref<glTF2::Skin>::Ref(std::__1::vector<glTF2::Skin*, std::__1::allocator<glTF2::Skin*> >&, unsigned int)
Line
Count
Source
264
5.58k
            vector(&vec),
265
5.58k
            index(idx) {}
glTFCommon::Ref<glTF2::Camera>::Ref(std::__1::vector<glTF2::Camera*, std::__1::allocator<glTF2::Camera*> >&, unsigned int)
Line
Count
Source
264
97
            vector(&vec),
265
97
            index(idx) {}
Unexecuted instantiation: glTFCommon::Ref<glTF2::Light>::Ref(std::__1::vector<glTF2::Light*, std::__1::allocator<glTF2::Light*> >&, unsigned int)
glTFCommon::Ref<glTF2::Animation>::Ref(std::__1::vector<glTF2::Animation*, std::__1::allocator<glTF2::Animation*> >&, unsigned int)
Line
Count
Source
264
1.11k
            vector(&vec),
265
1.11k
            index(idx) {}
Unexecuted instantiation: glTFCommon::Ref<glTF::Skin>::Ref(std::__1::vector<glTF::Skin*, std::__1::allocator<glTF::Skin*> >&, unsigned int)
Unexecuted instantiation: glTFCommon::Ref<glTF::Animation>::Ref(std::__1::vector<glTF::Animation*, std::__1::allocator<glTF::Animation*> >&, unsigned int)
266
267
7.71k
    inline unsigned int GetIndex() const { return index; }
Unexecuted instantiation: glTFCommon::Ref<glTF::Image>::GetIndex() const
glTFCommon::Ref<glTF::Material>::GetIndex() const
Line
Count
Source
267
9
    inline unsigned int GetIndex() const { return index; }
glTFCommon::Ref<glTF::Mesh>::GetIndex() const
Line
Count
Source
267
752
    inline unsigned int GetIndex() const { return index; }
Unexecuted instantiation: glTFCommon::Ref<glTF::Camera>::GetIndex() const
Unexecuted instantiation: glTFCommon::Ref<glTF::Light>::GetIndex() const
glTFCommon::Ref<glTF2::Image>::GetIndex() const
Line
Count
Source
267
408
    inline unsigned int GetIndex() const { return index; }
glTFCommon::Ref<glTF2::Material>::GetIndex() const
Line
Count
Source
267
2.37k
    inline unsigned int GetIndex() const { return index; }
glTFCommon::Ref<glTF2::Mesh>::GetIndex() const
Line
Count
Source
267
3.97k
    inline unsigned int GetIndex() const { return index; }
glTFCommon::Ref<glTF2::Camera>::GetIndex() const
Line
Count
Source
267
74
    inline unsigned int GetIndex() const { return index; }
Unexecuted instantiation: glTFCommon::Ref<glTF2::Light>::GetIndex() const
glTFCommon::Ref<glTF2::Node>::GetIndex() const
Line
Count
Source
267
116
    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
268
269
363k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Buffer>::operator bool() const
Line
Count
Source
269
34.7k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::BufferView>::operator bool() const
Line
Count
Source
269
130k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Node>::operator bool() const
Line
Count
Source
269
33.0k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Mesh>::operator bool() const
Line
Count
Source
269
7.68k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Camera>::operator bool() const
Line
Count
Source
269
16.0k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Light>::operator bool() const
Line
Count
Source
269
15.9k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF::BufferView>::operator bool() const
Line
Count
Source
269
51
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF::Texture>::operator bool() const
Line
Count
Source
269
36
    operator bool() const { return vector != nullptr && index < vector->size(); }
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
glTFCommon::Ref<glTF::Mesh>::operator bool() const
Line
Count
Source
269
1.15k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF::Node>::operator bool() const
Line
Count
Source
269
2.35k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF::Buffer>::operator bool() const
Line
Count
Source
269
30
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF::Camera>::operator bool() const
Line
Count
Source
269
469
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF::Accessor>::operator bool() const
Line
Count
Source
269
148
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF::Material>::operator bool() const
Line
Count
Source
269
97
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF::Scene>::operator bool() const
Line
Count
Source
269
503
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF::Light>::operator bool() const
Line
Count
Source
269
469
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Texture>::operator bool() const
Line
Count
Source
269
84.9k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Image>::operator bool() const
Line
Count
Source
269
490
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Sampler>::operator bool() const
Line
Count
Source
269
408
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Material>::operator bool() const
Line
Count
Source
269
3.11k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Accessor>::operator bool() const
Line
Count
Source
269
15.0k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Skin>::operator bool() const
Line
Count
Source
269
3.97k
    operator bool() const { return vector != nullptr && index < vector->size(); }
glTFCommon::Ref<glTF2::Scene>::operator bool() const
Line
Count
Source
269
11.8k
    operator bool() const { return vector != nullptr && index < vector->size(); }
270
271
403k
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF2::Buffer>::operator->()
Line
Count
Source
271
65.7k
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF2::BufferView>::operator->()
Line
Count
Source
271
270k
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF2::Camera>::operator->()
Line
Count
Source
271
97
    T *operator->() { return (*vector)[index]; }
Unexecuted instantiation: glTFCommon::Ref<glTF2::Light>::operator->()
glTFCommon::Ref<glTF2::Scene>::operator->()
Line
Count
Source
271
18.4k
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF::BufferView>::operator->()
Line
Count
Source
271
30
    T *operator->() { return (*vector)[index]; }
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::Mesh>::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::Camera>::operator->()
glTFCommon::Ref<glTF::Buffer>::operator->()
Line
Count
Source
271
4.28k
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF::Accessor>::operator->()
Line
Count
Source
271
91
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF::Scene>::operator->()
Line
Count
Source
271
70
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF2::Texture>::operator->()
Line
Count
Source
271
2.03k
    T *operator->() { return (*vector)[index]; }
Unexecuted instantiation: glTFCommon::Ref<glTF2::Material>::operator->()
glTFCommon::Ref<glTF2::Image>::operator->()
Line
Count
Source
271
408
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF2::Sampler>::operator->()
Line
Count
Source
271
2.19k
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF2::Node>::operator->()
Line
Count
Source
271
7.94k
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF2::Accessor>::operator->()
Line
Count
Source
271
26.5k
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF2::Mesh>::operator->()
Line
Count
Source
271
607
    T *operator->() { return (*vector)[index]; }
glTFCommon::Ref<glTF2::Skin>::operator->()
Line
Count
Source
271
5.11k
    T *operator->() { return (*vector)[index]; }
Unexecuted instantiation: glTFCommon::Ref<glTF::Animation>::operator->()
Unexecuted instantiation: glTFCommon::Ref<glTF2::Animation>::operator->()
272
273
20.6k
    T &operator*() { return *((*vector)[index]); }
glTFCommon::Ref<glTF::Node>::operator*()
Line
Count
Source
273
469
    T &operator*() { return *((*vector)[index]); }
glTFCommon::Ref<glTF2::Node>::operator*()
Line
Count
Source
273
20.1k
    T &operator*() { return *((*vector)[index]); }
274
};
275
276
//
277
// JSON Value reading helpers
278
//
279
280
template <class T>
281
struct ReadHelper {
282
30.8k
    static bool Read(Value &val, T &out) {
283
30.8k
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
30.8k
    }
glTFCommon::ReadHelper<unsigned int>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, unsigned int&)
Line
Count
Source
282
6.56k
    static bool Read(Value &val, T &out) {
283
6.56k
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
6.56k
    }
glTFCommon::ReadHelper<glTF2::ComponentType>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF2::ComponentType&)
Line
Count
Source
282
16.9k
    static bool Read(Value &val, T &out) {
283
16.9k
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
16.9k
    }
glTFCommon::ReadHelper<glTF2::SamplerMagFilter>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF2::SamplerMagFilter&)
Line
Count
Source
282
70
    static bool Read(Value &val, T &out) {
283
70
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
70
    }
glTFCommon::ReadHelper<glTF2::SamplerMinFilter>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF2::SamplerMinFilter&)
Line
Count
Source
282
119
    static bool Read(Value &val, T &out) {
283
119
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
119
    }
glTFCommon::ReadHelper<glTF2::SamplerWrap>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF2::SamplerWrap&)
Line
Count
Source
282
240
    static bool Read(Value &val, T &out) {
283
240
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
240
    }
glTFCommon::ReadHelper<glTF2::PrimitiveMode>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF2::PrimitiveMode&)
Line
Count
Source
282
5.01k
    static bool Read(Value &val, T &out) {
283
5.01k
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
5.01k
    }
glTFCommon::ReadHelper<glTF::PrimitiveMode>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::PrimitiveMode&)
Line
Count
Source
282
990
    static bool Read(Value &val, T &out) {
283
990
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
990
    }
Unexecuted instantiation: glTFCommon::ReadHelper<int>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, int&)
glTFCommon::ReadHelper<glTF::SamplerMagFilter>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::SamplerMagFilter&)
Line
Count
Source
282
18
    static bool Read(Value &val, T &out) {
283
18
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
18
    }
glTFCommon::ReadHelper<glTF::SamplerMinFilter>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::SamplerMinFilter&)
Line
Count
Source
282
18
    static bool Read(Value &val, T &out) {
283
18
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
18
    }
glTFCommon::ReadHelper<glTF::SamplerWrap>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::SamplerWrap&)
Line
Count
Source
282
32
    static bool Read(Value &val, T &out) {
283
32
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
32
    }
glTFCommon::ReadHelper<glTF::ComponentType>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::ComponentType&)
Line
Count
Source
282
850
    static bool Read(Value &val, T &out) {
283
850
        return val.IsInt() ? out = static_cast<T>(val.GetInt()), true : false;
284
850
    }
Unexecuted instantiation: glTFCommon::ReadHelper<glTF::Camera::Type>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTF::Camera::Type&)
285
};
286
287
template <>
288
struct ReadHelper<bool> {
289
3.59k
    static bool Read(Value &val, bool &out) {
290
3.59k
        return val.IsBool() ? out = val.GetBool(), true : false;
291
3.59k
    }
292
};
293
294
template <>
295
struct ReadHelper<float> {
296
6.06k
    static bool Read(Value &val, float &out) {
297
6.06k
        return val.IsNumber() ? out = static_cast<float>(val.GetDouble()), true : false;
298
6.06k
    }
299
};
300
301
template <unsigned int N>
302
struct ReadHelper<float[N]> {
303
27.9k
    static bool Read(Value &val, float (&out)[N]) {
304
27.9k
        if (!val.IsArray() || val.Size() != N) return false;
305
351k
        for (unsigned int i = 0; i < N; ++i) {
306
324k
            if (val[i].IsNumber())
307
324k
                out[i] = static_cast<float>(val[i].GetDouble());
308
324k
        }
309
27.1k
        return true;
310
27.9k
    }
glTFCommon::ReadHelper<float [4]>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, float (&) [4])
Line
Count
Source
303
4.10k
    static bool Read(Value &val, float (&out)[N]) {
304
4.10k
        if (!val.IsArray() || val.Size() != N) return false;
305
20.2k
        for (unsigned int i = 0; i < N; ++i) {
306
16.1k
            if (val[i].IsNumber())
307
16.1k
                out[i] = static_cast<float>(val[i].GetDouble());
308
16.1k
        }
309
4.04k
        return true;
310
4.10k
    }
glTFCommon::ReadHelper<float [3]>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, float (&) [3])
Line
Count
Source
303
4.96k
    static bool Read(Value &val, float (&out)[N]) {
304
4.96k
        if (!val.IsArray() || val.Size() != N) return false;
305
18.9k
        for (unsigned int i = 0; i < N; ++i) {
306
14.1k
            if (val[i].IsNumber())
307
14.1k
                out[i] = static_cast<float>(val[i].GetDouble());
308
14.1k
        }
309
4.72k
        return true;
310
4.96k
    }
glTFCommon::ReadHelper<float [16]>::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, float (&) [16])
Line
Count
Source
303
18.9k
    static bool Read(Value &val, float (&out)[N]) {
304
18.9k
        if (!val.IsArray() || val.Size() != N) return false;
305
312k
        for (unsigned int i = 0; i < N; ++i) {
306
294k
            if (val[i].IsNumber())
307
294k
                out[i] = static_cast<float>(val[i].GetDouble());
308
294k
        }
309
18.3k
        return true;
310
18.9k
    }
311
};
312
313
template <>
314
struct ReadHelper<const char *> {
315
21.7k
    static bool Read(Value &val, const char *&out) {
316
21.7k
        return val.IsString() ? (out = val.GetString(), true) : false;
317
21.7k
    }
318
};
319
320
template <>
321
struct ReadHelper<std::string> {
322
56.9k
    static bool Read(Value &val, std::string &out) {
323
56.9k
        return val.IsString() ? (out = std::string(val.GetString(), val.GetStringLength()), true) : false;
324
56.9k
    }
325
};
326
327
template <class T>
328
struct ReadHelper<Nullable<T>> {
329
33.7k
    static bool Read(Value &val, Nullable<T> &out) {
330
33.7k
        return out.isPresent = ReadHelper<T>::Read(val, out.value);
331
33.7k
    }
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> > >&)
Line
Count
Source
329
12.1k
    static bool Read(Value &val, Nullable<T> &out) {
330
12.1k
        return out.isPresent = ReadHelper<T>::Read(val, out.value);
331
12.1k
    }
Unexecuted instantiation: glTFCommon::ReadHelper<glTFCommon::Nullable<float> >::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float>&)
glTFCommon::ReadHelper<glTFCommon::Nullable<float [16]> >::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [16]>&)
Line
Count
Source
329
18.9k
    static bool Read(Value &val, Nullable<T> &out) {
330
18.9k
        return out.isPresent = ReadHelper<T>::Read(val, out.value);
331
18.9k
    }
glTFCommon::ReadHelper<glTFCommon::Nullable<float [3]> >::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [3]>&)
Line
Count
Source
329
1.96k
    static bool Read(Value &val, Nullable<T> &out) {
330
1.96k
        return out.isPresent = ReadHelper<T>::Read(val, out.value);
331
1.96k
    }
glTFCommon::ReadHelper<glTFCommon::Nullable<float [4]> >::Read(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [4]>&)
Line
Count
Source
329
757
    static bool Read(Value &val, Nullable<T> &out) {
330
757
        return out.isPresent = ReadHelper<T>::Read(val, out.value);
331
757
    }
332
};
333
334
template <>
335
struct ReadHelper<uint64_t> {
336
41.1k
    static bool Read(Value &val, uint64_t &out) {
337
41.1k
        return val.IsUint64() ? out = val.GetUint64(), true : false;
338
41.1k
    }
339
};
340
341
template <>
342
struct ReadHelper<int64_t> {
343
0
    static bool Read(Value &val, int64_t &out) {
344
0
        return val.IsInt64() ? out = val.GetInt64(), true : false;
345
0
    }
346
};
347
348
#ifdef __APPLE__
349
350
// On Mac size_t and uint64_t are not the same, so we need a specialized version
351
// here to properly parse byteOffset and other parameters > 2^31
352
// On Windows and Linux the types match andno additional specialization is required
353
354
template <>
355
struct ReadHelper<size_t> {
356
    static bool Read(Value &val, size_t &out) {
357
        return val.IsInt64() ? out = val.GetInt64(), true : false;
358
    }
359
};
360
361
#endif
362
363
template <class T>
364
31.0k
inline static bool ReadValue(Value &val, T &out) {
365
31.0k
    return ReadHelper<T>::Read(val, out);
366
31.0k
}
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]>&)
glTFImporter.cpp:bool glTFCommon::ReadValue<glTFCommon::Nullable<float [16]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [16]>&)
Line
Count
Source
364
362
inline static bool ReadValue(Value &val, T &out) {
365
362
    return ReadHelper<T>::Read(val, out);
366
362
}
glTFImporter.cpp:bool glTFCommon::ReadValue<float [4]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, float (&) [4])
Line
Count
Source
364
78
inline static bool ReadValue(Value &val, T &out) {
365
78
    return ReadHelper<T>::Read(val, out);
366
78
}
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> > >&)
Line
Count
Source
364
12.1k
inline static bool ReadValue(Value &val, T &out) {
365
12.1k
    return ReadHelper<T>::Read(val, out);
366
12.1k
}
glTF2Importer.cpp:bool glTFCommon::ReadValue<glTFCommon::Nullable<float [16]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, glTFCommon::Nullable<float [16]>&)
Line
Count
Source
364
18.5k
inline static bool ReadValue(Value &val, T &out) {
365
18.5k
    return ReadHelper<T>::Read(val, out);
366
18.5k
}
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]>&)
367
368
template <class T>
369
310k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
310k
    if (!obj.IsObject()) {
371
124
        return false;
372
124
    }
373
310k
    Value::MemberIterator it = obj.FindMember(id);
374
310k
    if (it != obj.MemberEnd()) {
375
157k
        return ReadHelper<T>::Read(it->value, out);
376
157k
    }
377
153k
    return false;
378
310k
}
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]>&)
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> >&)
Line
Count
Source
369
15.3k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
15.3k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
15.3k
    Value::MemberIterator it = obj.FindMember(id);
374
15.3k
    if (it != obj.MemberEnd()) {
375
5.62k
        return ReadHelper<T>::Read(it->value, out);
376
5.62k
    }
377
9.71k
    return false;
378
15.3k
}
glTFImporter.cpp:bool glTFCommon::ReadMember<bool>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, bool&)
Line
Count
Source
369
4.43k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
4.43k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
4.43k
    Value::MemberIterator it = obj.FindMember(id);
374
4.43k
    if (it != obj.MemberEnd()) {
375
292
        return ReadHelper<T>::Read(it->value, out);
376
292
    }
377
4.14k
    return false;
378
4.43k
}
glTFImporter.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [3]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [3]>&)
Line
Count
Source
369
2.94k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
2.94k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
2.94k
    Value::MemberIterator it = obj.FindMember(id);
374
2.94k
    if (it != obj.MemberEnd()) {
375
1.19k
        return ReadHelper<T>::Read(it->value, out);
376
1.19k
    }
377
1.75k
    return false;
378
2.94k
}
glTFImporter.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [4]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [4]>&)
Line
Count
Source
369
1.47k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
1.47k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
1.47k
    Value::MemberIterator it = obj.FindMember(id);
374
1.47k
    if (it != obj.MemberEnd()) {
375
168
        return ReadHelper<T>::Read(it->value, out);
376
168
    }
377
1.30k
    return false;
378
1.47k
}
glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::PrimitiveMode&)
Line
Count
Source
369
1.04k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
1.04k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
1.04k
    Value::MemberIterator it = obj.FindMember(id);
374
1.04k
    if (it != obj.MemberEnd()) {
375
990
        return ReadHelper<T>::Read(it->value, out);
376
990
    }
377
56
    return false;
378
1.04k
}
glTFImporter.cpp:bool glTFCommon::ReadMember<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int&)
Line
Count
Source
369
3.73k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
3.73k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
3.73k
    Value::MemberIterator it = obj.FindMember(id);
374
3.73k
    if (it != obj.MemberEnd()) {
375
3.24k
        return ReadHelper<T>::Read(it->value, out);
376
3.24k
    }
377
494
    return false;
378
3.73k
}
Unexecuted instantiation: glTFImporter.cpp:bool glTFCommon::ReadMember<int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, int&)
glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::SamplerMagFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::SamplerMagFilter&)
Line
Count
Source
369
22
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
22
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
22
    Value::MemberIterator it = obj.FindMember(id);
374
22
    if (it != obj.MemberEnd()) {
375
18
        return ReadHelper<T>::Read(it->value, out);
376
18
    }
377
4
    return false;
378
22
}
glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::SamplerMinFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::SamplerMinFilter&)
Line
Count
Source
369
22
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
22
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
22
    Value::MemberIterator it = obj.FindMember(id);
374
22
    if (it != obj.MemberEnd()) {
375
18
        return ReadHelper<T>::Read(it->value, out);
376
18
    }
377
4
    return false;
378
22
}
glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::SamplerWrap>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::SamplerWrap&)
Line
Count
Source
369
44
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
44
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
44
    Value::MemberIterator it = obj.FindMember(id);
374
44
    if (it != obj.MemberEnd()) {
375
32
        return ReadHelper<T>::Read(it->value, out);
376
32
    }
377
12
    return false;
378
44
}
glTFImporter.cpp:bool glTFCommon::ReadMember<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float&)
Line
Count
Source
369
116
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
116
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
116
    Value::MemberIterator it = obj.FindMember(id);
374
116
    if (it != obj.MemberEnd()) {
375
54
        return ReadHelper<T>::Read(it->value, out);
376
54
    }
377
62
    return false;
378
116
}
glTFImporter.cpp:bool glTFCommon::ReadMember<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long&)
Line
Count
Source
369
210
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
210
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
210
    Value::MemberIterator it = obj.FindMember(id);
374
210
    if (it != obj.MemberEnd()) {
375
90
        return ReadHelper<T>::Read(it->value, out);
376
90
    }
377
120
    return false;
378
210
}
glTFImporter.cpp:bool glTFCommon::ReadMember<glTF::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::ComponentType&)
Line
Count
Source
369
914
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
914
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
914
    Value::MemberIterator it = obj.FindMember(id);
374
914
    if (it != obj.MemberEnd()) {
375
850
        return ReadHelper<T>::Read(it->value, out);
376
850
    }
377
64
    return false;
378
914
}
glTFImporter.cpp:bool glTFCommon::ReadMember<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*&)
Line
Count
Source
369
2.58k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
2.58k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
2.58k
    Value::MemberIterator it = obj.FindMember(id);
374
2.58k
    if (it != obj.MemberEnd()) {
375
2.24k
        return ReadHelper<T>::Read(it->value, out);
376
2.24k
    }
377
336
    return false;
378
2.58k
}
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])
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> >&)
Line
Count
Source
369
117k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
117k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
117k
    Value::MemberIterator it = obj.FindMember(id);
374
117k
    if (it != obj.MemberEnd()) {
375
39.1k
        return ReadHelper<T>::Read(it->value, out);
376
39.1k
    }
377
78.5k
    return false;
378
117k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [3]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [3]>&)
Line
Count
Source
369
15.1k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
15.1k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
15.1k
    Value::MemberIterator it = obj.FindMember(id);
374
15.1k
    if (it != obj.MemberEnd()) {
375
775
        return ReadHelper<T>::Read(it->value, out);
376
775
    }
377
14.3k
    return false;
378
15.1k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float [4]> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float [4]>&)
Line
Count
Source
369
7.56k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
7.56k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
7.56k
    Value::MemberIterator it = obj.FindMember(id);
374
7.56k
    if (it != obj.MemberEnd()) {
375
589
        return ReadHelper<T>::Read(it->value, out);
376
589
    }
377
6.97k
    return false;
378
7.56k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<glTF2::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::PrimitiveMode&)
Line
Count
Source
369
6.70k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
6.70k
    if (!obj.IsObject()) {
371
124
        return false;
372
124
    }
373
6.58k
    Value::MemberIterator it = obj.FindMember(id);
374
6.58k
    if (it != obj.MemberEnd()) {
375
5.01k
        return ReadHelper<T>::Read(it->value, out);
376
5.01k
    }
377
1.56k
    return false;
378
6.58k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int&)
Line
Count
Source
369
14.1k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
14.1k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
14.1k
    Value::MemberIterator it = obj.FindMember(id);
374
14.1k
    if (it != obj.MemberEnd()) {
375
3.32k
        return ReadHelper<T>::Read(it->value, out);
376
3.32k
    }
377
10.8k
    return false;
378
14.1k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<glTF2::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::ComponentType&)
Line
Count
Source
369
20.0k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
20.0k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
20.0k
    Value::MemberIterator it = obj.FindMember(id);
374
20.0k
    if (it != obj.MemberEnd()) {
375
16.9k
        return ReadHelper<T>::Read(it->value, out);
376
16.9k
    }
377
3.09k
    return false;
378
20.0k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*&)
Line
Count
Source
369
20.1k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
20.1k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
20.1k
    Value::MemberIterator it = obj.FindMember(id);
374
20.1k
    if (it != obj.MemberEnd()) {
375
19.4k
        return ReadHelper<T>::Read(it->value, out);
376
19.4k
    }
377
632
    return false;
378
20.1k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long&)
Line
Count
Source
369
49.8k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
49.8k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
49.8k
    Value::MemberIterator it = obj.FindMember(id);
374
49.8k
    if (it != obj.MemberEnd()) {
375
41.0k
        return ReadHelper<T>::Read(it->value, out);
376
41.0k
    }
377
8.80k
    return false;
378
49.8k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<float [4]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float (&) [4])
Line
Count
Source
369
3.84k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
3.84k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
3.84k
    Value::MemberIterator it = obj.FindMember(id);
374
3.84k
    if (it != obj.MemberEnd()) {
375
3.27k
        return ReadHelper<T>::Read(it->value, out);
376
3.27k
    }
377
567
    return false;
378
3.84k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<glTF2::SamplerMagFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerMagFilter&)
Line
Count
Source
369
178
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
178
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
178
    Value::MemberIterator it = obj.FindMember(id);
374
178
    if (it != obj.MemberEnd()) {
375
70
        return ReadHelper<T>::Read(it->value, out);
376
70
    }
377
108
    return false;
378
178
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<glTF2::SamplerMinFilter>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerMinFilter&)
Line
Count
Source
369
178
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
178
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
178
    Value::MemberIterator it = obj.FindMember(id);
374
178
    if (it != obj.MemberEnd()) {
375
119
        return ReadHelper<T>::Read(it->value, out);
376
119
    }
377
59
    return false;
378
178
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<glTF2::SamplerWrap>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::SamplerWrap&)
Line
Count
Source
369
356
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
356
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
356
    Value::MemberIterator it = obj.FindMember(id);
374
356
    if (it != obj.MemberEnd()) {
375
240
        return ReadHelper<T>::Read(it->value, out);
376
240
    }
377
116
    return false;
378
356
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float&)
Line
Count
Source
369
12.6k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
12.6k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
12.6k
    Value::MemberIterator it = obj.FindMember(id);
374
12.6k
    if (it != obj.MemberEnd()) {
375
6.00k
        return ReadHelper<T>::Read(it->value, out);
376
6.00k
    }
377
6.61k
    return false;
378
12.6k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<float [3]>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float (&) [3])
Line
Count
Source
369
4.66k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
4.66k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
4.66k
    Value::MemberIterator it = obj.FindMember(id);
374
4.66k
    if (it != obj.MemberEnd()) {
375
2.99k
        return ReadHelper<T>::Read(it->value, out);
376
2.99k
    }
377
1.67k
    return false;
378
4.66k
}
glTF2Importer.cpp:bool glTFCommon::ReadMember<bool>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, bool&)
Line
Count
Source
369
4.66k
inline static bool ReadMember(Value &obj, const char *id, T &out) {
370
4.66k
    if (!obj.IsObject()) {
371
0
        return false;
372
0
    }
373
4.66k
    Value::MemberIterator it = obj.FindMember(id);
374
4.66k
    if (it != obj.MemberEnd()) {
375
3.30k
        return ReadHelper<T>::Read(it->value, out);
376
3.30k
    }
377
1.36k
    return false;
378
4.66k
}
Unexecuted instantiation: glTF2Importer.cpp:bool glTFCommon::ReadMember<glTFCommon::Nullable<float> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTFCommon::Nullable<float>&)
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]>&)
379
380
template <class T>
381
103k
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
103k
    T out;
383
103k
    return ReadMember(obj, id, out) ? out : defaultValue;
384
103k
}
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)
glTFImporter.cpp:bool glTFCommon::MemberOrDefault<bool>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, bool)
Line
Count
Source
381
4.43k
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
4.43k
    T out;
383
4.43k
    return ReadMember(obj, id, out) ? out : defaultValue;
384
4.43k
}
glTFImporter.cpp:glTF::PrimitiveMode glTFCommon::MemberOrDefault<glTF::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::PrimitiveMode)
Line
Count
Source
381
1.04k
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
1.04k
    T out;
383
1.04k
    return ReadMember(obj, id, out) ? out : defaultValue;
384
1.04k
}
glTFImporter.cpp:char const* glTFCommon::MemberOrDefault<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*)
Line
Count
Source
381
1.52k
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
1.52k
    T out;
383
1.52k
    return ReadMember(obj, id, out) ? out : defaultValue;
384
1.52k
}
glTFImporter.cpp:unsigned long glTFCommon::MemberOrDefault<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long)
Line
Count
Source
381
210
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
210
    T out;
383
210
    return ReadMember(obj, id, out) ? out : defaultValue;
384
210
}
glTFImporter.cpp:unsigned int glTFCommon::MemberOrDefault<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int)
Line
Count
Source
381
3.73k
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
3.73k
    T out;
383
3.73k
    return ReadMember(obj, id, out) ? out : defaultValue;
384
3.73k
}
glTFImporter.cpp:glTF::ComponentType glTFCommon::MemberOrDefault<glTF::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF::ComponentType)
Line
Count
Source
381
914
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
914
    T out;
383
914
    return ReadMember(obj, id, out) ? out : defaultValue;
384
914
}
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)
glTF2Importer.cpp:glTF2::PrimitiveMode glTFCommon::MemberOrDefault<glTF2::PrimitiveMode>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::PrimitiveMode)
Line
Count
Source
381
6.70k
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
6.70k
    T out;
383
6.70k
    return ReadMember(obj, id, out) ? out : defaultValue;
384
6.70k
}
glTF2Importer.cpp:unsigned int glTFCommon::MemberOrDefault<unsigned int>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned int)
Line
Count
Source
381
14.1k
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
14.1k
    T out;
383
14.1k
    return ReadMember(obj, id, out) ? out : defaultValue;
384
14.1k
}
glTF2Importer.cpp:unsigned long glTFCommon::MemberOrDefault<unsigned long>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, unsigned long)
Line
Count
Source
381
49.8k
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
49.8k
    T out;
383
49.8k
    return ReadMember(obj, id, out) ? out : defaultValue;
384
49.8k
}
glTF2Importer.cpp:glTF2::ComponentType glTFCommon::MemberOrDefault<glTF2::ComponentType>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, glTF2::ComponentType)
Line
Count
Source
381
20.0k
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
20.0k
    T out;
383
20.0k
    return ReadMember(obj, id, out) ? out : defaultValue;
384
20.0k
}
glTF2Importer.cpp:char const* glTFCommon::MemberOrDefault<char const*>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, char const*)
Line
Count
Source
381
105
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
105
    T out;
383
105
    return ReadMember(obj, id, out) ? out : defaultValue;
384
105
}
glTF2Importer.cpp:float glTFCommon::MemberOrDefault<float>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >&, char const*, float)
Line
Count
Source
381
368
inline static T MemberOrDefault(Value &obj, const char *id, T defaultValue) {
382
368
    T out;
383
368
    return ReadMember(obj, id, out) ? out : defaultValue;
384
368
}
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)
385
386
28.7k
inline Value *FindMember(Value &val, const char *id) {
387
28.7k
    if (!val.IsObject()) {
388
0
        return nullptr;
389
0
    }
390
28.7k
    Value::MemberIterator it = val.FindMember(id);
391
28.7k
    return (it != val.MemberEnd()) ? &it->value : nullptr;
392
28.7k
}
393
394
template <int N>
395
377
inline void throwUnexpectedTypeError(const char (&expectedTypeName)[N], const char *memberId, const char *context, const char *extraContext) {
396
377
    std::string fullContext = context;
397
377
    if (extraContext && (strlen(extraContext) > 0)) {
398
46
        fullContext = fullContext + " (" + extraContext + ")";
399
46
    }
400
377
    throw DeadlyImportError("Member \"", memberId, "\" was not of type \"", expectedTypeName, "\" when reading ", fullContext);
401
377
}
void glTFCommon::throwUnexpectedTypeError<7>(char const (&) [7], char const*, char const*, char const*)
Line
Count
Source
395
202
inline void throwUnexpectedTypeError(const char (&expectedTypeName)[N], const char *memberId, const char *context, const char *extraContext) {
396
202
    std::string fullContext = context;
397
202
    if (extraContext && (strlen(extraContext) > 0)) {
398
0
        fullContext = fullContext + " (" + extraContext + ")";
399
0
    }
400
202
    throw DeadlyImportError("Member \"", memberId, "\" was not of type \"", expectedTypeName, "\" when reading ", fullContext);
401
202
}
void glTFCommon::throwUnexpectedTypeError<5>(char const (&) [5], char const*, char const*, char const*)
Line
Count
Source
395
80
inline void throwUnexpectedTypeError(const char (&expectedTypeName)[N], const char *memberId, const char *context, const char *extraContext) {
396
80
    std::string fullContext = context;
397
80
    if (extraContext && (strlen(extraContext) > 0)) {
398
33
        fullContext = fullContext + " (" + extraContext + ")";
399
33
    }
400
80
    throw DeadlyImportError("Member \"", memberId, "\" was not of type \"", expectedTypeName, "\" when reading ", fullContext);
401
80
}
void glTFCommon::throwUnexpectedTypeError<6>(char const (&) [6], char const*, char const*, char const*)
Line
Count
Source
395
95
inline void throwUnexpectedTypeError(const char (&expectedTypeName)[N], const char *memberId, const char *context, const char *extraContext) {
396
95
    std::string fullContext = context;
397
95
    if (extraContext && (strlen(extraContext) > 0)) {
398
13
        fullContext = fullContext + " (" + extraContext + ")";
399
13
    }
400
95
    throw DeadlyImportError("Member \"", memberId, "\" was not of type \"", expectedTypeName, "\" when reading ", fullContext);
401
95
}
402
403
// Look-up functions with type checks. Context and extra context help the user identify the problem if there's an error.
404
405
22.0k
inline Value *FindStringInContext(Value &val, const char *memberId, const char *context, const char *extraContext = nullptr) {
406
22.0k
    if (!val.IsObject()) {
407
66
        return nullptr;
408
66
    }
409
21.9k
    Value::MemberIterator it = val.FindMember(memberId);
410
21.9k
    if (it == val.MemberEnd()) {
411
7.25k
        return nullptr;
412
7.25k
    }
413
14.6k
    if (!it->value.IsString()) {
414
202
        throwUnexpectedTypeError("string", memberId, context, extraContext);
415
202
    }
416
14.6k
    return &it->value;
417
21.9k
}
418
419
0
inline Value *FindNumberInContext(Value &val, const char *memberId, const char *context, const char *extraContext = nullptr) {
420
0
    if (!val.IsObject()) {
421
0
        return nullptr;
422
0
    }
423
0
    Value::MemberIterator it = val.FindMember(memberId);
424
0
    if (it == val.MemberEnd()) {
425
0
        return nullptr;
426
0
    }
427
0
    if (!it->value.IsNumber()) {
428
0
        throwUnexpectedTypeError("number", memberId, context, extraContext);
429
0
    }
430
0
    return &it->value;
431
0
}
432
433
157k
inline Value *FindUIntInContext(Value &val, const char *memberId, const char *context, const char *extraContext = nullptr) {
434
157k
    if (!val.IsObject()) {
435
716
        return nullptr;
436
716
    }
437
157k
    Value::MemberIterator it = val.FindMember(memberId);
438
157k
    if (it == val.MemberEnd()) {
439
80.6k
        return nullptr;
440
80.6k
    }
441
76.5k
    if (!it->value.IsUint()) {
442
80
        throwUnexpectedTypeError("uint", memberId, context, extraContext);
443
80
    }
444
76.5k
    return &it->value;
445
157k
}
446
447
192k
inline Value *FindArrayInContext(Value &val, const char *memberId, const char *context, const char *extraContext = nullptr) {
448
192k
    if (!val.IsObject()) {
449
124
        return nullptr;
450
124
    }
451
191k
    Value::MemberIterator it = val.FindMember(memberId);
452
191k
    if (it == val.MemberEnd()) {
453
101k
        return nullptr;
454
101k
    }
455
90.7k
    if (!it->value.IsArray()) {
456
95
        throwUnexpectedTypeError("array", memberId, context, extraContext);
457
95
    }
458
90.7k
    return &it->value;
459
191k
}
460
461
279k
inline Value *FindObjectInContext(Value &val, const char * memberId, const char *context, const char *extraContext = nullptr) {
462
279k
    if (!val.IsObject()) {
463
584
        return nullptr;
464
584
    }
465
279k
    Value::MemberIterator it = val.FindMember(memberId);
466
279k
    if (it == val.MemberEnd()) {
467
239k
        return nullptr;
468
239k
    }
469
39.3k
    if (!it->value.IsObject()) {
470
74
        ASSIMP_LOG_ERROR("Member \"", memberId, "\" was not of type \"", context, "\" when reading ", extraContext);
471
74
        return nullptr;
472
74
   }
473
39.2k
    return &it->value;
474
39.3k
}
475
476
3
inline Value *FindExtensionInContext(Value &val, const char *extensionId, const char *context, const char *extraContext = nullptr) {
477
3
    if (Value *extensionList = FindObjectInContext(val, "extensions", context, extraContext)) {
478
2
        if (Value *extension = FindObjectInContext(*extensionList, extensionId, context, extraContext)) {
479
0
            return extension;
480
0
        }
481
2
    }
482
3
    return nullptr;
483
3
}
484
485
// Overloads when the value is the document.
486
487
1.58k
inline Value *FindString(Document &doc, const char *memberId) {
488
1.58k
    return FindStringInContext(doc, memberId, "the document");
489
1.58k
}
490
491
0
inline Value *FindNumber(Document &doc, const char *memberId) {
492
0
    return FindNumberInContext(doc, memberId, "the document");
493
0
}
494
495
6.04k
inline Value *FindUInt(Document &doc, const char *memberId) {
496
6.04k
    return FindUIntInContext(doc, memberId, "the document");
497
6.04k
}
498
499
29.2k
inline Value *FindArray(Document &val, const char *memberId) {
500
29.2k
    return FindArrayInContext(val, memberId, "the document");
501
29.2k
}
502
503
31.6k
inline Value *FindObject(Document &doc, const char *memberId) {
504
31.6k
    return FindObjectInContext(doc, memberId, "the document");
505
31.6k
}
506
507
0
inline Value *FindExtension(Value &val, const char *extensionId) {
508
0
    return FindExtensionInContext(val, extensionId, "the document");
509
0
}
510
511
8.07k
inline Value *FindString(Value &val, const char *id) {
512
8.07k
    Value::MemberIterator it = val.FindMember(id);
513
8.07k
    return (it != val.MemberEnd() && it->value.IsString()) ? &it->value : nullptr;
514
8.07k
}
515
516
28.7k
inline Value *FindObject(Value &val, const char *id) {
517
28.7k
    Value::MemberIterator it = val.FindMember(id);
518
28.7k
    return (it != val.MemberEnd() && it->value.IsObject()) ? &it->value : nullptr;
519
28.7k
}
520
521
7.55k
inline Value *FindArray(Value &val, const char *id) {
522
7.55k
    Value::MemberIterator it = val.FindMember(id);
523
7.55k
    return (it != val.MemberEnd() && it->value.IsArray()) ? &it->value : nullptr;
524
7.55k
}
525
526
282
inline Value *FindNumber(Value &val, const char *id) {
527
282
    Value::MemberIterator it = val.FindMember(id);
528
282
    return (it != val.MemberEnd() && it->value.IsNumber()) ? &it->value : nullptr;
529
282
}
530
531
} // namespace glTFCommon
532
533
#endif // AI_GLFTCOMMON_H_INC