Apply various clang-tidy checks for smartprs and modern C++ types

pull/4792/head
Aaron Gokaslan 2022-11-08 11:03:55 -05:00
parent cfed74516b
commit ccfb175460
92 changed files with 542 additions and 541 deletions

View File

@ -295,7 +295,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object> &objects) {
Surface &surf = obj.surfaces.back(); Surface &surf = obj.surfaces.back();
surf.flags = strtoul_cppstyle(buffer); surf.flags = strtoul_cppstyle(buffer);
while (1) { while (true) {
if (!GetNextLine()) { if (!GetNextLine()) {
throw DeadlyImportError("AC3D: Unexpected EOF: surface is incomplete"); throw DeadlyImportError("AC3D: Unexpected EOF: surface is incomplete");
} }
@ -750,7 +750,7 @@ void AC3DImporter::InternReadFile(const std::string &pFile,
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open AC3D file ", pFile, "."); throw DeadlyImportError("Failed to open AC3D file ", pFile, ".");
} }

View File

@ -261,7 +261,7 @@ void AMFImporter::ParseFile(const std::string &pFile, IOSystem *pIOHandler) {
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open AMF file ", pFile, "."); throw DeadlyImportError("Failed to open AMF file ", pFile, ".");
} }

View File

@ -122,7 +122,7 @@ void ASEImporter::InternReadFile(const std::string &pFile,
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open ASE file ", pFile, "."); throw DeadlyImportError("Failed to open ASE file ", pFile, ".");
} }

View File

@ -652,7 +652,7 @@ void DumpSceneToAssxml(
const char *pFile, const char *cmd, IOSystem *pIOSystem, const char *pFile, const char *cmd, IOSystem *pIOSystem,
const aiScene *pScene, bool shortened) { const aiScene *pScene, bool shortened) {
std::unique_ptr<IOStream> file(pIOSystem->Open(pFile, "wt")); std::unique_ptr<IOStream> file(pIOSystem->Open(pFile, "wt"));
if (!file.get()) { if (!file) {
throw std::runtime_error("Unable to open output file " + std::string(pFile) + '\n'); throw std::runtime_error("Unable to open output file " + std::string(pFile) + '\n');
} }

View File

@ -116,7 +116,7 @@ void B3DImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile)); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open B3D file ", pFile, "."); throw DeadlyImportError("Failed to open B3D file ", pFile, ".");
} }
@ -253,7 +253,7 @@ size_t B3DImporter::ChunkSize() {
template <class T> template <class T>
T *B3DImporter::to_array(const vector<T> &v) { T *B3DImporter::to_array(const vector<T> &v) {
if (v.empty()) { if (v.empty()) {
return 0; return nullptr;
} }
T *p = new T[v.size()]; T *p = new T[v.size()];
for (size_t i = 0; i < v.size(); ++i) { for (size_t i = 0; i < v.size(); ++i) {
@ -266,7 +266,7 @@ T *B3DImporter::to_array(const vector<T> &v) {
template <class T> template <class T>
T **unique_to_array(vector<std::unique_ptr<T>> &v) { T **unique_to_array(vector<std::unique_ptr<T>> &v) {
if (v.empty()) { if (v.empty()) {
return 0; return nullptr;
} }
T **p = new T *[v.size()]; T **p = new T *[v.size()];
for (size_t i = 0; i < v.size(); ++i) { for (size_t i = 0; i < v.size(); ++i) {
@ -617,7 +617,7 @@ void B3DImporter::ReadBB3D(aiScene *scene) {
} else if (chunk == "BRUS") { } else if (chunk == "BRUS") {
ReadBRUS(); ReadBRUS();
} else if (chunk == "NODE") { } else if (chunk == "NODE") {
ReadNODE(0); ReadNODE(nullptr);
} }
ExitChunk(); ExitChunk();
} }
@ -642,7 +642,7 @@ void B3DImporter::ReadBB3D(aiScene *scene) {
int n_tris = mesh->mNumFaces; int n_tris = mesh->mNumFaces;
int n_verts = mesh->mNumVertices = n_tris * 3; int n_verts = mesh->mNumVertices = n_tris * 3;
aiVector3D *mv = mesh->mVertices = new aiVector3D[n_verts], *mn = 0, *mc = 0; aiVector3D *mv = mesh->mVertices = new aiVector3D[n_verts], *mn = nullptr, *mc = nullptr;
if (_vflags & 1) { if (_vflags & 1) {
mn = mesh->mNormals = new aiVector3D[n_verts]; mn = mesh->mNormals = new aiVector3D[n_verts];
} }

View File

@ -115,7 +115,7 @@ void BVHLoader::InternReadFile(const std::string &pFile, aiScene *pScene, IOSyst
// read file into memory // read file into memory
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile)); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile));
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open file ", pFile, "."); throw DeadlyImportError("Failed to open file ", pFile, ".");
} }
@ -191,7 +191,7 @@ aiNode *BVHLoader::ReadNode() {
// now read the node's contents // now read the node's contents
std::string siteToken; std::string siteToken;
while (1) { while (true) {
std::string token = GetNextToken(); std::string token = GetNextToken();
// node offset to parent node // node offset to parent node
@ -247,7 +247,7 @@ aiNode *BVHLoader::ReadEndSite(const std::string &pParentName) {
// now read the node's contents. Only possible entry is "OFFSET" // now read the node's contents. Only possible entry is "OFFSET"
std::string token; std::string token;
while (1) { while (true) {
token.clear(); token.clear();
token = GetNextToken(); token = GetNextToken();

View File

@ -140,7 +140,7 @@ void BlenderBMeshConverter::ConvertPolyToFaces(const MPoly &poly) {
ThrowException("BMesh uv loop array has incorrect size"); ThrowException("BMesh uv loop array has incorrect size");
} }
const MLoopUV *loopUV = &BMesh->mloopuv[poly.loopstart]; const MLoopUV *loopUV = &BMesh->mloopuv[poly.loopstart];
AddTFace(loopUV[0].uv, loopUV[1].uv, loopUV[2].uv, poly.totloop == 4 ? loopUV[3].uv : 0); AddTFace(loopUV[0].uv, loopUV[1].uv, loopUV[2].uv, poly.totloop == 4 ? loopUV[3].uv : nullptr);
} }
} else if (poly.totloop > 4) { } else if (poly.totloop > 4) {
#if ASSIMP_BLEND_WITH_GLU_TESSELLATE #if ASSIMP_BLEND_WITH_GLU_TESSELLATE

View File

@ -80,7 +80,7 @@ namespace Assimp
void DestroyTriMesh( ); void DestroyTriMesh( );
void ConvertPolyToFaces( const Blender::MPoly& poly ); void ConvertPolyToFaces( const Blender::MPoly& poly );
void AddFace( int v1, int v2, int v3, int v4 = 0 ); void AddFace( int v1, int v2, int v3, int v4 = 0 );
void AddTFace( const float* uv1, const float* uv2, const float *uv3, const float* uv4 = 0 ); void AddTFace(const float *uv1, const float *uv2, const float *uv3, const float *uv4 = nullptr);
const Blender::Mesh* BMesh; const Blender::Mesh* BMesh;
Blender::Mesh* triMesh; Blender::Mesh* triMesh;

View File

@ -72,7 +72,7 @@ struct Type {
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
void DNAParser::Parse() { void DNAParser::Parse() {
StreamReaderAny &stream = *db.reader.get(); StreamReaderAny &stream = *db.reader;
DNA &dna = db.dna; DNA &dna = db.dna;
if (!match4(stream, "SDNA")) { if (!match4(stream, "SDNA")) {

View File

@ -63,6 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/StringComparison.h> #include <assimp/StringComparison.h>
#include <cctype> #include <cctype>
#include <memory>
#include <utility> #include <utility>
// zlib is needed for compressed blend files // zlib is needed for compressed blend files
@ -182,7 +183,7 @@ void BlenderImporter::InternReadFile(const std::string &pFile,
} }
// replace the input stream with a memory stream // replace the input stream with a memory stream
stream.reset(new MemoryIOStream(reinterpret_cast<uint8_t *>(uncompressed.data()), total)); stream = std::make_shared<MemoryIOStream>(reinterpret_cast<uint8_t *>(uncompressed.data()), total);
// .. and retry // .. and retry
stream->Read(magic, 7, 1); stream->Read(magic, 7, 1);
@ -219,7 +220,7 @@ void BlenderImporter::ParseBlendFile(FileDatabase &out, std::shared_ptr<IOStream
out.entries.reserve(128); out.entries.reserve(128);
{ // even small BLEND files tend to consist of many file blocks { // even small BLEND files tend to consist of many file blocks
SectionParser parser(*out.reader.get(), out.i64bit); SectionParser parser(*out.reader, out.i64bit);
// first parse the file in search for the DNA and insert all other sections into the database // first parse the file in search for the DNA and insert all other sections into the database
while ((parser.Next(), 1)) { while ((parser.Next(), 1)) {

View File

@ -158,7 +158,7 @@ void COBImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
// sort faces by material indices // sort faces by material indices
for (std::shared_ptr<Node> &n : scene.nodes) { for (std::shared_ptr<Node> &n : scene.nodes) {
if (n->type == Node::TYPE_MESH) { if (n->type == Node::TYPE_MESH) {
Mesh &mesh = (Mesh &)(*n.get()); Mesh &mesh = (Mesh &)(*n);
for (Face &f : mesh.faces) { for (Face &f : mesh.faces) {
mesh.temp_map[f.material].push_back(&f); mesh.temp_map[f.material].push_back(&f);
} }
@ -168,7 +168,7 @@ void COBImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
// count meshes // count meshes
for (std::shared_ptr<Node> &n : scene.nodes) { for (std::shared_ptr<Node> &n : scene.nodes) {
if (n->type == Node::TYPE_MESH) { if (n->type == Node::TYPE_MESH) {
Mesh &mesh = (Mesh &)(*n.get()); Mesh &mesh = (Mesh &)(*n);
if (mesh.vertex_positions.size() && mesh.texture_coords.size()) { if (mesh.vertex_positions.size() && mesh.texture_coords.size()) {
pScene->mNumMeshes += static_cast<unsigned int>(mesh.temp_map.size()); pScene->mNumMeshes += static_cast<unsigned int>(mesh.temp_map.size());
} }
@ -211,7 +211,7 @@ void COBImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
} }
} }
pScene->mRootNode = BuildNodes(*root.get(), scene, pScene); pScene->mRootNode = BuildNodes(*root, scene, pScene);
//flip normals after import //flip normals after import
FlipWindingOrderProcess flip; FlipWindingOrderProcess flip;
flip.Execute(pScene); flip.Execute(pScene);
@ -868,7 +868,7 @@ void COBImporter::ReadBinaryFile(Scene &out, StreamReaderLE *reader) {
return; return;
} }
while (1) { while (true) {
std::string type; std::string type;
type += reader->GetI1(); type += reader->GetI1();
type += reader->GetI1(); type += reader->GetI1();
@ -1054,7 +1054,7 @@ void COBImporter::ReadMat1_Binary(COB::Scene &out, StreamReaderLE &reader, const
id[0] = reader.GetI1(), id[1] = reader.GetI1(); id[0] = reader.GetI1(), id[1] = reader.GetI1();
if (id[0] == 'e' && id[1] == ':') { if (id[0] == 'e' && id[1] == ':') {
mat.tex_env.reset(new Texture()); mat.tex_env = std::make_shared<Texture>();
reader.GetI1(); reader.GetI1();
ReadString_Binary(mat.tex_env->path, reader); ReadString_Binary(mat.tex_env->path, reader);
@ -1064,7 +1064,7 @@ void COBImporter::ReadMat1_Binary(COB::Scene &out, StreamReaderLE &reader, const
} }
if (id[0] == 't' && id[1] == ':') { if (id[0] == 't' && id[1] == ':') {
mat.tex_color.reset(new Texture()); mat.tex_color = std::make_shared<Texture>();
reader.GetI1(); reader.GetI1();
ReadString_Binary(mat.tex_color->path, reader); ReadString_Binary(mat.tex_color->path, reader);
@ -1080,7 +1080,7 @@ void COBImporter::ReadMat1_Binary(COB::Scene &out, StreamReaderLE &reader, const
} }
if (id[0] == 'b' && id[1] == ':') { if (id[0] == 'b' && id[1] == ':') {
mat.tex_bump.reset(new Texture()); mat.tex_bump = std::make_shared<Texture>();
reader.GetI1(); reader.GetI1();
ReadString_Binary(mat.tex_bump->path, reader); ReadString_Binary(mat.tex_bump->path, reader);

View File

@ -117,7 +117,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
std::unique_ptr<IOStream> file( pIOHandler->Open( pFile, "rb")); std::unique_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if( file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError( "Failed to open CSM file ", pFile, "."); throw DeadlyImportError( "Failed to open CSM file ", pFile, ".");
} }
@ -130,7 +130,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
int first = 0, last = 0x00ffffff; int first = 0, last = 0x00ffffff;
// now process the file and look out for '$' sections // now process the file and look out for '$' sections
while (1) { while (true) {
SkipSpaces(&buffer); SkipSpaces(&buffer);
if ('\0' == *buffer) if ('\0' == *buffer)
break; break;
@ -154,7 +154,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
else if (TokenMatchI(buffer,"order",5)) { else if (TokenMatchI(buffer,"order",5)) {
std::vector< aiNodeAnim* > anims_temp; std::vector< aiNodeAnim* > anims_temp;
anims_temp.reserve(30); anims_temp.reserve(30);
while (1) { while (true) {
SkipSpaces(&buffer); SkipSpaces(&buffer);
if (IsLineEnd(*buffer) && SkipSpacesAndLineEnd(&buffer) && *buffer == '$') if (IsLineEnd(*buffer) && SkipSpacesAndLineEnd(&buffer) && *buffer == '$')
break; // next section break; // next section
@ -196,7 +196,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
unsigned int filled = 0; unsigned int filled = 0;
// Now read all point data. // Now read all point data.
while (1) { while (true) {
SkipSpaces(&buffer); SkipSpaces(&buffer);
if (IsLineEnd(*buffer) && (!SkipSpacesAndLineEnd(&buffer) || *buffer == '$')) { if (IsLineEnd(*buffer) && (!SkipSpacesAndLineEnd(&buffer) || *buffer == '$')) {
break; // next section break; // next section

View File

@ -246,7 +246,7 @@ void ColladaExporter::WriteHeader() {
} }
// Assimp root nodes can have meshes, Collada Scenes cannot // Assimp root nodes can have meshes, Collada Scenes cannot
if (mScene->mRootNode->mNumChildren == 0 || mScene->mRootNode->mMeshes != 0) { if (mScene->mRootNode->mNumChildren == 0 || mScene->mRootNode->mMeshes != nullptr) {
mAdd_root_node = true; mAdd_root_node = true;
} }

View File

@ -1264,12 +1264,12 @@ void ColladaLoader::CreateAnimation(aiScene *pScene, const ColladaParser &pParse
// now for every unique point in time, find or interpolate the key values for that time // now for every unique point in time, find or interpolate the key values for that time
// and apply them to the transform chain. Then the node's present transformation can be calculated. // and apply them to the transform chain. Then the node's present transformation can be calculated.
ai_real time = startTime; ai_real time = startTime;
while (1) { while (true) {
for (ChannelEntry & e : entries) { for (ChannelEntry & e : entries) {
// find the keyframe behind the current point in time // find the keyframe behind the current point in time
size_t pos = 0; size_t pos = 0;
ai_real postTime = 0.0; ai_real postTime = 0.0;
while (1) { while (true) {
if (pos >= e.mTimeAccessor->mCount) { if (pos >= e.mTimeAccessor->mCount) {
break; break;
} }
@ -1680,7 +1680,7 @@ aiString ColladaLoader::FindFilenameForEffectTexture(const ColladaParser &pParse
// recurse through the param references until we end up at an image // recurse through the param references until we end up at an image
std::string name = pName; std::string name = pName;
while (1) { while (true) {
// the given string is a param entry. Find it // the given string is a param entry. Find it
Effect::ParamLibrary::const_iterator it = pEffect.mParams.find(name); Effect::ParamLibrary::const_iterator it = pEffect.mParams.find(name);
// if not found, we're at the end of the recursion. The resulting string should be the image ID // if not found, we're at the end of the recursion. The resulting string should be the image ID

View File

@ -145,7 +145,7 @@ ColladaParser::ColladaParser(IOSystem *pIOHandler, const std::string &pFile) :
} else { } else {
// attempt to open the file directly // attempt to open the file directly
daefile.reset(pIOHandler->Open(pFile)); daefile.reset(pIOHandler->Open(pFile));
if (daefile.get() == nullptr) { if (daefile == nullptr) {
throw DeadlyImportError("Failed to open file '", pFile, "'."); throw DeadlyImportError("Failed to open file '", pFile, "'.");
} }
} }
@ -759,7 +759,7 @@ void ColladaParser::ReadControllerWeights(XmlNode &node, Collada::Controller &pC
XmlParser::getValueAsString(currentNode, stdText); XmlParser::getValueAsString(currentNode, stdText);
const char *text = stdText.c_str(); const char *text = stdText.c_str();
for (std::vector<std::pair<size_t, size_t>>::iterator it = pController.mWeights.begin(); it != pController.mWeights.end(); ++it) { for (std::vector<std::pair<size_t, size_t>>::iterator it = pController.mWeights.begin(); it != pController.mWeights.end(); ++it) {
if (text == 0) { if (text == nullptr) {
throw DeadlyImportError("Out of data while reading <vertex_weights>"); throw DeadlyImportError("Out of data while reading <vertex_weights>");
} }
it->first = strtoul10(text, &text); it->first = strtoul10(text, &text);

View File

@ -136,7 +136,7 @@ void DXFImporter::InternReadFile( const std::string& filename, aiScene* pScene,
std::shared_ptr<IOStream> file = std::shared_ptr<IOStream>( pIOHandler->Open( filename) ); std::shared_ptr<IOStream> file = std::shared_ptr<IOStream>( pIOHandler->Open( filename) );
// Check whether we can read the file // Check whether we can read the file
if( file.get() == nullptr ) { if (file == nullptr) {
throw DeadlyImportError( "Failed to open DXF file ", filename, ""); throw DeadlyImportError( "Failed to open DXF file ", filename, "");
} }

View File

@ -119,7 +119,7 @@ FBXConverter::FBXConverter(aiScene *out, const Document &doc, bool removeEmptyBo
if (mat) { if (mat) {
if (materials_converted.find(mat) == materials_converted.end()) { if (materials_converted.find(mat) == materials_converted.end()) {
ConvertMaterial(*mat, 0); ConvertMaterial(*mat, nullptr);
} }
} }
} }

View File

@ -78,7 +78,7 @@ const Object* LazyObject::Get(bool dieOnError) {
return nullptr; return nullptr;
} }
if (object.get()) { if (object) {
return object.get(); return object.get();
} }
@ -214,7 +214,7 @@ const Object* LazyObject::Get(bool dieOnError) {
return nullptr; return nullptr;
} }
if (!object.get()) { if (!object) {
//DOMError("failed to convert element to DOM object, class: " + classtag + ", name: " + name,&element); //DOMError("failed to convert element to DOM object, class: " + classtag + ", name: " + name,&element);
} }

View File

@ -168,7 +168,7 @@ public:
const PropertyTable& Props() const { const PropertyTable& Props() const {
ai_assert(props.get()); ai_assert(props.get());
return *props.get(); return *props;
} }
private: private:
@ -432,7 +432,7 @@ public:
const PropertyTable& Props() const { const PropertyTable& Props() const {
ai_assert(props.get()); ai_assert(props.get());
return *props.get(); return *props;
} }
/** Get material links */ /** Get material links */
@ -503,7 +503,7 @@ public:
const PropertyTable& Props() const { const PropertyTable& Props() const {
ai_assert(props.get()); ai_assert(props.get());
return *props.get(); return *props;
} }
// return a 4-tuple // return a 4-tuple
@ -618,7 +618,7 @@ public:
const PropertyTable& Props() const { const PropertyTable& Props() const {
ai_assert(props.get()); ai_assert(props.get());
return *props.get(); return *props;
} }
const uint8_t* Content() const { const uint8_t* Content() const {
@ -632,7 +632,7 @@ public:
uint8_t* RelinquishContent() { uint8_t* RelinquishContent() {
uint8_t* ptr = content; uint8_t* ptr = content;
content = 0; content = nullptr;
return ptr; return ptr;
} }
@ -663,7 +663,7 @@ public:
const PropertyTable& Props() const { const PropertyTable& Props() const {
ai_assert(props.get()); ai_assert(props.get());
return *props.get(); return *props;
} }
const TextureMap& Textures() const { const TextureMap& Textures() const {
@ -735,7 +735,7 @@ public:
const PropertyTable& Props() const { const PropertyTable& Props() const {
ai_assert(props.get()); ai_assert(props.get());
return *props.get(); return *props;
} }
@ -780,7 +780,7 @@ public:
const PropertyTable& Props() const { const PropertyTable& Props() const {
ai_assert(props.get()); ai_assert(props.get());
return *props.get(); return *props;
} }
/* the optional white list specifies a list of property names for which the caller /* the optional white list specifies a list of property names for which the caller
@ -808,7 +808,7 @@ public:
const PropertyTable& Props() const { const PropertyTable& Props() const {
ai_assert(props.get()); ai_assert(props.get());
return *props.get(); return *props;
} }
const AnimationLayerList& Layers() const { const AnimationLayerList& Layers() const {
@ -829,7 +829,7 @@ public:
const PropertyTable& Props() const { const PropertyTable& Props() const {
ai_assert(props.get()); ai_assert(props.get());
return *props.get(); return *props;
} }
private: private:
@ -1018,7 +1018,7 @@ public:
const PropertyTable& Props() const { const PropertyTable& Props() const {
ai_assert(props.get()); ai_assert(props.get());
return *props.get(); return *props;
} }
const Document& GetDocument() const { const Document& GetDocument() const {
@ -1097,7 +1097,7 @@ public:
const FileGlobalSettings& GlobalSettings() const { const FileGlobalSettings& GlobalSettings() const {
ai_assert(globals.get()); ai_assert(globals.get());
return *globals.get(); return *globals;
} }
const PropertyTemplateMap& Templates() const { const PropertyTemplateMap& Templates() const {

View File

@ -58,12 +58,11 @@ namespace Util {
/* DOM/Parse error reporting - does not return */ /* DOM/Parse error reporting - does not return */
AI_WONT_RETURN void DOMError(const std::string& message, const Token& token) AI_WONT_RETURN_SUFFIX; AI_WONT_RETURN void DOMError(const std::string& message, const Token& token) AI_WONT_RETURN_SUFFIX;
AI_WONT_RETURN void DOMError(const std::string& message, const Element* element = NULL) AI_WONT_RETURN_SUFFIX; AI_WONT_RETURN void DOMError(const std::string &message, const Element *element = nullptr) AI_WONT_RETURN_SUFFIX;
// does return // does return
void DOMWarning(const std::string& message, const Token& token); void DOMWarning(const std::string& message, const Token& token);
void DOMWarning(const std::string& message, const Element* element = NULL); void DOMWarning(const std::string &message, const Element *element = nullptr);
// fetch a property table and the corresponding property template // fetch a property table and the corresponding property template
std::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc, std::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc,

View File

@ -681,9 +681,9 @@ void FBXExporter::WriteDefinitions ()
pt = FBX::Node("PropertyTemplate", "FBXAnimLayer"); pt = FBX::Node("PropertyTemplate", "FBXAnimLayer");
p = FBX::Node("Properties70"); p = FBX::Node("Properties70");
p.AddP70("Weight", "Number", "", "A", double(100)); p.AddP70("Weight", "Number", "", "A", double(100));
p.AddP70bool("Mute", 0); p.AddP70bool("Mute", false);
p.AddP70bool("Solo", 0); p.AddP70bool("Solo", false);
p.AddP70bool("Lock", 0); p.AddP70bool("Lock", false);
p.AddP70color("Color", 0.8, 0.8, 0.8); p.AddP70color("Color", 0.8, 0.8, 0.8);
p.AddP70("BlendMode", "enum", "", "", int32_t(0)); p.AddP70("BlendMode", "enum", "", "", int32_t(0));
p.AddP70("RotationAccumulationMode", "enum", "", "", int32_t(0)); p.AddP70("RotationAccumulationMode", "enum", "", "", int32_t(0));
@ -733,42 +733,42 @@ void FBXExporter::WriteDefinitions ()
p.AddP70vector("RotationPivot", 0.0, 0.0, 0.0); p.AddP70vector("RotationPivot", 0.0, 0.0, 0.0);
p.AddP70vector("ScalingOffset", 0.0, 0.0, 0.0); p.AddP70vector("ScalingOffset", 0.0, 0.0, 0.0);
p.AddP70vector("ScalingPivot", 0.0, 0.0, 0.0); p.AddP70vector("ScalingPivot", 0.0, 0.0, 0.0);
p.AddP70bool("TranslationActive", 0); p.AddP70bool("TranslationActive", false);
p.AddP70vector("TranslationMin", 0.0, 0.0, 0.0); p.AddP70vector("TranslationMin", 0.0, 0.0, 0.0);
p.AddP70vector("TranslationMax", 0.0, 0.0, 0.0); p.AddP70vector("TranslationMax", 0.0, 0.0, 0.0);
p.AddP70bool("TranslationMinX", 0); p.AddP70bool("TranslationMinX", false);
p.AddP70bool("TranslationMinY", 0); p.AddP70bool("TranslationMinY", false);
p.AddP70bool("TranslationMinZ", 0); p.AddP70bool("TranslationMinZ", false);
p.AddP70bool("TranslationMaxX", 0); p.AddP70bool("TranslationMaxX", false);
p.AddP70bool("TranslationMaxY", 0); p.AddP70bool("TranslationMaxY", false);
p.AddP70bool("TranslationMaxZ", 0); p.AddP70bool("TranslationMaxZ", false);
p.AddP70enum("RotationOrder", 0); p.AddP70enum("RotationOrder", 0);
p.AddP70bool("RotationSpaceForLimitOnly", 0); p.AddP70bool("RotationSpaceForLimitOnly", false);
p.AddP70double("RotationStiffnessX", 0.0); p.AddP70double("RotationStiffnessX", 0.0);
p.AddP70double("RotationStiffnessY", 0.0); p.AddP70double("RotationStiffnessY", 0.0);
p.AddP70double("RotationStiffnessZ", 0.0); p.AddP70double("RotationStiffnessZ", 0.0);
p.AddP70double("AxisLen", 10.0); p.AddP70double("AxisLen", 10.0);
p.AddP70vector("PreRotation", 0.0, 0.0, 0.0); p.AddP70vector("PreRotation", 0.0, 0.0, 0.0);
p.AddP70vector("PostRotation", 0.0, 0.0, 0.0); p.AddP70vector("PostRotation", 0.0, 0.0, 0.0);
p.AddP70bool("RotationActive", 0); p.AddP70bool("RotationActive", false);
p.AddP70vector("RotationMin", 0.0, 0.0, 0.0); p.AddP70vector("RotationMin", 0.0, 0.0, 0.0);
p.AddP70vector("RotationMax", 0.0, 0.0, 0.0); p.AddP70vector("RotationMax", 0.0, 0.0, 0.0);
p.AddP70bool("RotationMinX", 0); p.AddP70bool("RotationMinX", false);
p.AddP70bool("RotationMinY", 0); p.AddP70bool("RotationMinY", false);
p.AddP70bool("RotationMinZ", 0); p.AddP70bool("RotationMinZ", false);
p.AddP70bool("RotationMaxX", 0); p.AddP70bool("RotationMaxX", false);
p.AddP70bool("RotationMaxY", 0); p.AddP70bool("RotationMaxY", false);
p.AddP70bool("RotationMaxZ", 0); p.AddP70bool("RotationMaxZ", false);
p.AddP70enum("InheritType", 0); p.AddP70enum("InheritType", 0);
p.AddP70bool("ScalingActive", 0); p.AddP70bool("ScalingActive", false);
p.AddP70vector("ScalingMin", 0.0, 0.0, 0.0); p.AddP70vector("ScalingMin", 0.0, 0.0, 0.0);
p.AddP70vector("ScalingMax", 1.0, 1.0, 1.0); p.AddP70vector("ScalingMax", 1.0, 1.0, 1.0);
p.AddP70bool("ScalingMinX", 0); p.AddP70bool("ScalingMinX", false);
p.AddP70bool("ScalingMinY", 0); p.AddP70bool("ScalingMinY", false);
p.AddP70bool("ScalingMinZ", 0); p.AddP70bool("ScalingMinZ", false);
p.AddP70bool("ScalingMaxX", 0); p.AddP70bool("ScalingMaxX", false);
p.AddP70bool("ScalingMaxY", 0); p.AddP70bool("ScalingMaxY", false);
p.AddP70bool("ScalingMaxZ", 0); p.AddP70bool("ScalingMaxZ", false);
p.AddP70vector("GeometricTranslation", 0.0, 0.0, 0.0); p.AddP70vector("GeometricTranslation", 0.0, 0.0, 0.0);
p.AddP70vector("GeometricRotation", 0.0, 0.0, 0.0); p.AddP70vector("GeometricRotation", 0.0, 0.0, 0.0);
p.AddP70vector("GeometricScaling", 1.0, 1.0, 1.0); p.AddP70vector("GeometricScaling", 1.0, 1.0, 1.0);
@ -789,11 +789,11 @@ void FBXExporter::WriteDefinitions ()
p.AddP70double("PreferedAngleZ", 0.0); p.AddP70double("PreferedAngleZ", 0.0);
p.AddP70("LookAtProperty", "object", "", ""); p.AddP70("LookAtProperty", "object", "", "");
p.AddP70("UpVectorProperty", "object", "", ""); p.AddP70("UpVectorProperty", "object", "", "");
p.AddP70bool("Show", 1); p.AddP70bool("Show", true);
p.AddP70bool("NegativePercentShapeSupport", 1); p.AddP70bool("NegativePercentShapeSupport", true);
p.AddP70int("DefaultAttributeIndex", -1); p.AddP70int("DefaultAttributeIndex", -1);
p.AddP70bool("Freeze", 0); p.AddP70bool("Freeze", false);
p.AddP70bool("LODBox", 0); p.AddP70bool("LODBox", false);
p.AddP70( p.AddP70(
"Lcl Translation", "Lcl Translation", "", "A", "Lcl Translation", "Lcl Translation", "", "A",
double(0), double(0), double(0) double(0), double(0), double(0)
@ -840,9 +840,9 @@ void FBXExporter::WriteDefinitions ()
p.AddP70color("Color", 0, 0, 0); p.AddP70color("Color", 0, 0, 0);
p.AddP70vector("BBoxMin", 0, 0, 0); p.AddP70vector("BBoxMin", 0, 0, 0);
p.AddP70vector("BBoxMax", 0, 0, 0); p.AddP70vector("BBoxMax", 0, 0, 0);
p.AddP70bool("Primary Visibility", 1); p.AddP70bool("Primary Visibility", true);
p.AddP70bool("Casts Shadows", 1); p.AddP70bool("Casts Shadows", true);
p.AddP70bool("Receive Shadows", 1); p.AddP70bool("Receive Shadows", true);
pt.AddChild(p); pt.AddChild(p);
n.AddChild(pt); n.AddChild(pt);
object_nodes.push_back(n); object_nodes.push_back(n);
@ -873,7 +873,7 @@ void FBXExporter::WriteDefinitions ()
} else { } else {
p.AddP70string("ShadingModel", "Lambert"); p.AddP70string("ShadingModel", "Lambert");
} }
p.AddP70bool("MultiLayer", 0); p.AddP70bool("MultiLayer", false);
p.AddP70colorA("EmissiveColor", 0.0, 0.0, 0.0); p.AddP70colorA("EmissiveColor", 0.0, 0.0, 0.0);
p.AddP70numberA("EmissiveFactor", 1.0); p.AddP70numberA("EmissiveFactor", 1.0);
p.AddP70colorA("AmbientColor", 0.2, 0.2, 0.2); p.AddP70colorA("AmbientColor", 0.2, 0.2, 0.2);
@ -910,7 +910,7 @@ void FBXExporter::WriteDefinitions ()
n.AddChild("Count", count); n.AddChild("Count", count);
pt = FBX::Node("PropertyTemplate", "FbxVideo"); pt = FBX::Node("PropertyTemplate", "FbxVideo");
p = FBX::Node("Properties70"); p = FBX::Node("Properties70");
p.AddP70bool("ImageSequence", 0); p.AddP70bool("ImageSequence", false);
p.AddP70int("ImageSequenceOffset", 0); p.AddP70int("ImageSequenceOffset", 0);
p.AddP70double("FrameRate", 0.0); p.AddP70double("FrameRate", 0.0);
p.AddP70int("LastFrame", 0); p.AddP70int("LastFrame", 0);
@ -922,8 +922,8 @@ void FBXExporter::WriteDefinitions ()
p.AddP70double("PlaySpeed", 0.0); p.AddP70double("PlaySpeed", 0.0);
p.AddP70time("Offset", 0); p.AddP70time("Offset", 0);
p.AddP70enum("InterlaceMode", 0); p.AddP70enum("InterlaceMode", 0);
p.AddP70bool("FreeRunning", 0); p.AddP70bool("FreeRunning", false);
p.AddP70bool("Loop", 0); p.AddP70bool("Loop", false);
p.AddP70enum("AccessMode", 0); p.AddP70enum("AccessMode", 0);
pt.AddChild(p); pt.AddChild(p);
n.AddChild(pt); n.AddChild(pt);
@ -944,8 +944,8 @@ void FBXExporter::WriteDefinitions ()
p.AddP70enum("CurrentMappingType", 0); p.AddP70enum("CurrentMappingType", 0);
p.AddP70enum("WrapModeU", 0); p.AddP70enum("WrapModeU", 0);
p.AddP70enum("WrapModeV", 0); p.AddP70enum("WrapModeV", 0);
p.AddP70bool("UVSwap", 0); p.AddP70bool("UVSwap", false);
p.AddP70bool("PremultiplyAlpha", 1); p.AddP70bool("PremultiplyAlpha", true);
p.AddP70vectorA("Translation", 0.0, 0.0, 0.0); p.AddP70vectorA("Translation", 0.0, 0.0, 0.0);
p.AddP70vectorA("Rotation", 0.0, 0.0, 0.0); p.AddP70vectorA("Rotation", 0.0, 0.0, 0.0);
p.AddP70vectorA("Scaling", 1.0, 1.0, 1.0); p.AddP70vectorA("Scaling", 1.0, 1.0, 1.0);
@ -953,8 +953,8 @@ void FBXExporter::WriteDefinitions ()
p.AddP70vector("TextureScalingPivot", 0.0, 0.0, 0.0); p.AddP70vector("TextureScalingPivot", 0.0, 0.0, 0.0);
p.AddP70enum("CurrentTextureBlendMode", 1); p.AddP70enum("CurrentTextureBlendMode", 1);
p.AddP70string("UVSet", "default"); p.AddP70string("UVSet", "default");
p.AddP70bool("UseMaterial", 0); p.AddP70bool("UseMaterial", false);
p.AddP70bool("UseMipMap", 0); p.AddP70bool("UseMipMap", false);
pt.AddChild(p); pt.AddChild(p);
n.AddChild(pt); n.AddChild(pt);
object_nodes.push_back(n); object_nodes.push_back(n);
@ -1708,7 +1708,7 @@ void FBXExporter::WriteObjects ()
p.AddP70vectorA("Scaling", trafo.mScaling[0], trafo.mScaling[1], 0.0); p.AddP70vectorA("Scaling", trafo.mScaling[0], trafo.mScaling[1], 0.0);
p.AddP70enum("CurrentTextureBlendMode", 0); // TODO: verify p.AddP70enum("CurrentTextureBlendMode", 0); // TODO: verify
//p.AddP70string("UVSet", ""); // TODO: how should this work? //p.AddP70string("UVSet", ""); // TODO: how should this work?
p.AddP70bool("UseMaterial", 1); p.AddP70bool("UseMaterial", true);
tnode.AddChild(p); tnode.AddChild(p);
// can't easily determine which texture path will be correct, // can't easily determine which texture path will be correct,
// so just store what we have in every field. // so just store what we have in every field.
@ -2501,7 +2501,7 @@ void FBXExporter::WriteModelNode(
m.AddProperties(node_uid, std::move(name), type); m.AddProperties(node_uid, std::move(name), type);
m.AddChild("Version", int32_t(232)); m.AddChild("Version", int32_t(232));
FBX::Node p("Properties70"); FBX::Node p("Properties70");
p.AddP70bool("RotationActive", 1); p.AddP70bool("RotationActive", true);
p.AddP70int("DefaultAttributeIndex", 0); p.AddP70int("DefaultAttributeIndex", 0);
p.AddP70enum("InheritType", inherit_type); p.AddP70enum("InheritType", inherit_type);
if (transform_chain.empty()) { if (transform_chain.empty()) {

View File

@ -295,7 +295,7 @@ void LayeredTexture::fillTexture(const Document& doc) {
Video::Video(uint64_t id, const Element &element, const Document &doc, const std::string &name) : Video::Video(uint64_t id, const Element &element, const Document &doc, const std::string &name) :
Object(id, element, name), Object(id, element, name),
contentLength(0), contentLength(0),
content(0) { content(nullptr) {
const Scope& sc = GetRequiredScope(element); const Scope& sc = GetRequiredScope(element);
const Element* const Type = sc["Type"]; const Element* const Type = sc["Type"];
@ -380,7 +380,6 @@ Video::Video(uint64_t id, const Element& element, const Document& doc, const std
props = GetPropertyTable(doc,"Video.FbxVideo",element,sc); props = GetPropertyTable(doc,"Video.FbxVideo",element,sc);
} }
Video::~Video() { Video::~Video() {
delete[] content; delete[] content;
} }

View File

@ -163,7 +163,7 @@ public:
~Parser() = default; ~Parser() = default;
const Scope& GetRootScope() const { const Scope& GetRootScope() const {
return *root.get(); return *root;
} }
bool IsBinary() const { bool IsBinary() const {

View File

@ -104,7 +104,7 @@ void HMPImporter::InternReadFile(const std::string &pFile,
std::unique_ptr<IOStream> file(mIOHandler->Open(pFile)); std::unique_ptr<IOStream> file(mIOHandler->Open(pFile));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open HMP file ", pFile, "."); throw DeadlyImportError("Failed to open HMP file ", pFile, ".");
} }

View File

@ -389,7 +389,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const Schema_2x3::IfcPoly
// obtain the polygonal bounding volume // obtain the polygonal bounding volume
std::shared_ptr<TempMesh> profile = std::shared_ptr<TempMesh>(new TempMesh()); std::shared_ptr<TempMesh> profile = std::shared_ptr<TempMesh>(new TempMesh());
if (!ProcessCurve(hs->PolygonalBoundary, *profile.get(), conv)) { if (!ProcessCurve(hs->PolygonalBoundary, *profile, conv)) {
IFCImporter::LogError("expected valid polyline for boundary of boolean halfspace"); IFCImporter::LogError("expected valid polyline for boundary of boolean halfspace");
return; return;
} }

View File

@ -610,7 +610,7 @@ void ProcessExtrudedArea(const Schema_2x3::IfcExtrudedAreaSolid& solid, const Te
nors.reserve(conv.apply_openings->size()); nors.reserve(conv.apply_openings->size());
for(TempOpening& t : *conv.apply_openings) { for(TempOpening& t : *conv.apply_openings) {
TempMesh& bounds = *t.profileMesh.get(); TempMesh &bounds = *t.profileMesh;
if( bounds.mVerts.size() <= 2 ) { if( bounds.mVerts.size() <= 2 ) {
nors.emplace_back(); nors.emplace_back();
@ -787,7 +787,7 @@ bool ProcessGeometricItem(const Schema_2x3::IfcRepresentationItem& geo, unsigned
const ::Assimp::STEP::EXPRESS::ENTITY& e = shell->To<::Assimp::STEP::EXPRESS::ENTITY>(); const ::Assimp::STEP::EXPRESS::ENTITY& e = shell->To<::Assimp::STEP::EXPRESS::ENTITY>();
const Schema_2x3::IfcConnectedFaceSet& fs = conv.db.MustGetObject(e).To<Schema_2x3::IfcConnectedFaceSet>(); const Schema_2x3::IfcConnectedFaceSet& fs = conv.db.MustGetObject(e).To<Schema_2x3::IfcConnectedFaceSet>();
ProcessConnectedFaceSet(fs,*meshtmp.get(),conv); ProcessConnectedFaceSet(fs, *meshtmp, conv);
} }
catch(std::bad_cast&) { catch(std::bad_cast&) {
IFCImporter::LogWarn("unexpected type error, IfcShell ought to inherit from IfcConnectedFaceSet"); IFCImporter::LogWarn("unexpected type error, IfcShell ought to inherit from IfcConnectedFaceSet");
@ -796,27 +796,27 @@ bool ProcessGeometricItem(const Schema_2x3::IfcRepresentationItem& geo, unsigned
fix_orientation = true; fix_orientation = true;
} }
else if(const Schema_2x3::IfcConnectedFaceSet* fset = geo.ToPtr<Schema_2x3::IfcConnectedFaceSet>()) { else if(const Schema_2x3::IfcConnectedFaceSet* fset = geo.ToPtr<Schema_2x3::IfcConnectedFaceSet>()) {
ProcessConnectedFaceSet(*fset,*meshtmp.get(),conv); ProcessConnectedFaceSet(*fset, *meshtmp, conv);
fix_orientation = true; fix_orientation = true;
} }
else if(const Schema_2x3::IfcSweptAreaSolid* swept = geo.ToPtr<Schema_2x3::IfcSweptAreaSolid>()) { else if(const Schema_2x3::IfcSweptAreaSolid* swept = geo.ToPtr<Schema_2x3::IfcSweptAreaSolid>()) {
ProcessSweptAreaSolid(*swept,*meshtmp.get(),conv); ProcessSweptAreaSolid(*swept, *meshtmp, conv);
} }
else if(const Schema_2x3::IfcSweptDiskSolid* disk = geo.ToPtr<Schema_2x3::IfcSweptDiskSolid>()) { else if(const Schema_2x3::IfcSweptDiskSolid* disk = geo.ToPtr<Schema_2x3::IfcSweptDiskSolid>()) {
ProcessSweptDiskSolid(*disk,*meshtmp.get(),conv); ProcessSweptDiskSolid(*disk, *meshtmp, conv);
} }
else if(const Schema_2x3::IfcManifoldSolidBrep* brep = geo.ToPtr<Schema_2x3::IfcManifoldSolidBrep>()) { else if(const Schema_2x3::IfcManifoldSolidBrep* brep = geo.ToPtr<Schema_2x3::IfcManifoldSolidBrep>()) {
ProcessConnectedFaceSet(brep->Outer,*meshtmp.get(),conv); ProcessConnectedFaceSet(brep->Outer, *meshtmp, conv);
fix_orientation = true; fix_orientation = true;
} }
else if(const Schema_2x3::IfcFaceBasedSurfaceModel* surf = geo.ToPtr<Schema_2x3::IfcFaceBasedSurfaceModel>()) { else if(const Schema_2x3::IfcFaceBasedSurfaceModel* surf = geo.ToPtr<Schema_2x3::IfcFaceBasedSurfaceModel>()) {
for(const Schema_2x3::IfcConnectedFaceSet& fc : surf->FbsmFaces) { for(const Schema_2x3::IfcConnectedFaceSet& fc : surf->FbsmFaces) {
ProcessConnectedFaceSet(fc,*meshtmp.get(),conv); ProcessConnectedFaceSet(fc, *meshtmp, conv);
} }
fix_orientation = true; fix_orientation = true;
} }
else if(const Schema_2x3::IfcBooleanResult* boolean = geo.ToPtr<Schema_2x3::IfcBooleanResult>()) { else if(const Schema_2x3::IfcBooleanResult* boolean = geo.ToPtr<Schema_2x3::IfcBooleanResult>()) {
ProcessBoolean(*boolean,*meshtmp.get(),conv); ProcessBoolean(*boolean, *meshtmp, conv);
} }
else if(geo.ToPtr<Schema_2x3::IfcBoundingBox>()) { else if(geo.ToPtr<Schema_2x3::IfcBoundingBox>()) {
// silently skip over bounding boxes // silently skip over bounding boxes

View File

@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <iterator> #include <iterator>
#include <limits> #include <limits>
#include <memory>
#include <tuple> #include <tuple>
#ifndef ASSIMP_BUILD_NO_COMPRESSED_IFC #ifndef ASSIMP_BUILD_NO_COMPRESSED_IFC
@ -186,7 +187,7 @@ void IFCImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
// get file size, etc. // get file size, etc.
unz_file_info fileInfo; unz_file_info fileInfo;
char filename[256]; char filename[256];
unzGetCurrentFileInfo(zip, &fileInfo, filename, sizeof(filename), 0, 0, 0, 0); unzGetCurrentFileInfo(zip, &fileInfo, filename, sizeof(filename), nullptr, 0, nullptr, 0);
if (GetExtension(filename) != "ifc") { if (GetExtension(filename) != "ifc") {
continue; continue;
} }
@ -211,7 +212,7 @@ void IFCImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
ThrowException("Failed to decompress IFC ZIP file"); ThrowException("Failed to decompress IFC ZIP file");
} }
unzCloseCurrentFile(zip); unzCloseCurrentFile(zip);
stream.reset(new MemoryIOStream(buff, fileInfo.uncompressed_size, true)); stream = std::make_shared<MemoryIOStream>(buff, fileInfo.uncompressed_size, true);
if (unzGoToNextFile(zip) == UNZ_END_OF_LIST_OF_FILE) { if (unzGoToNextFile(zip) == UNZ_END_OF_LIST_OF_FILE) {
ThrowException("Found no IFC file member in IFCZIP file (1)"); ThrowException("Found no IFC file member in IFCZIP file (1)");
} }

View File

@ -1065,27 +1065,27 @@ template <> size_t GenericFill<IfcRoot>(const DB& db, const LIST& params, IfcRoo
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRoot,4>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRoot,4>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->GlobalId, arg, db ); break; } try { GenericConvert( in->GlobalId, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRoot to be a `IfcGloballyUniqueId`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRoot to be a `IfcGloballyUniqueId`")); }
} while(0); } while (false);
do { // convert the 'OwnerHistory' argument do { // convert the 'OwnerHistory' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRoot,4>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRoot,4>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->OwnerHistory, arg, db ); break; } try { GenericConvert( in->OwnerHistory, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRoot to be a `IfcOwnerHistory`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRoot to be a `IfcOwnerHistory`")); }
} while(0); } while (false);
do { // convert the 'Name' argument do { // convert the 'Name' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRoot,4>::aux_is_derived[2]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRoot,4>::aux_is_derived[2]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Name, arg, db ); break; } try { GenericConvert( in->Name, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcRoot to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcRoot to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'Description' argument do { // convert the 'Description' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRoot,4>::aux_is_derived[3]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRoot,4>::aux_is_derived[3]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Description, arg, db ); break; } try { GenericConvert( in->Description, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRoot to be a `IfcText`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRoot to be a `IfcText`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1152,27 +1152,27 @@ template <> size_t GenericFill<IfcRepresentation>(const DB& db, const LIST& para
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRepresentation,4>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRepresentation,4>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->ContextOfItems, arg, db ); break; } try { GenericConvert( in->ContextOfItems, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRepresentation to be a `IfcRepresentationContext`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRepresentation to be a `IfcRepresentationContext`")); }
} while(0); } while (false);
do { // convert the 'RepresentationIdentifier' argument do { // convert the 'RepresentationIdentifier' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRepresentation,4>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRepresentation,4>::aux_is_derived[1]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->RepresentationIdentifier, arg, db ); break; } try { GenericConvert( in->RepresentationIdentifier, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRepresentation to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRepresentation to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'RepresentationType' argument do { // convert the 'RepresentationType' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRepresentation,4>::aux_is_derived[2]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRepresentation,4>::aux_is_derived[2]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->RepresentationType, arg, db ); break; } try { GenericConvert( in->RepresentationType, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcRepresentation to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcRepresentation to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'Items' argument do { // convert the 'Items' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRepresentation,4>::aux_is_derived[3]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRepresentation,4>::aux_is_derived[3]=true; break; }
try { GenericConvert( in->Items, arg, db ); break; } try { GenericConvert( in->Items, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRepresentation to be a `SET [1:?] OF IfcRepresentationItem`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRepresentation to be a `SET [1:?] OF IfcRepresentationItem`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1239,7 +1239,7 @@ template <> size_t GenericFill<IfcObject>(const DB& db, const LIST& params, IfcO
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->ObjectType, arg, db ); break; } try { GenericConvert( in->ObjectType, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcObject to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcObject to be a `IfcLabel`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1292,20 +1292,20 @@ template <> size_t GenericFill<IfcProductRepresentation>(const DB& db, const LIS
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Name, arg, db ); break; } try { GenericConvert( in->Name, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProductRepresentation to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProductRepresentation to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'Description' argument do { // convert the 'Description' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProductRepresentation,3>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProductRepresentation,3>::aux_is_derived[1]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Description, arg, db ); break; } try { GenericConvert( in->Description, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcProductRepresentation to be a `IfcText`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcProductRepresentation to be a `IfcText`")); }
} while(0); } while (false);
do { // convert the 'Representations' argument do { // convert the 'Representations' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProductRepresentation,3>::aux_is_derived[2]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProductRepresentation,3>::aux_is_derived[2]=true; break; }
try { GenericConvert( in->Representations, arg, db ); break; } try { GenericConvert( in->Representations, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcProductRepresentation to be a `LIST [1:?] OF IfcRepresentation`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcProductRepresentation to be a `LIST [1:?] OF IfcRepresentation`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1318,14 +1318,14 @@ template <> size_t GenericFill<IfcProduct>(const DB& db, const LIST& params, Ifc
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->ObjectPlacement, arg, db ); break; } try { GenericConvert( in->ObjectPlacement, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcProduct to be a `IfcObjectPlacement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcProduct to be a `IfcObjectPlacement`")); }
} while(0); } while (false);
do { // convert the 'Representation' argument do { // convert the 'Representation' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProduct,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProduct,2>::aux_is_derived[1]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Representation, arg, db ); break; } try { GenericConvert( in->Representation, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcProduct to be a `IfcProductRepresentation`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcProduct to be a `IfcProductRepresentation`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1338,7 +1338,7 @@ template <> size_t GenericFill<IfcElement>(const DB& db, const LIST& params, Ifc
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Tag, arg, db ); break; } try { GenericConvert( in->Tag, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcElement to be a `IfcIdentifier`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcElement to be a `IfcIdentifier`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1376,13 +1376,13 @@ template <> size_t GenericFill<IfcCompositeCurve>(const DB& db, const LIST& para
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCompositeCurve,2>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCompositeCurve,2>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Segments, arg, db ); break; } try { GenericConvert( in->Segments, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCompositeCurve to be a `LIST [1:?] OF IfcCompositeCurveSegment`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCompositeCurve to be a `LIST [1:?] OF IfcCompositeCurveSegment`")); }
} while(0); } while (false);
do { // convert the 'SelfIntersect' argument do { // convert the 'SelfIntersect' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCompositeCurve,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCompositeCurve,2>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->SelfIntersect, arg, db ); break; } try { GenericConvert( in->SelfIntersect, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCompositeCurve to be a `LOGICAL`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCompositeCurve to be a `LOGICAL`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1402,27 +1402,27 @@ template <> size_t GenericFill<IfcCartesianTransformationOperator>(const DB& db,
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Axis1, arg, db ); break; } try { GenericConvert( in->Axis1, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCartesianTransformationOperator to be a `IfcDirection`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCartesianTransformationOperator to be a `IfcDirection`")); }
} while(0); } while (false);
do { // convert the 'Axis2' argument do { // convert the 'Axis2' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCartesianTransformationOperator,4>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCartesianTransformationOperator,4>::aux_is_derived[1]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Axis2, arg, db ); break; } try { GenericConvert( in->Axis2, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCartesianTransformationOperator to be a `IfcDirection`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCartesianTransformationOperator to be a `IfcDirection`")); }
} while(0); } while (false);
do { // convert the 'LocalOrigin' argument do { // convert the 'LocalOrigin' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCartesianTransformationOperator,4>::aux_is_derived[2]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCartesianTransformationOperator,4>::aux_is_derived[2]=true; break; }
try { GenericConvert( in->LocalOrigin, arg, db ); break; } try { GenericConvert( in->LocalOrigin, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcCartesianTransformationOperator to be a `IfcCartesianPoint`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcCartesianTransformationOperator to be a `IfcCartesianPoint`")); }
} while(0); } while (false);
do { // convert the 'Scale' argument do { // convert the 'Scale' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCartesianTransformationOperator,4>::aux_is_derived[3]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCartesianTransformationOperator,4>::aux_is_derived[3]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Scale, arg, db ); break; } try { GenericConvert( in->Scale, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcCartesianTransformationOperator to be a `REAL`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcCartesianTransformationOperator to be a `REAL`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1435,7 +1435,7 @@ template <> size_t GenericFill<IfcCartesianTransformationOperator3D>(const DB& d
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Axis3, arg, db ); break; } try { GenericConvert( in->Axis3, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcCartesianTransformationOperator3D to be a `IfcDirection`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcCartesianTransformationOperator3D to be a `IfcDirection`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1447,14 +1447,14 @@ template <> size_t GenericFill<IfcProperty>(const DB& db, const LIST& params, If
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProperty,2>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProperty,2>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Name, arg, db ); break; } try { GenericConvert( in->Name, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProperty to be a `IfcIdentifier`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProperty to be a `IfcIdentifier`")); }
} while(0); } while (false);
do { // convert the 'Description' argument do { // convert the 'Description' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProperty,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProperty,2>::aux_is_derived[1]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Description, arg, db ); break; } try { GenericConvert( in->Description, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcProperty to be a `IfcText`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcProperty to be a `IfcText`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1499,7 +1499,7 @@ template <> size_t GenericFill<IfcElementarySurface>(const DB& db, const LIST& p
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcElementarySurface,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcElementarySurface,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Position, arg, db ); break; } try { GenericConvert( in->Position, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcElementarySurface to be a `IfcAxis2Placement3D`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcElementarySurface to be a `IfcAxis2Placement3D`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1517,19 +1517,19 @@ template <> size_t GenericFill<IfcBooleanResult>(const DB& db, const LIST& param
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBooleanResult,3>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBooleanResult,3>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Operator, arg, db ); break; } try { GenericConvert( in->Operator, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcBooleanResult to be a `IfcBooleanOperator`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcBooleanResult to be a `IfcBooleanOperator`")); }
} while(0); } while (false);
do { // convert the 'FirstOperand' argument do { // convert the 'FirstOperand' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBooleanResult,3>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBooleanResult,3>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->FirstOperand, arg, db ); break; } try { GenericConvert( in->FirstOperand, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcBooleanResult to be a `IfcBooleanOperand`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcBooleanResult to be a `IfcBooleanOperand`")); }
} while(0); } while (false);
do { // convert the 'SecondOperand' argument do { // convert the 'SecondOperand' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBooleanResult,3>::aux_is_derived[2]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBooleanResult,3>::aux_is_derived[2]=true; break; }
try { GenericConvert( in->SecondOperand, arg, db ); break; } try { GenericConvert( in->SecondOperand, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcBooleanResult to be a `IfcBooleanOperand`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcBooleanResult to be a `IfcBooleanOperand`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1553,7 +1553,7 @@ template <> size_t GenericFill<IfcManifoldSolidBrep>(const DB& db, const LIST& p
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcManifoldSolidBrep,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcManifoldSolidBrep,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Outer, arg, db ); break; } try { GenericConvert( in->Outer, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcManifoldSolidBrep to be a `IfcClosedShell`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcManifoldSolidBrep to be a `IfcClosedShell`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1632,12 +1632,12 @@ template <> size_t GenericFill<IfcRelFillsElement>(const DB& db, const LIST& par
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->RelatingOpeningElement, arg, db ); break; } try { GenericConvert( in->RelatingOpeningElement, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelFillsElement to be a `IfcOpeningElement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelFillsElement to be a `IfcOpeningElement`")); }
} while(0); } while (false);
do { // convert the 'RelatedBuildingElement' argument do { // convert the 'RelatedBuildingElement' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->RelatedBuildingElement, arg, db ); break; } try { GenericConvert( in->RelatedBuildingElement, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelFillsElement to be a `IfcElement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelFillsElement to be a `IfcElement`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1683,12 +1683,12 @@ template <> size_t GenericFill<IfcRelContainedInSpatialStructure>(const DB& db,
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->RelatedElements, arg, db ); break; } try { GenericConvert( in->RelatedElements, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelContainedInSpatialStructure to be a `SET [1:?] OF IfcProduct`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelContainedInSpatialStructure to be a `SET [1:?] OF IfcProduct`")); }
} while(0); } while (false);
do { // convert the 'RelatingStructure' argument do { // convert the 'RelatingStructure' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->RelatingStructure, arg, db ); break; } try { GenericConvert( in->RelatingStructure, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelContainedInSpatialStructure to be a `IfcSpatialStructureElement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelContainedInSpatialStructure to be a `IfcSpatialStructureElement`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1774,7 +1774,7 @@ template <> size_t GenericFill<IfcDirection>(const DB& db, const LIST& params, I
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->DirectionRatios, arg, db ); break; } try { GenericConvert( in->DirectionRatios, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcDirection to be a `LIST [2:3] OF REAL`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcDirection to be a `LIST [2:3] OF REAL`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1786,14 +1786,14 @@ template <> size_t GenericFill<IfcProfileDef>(const DB& db, const LIST& params,
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProfileDef,2>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProfileDef,2>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->ProfileType, arg, db ); break; } try { GenericConvert( in->ProfileType, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProfileDef to be a `IfcProfileTypeEnum`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProfileDef to be a `IfcProfileTypeEnum`")); }
} while(0); } while (false);
do { // convert the 'ProfileName' argument do { // convert the 'ProfileName' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProfileDef,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcProfileDef,2>::aux_is_derived[1]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->ProfileName, arg, db ); break; } try { GenericConvert( in->ProfileName, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcProfileDef to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcProfileDef to be a `IfcLabel`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1805,7 +1805,7 @@ template <> size_t GenericFill<IfcParameterizedProfileDef>(const DB& db, const L
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcParameterizedProfileDef,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcParameterizedProfileDef,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Position, arg, db ); break; } try { GenericConvert( in->Position, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcParameterizedProfileDef to be a `IfcAxis2Placement2D`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcParameterizedProfileDef to be a `IfcAxis2Placement2D`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1912,7 +1912,7 @@ template <> size_t GenericFill<IfcCircleProfileDef>(const DB& db, const LIST& pa
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCircleProfileDef,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcCircleProfileDef,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Radius, arg, db ); break; } try { GenericConvert( in->Radius, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcCircleProfileDef to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcCircleProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1923,7 +1923,7 @@ template <> size_t GenericFill<IfcCircleHollowProfileDef>(const DB& db, const LI
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->WallThickness, arg, db ); break; } try { GenericConvert( in->WallThickness, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcCircleHollowProfileDef to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcCircleHollowProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1935,7 +1935,7 @@ template <> size_t GenericFill<IfcPlacement>(const DB& db, const LIST& params, I
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcPlacement,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcPlacement,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Location, arg, db ); break; } try { GenericConvert( in->Location, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPlacement to be a `IfcCartesianPoint`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPlacement to be a `IfcCartesianPoint`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1947,13 +1947,13 @@ template <> size_t GenericFill<IfcAxis2Placement3D>(const DB& db, const LIST& pa
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Axis, arg, db ); break; } try { GenericConvert( in->Axis, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcAxis2Placement3D to be a `IfcDirection`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcAxis2Placement3D to be a `IfcDirection`")); }
} while(0); } while (false);
do { // convert the 'RefDirection' argument do { // convert the 'RefDirection' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->RefDirection, arg, db ); break; } try { GenericConvert( in->RefDirection, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcAxis2Placement3D to be a `IfcDirection`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcAxis2Placement3D to be a `IfcDirection`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1966,7 +1966,7 @@ template <> size_t GenericFill<IfcPresentationStyle>(const DB& db, const LIST& p
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Name, arg, db ); break; } try { GenericConvert( in->Name, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPresentationStyle to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPresentationStyle to be a `IfcLabel`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1984,17 +1984,17 @@ template <> size_t GenericFill<IfcCompositeCurveSegment>(const DB& db, const LIS
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Transition, arg, db ); break; } try { GenericConvert( in->Transition, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCompositeCurveSegment to be a `IfcTransitionCode`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCompositeCurveSegment to be a `IfcTransitionCode`")); }
} while(0); } while (false);
do { // convert the 'SameSense' argument do { // convert the 'SameSense' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->SameSense, arg, db ); break; } try { GenericConvert( in->SameSense, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCompositeCurveSegment to be a `BOOLEAN`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCompositeCurveSegment to be a `BOOLEAN`")); }
} while(0); } while (false);
do { // convert the 'ParentCurve' argument do { // convert the 'ParentCurve' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->ParentCurve, arg, db ); break; } try { GenericConvert( in->ParentCurve, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcCompositeCurveSegment to be a `IfcCurve`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcCompositeCurveSegment to be a `IfcCurve`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2006,13 +2006,13 @@ template <> size_t GenericFill<IfcRectangleProfileDef>(const DB& db, const LIST&
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRectangleProfileDef,2>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRectangleProfileDef,2>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->XDim, arg, db ); break; } try { GenericConvert( in->XDim, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRectangleProfileDef to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRectangleProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'YDim' argument do { // convert the 'YDim' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRectangleProfileDef,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRectangleProfileDef,2>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->YDim, arg, db ); break; } try { GenericConvert( in->YDim, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRectangleProfileDef to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRectangleProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2108,12 +2108,12 @@ template <> size_t GenericFill<IfcLocalPlacement>(const DB& db, const LIST& para
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->PlacementRelTo, arg, db ); break; } try { GenericConvert( in->PlacementRelTo, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcLocalPlacement to be a `IfcObjectPlacement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcLocalPlacement to be a `IfcObjectPlacement`")); }
} while(0); } while (false);
do { // convert the 'RelativePlacement' argument do { // convert the 'RelativePlacement' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->RelativePlacement, arg, db ); break; } try { GenericConvert( in->RelativePlacement, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcLocalPlacement to be a `IfcAxis2Placement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcLocalPlacement to be a `IfcAxis2Placement`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2125,13 +2125,13 @@ template <> size_t GenericFill<IfcSweptAreaSolid>(const DB& db, const LIST& para
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcSweptAreaSolid,2>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcSweptAreaSolid,2>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->SweptArea, arg, db ); break; } try { GenericConvert( in->SweptArea, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSweptAreaSolid to be a `IfcProfileDef`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSweptAreaSolid to be a `IfcProfileDef`")); }
} while(0); } while (false);
do { // convert the 'Position' argument do { // convert the 'Position' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcSweptAreaSolid,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcSweptAreaSolid,2>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->Position, arg, db ); break; } try { GenericConvert( in->Position, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSweptAreaSolid to be a `IfcAxis2Placement3D`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSweptAreaSolid to be a `IfcAxis2Placement3D`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2142,12 +2142,12 @@ template <> size_t GenericFill<IfcRevolvedAreaSolid>(const DB& db, const LIST& p
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Axis, arg, db ); break; } try { GenericConvert( in->Axis, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcRevolvedAreaSolid to be a `IfcAxis1Placement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcRevolvedAreaSolid to be a `IfcAxis1Placement`")); }
} while(0); } while (false);
do { // convert the 'Angle' argument do { // convert the 'Angle' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Angle, arg, db ); break; } try { GenericConvert( in->Angle, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRevolvedAreaSolid to be a `IfcPlaneAngleMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcRevolvedAreaSolid to be a `IfcPlaneAngleMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2172,28 +2172,28 @@ template <> size_t GenericFill<IfcSweptDiskSolid>(const DB& db, const LIST& para
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Directrix, arg, db ); break; } try { GenericConvert( in->Directrix, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSweptDiskSolid to be a `IfcCurve`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSweptDiskSolid to be a `IfcCurve`")); }
} while(0); } while (false);
do { // convert the 'Radius' argument do { // convert the 'Radius' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Radius, arg, db ); break; } try { GenericConvert( in->Radius, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSweptDiskSolid to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSweptDiskSolid to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'InnerRadius' argument do { // convert the 'InnerRadius' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->InnerRadius, arg, db ); break; } try { GenericConvert( in->InnerRadius, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSweptDiskSolid to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSweptDiskSolid to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'StartParam' argument do { // convert the 'StartParam' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->StartParam, arg, db ); break; } try { GenericConvert( in->StartParam, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcSweptDiskSolid to be a `IfcParameterValue`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcSweptDiskSolid to be a `IfcParameterValue`")); }
} while(0); } while (false);
do { // convert the 'EndParam' argument do { // convert the 'EndParam' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->EndParam, arg, db ); break; } try { GenericConvert( in->EndParam, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcSweptDiskSolid to be a `IfcParameterValue`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcSweptDiskSolid to be a `IfcParameterValue`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2205,13 +2205,13 @@ template <> size_t GenericFill<IfcHalfSpaceSolid>(const DB& db, const LIST& para
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcHalfSpaceSolid,2>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcHalfSpaceSolid,2>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->BaseSurface, arg, db ); break; } try { GenericConvert( in->BaseSurface, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcHalfSpaceSolid to be a `IfcSurface`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcHalfSpaceSolid to be a `IfcSurface`")); }
} while(0); } while (false);
do { // convert the 'AgreementFlag' argument do { // convert the 'AgreementFlag' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcHalfSpaceSolid,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcHalfSpaceSolid,2>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->AgreementFlag, arg, db ); break; } try { GenericConvert( in->AgreementFlag, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcHalfSpaceSolid to be a `BOOLEAN`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcHalfSpaceSolid to be a `BOOLEAN`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2222,12 +2222,12 @@ template <> size_t GenericFill<IfcPolygonalBoundedHalfSpace>(const DB& db, const
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Position, arg, db ); break; } try { GenericConvert( in->Position, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcPolygonalBoundedHalfSpace to be a `IfcAxis2Placement3D`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcPolygonalBoundedHalfSpace to be a `IfcAxis2Placement3D`")); }
} while(0); } while (false);
do { // convert the 'PolygonalBoundary' argument do { // convert the 'PolygonalBoundary' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->PolygonalBoundary, arg, db ); break; } try { GenericConvert( in->PolygonalBoundary, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcPolygonalBoundedHalfSpace to be a `IfcBoundedCurve`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcPolygonalBoundedHalfSpace to be a `IfcBoundedCurve`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2253,23 +2253,23 @@ template <> size_t GenericFill<IfcProject>(const DB& db, const LIST& params, Ifc
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->LongName, arg, db ); break; } try { GenericConvert( in->LongName, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcProject to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcProject to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'Phase' argument do { // convert the 'Phase' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Phase, arg, db ); break; } try { GenericConvert( in->Phase, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcProject to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcProject to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'RepresentationContexts' argument do { // convert the 'RepresentationContexts' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->RepresentationContexts, arg, db ); break; } try { GenericConvert( in->RepresentationContexts, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcProject to be a `SET [1:?] OF IfcRepresentationContext`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcProject to be a `SET [1:?] OF IfcRepresentationContext`")); }
} while(0); } while (false);
do { // convert the 'UnitsInContext' argument do { // convert the 'UnitsInContext' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->UnitsInContext, arg, db ); break; } try { GenericConvert( in->UnitsInContext, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcProject to be a `IfcUnitAssignment`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcProject to be a `IfcUnitAssignment`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2329,27 +2329,27 @@ template <> size_t GenericFill<IfcTrimmedCurve>(const DB& db, const LIST& params
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->BasisCurve, arg, db ); break; } try { GenericConvert( in->BasisCurve, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcTrimmedCurve to be a `IfcCurve`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcTrimmedCurve to be a `IfcCurve`")); }
} while(0); } while (false);
do { // convert the 'Trim1' argument do { // convert the 'Trim1' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Trim1, arg, db ); break; } try { GenericConvert( in->Trim1, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcTrimmedCurve to be a `SET [1:2] OF IfcTrimmingSelect`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcTrimmedCurve to be a `SET [1:2] OF IfcTrimmingSelect`")); }
} while(0); } while (false);
do { // convert the 'Trim2' argument do { // convert the 'Trim2' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Trim2, arg, db ); break; } try { GenericConvert( in->Trim2, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcTrimmedCurve to be a `SET [1:2] OF IfcTrimmingSelect`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcTrimmedCurve to be a `SET [1:2] OF IfcTrimmingSelect`")); }
} while(0); } while (false);
do { // convert the 'SenseAgreement' argument do { // convert the 'SenseAgreement' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->SenseAgreement, arg, db ); break; } try { GenericConvert( in->SenseAgreement, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcTrimmedCurve to be a `BOOLEAN`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcTrimmedCurve to be a `BOOLEAN`")); }
} while(0); } while (false);
do { // convert the 'MasterRepresentation' argument do { // convert the 'MasterRepresentation' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->MasterRepresentation, arg, db ); break; } try { GenericConvert( in->MasterRepresentation, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcTrimmedCurve to be a `IfcTrimmingPreference`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcTrimmedCurve to be a `IfcTrimmingPreference`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2361,7 +2361,7 @@ template <> size_t GenericFill<IfcRelDefines>(const DB& db, const LIST& params,
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRelDefines,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRelDefines,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->RelatedObjects, arg, db ); break; } try { GenericConvert( in->RelatedObjects, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelDefines to be a `SET [1:?] OF IfcObject`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelDefines to be a `SET [1:?] OF IfcObject`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2373,7 +2373,7 @@ template <> size_t GenericFill<IfcRelDefinesByProperties>(const DB& db, const LI
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRelDefinesByProperties,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRelDefinesByProperties,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->RelatingPropertyDefinition, arg, db ); break; } try { GenericConvert( in->RelatingPropertyDefinition, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelDefinesByProperties to be a `IfcPropertySetDefinition`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelDefinesByProperties to be a `IfcPropertySetDefinition`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2406,7 +2406,7 @@ template <> size_t GenericFill<IfcArbitraryOpenProfileDef>(const DB& db, const L
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcArbitraryOpenProfileDef,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcArbitraryOpenProfileDef,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Curve, arg, db ); break; } try { GenericConvert( in->Curve, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcArbitraryOpenProfileDef to be a `IfcBoundedCurve`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcArbitraryOpenProfileDef to be a `IfcBoundedCurve`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2572,13 +2572,13 @@ template <> size_t GenericFill<IfcRelDecomposes>(const DB& db, const LIST& param
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRelDecomposes,2>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRelDecomposes,2>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->RelatingObject, arg, db ); break; } try { GenericConvert( in->RelatingObject, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelDecomposes to be a `IfcObjectDefinition`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelDecomposes to be a `IfcObjectDefinition`")); }
} while(0); } while (false);
do { // convert the 'RelatedObjects' argument do { // convert the 'RelatedObjects' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRelDecomposes,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRelDecomposes,2>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->RelatedObjects, arg, db ); break; } try { GenericConvert( in->RelatedObjects, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelDecomposes to be a `SET [1:?] OF IfcObjectDefinition`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelDecomposes to be a `SET [1:?] OF IfcObjectDefinition`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2596,7 +2596,7 @@ template <> size_t GenericFill<IfcPolyline>(const DB& db, const LIST& params, If
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Points, arg, db ); break; } try { GenericConvert( in->Points, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPolyline to be a `LIST [2:?] OF IfcCartesianPoint`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPolyline to be a `LIST [2:?] OF IfcCartesianPoint`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2628,12 +2628,12 @@ template <> size_t GenericFill<IfcMappedItem>(const DB& db, const LIST& params,
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->MappingSource, arg, db ); break; } try { GenericConvert( in->MappingSource, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcMappedItem to be a `IfcRepresentationMap`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcMappedItem to be a `IfcRepresentationMap`")); }
} while(0); } while (false);
do { // convert the 'MappingTarget' argument do { // convert the 'MappingTarget' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->MappingTarget, arg, db ); break; } try { GenericConvert( in->MappingTarget, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcMappedItem to be a `IfcCartesianTransformationOperator`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcMappedItem to be a `IfcCartesianTransformationOperator`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2660,13 +2660,13 @@ template <> size_t GenericFill<IfcNamedUnit>(const DB& db, const LIST& params, I
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcNamedUnit,2>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcNamedUnit,2>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Dimensions, arg, db ); break; } try { GenericConvert( in->Dimensions, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcNamedUnit to be a `IfcDimensionalExponents`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcNamedUnit to be a `IfcDimensionalExponents`")); }
} while(0); } while (false);
do { // convert the 'UnitType' argument do { // convert the 'UnitType' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcNamedUnit,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcNamedUnit,2>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->UnitType, arg, db ); break; } try { GenericConvert( in->UnitType, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcNamedUnit to be a `IfcUnitEnum`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcNamedUnit to be a `IfcUnitEnum`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2721,13 +2721,13 @@ template <> size_t GenericFill<IfcSpatialStructureElement>(const DB& db, const L
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->LongName, arg, db ); break; } try { GenericConvert( in->LongName, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcSpatialStructureElement to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcSpatialStructureElement to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'CompositionType' argument do { // convert the 'CompositionType' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcSpatialStructureElement,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcSpatialStructureElement,2>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->CompositionType, arg, db ); break; } try { GenericConvert( in->CompositionType, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcSpatialStructureElement to be a `IfcElementCompositionEnum`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcSpatialStructureElement to be a `IfcElementCompositionEnum`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2739,19 +2739,19 @@ template <> size_t GenericFill<IfcBuilding>(const DB& db, const LIST& params, If
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->ElevationOfRefHeight, arg, db ); break; } try { GenericConvert( in->ElevationOfRefHeight, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcBuilding to be a `IfcLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcBuilding to be a `IfcLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'ElevationOfTerrain' argument do { // convert the 'ElevationOfTerrain' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->ElevationOfTerrain, arg, db ); break; } try { GenericConvert( in->ElevationOfTerrain, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to IfcBuilding to be a `IfcLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to IfcBuilding to be a `IfcLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'BuildingAddress' argument do { // convert the 'BuildingAddress' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->BuildingAddress, arg, db ); break; } try { GenericConvert( in->BuildingAddress, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 11 to IfcBuilding to be a `IfcPostalAddress`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 11 to IfcBuilding to be a `IfcPostalAddress`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2763,7 +2763,7 @@ template <> size_t GenericFill<IfcConnectedFaceSet>(const DB& db, const LIST& pa
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcConnectedFaceSet,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcConnectedFaceSet,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->CfsFaces, arg, db ); break; } try { GenericConvert( in->CfsFaces, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcConnectedFaceSet to be a `SET [1:?] OF IfcFace`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcConnectedFaceSet to be a `SET [1:?] OF IfcFace`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2789,7 +2789,7 @@ template <> size_t GenericFill<IfcConic>(const DB& db, const LIST& params, IfcCo
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcConic,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcConic,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Position, arg, db ); break; } try { GenericConvert( in->Position, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcConic to be a `IfcAxis2Placement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcConic to be a `IfcAxis2Placement`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2836,32 +2836,32 @@ template <> size_t GenericFill<IfcIShapeProfileDef>(const DB& db, const LIST& pa
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->OverallWidth, arg, db ); break; } try { GenericConvert( in->OverallWidth, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'OverallDepth' argument do { // convert the 'OverallDepth' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->OverallDepth, arg, db ); break; } try { GenericConvert( in->OverallDepth, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'WebThickness' argument do { // convert the 'WebThickness' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[2]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[2]=true; break; }
try { GenericConvert( in->WebThickness, arg, db ); break; } try { GenericConvert( in->WebThickness, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'FlangeThickness' argument do { // convert the 'FlangeThickness' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[3]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[3]=true; break; }
try { GenericConvert( in->FlangeThickness, arg, db ); break; } try { GenericConvert( in->FlangeThickness, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'FilletRadius' argument do { // convert the 'FilletRadius' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[4]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcIShapeProfileDef,5>::aux_is_derived[4]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->FilletRadius, arg, db ); break; } try { GenericConvert( in->FilletRadius, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcIShapeProfileDef to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2935,13 +2935,13 @@ template <> size_t GenericFill<IfcPropertyListValue>(const DB& db, const LIST& p
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->ListValues, arg, db ); break; } try { GenericConvert( in->ListValues, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcPropertyListValue to be a `LIST [1:?] OF IfcValue`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcPropertyListValue to be a `LIST [1:?] OF IfcValue`")); }
} while(0); } while (false);
do { // convert the 'Unit' argument do { // convert the 'Unit' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Unit, arg, db ); break; } try { GenericConvert( in->Unit, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcPropertyListValue to be a `IfcUnit`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcPropertyListValue to be a `IfcUnit`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2967,13 +2967,13 @@ template <> size_t GenericFill<IfcDoor>(const DB& db, const LIST& params, IfcDoo
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->OverallHeight, arg, db ); break; } try { GenericConvert( in->OverallHeight, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcDoor to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcDoor to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'OverallWidth' argument do { // convert the 'OverallWidth' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->OverallWidth, arg, db ); break; } try { GenericConvert( in->OverallWidth, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcDoor to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcDoor to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -2986,20 +2986,20 @@ template <> size_t GenericFill<IfcStyledItem>(const DB& db, const LIST& params,
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Item, arg, db ); break; } try { GenericConvert( in->Item, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcStyledItem to be a `IfcRepresentationItem`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcStyledItem to be a `IfcRepresentationItem`")); }
} while(0); } while (false);
do { // convert the 'Styles' argument do { // convert the 'Styles' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcStyledItem,3>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcStyledItem,3>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->Styles, arg, db ); break; } try { GenericConvert( in->Styles, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcStyledItem to be a `SET [1:?] OF IfcPresentationStyleAssignment`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcStyledItem to be a `SET [1:?] OF IfcPresentationStyleAssignment`")); }
} while(0); } while (false);
do { // convert the 'Name' argument do { // convert the 'Name' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcStyledItem,3>::aux_is_derived[2]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcStyledItem,3>::aux_is_derived[2]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Name, arg, db ); break; } try { GenericConvert( in->Name, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcStyledItem to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcStyledItem to be a `IfcLabel`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -3025,7 +3025,7 @@ template <> size_t GenericFill<IfcArbitraryClosedProfileDef>(const DB& db, const
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcArbitraryClosedProfileDef,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcArbitraryClosedProfileDef,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->OuterCurve, arg, db ); break; } try { GenericConvert( in->OuterCurve, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcArbitraryClosedProfileDef to be a `IfcCurve`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcArbitraryClosedProfileDef to be a `IfcCurve`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -3043,12 +3043,12 @@ template <> size_t GenericFill<IfcLine>(const DB& db, const LIST& params, IfcLin
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Pnt, arg, db ); break; } try { GenericConvert( in->Pnt, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcLine to be a `IfcCartesianPoint`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcLine to be a `IfcCartesianPoint`")); }
} while(0); } while (false);
do { // convert the 'Dir' argument do { // convert the 'Dir' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Dir, arg, db ); break; } try { GenericConvert( in->Dir, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcLine to be a `IfcVector`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcLine to be a `IfcVector`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -3074,13 +3074,13 @@ template <> size_t GenericFill<IfcPropertySingleValue>(const DB& db, const LIST&
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->NominalValue, arg, db ); break; } try { GenericConvert( in->NominalValue, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcPropertySingleValue to be a `IfcValue`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcPropertySingleValue to be a `IfcValue`")); }
} while(0); } while (false);
do { // convert the 'Unit' argument do { // convert the 'Unit' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Unit, arg, db ); break; } try { GenericConvert( in->Unit, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcPropertySingleValue to be a `IfcUnit`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcPropertySingleValue to be a `IfcUnit`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -3113,7 +3113,7 @@ template <> size_t GenericFill<IfcSurfaceStyleShading>(const DB& db, const LIST&
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcSurfaceStyleShading,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcSurfaceStyleShading,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->SurfaceColour, arg, db ); break; } try { GenericConvert( in->SurfaceColour, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSurfaceStyleShading to be a `IfcColourRgb`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSurfaceStyleShading to be a `IfcColourRgb`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------

View File

@ -61,12 +61,12 @@ template <> size_t GenericFill<IfcSurfaceStyle>(const DB& db, const LIST& params
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Side, arg, db ); break; } try { GenericConvert( in->Side, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSurfaceStyle to be a `IfcSurfaceSide`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSurfaceStyle to be a `IfcSurfaceSide`")); }
} while(0); } while (false);
do { // convert the 'Styles' argument do { // convert the 'Styles' argument
std::shared_ptr<const DataType> arg = params[ base++ ]; std::shared_ptr<const DataType> arg = params[ base++ ];
try { GenericConvert( in->Styles, arg, db ); break; } try { GenericConvert( in->Styles, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSurfaceStyle to be a `SET [1:5] OF IfcSurfaceStyleElementSelect`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSurfaceStyle to be a `SET [1:5] OF IfcSurfaceStyleElementSelect`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -120,7 +120,7 @@ template <> size_t GenericFill<IfcFace>(const DB& db, const LIST& params, IfcFac
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcFace,1>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcFace,1>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Bounds, arg, db ); break; } try { GenericConvert( in->Bounds, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcFace to be a `SET [1:?] OF IfcFaceBound`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcFace to be a `SET [1:?] OF IfcFaceBound`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -175,7 +175,7 @@ template <> size_t GenericFill<IfcColourSpecification>(const DB& db, const LIST&
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Name, arg, db ); break; } try { GenericConvert( in->Name, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcColourSpecification to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcColourSpecification to be a `IfcLabel`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -186,12 +186,12 @@ template <> size_t GenericFill<IfcVector>(const DB& db, const LIST& params, IfcV
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Orientation, arg, db ); break; } try { GenericConvert( in->Orientation, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcVector to be a `IfcDirection`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcVector to be a `IfcDirection`")); }
} while(0); } while (false);
do { // convert the 'Magnitude' argument do { // convert the 'Magnitude' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Magnitude, arg, db ); break; } try { GenericConvert( in->Magnitude, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcVector to be a `IfcLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcVector to be a `IfcLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -209,17 +209,17 @@ template <> size_t GenericFill<IfcColourRgb>(const DB& db, const LIST& params, I
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Red, arg, db ); break; } try { GenericConvert( in->Red, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcColourRgb to be a `IfcNormalisedRatioMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcColourRgb to be a `IfcNormalisedRatioMeasure`")); }
} while(0); } while (false);
do { // convert the 'Green' argument do { // convert the 'Green' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Green, arg, db ); break; } try { GenericConvert( in->Green, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcColourRgb to be a `IfcNormalisedRatioMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcColourRgb to be a `IfcNormalisedRatioMeasure`")); }
} while(0); } while (false);
do { // convert the 'Blue' argument do { // convert the 'Blue' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Blue, arg, db ); break; } try { GenericConvert( in->Blue, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcColourRgb to be a `IfcNormalisedRatioMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcColourRgb to be a `IfcNormalisedRatioMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -245,31 +245,31 @@ template <> size_t GenericFill<IfcSite>(const DB& db, const LIST& params, IfcSit
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->RefLatitude, arg, db ); break; } try { GenericConvert( in->RefLatitude, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcSite to be a `IfcCompoundPlaneAngleMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcSite to be a `IfcCompoundPlaneAngleMeasure`")); }
} while(0); } while (false);
do { // convert the 'RefLongitude' argument do { // convert the 'RefLongitude' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->RefLongitude, arg, db ); break; } try { GenericConvert( in->RefLongitude, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to IfcSite to be a `IfcCompoundPlaneAngleMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to IfcSite to be a `IfcCompoundPlaneAngleMeasure`")); }
} while(0); } while (false);
do { // convert the 'RefElevation' argument do { // convert the 'RefElevation' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->RefElevation, arg, db ); break; } try { GenericConvert( in->RefElevation, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 11 to IfcSite to be a `IfcLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 11 to IfcSite to be a `IfcLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'LandTitleNumber' argument do { // convert the 'LandTitleNumber' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->LandTitleNumber, arg, db ); break; } try { GenericConvert( in->LandTitleNumber, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 12 to IfcSite to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 12 to IfcSite to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'SiteAddress' argument do { // convert the 'SiteAddress' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->SiteAddress, arg, db ); break; } try { GenericConvert( in->SiteAddress, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 13 to IfcSite to be a `IfcPostalAddress`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 13 to IfcSite to be a `IfcPostalAddress`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -414,31 +414,31 @@ template <> size_t GenericFill<IfcBSplineCurve>(const DB& db, const LIST& params
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBSplineCurve,5>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBSplineCurve,5>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Degree, arg, db ); break; } try { GenericConvert( in->Degree, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcBSplineCurve to be a `INTEGER`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcBSplineCurve to be a `INTEGER`")); }
} while(0); } while (false);
do { // convert the 'ControlPointsList' argument do { // convert the 'ControlPointsList' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBSplineCurve,5>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBSplineCurve,5>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->ControlPointsList, arg, db ); break; } try { GenericConvert( in->ControlPointsList, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcBSplineCurve to be a `LIST [2:?] OF IfcCartesianPoint`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcBSplineCurve to be a `LIST [2:?] OF IfcCartesianPoint`")); }
} while(0); } while (false);
do { // convert the 'CurveForm' argument do { // convert the 'CurveForm' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBSplineCurve,5>::aux_is_derived[2]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBSplineCurve,5>::aux_is_derived[2]=true; break; }
try { GenericConvert( in->CurveForm, arg, db ); break; } try { GenericConvert( in->CurveForm, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcBSplineCurve to be a `IfcBSplineCurveForm`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcBSplineCurve to be a `IfcBSplineCurveForm`")); }
} while(0); } while (false);
do { // convert the 'ClosedCurve' argument do { // convert the 'ClosedCurve' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBSplineCurve,5>::aux_is_derived[3]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBSplineCurve,5>::aux_is_derived[3]=true; break; }
try { GenericConvert( in->ClosedCurve, arg, db ); break; } try { GenericConvert( in->ClosedCurve, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcBSplineCurve to be a `LOGICAL`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcBSplineCurve to be a `LOGICAL`")); }
} while(0); } while (false);
do { // convert the 'SelfIntersect' argument do { // convert the 'SelfIntersect' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBSplineCurve,5>::aux_is_derived[4]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcBSplineCurve,5>::aux_is_derived[4]=true; break; }
try { GenericConvert( in->SelfIntersect, arg, db ); break; } try { GenericConvert( in->SelfIntersect, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcBSplineCurve to be a `LOGICAL`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcBSplineCurve to be a `LOGICAL`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -476,7 +476,7 @@ template <> size_t GenericFill<IfcShellBasedSurfaceModel>(const DB& db, const LI
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->SbsmBoundary, arg, db ); break; } try { GenericConvert( in->SbsmBoundary, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcShellBasedSurfaceModel to be a `SET [1:?] OF IfcShell`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcShellBasedSurfaceModel to be a `SET [1:?] OF IfcShell`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -494,12 +494,12 @@ template <> size_t GenericFill<IfcExtrudedAreaSolid>(const DB& db, const LIST& p
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->ExtrudedDirection, arg, db ); break; } try { GenericConvert( in->ExtrudedDirection, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcExtrudedAreaSolid to be a `IfcDirection`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcExtrudedAreaSolid to be a `IfcDirection`")); }
} while(0); } while (false);
do { // convert the 'Depth' argument do { // convert the 'Depth' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Depth, arg, db ); break; } try { GenericConvert( in->Depth, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcExtrudedAreaSolid to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcExtrudedAreaSolid to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -524,12 +524,12 @@ template <> size_t GenericFill<IfcRelVoidsElement>(const DB& db, const LIST& par
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->RelatingBuildingElement, arg, db ); break; } try { GenericConvert( in->RelatingBuildingElement, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelVoidsElement to be a `IfcElement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcRelVoidsElement to be a `IfcElement`")); }
} while(0); } while (false);
do { // convert the 'RelatedOpeningElement' argument do { // convert the 'RelatedOpeningElement' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->RelatedOpeningElement, arg, db ); break; } try { GenericConvert( in->RelatedOpeningElement, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelVoidsElement to be a `IfcFeatureElementSubtraction`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcRelVoidsElement to be a `IfcFeatureElementSubtraction`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -548,13 +548,13 @@ template <> size_t GenericFill<IfcCartesianTransformationOperator3DnonUniform>(c
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Scale2, arg, db ); break; } try { GenericConvert( in->Scale2, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcCartesianTransformationOperator3DnonUniform to be a `REAL`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcCartesianTransformationOperator3DnonUniform to be a `REAL`")); }
} while(0); } while (false);
do { // convert the 'Scale3' argument do { // convert the 'Scale3' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Scale3, arg, db ); break; } try { GenericConvert( in->Scale3, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcCartesianTransformationOperator3DnonUniform to be a `REAL`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcCartesianTransformationOperator3DnonUniform to be a `REAL`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -636,7 +636,7 @@ template <> size_t GenericFill<IfcAxis2Placement2D>(const DB& db, const LIST& pa
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->RefDirection, arg, db ); break; } try { GenericConvert( in->RefDirection, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcAxis2Placement2D to be a `IfcDirection`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcAxis2Placement2D to be a `IfcDirection`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -660,7 +660,7 @@ template <> size_t GenericFill<IfcCartesianPoint>(const DB& db, const LIST& para
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Coordinates, arg, db ); break; } try { GenericConvert( in->Coordinates, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCartesianPoint to be a `LIST [1:3] OF IfcLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcCartesianPoint to be a `LIST [1:3] OF IfcLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -684,7 +684,7 @@ template <> size_t GenericFill<IfcPolyLoop>(const DB& db, const LIST& params, If
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Polygon, arg, db ); break; } try { GenericConvert( in->Polygon, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPolyLoop to be a `LIST [3:?] OF IfcCartesianPoint`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPolyLoop to be a `LIST [3:?] OF IfcCartesianPoint`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -718,14 +718,14 @@ template <> size_t GenericFill<IfcRepresentationContext>(const DB& db, const LIS
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->ContextIdentifier, arg, db ); break; } try { GenericConvert( in->ContextIdentifier, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRepresentationContext to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRepresentationContext to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'ContextType' argument do { // convert the 'ContextType' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRepresentationContext,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcRepresentationContext,2>::aux_is_derived[1]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->ContextType, arg, db ); break; } try { GenericConvert( in->ContextType, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRepresentationContext to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRepresentationContext to be a `IfcLabel`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -737,27 +737,27 @@ template <> size_t GenericFill<IfcGeometricRepresentationContext>(const DB& db,
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcGeometricRepresentationContext,4>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcGeometricRepresentationContext,4>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->CoordinateSpaceDimension, arg, db ); break; } try { GenericConvert( in->CoordinateSpaceDimension, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcGeometricRepresentationContext to be a `IfcDimensionCount`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcGeometricRepresentationContext to be a `IfcDimensionCount`")); }
} while(0); } while (false);
do { // convert the 'Precision' argument do { // convert the 'Precision' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcGeometricRepresentationContext,4>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcGeometricRepresentationContext,4>::aux_is_derived[1]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Precision, arg, db ); break; } try { GenericConvert( in->Precision, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcGeometricRepresentationContext to be a `REAL`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcGeometricRepresentationContext to be a `REAL`")); }
} while(0); } while (false);
do { // convert the 'WorldCoordinateSystem' argument do { // convert the 'WorldCoordinateSystem' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcGeometricRepresentationContext,4>::aux_is_derived[2]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcGeometricRepresentationContext,4>::aux_is_derived[2]=true; break; }
try { GenericConvert( in->WorldCoordinateSystem, arg, db ); break; } try { GenericConvert( in->WorldCoordinateSystem, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcGeometricRepresentationContext to be a `IfcAxis2Placement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcGeometricRepresentationContext to be a `IfcAxis2Placement`")); }
} while(0); } while (false);
do { // convert the 'TrueNorth' argument do { // convert the 'TrueNorth' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcGeometricRepresentationContext,4>::aux_is_derived[3]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcGeometricRepresentationContext,4>::aux_is_derived[3]=true; break; }
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->TrueNorth, arg, db ); break; } try { GenericConvert( in->TrueNorth, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcGeometricRepresentationContext to be a `IfcDirection`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcGeometricRepresentationContext to be a `IfcDirection`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -776,12 +776,12 @@ template <> size_t GenericFill<IfcSIUnit>(const DB& db, const LIST& params, IfcS
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Prefix, arg, db ); break; } try { GenericConvert( in->Prefix, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSIUnit to be a `IfcSIPrefix`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSIUnit to be a `IfcSIPrefix`")); }
} while(0); } while (false);
do { // convert the 'Name' argument do { // convert the 'Name' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Name, arg, db ); break; } try { GenericConvert( in->Name, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcSIUnit to be a `IfcSIUnitName`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcSIUnit to be a `IfcSIUnitName`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -807,7 +807,7 @@ template <> size_t GenericFill<IfcAxis1Placement>(const DB& db, const LIST& para
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Axis, arg, db ); break; } try { GenericConvert( in->Axis, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcAxis1Placement to be a `IfcDirection`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcAxis1Placement to be a `IfcDirection`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -860,12 +860,12 @@ template <> size_t GenericFill<IfcRepresentationMap>(const DB& db, const LIST& p
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->MappingOrigin, arg, db ); break; } try { GenericConvert( in->MappingOrigin, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRepresentationMap to be a `IfcAxis2Placement`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcRepresentationMap to be a `IfcAxis2Placement`")); }
} while(0); } while (false);
do { // convert the 'MappedRepresentation' argument do { // convert the 'MappedRepresentation' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->MappedRepresentation, arg, db ); break; } try { GenericConvert( in->MappedRepresentation, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRepresentationMap to be a `IfcRepresentation`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcRepresentationMap to be a `IfcRepresentation`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1014,12 +1014,12 @@ template <> size_t GenericFill<IfcMeasureWithUnit>(const DB& db, const LIST& par
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->ValueComponent, arg, db ); break; } try { GenericConvert( in->ValueComponent, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcMeasureWithUnit to be a `IfcValue`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcMeasureWithUnit to be a `IfcValue`")); }
} while(0); } while (false);
do { // convert the 'UnitComponent' argument do { // convert the 'UnitComponent' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->UnitComponent, arg, db ); break; } try { GenericConvert( in->UnitComponent, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcMeasureWithUnit to be a `IfcUnit`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcMeasureWithUnit to be a `IfcUnit`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1127,7 +1127,7 @@ template <> size_t GenericFill<IfcFaceBasedSurfaceModel>(const DB& db, const LIS
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->FbsmFaces, arg, db ); break; } try { GenericConvert( in->FbsmFaces, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcFaceBasedSurfaceModel to be a `SET [1:?] OF IfcConnectedFaceSet`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcFaceBasedSurfaceModel to be a `SET [1:?] OF IfcConnectedFaceSet`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1174,13 +1174,13 @@ template <> size_t GenericFill<IfcFaceBound>(const DB& db, const LIST& params, I
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcFaceBound,2>::aux_is_derived[0]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcFaceBound,2>::aux_is_derived[0]=true; break; }
try { GenericConvert( in->Bound, arg, db ); break; } try { GenericConvert( in->Bound, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcFaceBound to be a `IfcLoop`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcFaceBound to be a `IfcLoop`")); }
} while(0); } while (false);
do { // convert the 'Orientation' argument do { // convert the 'Orientation' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcFaceBound,2>::aux_is_derived[1]=true; break; } if (dynamic_cast<const ISDERIVED*>(&*arg)) { in->ObjectHelper<Assimp::IFC::Schema_2x3::IfcFaceBound,2>::aux_is_derived[1]=true; break; }
try { GenericConvert( in->Orientation, arg, db ); break; } try { GenericConvert( in->Orientation, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcFaceBound to be a `BOOLEAN`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcFaceBound to be a `BOOLEAN`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1218,12 +1218,12 @@ template <> size_t GenericFill<IfcComplexProperty>(const DB& db, const LIST& par
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->UsageName, arg, db ); break; } try { GenericConvert( in->UsageName, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcComplexProperty to be a `IfcIdentifier`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcComplexProperty to be a `IfcIdentifier`")); }
} while(0); } while (false);
do { // convert the 'HasProperties' argument do { // convert the 'HasProperties' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->HasProperties, arg, db ); break; } try { GenericConvert( in->HasProperties, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcComplexProperty to be a `SET [1:?] OF IfcProperty`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcComplexProperty to be a `SET [1:?] OF IfcProperty`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1276,7 +1276,7 @@ template <> size_t GenericFill<IfcUnitAssignment>(const DB& db, const LIST& para
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Units, arg, db ); break; } try { GenericConvert( in->Units, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcUnitAssignment to be a `SET [1:?] OF IfcUnit`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcUnitAssignment to be a `SET [1:?] OF IfcUnit`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1309,12 +1309,12 @@ template <> size_t GenericFill<IfcElementQuantity>(const DB& db, const LIST& par
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->MethodOfMeasurement, arg, db ); break; } try { GenericConvert( in->MethodOfMeasurement, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcElementQuantity to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcElementQuantity to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'Quantities' argument do { // convert the 'Quantities' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Quantities, arg, db ); break; } try { GenericConvert( in->Quantities, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcElementQuantity to be a `SET [1:?] OF IfcPhysicalQuantity`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcElementQuantity to be a `SET [1:?] OF IfcPhysicalQuantity`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1381,7 +1381,7 @@ template <> size_t GenericFill<IfcPresentationStyleAssignment>(const DB& db, con
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Styles, arg, db ); break; } try { GenericConvert( in->Styles, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPresentationStyleAssignment to be a `SET [1:?] OF IfcPresentationStyleSelect`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcPresentationStyleAssignment to be a `SET [1:?] OF IfcPresentationStyleSelect`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1420,13 +1420,13 @@ template <> size_t GenericFill<IfcSpace>(const DB& db, const LIST& params, IfcSp
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->InteriorOrExteriorSpace, arg, db ); break; } try { GenericConvert( in->InteriorOrExteriorSpace, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcSpace to be a `IfcInternalOrExternalEnum`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 9 to IfcSpace to be a `IfcInternalOrExternalEnum`")); }
} while(0); } while (false);
do { // convert the 'ElevationWithFlooring' argument do { // convert the 'ElevationWithFlooring' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->ElevationWithFlooring, arg, db ); break; } try { GenericConvert( in->ElevationWithFlooring, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to IfcSpace to be a `IfcLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 10 to IfcSpace to be a `IfcLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1486,7 +1486,7 @@ template <> size_t GenericFill<IfcSurfaceStyleWithTextures>(const DB& db, const
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Textures, arg, db ); break; } try { GenericConvert( in->Textures, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSurfaceStyleWithTextures to be a `LIST [1:?] OF IfcSurfaceTexture`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSurfaceStyleWithTextures to be a `LIST [1:?] OF IfcSurfaceTexture`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1497,22 +1497,22 @@ template <> size_t GenericFill<IfcBoundingBox>(const DB& db, const LIST& params,
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Corner, arg, db ); break; } try { GenericConvert( in->Corner, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcBoundingBox to be a `IfcCartesianPoint`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcBoundingBox to be a `IfcCartesianPoint`")); }
} while(0); } while (false);
do { // convert the 'XDim' argument do { // convert the 'XDim' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->XDim, arg, db ); break; } try { GenericConvert( in->XDim, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcBoundingBox to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcBoundingBox to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'YDim' argument do { // convert the 'YDim' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->YDim, arg, db ); break; } try { GenericConvert( in->YDim, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcBoundingBox to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcBoundingBox to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'ZDim' argument do { // convert the 'ZDim' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->ZDim, arg, db ); break; } try { GenericConvert( in->ZDim, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcBoundingBox to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcBoundingBox to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1537,7 +1537,7 @@ template <> size_t GenericFill<IfcCircle>(const DB& db, const LIST& params, IfcC
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Radius, arg, db ); break; } try { GenericConvert( in->Radius, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCircle to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcCircle to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1625,12 +1625,12 @@ template <> size_t GenericFill<IfcConversionBasedUnit>(const DB& db, const LIST&
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->Name, arg, db ); break; } try { GenericConvert( in->Name, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcConversionBasedUnit to be a `IfcLabel`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcConversionBasedUnit to be a `IfcLabel`")); }
} while(0); } while (false);
do { // convert the 'ConversionFactor' argument do { // convert the 'ConversionFactor' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->ConversionFactor, arg, db ); break; } try { GenericConvert( in->ConversionFactor, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcConversionBasedUnit to be a `IfcMeasureWithUnit`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcConversionBasedUnit to be a `IfcMeasureWithUnit`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1746,12 +1746,12 @@ template <> size_t GenericFill<IfcEllipse>(const DB& db, const LIST& params, Ifc
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->SemiAxis1, arg, db ); break; } try { GenericConvert( in->SemiAxis1, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcEllipse to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcEllipse to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
do { // convert the 'SemiAxis2' argument do { // convert the 'SemiAxis2' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->SemiAxis2, arg, db ); break; } try { GenericConvert( in->SemiAxis2, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcEllipse to be a `IfcPositiveLengthMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcEllipse to be a `IfcPositiveLengthMeasure`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1818,7 +1818,7 @@ template <> size_t GenericFill<IfcPropertySet>(const DB& db, const LIST& params,
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->HasProperties, arg, db ); break; } try { GenericConvert( in->HasProperties, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcPropertySet to be a `SET [1:?] OF IfcProperty`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcPropertySet to be a `SET [1:?] OF IfcProperty`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
@ -1830,48 +1830,48 @@ template <> size_t GenericFill<IfcSurfaceStyleRendering>(const DB& db, const LIS
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->Transparency, arg, db ); break; } try { GenericConvert( in->Transparency, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSurfaceStyleRendering to be a `IfcNormalisedRatioMeasure`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSurfaceStyleRendering to be a `IfcNormalisedRatioMeasure`")); }
} while(0); } while (false);
do { // convert the 'DiffuseColour' argument do { // convert the 'DiffuseColour' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->DiffuseColour, arg, db ); break; } try { GenericConvert( in->DiffuseColour, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); }
} while(0); } while (false);
do { // convert the 'TransmissionColour' argument do { // convert the 'TransmissionColour' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->TransmissionColour, arg, db ); break; } try { GenericConvert( in->TransmissionColour, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); }
} while(0); } while (false);
do { // convert the 'DiffuseTransmissionColour' argument do { // convert the 'DiffuseTransmissionColour' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->DiffuseTransmissionColour, arg, db ); break; } try { GenericConvert( in->DiffuseTransmissionColour, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); }
} while(0); } while (false);
do { // convert the 'ReflectionColour' argument do { // convert the 'ReflectionColour' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->ReflectionColour, arg, db ); break; } try { GenericConvert( in->ReflectionColour, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 5 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); }
} while(0); } while (false);
do { // convert the 'SpecularColour' argument do { // convert the 'SpecularColour' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->SpecularColour, arg, db ); break; } try { GenericConvert( in->SpecularColour, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 6 to IfcSurfaceStyleRendering to be a `IfcColourOrFactor`")); }
} while(0); } while (false);
do { // convert the 'SpecularHighlight' argument do { // convert the 'SpecularHighlight' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
if (dynamic_cast<const UNSET*>(&*arg)) break; if (dynamic_cast<const UNSET*>(&*arg)) break;
try { GenericConvert( in->SpecularHighlight, arg, db ); break; } try { GenericConvert( in->SpecularHighlight, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcSurfaceStyleRendering to be a `IfcSpecularHighlightSelect`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 7 to IfcSurfaceStyleRendering to be a `IfcSpecularHighlightSelect`")); }
} while(0); } while (false);
do { // convert the 'ReflectanceMethod' argument do { // convert the 'ReflectanceMethod' argument
std::shared_ptr<const DataType> arg = params[base++]; std::shared_ptr<const DataType> arg = params[base++];
try { GenericConvert( in->ReflectanceMethod, arg, db ); break; } try { GenericConvert( in->ReflectanceMethod, arg, db ); break; }
catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcSurfaceStyleRendering to be a `IfcReflectanceMethodEnum`")); } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcSurfaceStyleRendering to be a `IfcReflectanceMethodEnum`")); }
} while(0); } while (false);
return base; return base;
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------

View File

@ -127,7 +127,7 @@ const aiImporterDesc *IQMImporter::GetInfo() const {
void IQMImporter::InternReadFile(const std::string &file, aiScene *pScene, IOSystem *pIOHandler) { void IQMImporter::InternReadFile(const std::string &file, aiScene *pScene, IOSystem *pIOHandler) {
// Read file into memory // Read file into memory
std::unique_ptr<IOStream> pStream(pIOHandler->Open(file, "rb")); std::unique_ptr<IOStream> pStream(pIOHandler->Open(file, "rb"));
if (!pStream.get()) { if (!pStream) {
throw DeadlyImportError("Failed to open file ", file, "."); throw DeadlyImportError("Failed to open file ", file, ".");
} }

View File

@ -842,7 +842,7 @@ void IRRImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile)); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open IRR file ", pFile); throw DeadlyImportError("Failed to open IRR file ", pFile);
} }

View File

@ -120,7 +120,7 @@ void IRRMeshImporter::InternReadFile(const std::string &pFile,
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile)); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == NULL) if (file == nullptr)
throw DeadlyImportError("Failed to open IRRMESH file ", pFile); throw DeadlyImportError("Failed to open IRRMESH file ", pFile);
// Construct the irrXML parser // Construct the irrXML parser

View File

@ -463,7 +463,7 @@ void AnimResolver::GetKeys(std::vector<aiVectorKey> &out,
cur_z = envl_z->keys.begin(); cur_z = envl_z->keys.begin();
end_x = end_y = end_z = false; end_x = end_y = end_z = false;
while (1) { while (true) {
aiVectorKey fill; aiVectorKey fill;

View File

@ -135,7 +135,7 @@ void LWOImporter::InternReadFile(const std::string &pFile,
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open LWO file ", pFile, "."); throw DeadlyImportError("Failed to open LWO file ", pFile, ".");
} }

View File

@ -494,7 +494,7 @@ void LWSImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open LWS file ", pFile, "."); throw DeadlyImportError("Failed to open LWS file ", pFile, ".");
} }

View File

@ -205,7 +205,7 @@ void MD2Importer::InternReadFile( const std::string& pFile,
std::unique_ptr<IOStream> file( pIOHandler->Open( pFile)); std::unique_ptr<IOStream> file( pIOHandler->Open( pFile));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open MD2 file ", pFile, ""); throw DeadlyImportError("Failed to open MD2 file ", pFile, "");
} }

View File

@ -109,7 +109,7 @@ Q3Shader::BlendFunc StringToBlendFunc(const std::string &m) {
// Load a Quake 3 shader // Load a Quake 3 shader
bool Q3Shader::LoadShader(ShaderData &fill, const std::string &pFile, IOSystem *io) { bool Q3Shader::LoadShader(ShaderData &fill, const std::string &pFile, IOSystem *io) {
std::unique_ptr<IOStream> file(io->Open(pFile, "rt")); std::unique_ptr<IOStream> file(io->Open(pFile, "rt"));
if (!file.get()) if (!file)
return false; // if we can't access the file, don't worry and return return false; // if we can't access the file, don't worry and return
ASSIMP_LOG_INFO("Loading Quake3 shader file ", pFile); ASSIMP_LOG_INFO("Loading Quake3 shader file ", pFile);
@ -223,7 +223,7 @@ bool Q3Shader::LoadShader(ShaderData &fill, const std::string &pFile, IOSystem *
// Load a Quake 3 skin // Load a Quake 3 skin
bool Q3Shader::LoadSkin(SkinData &fill, const std::string &pFile, IOSystem *io) { bool Q3Shader::LoadSkin(SkinData &fill, const std::string &pFile, IOSystem *io) {
std::unique_ptr<IOStream> file(io->Open(pFile, "rt")); std::unique_ptr<IOStream> file(io->Open(pFile, "rt"));
if (!file.get()) if (!file)
return false; // if we can't access the file, don't worry and return return false; // if we can't access the file, don't worry and return
ASSIMP_LOG_INFO("Loading Quake3 skin file ", pFile); ASSIMP_LOG_INFO("Loading Quake3 skin file ", pFile);
@ -709,7 +709,7 @@ void MD3Importer::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile)); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open MD3 file ", pFile, "."); throw DeadlyImportError("Failed to open MD3 file ", pFile, ".");
} }

View File

@ -331,7 +331,7 @@ void MD5Importer::LoadMD5MeshFile() {
std::unique_ptr<IOStream> file(mIOHandler->Open(filename, "rb")); std::unique_ptr<IOStream> file(mIOHandler->Open(filename, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr || !file->FileSize()) { if (file == nullptr || !file->FileSize()) {
ASSIMP_LOG_WARN("Failed to access MD5MESH file: ", filename); ASSIMP_LOG_WARN("Failed to access MD5MESH file: ", filename);
return; return;
} }
@ -553,7 +553,7 @@ void MD5Importer::LoadMD5AnimFile() {
std::unique_ptr<IOStream> file(mIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(mIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (!file.get() || !file->FileSize()) { if (!file || !file->FileSize()) {
ASSIMP_LOG_WARN("Failed to read MD5ANIM file: ", pFile); ASSIMP_LOG_WARN("Failed to read MD5ANIM file: ", pFile);
return; return;
} }
@ -661,7 +661,7 @@ void MD5Importer::LoadMD5CameraFile() {
std::unique_ptr<IOStream> file(mIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(mIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (!file.get() || !file->FileSize()) { if (!file || !file->FileSize()) {
throw DeadlyImportError("Failed to read MD5CAMERA file: ", pFile); throw DeadlyImportError("Failed to read MD5CAMERA file: ", pFile);
} }
mHadMD5Camera = true; mHadMD5Camera = true;

View File

@ -199,7 +199,7 @@ void MDCImporter::InternReadFile(
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile)); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open MDC file ", pFile, "."); throw DeadlyImportError("Failed to open MDC file ", pFile, ".");
} }

View File

@ -222,7 +222,7 @@ void HL1MDLLoader::load_file_into_buffer(const std::string &file_path, unsigned
std::unique_ptr<IOStream> file(io_->Open(file_path)); std::unique_ptr<IOStream> file(io_->Open(file_path));
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open MDL file ", DefaultIOSystem::fileName(file_path), "."); throw DeadlyImportError("Failed to open MDL file ", DefaultIOSystem::fileName(file_path), ".");
} }

View File

@ -159,7 +159,7 @@ void MDLImporter::InternReadFile(const std::string &pFile,
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile)); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open MDL file ", pFile, "."); throw DeadlyImportError("Failed to open MDL file ", pFile, ".");
} }

View File

@ -268,7 +268,7 @@ void NDOImporter::InternReadFile( const std::string& pFile,
const unsigned int key = v.first; const unsigned int key = v.first;
unsigned int cur_edge = v.second; unsigned int cur_edge = v.second;
while (1) { while (true) {
unsigned int next_edge, next_vert; unsigned int next_edge, next_vert;
if (key == obj.edges[cur_edge].edge[3]) { if (key == obj.edges[cur_edge].edge[3]) {
next_edge = obj.edges[cur_edge].edge[5]; next_edge = obj.edges[cur_edge].edge[5];

View File

@ -129,7 +129,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo> &output,
std::unique_ptr<IOStream> file(pIOHandler->Open(path, "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(path, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (!file.get()) { if (!file) {
ASSIMP_LOG_ERROR("NFF2: Unable to open material library ", path, "."); ASSIMP_LOG_ERROR("NFF2: Unable to open material library ", path, ".");
return; return;
} }
@ -211,7 +211,7 @@ void NFFImporter::InternReadFile(const std::string &pFile,
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (!file.get()) if (!file)
throw DeadlyImportError("Failed to open NFF file ", pFile, "."); throw DeadlyImportError("Failed to open NFF file ", pFile, ".");
// allocate storage and copy the contents of the file to a memory buffer // allocate storage and copy the contents of the file to a memory buffer

View File

@ -109,7 +109,7 @@ void OFFImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
std::unique_ptr<IOStream> file( pIOHandler->Open( pFile, "rb")); std::unique_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if( file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open OFF file ", pFile, "."); throw DeadlyImportError("Failed to open OFF file ", pFile, ".");
} }

View File

@ -108,7 +108,7 @@ void ObjFileImporter::InternReadFile(const std::string &file, aiScene *pScene, I
pIOHandler->Close(pStream); pIOHandler->Close(pStream);
}; };
std::unique_ptr<IOStream, decltype(streamCloser)> fileStream(pIOHandler->Open(file, mode), streamCloser); std::unique_ptr<IOStream, decltype(streamCloser)> fileStream(pIOHandler->Open(file, mode), streamCloser);
if (!fileStream.get()) { if (!fileStream) {
throw DeadlyImportError("Failed to open file ", file, "."); throw DeadlyImportError("Failed to open file ", file, ".");
} }

View File

@ -111,7 +111,7 @@ void OgreImporter::AssignMaterials(aiScene *pScene, std::vector<aiMaterial *> &m
aiMaterial *OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSystem *pIOHandler, const std::string &materialName) { aiMaterial *OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSystem *pIOHandler, const std::string &materialName) {
if (materialName.empty()) { if (materialName.empty()) {
return 0; return nullptr;
} }
// Full reference and examples of Ogre Material Script // Full reference and examples of Ogre Material Script
@ -154,7 +154,7 @@ aiMaterial *OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
if (!m_userDefinedMaterialLibFile.empty()) if (!m_userDefinedMaterialLibFile.empty())
potentialFiles.push_back(m_userDefinedMaterialLibFile); potentialFiles.push_back(m_userDefinedMaterialLibFile);
IOStream *materialFile = 0; IOStream *materialFile = nullptr;
for (size_t i = 0; i < potentialFiles.size(); ++i) { for (size_t i = 0; i < potentialFiles.size(); ++i) {
materialFile = pIOHandler->Open(potentialFiles[i]); materialFile = pIOHandler->Open(potentialFiles[i]);
if (materialFile) { if (materialFile) {
@ -164,13 +164,13 @@ aiMaterial *OgreImporter::ReadMaterial(const std::string &pFile, Assimp::IOSyste
} }
if (!materialFile) { if (!materialFile) {
ASSIMP_LOG_ERROR("Failed to find source file for material '", materialName, "'"); ASSIMP_LOG_ERROR("Failed to find source file for material '", materialName, "'");
return 0; return nullptr;
} }
std::unique_ptr<IOStream> stream(materialFile); std::unique_ptr<IOStream> stream(materialFile);
if (stream->FileSize() == 0) { if (stream->FileSize() == 0) {
ASSIMP_LOG_WARN("Source file for material '", materialName, "' is empty (size is 0 bytes)"); ASSIMP_LOG_WARN("Source file for material '", materialName, "' is empty (size is 0 bytes)");
return 0; return nullptr;
} }
// Read bytes // Read bytes

View File

@ -296,7 +296,7 @@ uint32_t VertexData::VertexSize(uint16_t source) const {
MemoryStream *VertexData::VertexBuffer(uint16_t source) { MemoryStream *VertexData::VertexBuffer(uint16_t source) {
if (vertexBindings.find(source) != vertexBindings.end()) if (vertexBindings.find(source) != vertexBindings.end())
return vertexBindings[source].get(); return vertexBindings[source].get();
return 0; return nullptr;
} }
VertexElement *VertexData::GetVertexElement(VertexElement::Semantic semantic, uint16_t index) { VertexElement *VertexData::GetVertexElement(VertexElement::Semantic semantic, uint16_t index) {
@ -304,7 +304,7 @@ VertexElement *VertexData::GetVertexElement(VertexElement::Semantic semantic, ui
if (element.semantic == semantic && element.index == index) if (element.semantic == semantic && element.index == index)
return &element; return &element;
} }
return 0; return nullptr;
} }
// VertexDataXml // VertexDataXml
@ -399,7 +399,7 @@ SubMesh *Mesh::GetSubMesh(size_t index) const {
return subMeshes[i]; return subMeshes[i];
} }
} }
return 0; return nullptr;
} }
void Mesh::ConvertToAssimpScene(aiScene *dest) { void Mesh::ConvertToAssimpScene(aiScene *dest) {
@ -459,7 +459,7 @@ ISubMesh::ISubMesh() :
// SubMesh // SubMesh
SubMesh::SubMesh() : SubMesh::SubMesh() :
vertexData(0), vertexData(nullptr),
indexData(new IndexData()) { indexData(new IndexData()) {
} }
@ -515,9 +515,9 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent) {
// Source streams // Source streams
MemoryStream *positions = src->VertexBuffer(positionsElement->source); MemoryStream *positions = src->VertexBuffer(positionsElement->source);
MemoryStream *normals = (normalsElement ? src->VertexBuffer(normalsElement->source) : 0); MemoryStream *normals = (normalsElement ? src->VertexBuffer(normalsElement->source) : nullptr);
MemoryStream *uv1 = (uv1Element ? src->VertexBuffer(uv1Element->source) : 0); MemoryStream *uv1 = (uv1Element ? src->VertexBuffer(uv1Element->source) : nullptr);
MemoryStream *uv2 = (uv2Element ? src->VertexBuffer(uv2Element->source) : 0); MemoryStream *uv2 = (uv2Element ? src->VertexBuffer(uv2Element->source) : nullptr);
// Element size // Element size
const size_t sizePosition = positionsElement->Size(); const size_t sizePosition = positionsElement->Size();
@ -544,7 +544,7 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent) {
dest->mTextureCoords[0] = new aiVector3D[dest->mNumVertices]; dest->mTextureCoords[0] = new aiVector3D[dest->mNumVertices];
} else { } else {
ASSIMP_LOG_WARN("Ogre imported UV0 type ", uv1Element->TypeToString(), " is not compatible with Assimp. Ignoring UV."); ASSIMP_LOG_WARN("Ogre imported UV0 type ", uv1Element->TypeToString(), " is not compatible with Assimp. Ignoring UV.");
uv1 = 0; uv1 = nullptr;
} }
} }
if (uv2) { if (uv2) {
@ -553,12 +553,12 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent) {
dest->mTextureCoords[1] = new aiVector3D[dest->mNumVertices]; dest->mTextureCoords[1] = new aiVector3D[dest->mNumVertices];
} else { } else {
ASSIMP_LOG_WARN("Ogre imported UV0 type ", uv2Element->TypeToString(), " is not compatible with Assimp. Ignoring UV."); ASSIMP_LOG_WARN("Ogre imported UV0 type ", uv2Element->TypeToString(), " is not compatible with Assimp. Ignoring UV.");
uv2 = 0; uv2 = nullptr;
} }
} }
aiVector3D *uv1Dest = (uv1 ? dest->mTextureCoords[0] : 0); aiVector3D *uv1Dest = (uv1 ? dest->mTextureCoords[0] : nullptr);
aiVector3D *uv2Dest = (uv2 ? dest->mTextureCoords[1] : 0); aiVector3D *uv2Dest = (uv2 ? dest->mTextureCoords[1] : nullptr);
MemoryStream *faces = indexData->buffer.get(); MemoryStream *faces = indexData->buffer.get();
for (size_t fi = 0, isize = indexData->IndexSize(), fsize = indexData->FaceSize(); for (size_t fi = 0, isize = indexData->IndexSize(), fsize = indexData->FaceSize();
@ -640,8 +640,8 @@ aiMesh *SubMesh::ConvertToAssimpMesh(Mesh *parent) {
// MeshXml // MeshXml
MeshXml::MeshXml() : MeshXml::MeshXml() :
skeleton(0), skeleton(nullptr),
sharedVertexData(0) { sharedVertexData(nullptr) {
} }
MeshXml::~MeshXml() { MeshXml::~MeshXml() {
@ -666,7 +666,7 @@ SubMeshXml *MeshXml::GetSubMesh(uint16_t index) const {
for (size_t i = 0; i < subMeshes.size(); ++i) for (size_t i = 0; i < subMeshes.size(); ++i)
if (subMeshes[i]->index == index) if (subMeshes[i]->index == index)
return subMeshes[i]; return subMeshes[i];
return 0; return nullptr;
} }
void MeshXml::ConvertToAssimpScene(aiScene *dest) { void MeshXml::ConvertToAssimpScene(aiScene *dest) {
@ -714,7 +714,7 @@ void MeshXml::ConvertToAssimpScene(aiScene *dest) {
SubMeshXml::SubMeshXml() : SubMeshXml::SubMeshXml() :
indexData(new IndexDataXml()), indexData(new IndexDataXml()),
vertexData(0) { vertexData(nullptr) {
} }
SubMeshXml::~SubMeshXml() { SubMeshXml::~SubMeshXml() {
@ -827,7 +827,7 @@ Animation::Animation(Skeleton *parent) :
Animation::Animation(Mesh *parent) : Animation::Animation(Mesh *parent) :
parentMesh(parent), parentMesh(parent),
parentSkeleton(0), parentSkeleton(nullptr),
length(0.0f), length(0.0f),
baseTime(-1.0f) { baseTime(-1.0f) {
// empty // empty
@ -910,7 +910,7 @@ Bone *Skeleton::BoneByName(const std::string &name) const {
if ((*iter)->name == name) if ((*iter)->name == name)
return (*iter); return (*iter);
} }
return 0; return nullptr;
} }
Bone *Skeleton::BoneById(uint16_t id) const { Bone *Skeleton::BoneById(uint16_t id) const {
@ -918,20 +918,20 @@ Bone *Skeleton::BoneById(uint16_t id) const {
if ((*iter)->id == id) if ((*iter)->id == id)
return (*iter); return (*iter);
} }
return 0; return nullptr;
} }
// Bone // Bone
Bone::Bone() : Bone::Bone() :
id(0), id(0),
parent(0), parent(nullptr),
parentId(-1), parentId(-1),
scale(1.0f, 1.0f, 1.0f) { scale(1.0f, 1.0f, 1.0f) {
} }
bool Bone::IsParented() const { bool Bone::IsParented() const {
return (parentId != -1 && parent != 0); return (parentId != -1 && parent != nullptr);
} }
uint16_t Bone::ParentId() const { uint16_t Bone::ParentId() const {

View File

@ -437,7 +437,7 @@ public:
void CalculateWorldMatrixAndDefaultPose(Skeleton *skeleton); void CalculateWorldMatrixAndDefaultPose(Skeleton *skeleton);
/// Convert to Assimp node (animation nodes). /// Convert to Assimp node (animation nodes).
aiNode *ConvertToAssimpNode(Skeleton *parent, aiNode *parentNode = 0); aiNode *ConvertToAssimpNode(Skeleton *parent, aiNode *parentNode = nullptr);
/// Convert to Assimp bone (mesh bones). /// Convert to Assimp bone (mesh bones).
aiBone *ConvertToAssimpBone(Skeleton *parent, const std::vector<aiVertexWeight> &boneWeights); aiBone *ConvertToAssimpBone(Skeleton *parent, const std::vector<aiVertexWeight> &boneWeights);

View File

@ -535,7 +535,7 @@ XmlParserPtr OgreXmlSerializer::OpenXmlParser(Assimp::IOSystem *pIOHandler, cons
} }
std::unique_ptr<IOStream> file(pIOHandler->Open(filename)); std::unique_ptr<IOStream> file(pIOHandler->Open(filename));
if (!file.get()) { if (!file) {
throw DeadlyImportError("Failed to open skeleton file ", filename); throw DeadlyImportError("Failed to open skeleton file ", filename);
} }

View File

@ -133,7 +133,7 @@ static bool isBigEndian(const char *szMe) {
void PLYImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) { void PLYImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) {
const std::string mode = "rb"; const std::string mode = "rb";
std::unique_ptr<IOStream> fileStream(pIOHandler->Open(pFile, mode)); std::unique_ptr<IOStream> fileStream(pIOHandler->Open(pFile, mode));
if (!fileStream.get()) { if (!fileStream) {
throw DeadlyImportError("Failed to open file ", pFile, "."); throw DeadlyImportError("Failed to open file ", pFile, ".");
} }

View File

@ -96,7 +96,7 @@ void RAWImporter::InternReadFile(const std::string &pFile,
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open RAW file ", pFile, "."); throw DeadlyImportError("Failed to open RAW file ", pFile, ".");
} }

View File

@ -535,7 +535,7 @@ void SMDImporter::GetAnimationFileList(const std::string &pFile, IOSystem* pIOHa
auto path = base + "/" + name + "_animation.txt"; auto path = base + "/" + name + "_animation.txt";
std::unique_ptr<IOStream> file(pIOHandler->Open(path.c_str(), "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(path.c_str(), "rb"));
if (file.get() == nullptr) { if (file == nullptr) {
return; return;
} }
@ -675,7 +675,7 @@ void SMDImporter::ReadSmd(const std::string &pFile, IOSystem* pIOHandler) {
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open SMD/VTA file ", pFile, "."); throw DeadlyImportError("Failed to open SMD/VTA file ", pFile, ".");
} }

View File

@ -166,7 +166,7 @@ void STLImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb")); std::unique_ptr<IOStream> file(pIOHandler->Open(pFile, "rb"));
// Check whether we can read from the file // Check whether we can read from the file
if (file.get() == nullptr) { if (file == nullptr) {
throw DeadlyImportError("Failed to open STL file ", pFile, "."); throw DeadlyImportError("Failed to open STL file ", pFile, ".");
} }

View File

@ -195,7 +195,7 @@ public:
template <typename T> template <typename T>
const T *ResolveSelectPtr(const DB &db) const { const T *ResolveSelectPtr(const DB &db) const {
const EXPRESS::ENTITY *e = ToPtr<EXPRESS::ENTITY>(); const EXPRESS::ENTITY *e = ToPtr<EXPRESS::ENTITY>();
return e ? Couple<T>(db).MustGetObject(*e)->template ToPtr<T>() : (const T *)0; return e ? Couple<T>(db).MustGetObject(*e)->template ToPtr<T>() : (const T *)nullptr;
} }
public: public:
@ -207,7 +207,7 @@ public:
*/ */
static std::shared_ptr<const EXPRESS::DataType> Parse(const char *&inout, static std::shared_ptr<const EXPRESS::DataType> Parse(const char *&inout,
uint64_t line = SyntaxError::LINE_NOT_SPECIFIED, uint64_t line = SyntaxError::LINE_NOT_SPECIFIED,
const EXPRESS::ConversionSchema *schema = NULL); const EXPRESS::ConversionSchema *schema = nullptr);
}; };
typedef DataType SELECT; typedef DataType SELECT;
@ -306,7 +306,7 @@ public:
*/ */
static std::shared_ptr<const EXPRESS::LIST> Parse(const char *&inout, static std::shared_ptr<const EXPRESS::LIST> Parse(const char *&inout,
uint64_t line = SyntaxError::LINE_NOT_SPECIFIED, uint64_t line = SyntaxError::LINE_NOT_SPECIFIED,
const EXPRESS::ConversionSchema *schema = NULL); const EXPRESS::ConversionSchema *schema = nullptr);
private: private:
typedef std::vector<std::shared_ptr<const DataType>> MemberList; typedef std::vector<std::shared_ptr<const DataType>> MemberList;

View File

@ -315,7 +315,7 @@ void UnrealImporter::InternReadFile(const std::string &pFile,
// we can live without the uc file if necessary // we can live without the uc file if necessary
std::unique_ptr<IOStream> pb(pIOHandler->Open(uc_path)); std::unique_ptr<IOStream> pb(pIOHandler->Open(uc_path));
if (pb.get()) { if (pb) {
std::vector<char> _data; std::vector<char> _data;
TextFileToBuffer(pb.get(), _data); TextFileToBuffer(pb.get(), _data);

View File

@ -97,7 +97,7 @@ const aiImporterDesc* XFileImporter::GetInfo () const {
void XFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) { void XFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) {
// read file into memory // read file into memory
std::unique_ptr<IOStream> file( pIOHandler->Open( pFile)); std::unique_ptr<IOStream> file( pIOHandler->Open( pFile));
if ( file.get() == nullptr ) { if (file == nullptr) {
throw DeadlyImportError( "Failed to open file ", pFile, "." ); throw DeadlyImportError( "Failed to open file ", pFile, "." );
} }

View File

@ -207,7 +207,7 @@ void X3DImporter::ParseFile(const std::string &file, IOSystem *pIOHandler) {
static const std::string mode = "rb"; static const std::string mode = "rb";
std::unique_ptr<IOStream> fileStream(pIOHandler->Open(file, mode)); std::unique_ptr<IOStream> fileStream(pIOHandler->Open(file, mode));
if (!fileStream.get()) { if (!fileStream) {
throw DeadlyImportError("Failed to open file " + file + "."); throw DeadlyImportError("Failed to open file " + file + ".");
} }

View File

@ -54,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/mesh.h> #include <assimp/mesh.h>
#include <assimp/scene.h> #include <assimp/scene.h>
#include <memory>
#include <utility> #include <utility>
//#include <cctype> //#include <cctype>
//#include <memory> //#include <memory>
@ -121,7 +122,7 @@ void XGLImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile, "rb")); std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile, "rb"));
// check whether we can read from the file // check whether we can read from the file
if (stream.get() == NULL) { if (stream == nullptr) {
throw DeadlyImportError("Failed to open XGL/ZGL file " + pFile); throw DeadlyImportError("Failed to open XGL/ZGL file " + pFile);
} }
@ -141,7 +142,7 @@ void XGLImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
compression.close(); compression.close();
} }
// replace the input stream with a memory stream // replace the input stream with a memory stream
stream.reset(new MemoryIOStream(reinterpret_cast<uint8_t*>(uncompressed.data()), total)); stream = std::make_shared<MemoryIOStream>(reinterpret_cast<uint8_t *>(uncompressed.data()), total);
#endif #endif
} }

View File

@ -374,7 +374,7 @@ struct Accessor : public Object {
} }
inline bool IsValid() const { inline bool IsValid() const {
return data != 0; return data != nullptr;
} }
}; };
@ -873,7 +873,7 @@ class LazyDict : public LazyDictBase {
Ref<T> Add(T *obj); Ref<T> Add(T *obj);
public: public:
LazyDict(Asset &asset, const char *dictId, const char *extId = 0); LazyDict(Asset &asset, const char *dictId, const char *extId = nullptr);
~LazyDict(); ~LazyDict();
Ref<T> Get(const char *id); Ref<T> Get(const char *id);
@ -970,7 +970,7 @@ public:
Ref<Scene> scene; Ref<Scene> scene;
public: public:
Asset(IOSystem *io = 0) : Asset(IOSystem *io = nullptr) :
mIOSystem(io), mIOSystem(io),
asset(), asset(),
accessors(*this, "accessors"), accessors(*this, "accessors"),

View File

@ -68,7 +68,7 @@ using namespace glTFCommon;
template <class T> template <class T>
inline LazyDict<T>::LazyDict(Asset &asset, const char *dictId, const char *extId) : inline LazyDict<T>::LazyDict(Asset &asset, const char *dictId, const char *extId) :
mDictId(dictId), mExtId(extId), mDict(0), mAsset(asset) { mDictId(dictId), mExtId(extId), mDict(nullptr), mAsset(asset) {
asset.mDicts.push_back(this); // register to the list of dictionaries asset.mDicts.push_back(this); // register to the list of dictionaries
} }
@ -81,7 +81,7 @@ inline LazyDict<T>::~LazyDict() {
template <class T> template <class T>
inline void LazyDict<T>::AttachToDocument(Document &doc) { inline void LazyDict<T>::AttachToDocument(Document &doc) {
Value *container = 0; Value *container = nullptr;
if (mExtId) { if (mExtId) {
if (Value *exts = FindObject(doc, "extensions")) { if (Value *exts = FindObject(doc, "extensions")) {
@ -98,7 +98,7 @@ inline void LazyDict<T>::AttachToDocument(Document &doc) {
template <class T> template <class T>
inline void LazyDict<T>::DetachFromDocument() { inline void LazyDict<T>::DetachFromDocument() {
mDict = 0; mDict = nullptr;
} }
template <class T> template <class T>
@ -194,7 +194,7 @@ inline void Buffer::Read(Value &obj, Asset &r) {
glTFCommon::Util::DataURI dataURI; glTFCommon::Util::DataURI dataURI;
if (ParseDataURI(uri, it->GetStringLength(), dataURI)) { if (ParseDataURI(uri, it->GetStringLength(), dataURI)) {
if (dataURI.base64) { if (dataURI.base64) {
uint8_t *data = 0; uint8_t *data = nullptr;
this->byteLength = Base64::Decode(dataURI.data, dataURI.dataLength, data); this->byteLength = Base64::Decode(dataURI.data, dataURI.dataLength, data);
this->mData.reset(data, std::default_delete<uint8_t[]>()); this->mData.reset(data, std::default_delete<uint8_t[]>());
@ -383,9 +383,9 @@ inline unsigned int Accessor::GetElementSize() {
} }
inline uint8_t *Accessor::GetPointer() { inline uint8_t *Accessor::GetPointer() {
if (!bufferView || !bufferView->buffer) return 0; if (!bufferView || !bufferView->buffer) return nullptr;
uint8_t *basePtr = bufferView->buffer->GetPointer(); uint8_t *basePtr = bufferView->buffer->GetPointer();
if (!basePtr) return 0; if (!basePtr) return nullptr;
size_t offset = byteOffset + bufferView->byteOffset; size_t offset = byteOffset + bufferView->byteOffset;
@ -698,7 +698,7 @@ inline void Mesh::Read(Value &pJSON_Object, Asset &pAsset_Root) {
// and WEIGHT.Attribute semantics can be of the form[semantic]_[set_index], e.g., TEXCOORD_0, TEXCOORD_1, etc. // and WEIGHT.Attribute semantics can be of the form[semantic]_[set_index], e.g., TEXCOORD_0, TEXCOORD_1, etc.
int undPos = 0; int undPos = 0;
Mesh::AccessorList *vec = 0; Mesh::AccessorList *vec = nullptr;
if (GetAttribVector(prim, attr, vec, undPos)) { if (GetAttribVector(prim, attr, vec, undPos)) {
size_t idx = (attr[undPos] == '_') ? atoi(attr + undPos + 1) : 0; size_t idx = (attr[undPos] == '_') ? atoi(attr + undPos + 1) : 0;
if ((*vec).size() <= idx) (*vec).resize(idx + 1); if ((*vec).size() <= idx) (*vec).resize(idx + 1);

View File

@ -525,7 +525,7 @@ namespace glTF {
{ {
std::unique_ptr<IOStream> jsonOutFile(mAsset.OpenFile(path, "wt", true)); std::unique_ptr<IOStream> jsonOutFile(mAsset.OpenFile(path, "wt", true));
if (jsonOutFile == 0) { if (jsonOutFile == nullptr) {
throw DeadlyExportError("Could not open output file: " + std::string(path)); throw DeadlyExportError("Could not open output file: " + std::string(path));
} }
@ -548,7 +548,7 @@ namespace glTF {
std::unique_ptr<IOStream> binOutFile(mAsset.OpenFile(binPath, "wb", true)); std::unique_ptr<IOStream> binOutFile(mAsset.OpenFile(binPath, "wb", true));
if (binOutFile == 0) { if (binOutFile == nullptr) {
throw DeadlyExportError("Could not open output file: " + binPath); throw DeadlyExportError("Could not open output file: " + binPath);
} }
@ -564,7 +564,7 @@ namespace glTF {
{ {
std::unique_ptr<IOStream> outfile(mAsset.OpenFile(path, "wb", true)); std::unique_ptr<IOStream> outfile(mAsset.OpenFile(path, "wb", true));
if (outfile == 0) { if (outfile == nullptr) {
throw DeadlyExportError("Could not open output file: " + std::string(path)); throw DeadlyExportError("Could not open output file: " + std::string(path));
} }

View File

@ -259,7 +259,7 @@ class Ref {
public: public:
Ref() : Ref() :
vector(0), vector(nullptr),
index(0) {} index(0) {}
Ref(std::vector<T *> &vec, unsigned int idx) : Ref(std::vector<T *> &vec, unsigned int idx) :
vector(&vec), vector(&vec),
@ -495,22 +495,22 @@ inline Value *FindExtension(Value &val, const char *extensionId) {
inline Value *FindString(Value &val, const char *id) { inline Value *FindString(Value &val, const char *id) {
Value::MemberIterator it = val.FindMember(id); Value::MemberIterator it = val.FindMember(id);
return (it != val.MemberEnd() && it->value.IsString()) ? &it->value : 0; return (it != val.MemberEnd() && it->value.IsString()) ? &it->value : nullptr;
} }
inline Value *FindObject(Value &val, const char *id) { inline Value *FindObject(Value &val, const char *id) {
Value::MemberIterator it = val.FindMember(id); Value::MemberIterator it = val.FindMember(id);
return (it != val.MemberEnd() && it->value.IsObject()) ? &it->value : 0; return (it != val.MemberEnd() && it->value.IsObject()) ? &it->value : nullptr;
} }
inline Value *FindArray(Value &val, const char *id) { inline Value *FindArray(Value &val, const char *id) {
Value::MemberIterator it = val.FindMember(id); Value::MemberIterator it = val.FindMember(id);
return (it != val.MemberEnd() && it->value.IsArray()) ? &it->value : 0; return (it != val.MemberEnd() && it->value.IsArray()) ? &it->value : nullptr;
} }
inline Value *FindNumber(Value &val, const char *id) { inline Value *FindNumber(Value &val, const char *id) {
Value::MemberIterator it = val.FindMember(id); Value::MemberIterator it = val.FindMember(id);
return (it != val.MemberEnd() && it->value.IsNumber()) ? &it->value : 0; return (it != val.MemberEnd() && it->value.IsNumber()) ? &it->value : nullptr;
} }
} // namespace glTFCommon } // namespace glTFCommon

View File

@ -111,7 +111,7 @@ glTFExporter::glTFExporter(const char* filename, IOSystem* pIOSystem, const aiSc
mScene.reset(sceneCopy_tmp); mScene.reset(sceneCopy_tmp);
mAsset.reset( new glTF::Asset( pIOSystem ) ); mAsset = std::make_shared<glTF::Asset>(pIOSystem);
if (isBinary) { if (isBinary) {
mAsset->SetAsBinary(); mAsset->SetAsBinary();

View File

@ -283,7 +283,7 @@ void glTFImporter::ImportMeshes(glTF::Asset &r) {
} }
} }
aiFace *faces = 0; aiFace *faces = nullptr;
unsigned int nFaces = 0; unsigned int nFaces = 0;
if (prim.indices) { if (prim.indices) {

View File

@ -1044,7 +1044,7 @@ class LazyDict : public LazyDictBase {
Ref<T> Add(T *obj); Ref<T> Add(T *obj);
public: public:
LazyDict(Asset &asset, const char *dictId, const char *extId = 0); LazyDict(Asset &asset, const char *dictId, const char *extId = nullptr);
~LazyDict(); ~LazyDict();
Ref<T> Retrieve(unsigned int i); Ref<T> Retrieve(unsigned int i);

View File

@ -371,7 +371,7 @@ template <class T>
inline LazyDict<T>::LazyDict(Asset &asset, const char *dictId, const char *extId) : inline LazyDict<T>::LazyDict(Asset &asset, const char *dictId, const char *extId) :
mDictId(dictId), mDictId(dictId),
mExtId(extId), mExtId(extId),
mDict(0), mDict(nullptr),
mAsset(asset) { mAsset(asset) {
asset.mDicts.push_back(this); // register to the list of dictionaries asset.mDicts.push_back(this); // register to the list of dictionaries
} }
@ -903,7 +903,7 @@ inline void Accessor::Read(Value &obj, Asset &r) {
const unsigned int elementSize = GetElementSize(); const unsigned int elementSize = GetElementSize();
const size_t dataSize = count * elementSize; const size_t dataSize = count * elementSize;
sparse->PopulateData(dataSize, bufferView ? bufferView->GetPointer(byteOffset) : 0); sparse->PopulateData(dataSize, bufferView ? bufferView->GetPointer(byteOffset) : nullptr);
sparse->PatchData(elementSize); sparse->PatchData(elementSize);
} }
} }

View File

@ -758,7 +758,7 @@ namespace glTF2 {
{ {
std::unique_ptr<IOStream> jsonOutFile(mAsset.OpenFile(path, "wt", true)); std::unique_ptr<IOStream> jsonOutFile(mAsset.OpenFile(path, "wt", true));
if (jsonOutFile == 0) { if (jsonOutFile == nullptr) {
throw DeadlyExportError("Could not open output file: " + std::string(path)); throw DeadlyExportError("Could not open output file: " + std::string(path));
} }
@ -781,7 +781,7 @@ namespace glTF2 {
std::unique_ptr<IOStream> binOutFile(mAsset.OpenFile(binPath, "wb", true)); std::unique_ptr<IOStream> binOutFile(mAsset.OpenFile(binPath, "wb", true));
if (binOutFile == 0) { if (binOutFile == nullptr) {
throw DeadlyExportError("Could not open output file: " + binPath); throw DeadlyExportError("Could not open output file: " + binPath);
} }
@ -797,7 +797,7 @@ namespace glTF2 {
{ {
std::unique_ptr<IOStream> outfile(mAsset.OpenFile(path, "wb", true)); std::unique_ptr<IOStream> outfile(mAsset.OpenFile(path, "wb", true));
if (outfile == 0) { if (outfile == nullptr) {
throw DeadlyExportError("Could not open output file: " + std::string(path)); throw DeadlyExportError("Could not open output file: " + std::string(path));
} }

View File

@ -321,7 +321,7 @@ inline size_t NZDiff(ComponentType compType, void *data, void *dataBase, size_t
} }
inline Ref<Accessor> ExportDataSparse(Asset &a, std::string &meshName, Ref<Buffer> &buffer, inline Ref<Accessor> ExportDataSparse(Asset &a, std::string &meshName, Ref<Buffer> &buffer,
size_t count, void *data, AttribType::Value typeIn, AttribType::Value typeOut, ComponentType compType, BufferViewTarget target = BufferViewTarget_NONE, void *dataBase = 0) { size_t count, void *data, AttribType::Value typeIn, AttribType::Value typeOut, ComponentType compType, BufferViewTarget target = BufferViewTarget_NONE, void *dataBase = nullptr) {
if (!count || !data) { if (!count || !data) {
return Ref<Accessor>(); return Ref<Accessor>();
} }
@ -356,7 +356,7 @@ inline Ref<Accessor> ExportDataSparse(Asset &a, std::string &meshName, Ref<Buffe
acc->type = typeOut; acc->type = typeOut;
if (data) { if (data) {
void *nzDiff = 0, *nzIdx = 0; void *nzDiff = nullptr, *nzIdx = nullptr;
size_t nzCount = NZDiff(compType, data, dataBase, count, numCompsIn, numCompsOut, nzDiff, nzIdx); size_t nzCount = NZDiff(compType, data, dataBase, count, numCompsIn, numCompsOut, nzDiff, nzIdx);
acc->sparse.reset(new Accessor::Sparse); acc->sparse.reset(new Accessor::Sparse);
acc->sparse->count = nzCount; acc->sparse->count = nzCount;

View File

@ -1131,7 +1131,7 @@ ASSIMP_API void aiMatrix4RotationX(
ASSIMP_API void aiMatrix4RotationY( ASSIMP_API void aiMatrix4RotationY(
C_STRUCT aiMatrix4x4 *mat, C_STRUCT aiMatrix4x4 *mat,
const float angle) { const float angle) {
ai_assert(NULL != mat); ai_assert(nullptr != mat);
aiMatrix4x4::RotationY(angle, *mat); aiMatrix4x4::RotationY(angle, *mat);
} }

View File

@ -595,7 +595,7 @@ bool ExportProperties::SetPropertyCallback(const char *szName, const std::functi
} }
std::function<void *(void *)> ExportProperties::GetPropertyCallback(const char *szName) const { std::function<void *(void *)> ExportProperties::GetPropertyCallback(const char *szName) const {
return GetGenericProperty<std::function<void *(void *)>>(mCallbackProperties, szName, 0); return GetGenericProperty<std::function<void *(void *)>>(mCallbackProperties, szName, nullptr);
} }
bool ExportProperties::HasPropertyCallback(const char *szName) const { bool ExportProperties::HasPropertyCallback(const char *szName) const {

View File

@ -122,7 +122,7 @@ inline const char* ReadHeader(uint8_t* outFile, uint32_t& fileType)
} }
::memcpy(&fileType, outFile, 4); ::memcpy(&fileType, outFile, 4);
AI_LSWAP4(fileType); AI_LSWAP4(fileType);
return 0; return nullptr;
} }

View File

@ -121,7 +121,7 @@ voidpf IOSystem2Unzip::open(voidpf opaque, const char *filename, int mode) {
voidpf IOSystem2Unzip::opendisk(voidpf opaque, voidpf stream, uint32_t number_disk, int mode) { voidpf IOSystem2Unzip::opendisk(voidpf opaque, voidpf stream, uint32_t number_disk, int mode) {
ZipFile *io_stream = (ZipFile *)stream; ZipFile *io_stream = (ZipFile *)stream;
voidpf ret = NULL; voidpf ret = nullptr;
int i; int i;
char *disk_filename = (char*)malloc(io_stream->m_Filename.length() + 1); char *disk_filename = (char*)malloc(io_stream->m_Filename.length() + 1);

View File

@ -133,9 +133,9 @@ void DeboneProcess::Execute( aiScene* pScene)
// store new meshes and indices of the new meshes // store new meshes and indices of the new meshes
for(unsigned int b=0;b<newMeshes.size();b++) { for(unsigned int b=0;b<newMeshes.size();b++) {
const aiString *find = newMeshes[b].second?&newMeshes[b].second->mName:0; const aiString *find = newMeshes[b].second ? &newMeshes[b].second->mName : nullptr;
aiNode *theNode = find?pScene->mRootNode->FindNode(*find):0; aiNode *theNode = find ? pScene->mRootNode->FindNode(*find) : nullptr;
std::pair<unsigned int,aiNode*> push_pair(static_cast<unsigned int>(meshes.size()),theNode); std::pair<unsigned int,aiNode*> push_pair(static_cast<unsigned int>(meshes.size()),theNode);
mSubMeshIndices[a].push_back(push_pair); mSubMeshIndices[a].push_back(push_pair);
@ -153,7 +153,7 @@ void DeboneProcess::Execute( aiScene* pScene)
} }
else { else {
// Mesh is kept unchanged - store it's new place in the mesh array // Mesh is kept unchanged - store it's new place in the mesh array
mSubMeshIndices[a].emplace_back(static_cast<unsigned int>(meshes.size()), (aiNode *)0); mSubMeshIndices[a].emplace_back(static_cast<unsigned int>(meshes.size()), (aiNode *)nullptr);
meshes.push_back(srcMesh); meshes.push_back(srcMesh);
} }
} }
@ -341,7 +341,7 @@ void DeboneProcess::SplitMesh( const aiMesh* pMesh, std::vector< std::pair< aiMe
} }
aiMesh *baseMesh = MakeSubmesh(pMesh,subFaces,0); aiMesh *baseMesh = MakeSubmesh(pMesh,subFaces,0);
std::pair<aiMesh*,const aiBone*> push_pair(baseMesh,(const aiBone*)0); std::pair<aiMesh *, const aiBone *> push_pair(baseMesh, (const aiBone *)nullptr);
poNewMeshes.push_back(push_pair); poNewMeshes.push_back(push_pair);
} }

View File

@ -93,8 +93,8 @@ bool MakeVerboseFormatProcess::MakeVerboseFormat(aiMesh *pcMesh) {
pvBitangents = new aiVector3D[iNumVerts]; pvBitangents = new aiVector3D[iNumVerts];
} }
aiVector3D *apvTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS] = { 0 }; aiVector3D *apvTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS] = { nullptr };
aiColor4D *apvColorSets[AI_MAX_NUMBER_OF_COLOR_SETS] = { 0 }; aiColor4D *apvColorSets[AI_MAX_NUMBER_OF_COLOR_SETS] = { nullptr };
unsigned int p = 0; unsigned int p = 0;
while (pcMesh->HasTextureCoords(p)) while (pcMesh->HasTextureCoords(p))

View File

@ -51,7 +51,7 @@ public
protected: protected:
void SetUp() override { void SetUp() override {
::srand(static_cast<unsigned>(time(0))); ::srand(static_cast<unsigned>(time(nullptr)));
vecs = new aiVector3D[100]; vecs = new aiVector3D[100];
for (size_t i = 0; i < 100; ++i) { for (size_t i = 0; i < 100; ++i) {
vecs[i].x = static_cast<float>(rand()) / (static_cast<float>(RAND_MAX / 100)); vecs[i].x = static_cast<float>(rand()) / (static_cast<float>(RAND_MAX / 100));

View File

@ -73,7 +73,7 @@ public:
virtual IOStream* Open( const char* pFile, const char* pMode = "rb" ) { virtual IOStream* Open( const char* pFile, const char* pMode = "rb" ) {
EXPECT_NE( nullptr, pFile ); EXPECT_NE( nullptr, pFile );
EXPECT_NE( nullptr, pMode ); EXPECT_NE( nullptr, pMode );
return NULL; return nullptr;
} }
virtual void Close( IOStream* pFile ) { virtual void Close( IOStream* pFile ) {

View File

@ -67,7 +67,7 @@ public:
aiColor3D color( 1, 0, 0 ); aiColor3D color( 1, 0, 0 );
EXPECT_EQ( AI_SUCCESS, scene->mMaterials[ 0 ]->AddProperty( &color, 1, AI_MATKEY_COLOR_DIFFUSE ) ); EXPECT_EQ( AI_SUCCESS, scene->mMaterials[ 0 ]->AddProperty( &color, 1, AI_MATKEY_COLOR_DIFFUSE ) );
::srand( static_cast< unsigned int >( ::time( NULL ) ) ); ::srand(static_cast<unsigned int>(::time(nullptr)));
opacity = float( rand() ) / float( RAND_MAX ); opacity = float( rand() ) / float( RAND_MAX );
EXPECT_EQ( AI_SUCCESS, scene->mMaterials[ 0 ]->AddProperty( &opacity, 1, AI_MATKEY_OPACITY ) ); EXPECT_EQ( AI_SUCCESS, scene->mMaterials[ 0 ]->AddProperty( &opacity, 1, AI_MATKEY_OPACITY ) );

View File

@ -62,7 +62,7 @@ protected:
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
TEST_F(BlendImportMaterials, testImportMaterial) { TEST_F(BlendImportMaterials, testImportMaterial) {
const aiScene *pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/BlenderMaterial_269.blend", aiProcess_ValidateDataStructure); const aiScene *pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/BlenderMaterial_269.blend", aiProcess_ValidateDataStructure);
ASSERT_TRUE(pTest != NULL); ASSERT_TRUE(pTest != nullptr);
ASSERT_TRUE(pTest->HasMaterials()); ASSERT_TRUE(pTest->HasMaterials());
ASSERT_EQ(1U, pTest->mNumMaterials); ASSERT_EQ(1U, pTest->mNumMaterials);
@ -121,7 +121,7 @@ TEST_F(BlendImportMaterials, testImportMaterial) {
TEST_F(BlendImportMaterials, testImportMaterialwith2texturesAnd2TexCoordMappings) { TEST_F(BlendImportMaterials, testImportMaterialwith2texturesAnd2TexCoordMappings) {
const aiScene *pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/plane_2_textures_2_texcoords_279.blend", aiProcess_ValidateDataStructure); const aiScene *pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/plane_2_textures_2_texcoords_279.blend", aiProcess_ValidateDataStructure);
ASSERT_TRUE(pTest != NULL); ASSERT_TRUE(pTest != nullptr);
// material has 2 diffuse textures // material has 2 diffuse textures
ASSERT_TRUE(pTest->HasMaterials()); ASSERT_TRUE(pTest->HasMaterials());

View File

@ -62,7 +62,7 @@ protected:
TEST_F(BlenderWorkTest, work_279) { TEST_F(BlenderWorkTest, work_279) {
const aiScene *pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/test_279.blend", aiProcess_ValidateDataStructure); const aiScene *pTest = im->ReadFile(ASSIMP_TEST_MODELS_DIR "/BLEND/test_279.blend", aiProcess_ValidateDataStructure);
ASSERT_TRUE(pTest != NULL); ASSERT_TRUE(pTest != nullptr);
// material has 2 diffuse textures // material has 2 diffuse textures
ASSERT_TRUE(pTest->HasMaterials()); ASSERT_TRUE(pTest->HasMaterials());

View File

@ -169,7 +169,7 @@ TEST_F(utColladaExport, testExportLight) {
const aiScene *imported = im->ReadFile(file, aiProcess_ValidateDataStructure); const aiScene *imported = im->ReadFile(file, aiProcess_ValidateDataStructure);
ASSERT_TRUE(imported != NULL); ASSERT_TRUE(imported != nullptr);
// Check common metadata survived roundtrip // Check common metadata survived roundtrip
aiString readImporter; aiString readImporter;

View File

@ -115,17 +115,17 @@ TEST_F(utFindInvalidDataProcess, testStepNegativeResult) {
mProcess->ProcessMesh(mMesh); mProcess->ProcessMesh(mMesh);
EXPECT_TRUE(NULL != mMesh->mVertices); EXPECT_TRUE(nullptr != mMesh->mVertices);
EXPECT_EQ(NULL, mMesh->mNormals); EXPECT_EQ(nullptr, mMesh->mNormals);
EXPECT_EQ(NULL, mMesh->mTangents); EXPECT_EQ(nullptr, mMesh->mTangents);
EXPECT_EQ(NULL, mMesh->mBitangents); EXPECT_EQ(nullptr, mMesh->mBitangents);
for (unsigned int i = 0; i < 2; ++i) { for (unsigned int i = 0; i < 2; ++i) {
EXPECT_TRUE(NULL != mMesh->mTextureCoords[i]); EXPECT_TRUE(nullptr != mMesh->mTextureCoords[i]);
} }
for (unsigned int i = 2; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) { for (unsigned int i = 2; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) {
EXPECT_EQ(NULL, mMesh->mTextureCoords[i]); EXPECT_EQ(nullptr, mMesh->mTextureCoords[i]);
} }
} }

View File

@ -82,5 +82,5 @@ void GenNormalsTest::TearDown() {
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
TEST_F(GenNormalsTest, testSimpleTriangle) { TEST_F(GenNormalsTest, testSimpleTriangle) {
piProcess->GenMeshVertexNormals(pcMesh, 0); piProcess->GenMeshVertexNormals(pcMesh, 0);
EXPECT_TRUE(pcMesh->mNormals != NULL); EXPECT_TRUE(pcMesh->mNormals != nullptr);
} }

View File

@ -174,7 +174,7 @@ TEST_F(ImporterTest, testMemoryRead) {
const aiScene *sc = pImp->ReadFileFromMemory(InputData_abRawBlock, InputData_BLOCK_SIZE, const aiScene *sc = pImp->ReadFileFromMemory(InputData_abRawBlock, InputData_BLOCK_SIZE,
aiProcessPreset_TargetRealtime_Quality, "3ds"); aiProcessPreset_TargetRealtime_Quality, "3ds");
ASSERT_TRUE(sc != NULL); ASSERT_TRUE(sc != nullptr);
EXPECT_EQ(aiString("<3DSRoot>"), sc->mRootNode->mName); EXPECT_EQ(aiString("<3DSRoot>"), sc->mRootNode->mName);
EXPECT_EQ(1U, sc->mNumMeshes); EXPECT_EQ(1U, sc->mNumMeshes);
EXPECT_EQ(24U, sc->mMeshes[0]->mNumVertices); EXPECT_EQ(24U, sc->mMeshes[0]->mNumVertices);
@ -220,10 +220,10 @@ TEST_F(ImporterTest, testPluginInterface) {
EXPECT_FALSE(pImp->IsExtensionSupported(".")); EXPECT_FALSE(pImp->IsExtensionSupported("."));
TestPlugin *p = (TestPlugin *)pImp->GetImporter(".windows"); TestPlugin *p = (TestPlugin *)pImp->GetImporter(".windows");
ASSERT_TRUE(NULL != p); ASSERT_TRUE(nullptr != p);
try { try {
p->InternReadFile("", 0, NULL); p->InternReadFile("", nullptr, nullptr);
} catch (const DeadlyImportError &dead) { } catch (const DeadlyImportError &dead) {
EXPECT_TRUE(!strcmp(dead.what(), AIUT_DEF_ERROR_TEXT)); EXPECT_TRUE(!strcmp(dead.what(), AIUT_DEF_ERROR_TEXT));

View File

@ -49,7 +49,7 @@ class utMatrix4x4 : public ::testing::Test {
TEST_F(utMatrix4x4, badIndexOperatorTest) { TEST_F(utMatrix4x4, badIndexOperatorTest) {
aiMatrix4x4 m; aiMatrix4x4 m;
ai_real *a0 = m[4]; ai_real *a0 = m[4];
EXPECT_EQ(NULL, a0); EXPECT_EQ(nullptr, a0);
} }
TEST_F(utMatrix4x4, indexOperatorTest) { TEST_F(utMatrix4x4, indexOperatorTest) {

View File

@ -111,7 +111,7 @@ TEST_F(RemoveVCProcessTest, testMeshRemove) {
piProcess->SetDeleteFlags(aiComponent_MESHES); piProcess->SetDeleteFlags(aiComponent_MESHES);
piProcess->Execute(pScene); piProcess->Execute(pScene);
EXPECT_TRUE(NULL == pScene->mMeshes); EXPECT_TRUE(nullptr == pScene->mMeshes);
EXPECT_EQ(0U, pScene->mNumMeshes); EXPECT_EQ(0U, pScene->mNumMeshes);
EXPECT_TRUE(pScene->mFlags == AI_SCENE_FLAGS_INCOMPLETE); EXPECT_TRUE(pScene->mFlags == AI_SCENE_FLAGS_INCOMPLETE);
} }
@ -121,7 +121,7 @@ TEST_F(RemoveVCProcessTest, testAnimRemove) {
piProcess->SetDeleteFlags(aiComponent_ANIMATIONS); piProcess->SetDeleteFlags(aiComponent_ANIMATIONS);
piProcess->Execute(pScene); piProcess->Execute(pScene);
EXPECT_TRUE(NULL == pScene->mAnimations); EXPECT_TRUE(nullptr == pScene->mAnimations);
EXPECT_EQ(0U, pScene->mNumAnimations); EXPECT_EQ(0U, pScene->mNumAnimations);
EXPECT_EQ(0U, pScene->mFlags); EXPECT_EQ(0U, pScene->mFlags);
} }
@ -143,7 +143,7 @@ TEST_F(RemoveVCProcessTest, testTextureRemove) {
piProcess->SetDeleteFlags(aiComponent_TEXTURES); piProcess->SetDeleteFlags(aiComponent_TEXTURES);
piProcess->Execute(pScene); piProcess->Execute(pScene);
EXPECT_TRUE(NULL == pScene->mTextures); EXPECT_TRUE(nullptr == pScene->mTextures);
EXPECT_EQ(0U, pScene->mNumTextures); EXPECT_EQ(0U, pScene->mNumTextures);
EXPECT_EQ(0U, pScene->mFlags); EXPECT_EQ(0U, pScene->mFlags);
} }
@ -153,7 +153,7 @@ TEST_F(RemoveVCProcessTest, testCameraRemove) {
piProcess->SetDeleteFlags(aiComponent_CAMERAS); piProcess->SetDeleteFlags(aiComponent_CAMERAS);
piProcess->Execute(pScene); piProcess->Execute(pScene);
EXPECT_TRUE(NULL == pScene->mCameras); EXPECT_TRUE(nullptr == pScene->mCameras);
EXPECT_EQ(0U, pScene->mNumCameras); EXPECT_EQ(0U, pScene->mNumCameras);
EXPECT_EQ(0U, pScene->mFlags); EXPECT_EQ(0U, pScene->mFlags);
} }
@ -163,7 +163,7 @@ TEST_F(RemoveVCProcessTest, testLightRemove) {
piProcess->SetDeleteFlags(aiComponent_LIGHTS); piProcess->SetDeleteFlags(aiComponent_LIGHTS);
piProcess->Execute(pScene); piProcess->Execute(pScene);
EXPECT_TRUE(NULL == pScene->mLights); EXPECT_TRUE(nullptr == pScene->mLights);
EXPECT_EQ(0U, pScene->mNumLights); EXPECT_EQ(0U, pScene->mNumLights);
EXPECT_EQ(0U, pScene->mFlags); EXPECT_EQ(0U, pScene->mFlags);
} }

View File

@ -149,10 +149,10 @@ TEST_F(RemoveRedundantMatsTest, testRedundantMaterials) {
piProcess->Execute(pcScene1); piProcess->Execute(pcScene1);
EXPECT_EQ(3U, pcScene1->mNumMaterials); EXPECT_EQ(3U, pcScene1->mNumMaterials);
EXPECT_TRUE(0 != pcScene1->mMaterials && EXPECT_TRUE(nullptr != pcScene1->mMaterials &&
0 != pcScene1->mMaterials[0] && nullptr != pcScene1->mMaterials[0] &&
0 != pcScene1->mMaterials[1] && nullptr != pcScene1->mMaterials[1] &&
0 != pcScene1->mMaterials[2]); nullptr != pcScene1->mMaterials[2]);
aiString sName; aiString sName;
EXPECT_EQ(AI_SUCCESS, aiGetMaterialString(pcScene1->mMaterials[2], AI_MATKEY_NAME, &sName)); EXPECT_EQ(AI_SUCCESS, aiGetMaterialString(pcScene1->mMaterials[2], AI_MATKEY_NAME, &sName));
@ -165,11 +165,11 @@ TEST_F(RemoveRedundantMatsTest, testRedundantMaterialsWithExcludeList) {
piProcess->Execute(pcScene1); piProcess->Execute(pcScene1);
EXPECT_EQ(4U, pcScene1->mNumMaterials); EXPECT_EQ(4U, pcScene1->mNumMaterials);
EXPECT_TRUE(0 != pcScene1->mMaterials && EXPECT_TRUE(nullptr != pcScene1->mMaterials &&
0 != pcScene1->mMaterials[0] && nullptr != pcScene1->mMaterials[0] &&
0 != pcScene1->mMaterials[1] && nullptr != pcScene1->mMaterials[1] &&
0 != pcScene1->mMaterials[2] && nullptr != pcScene1->mMaterials[2] &&
0 != pcScene1->mMaterials[3]); nullptr != pcScene1->mMaterials[3]);
aiString sName; aiString sName;
EXPECT_EQ(AI_SUCCESS, aiGetMaterialString(pcScene1->mMaterials[3], AI_MATKEY_NAME, &sName)); EXPECT_EQ(AI_SUCCESS, aiGetMaterialString(pcScene1->mMaterials[3], AI_MATKEY_NAME, &sName));

View File

@ -184,13 +184,13 @@ TEST_F(SortByPTypeProcessTest, SortByPTypeStep) {
aiMesh *mesh = mScene->mMeshes[real]; aiMesh *mesh = mScene->mMeshes[real];
EXPECT_TRUE(NULL != mesh); EXPECT_TRUE(nullptr != mesh);
EXPECT_EQ(AI_PRIMITIVE_TYPE_FOR_N_INDICES(n + 1), mesh->mPrimitiveTypes); EXPECT_EQ(AI_PRIMITIVE_TYPE_FOR_N_INDICES(n + 1), mesh->mPrimitiveTypes);
EXPECT_TRUE(NULL != mesh->mVertices); EXPECT_TRUE(nullptr != mesh->mVertices);
EXPECT_TRUE(NULL != mesh->mNormals); EXPECT_TRUE(nullptr != mesh->mNormals);
EXPECT_TRUE(NULL != mesh->mTangents); EXPECT_TRUE(nullptr != mesh->mTangents);
EXPECT_TRUE(NULL != mesh->mBitangents); EXPECT_TRUE(nullptr != mesh->mBitangents);
EXPECT_TRUE(NULL != mesh->mTextureCoords[0]); EXPECT_TRUE(nullptr != mesh->mTextureCoords[0]);
EXPECT_TRUE(mesh->mNumFaces == idx); EXPECT_TRUE(mesh->mNumFaces == idx);
for (unsigned int f = 0; f < mesh->mNumFaces; ++f) { for (unsigned int f = 0; f < mesh->mNumFaces; ++f) {

View File

@ -103,8 +103,8 @@ TEST_F(SplitLargeMeshesTest, testVertexSplit) {
iter != end; ++iter) { iter != end; ++iter) {
aiMesh *mesh = (*iter).first; aiMesh *mesh = (*iter).first;
EXPECT_LT(mesh->mNumVertices, 1000U); EXPECT_LT(mesh->mNumVertices, 1000U);
EXPECT_TRUE(NULL != mesh->mNormals); EXPECT_TRUE(nullptr != mesh->mNormals);
EXPECT_TRUE(NULL != mesh->mVertices); EXPECT_TRUE(nullptr != mesh->mVertices);
iOldFaceNum -= mesh->mNumFaces; iOldFaceNum -= mesh->mNumFaces;
delete mesh; delete mesh;
@ -145,8 +145,8 @@ TEST_F(SplitLargeMeshesTest, testTriangleSplit) {
iter != end; ++iter) { iter != end; ++iter) {
aiMesh *mesh = (*iter).first; aiMesh *mesh = (*iter).first;
EXPECT_LT(mesh->mNumFaces, 1000U); EXPECT_LT(mesh->mNumFaces, 1000U);
EXPECT_TRUE(NULL != mesh->mNormals); EXPECT_TRUE(nullptr != mesh->mNormals);
EXPECT_TRUE(NULL != mesh->mVertices); EXPECT_TRUE(nullptr != mesh->mVertices);
iOldFaceNum -= mesh->mNumFaces; iOldFaceNum -= mesh->mNumFaces;
delete mesh; delete mesh;

View File

@ -133,5 +133,5 @@ TEST_F(TriangulateProcessTest, testTriangulation) {
} }
// we should have no valid normal vectors now because we aren't a pure polygon mesh // we should have no valid normal vectors now because we aren't a pure polygon mesh
EXPECT_TRUE(pcMesh->mNormals == NULL); EXPECT_TRUE(pcMesh->mNormals == nullptr);
} }

View File

@ -910,7 +910,7 @@ int Assimp_CompareDump (const char* const* params, unsigned int num)
if (m_file) if (m_file)
{ {
fclose(m_file); fclose(m_file);
m_file = NULL; m_file = nullptr;
} }
} }

View File

@ -177,7 +177,7 @@ void FindSpecialPoints(const aiScene *scene, aiVector3D special_points[3]) {
// ----------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------
std::string FindPTypes(const aiScene *scene) { std::string FindPTypes(const aiScene *scene) {
bool haveit[4] = { 0 }; bool haveit[4] = { false };
for (unsigned int i = 0; i < scene->mNumMeshes; ++i) { for (unsigned int i = 0; i < scene->mNumMeshes; ++i) {
const unsigned int pt = scene->mMeshes[i]->mPrimitiveTypes; const unsigned int pt = scene->mMeshes[i]->mPrimitiveTypes;
if (pt & aiPrimitiveType_POINT) { if (pt & aiPrimitiveType_POINT) {

View File

@ -291,7 +291,7 @@ const aiScene* ImportModel(
// Now validate this flag combination // Now validate this flag combination
if(!globalImporter->ValidateFlags(imp.ppFlags)) { if(!globalImporter->ValidateFlags(imp.ppFlags)) {
printf("ERROR: Unsupported post-processing flags \n"); printf("ERROR: Unsupported post-processing flags \n");
return NULL; return nullptr;
} }
printf("Validating postprocessing flags ... OK\n"); printf("Validating postprocessing flags ... OK\n");
if (imp.showLog) { if (imp.showLog) {
@ -311,7 +311,7 @@ const aiScene* ImportModel(
} }
if (!scene) { if (!scene) {
printf("ERROR: Failed to load file: %s\n", globalImporter->GetErrorString()); printf("ERROR: Failed to load file: %s\n", globalImporter->GetErrorString());
return NULL; return nullptr;
} }
const clock_t second = ::clock(); const clock_t second = ::clock();