diff --git a/.gitignore b/.gitignore index 609873754..d7767ebfd 100644 --- a/.gitignore +++ b/.gitignore @@ -45,4 +45,7 @@ examples/CreateIfcWallAndWriteFile/x64/ examples/LoadFileWithGeometryExampleConsole/dump_mesh_debug.txt IfcPlusPlus-* IfcPlusPlus/src/ifcpp/geometry/Carve - Copy/ +IfcPlusPlus/src/ifcpp- IfcPlusPlus/src/ifcpp-- +IfcPlusPlus/src/ifcpp---/ +IfcPlusPlus/src/ifcpp----/ diff --git a/IfcPlusPlus/CMakeLists.txt b/IfcPlusPlus/CMakeLists.txt index aeaae43f0..286ffdc3c 100644 --- a/IfcPlusPlus/CMakeLists.txt +++ b/IfcPlusPlus/CMakeLists.txt @@ -38,6 +38,8 @@ set(IFCPP_SOURCE_FILES src/ifcpp/reader/ReaderUtil.cpp src/ifcpp/writer/WriterSTEP.cpp src/ifcpp/writer/WriterUtil.cpp + src/ifcpp/geometry/MeshOps.cpp + src/ifcpp/geometry/GeometryInputData.cpp src/external/manifold/src/boolean3.cpp src/external/manifold/src/boolean_result.cpp src/external/manifold/src/collider/src/collider.cpp @@ -82,14 +84,11 @@ set(IFCPP_SOURCE_FILES src/external/Carve/src/lib/timing.cpp src/external/Carve/src/lib/triangle_intersection.cpp src/external/Carve/src/lib/triangulator.cpp - src/external/Carve/src/common/geometry.cpp + src/external/Carve/src/common/geometry.cpp + src/external/zip-master/zip.c ) if (MSVC) - set(IFCPP_SOURCE_FILES - src/external/XUnzip.cpp # do not add src/external/XUnzip.cpp on unix platforms - ${IFCPP_SOURCE_FILES}) - #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj ") set_source_files_properties(src/ifcpp/IFC4X3/EntityFactory.cpp PROPERTIES COMPILE_FLAGS /bigobj) set_source_files_properties(src/ifcpp/IFC4X3/TypeFactory.cpp PROPERTIES COMPILE_FLAGS /bigobj) endif() diff --git a/IfcPlusPlus/IfcPlusPlus.vcxproj b/IfcPlusPlus/IfcPlusPlus.vcxproj index d934fada6..81ab7d38a 100644 --- a/IfcPlusPlus/IfcPlusPlus.vcxproj +++ b/IfcPlusPlus/IfcPlusPlus.vcxproj @@ -37,7 +37,7 @@ {9700AD93-4F6B-484A-BA34-FC4C97E5C645} IfcPlusPlus - 10.0.19041.0 + 10.0 @@ -341,7 +341,9 @@ - + + + /bigobj %(AdditionalOptions) @@ -402,7 +404,6 @@ - diff --git a/IfcPlusPlus/IfcPlusPlus.vcxproj.filters b/IfcPlusPlus/IfcPlusPlus.vcxproj.filters index 102a825fe..a6a555a47 100644 --- a/IfcPlusPlus/IfcPlusPlus.vcxproj.filters +++ b/IfcPlusPlus/IfcPlusPlus.vcxproj.filters @@ -153,9 +153,6 @@ Headerdateien - - Headerdateien - @@ -179,9 +176,6 @@ Quelldateien - - Quelldateien - Quelldateien @@ -323,5 +317,14 @@ Quelldateien + + Quelldateien + + + Quelldateien + + + Quelldateien + \ No newline at end of file diff --git a/IfcPlusPlus/src/external/Carve/src/include/carve/geom3d.hpp b/IfcPlusPlus/src/external/Carve/src/include/carve/geom3d.hpp index 78754e19e..d419b8066 100644 --- a/IfcPlusPlus/src/external/Carve/src/include/carve/geom3d.hpp +++ b/IfcPlusPlus/src/external/Carve/src/include/carve/geom3d.hpp @@ -130,8 +130,8 @@ namespace carve { } } - double lengthOfNormalVector = n.length(); - if( lengthOfNormalVector < CARVE_EPSILON * 0.001 ) + double length2OfNormalVector = n.length2(); + if( length2OfNormalVector < CARVE_EPSILON * CARVE_EPSILON * 0.000001 ) { n.x = 1.0; n.y = 0.0; @@ -160,7 +160,7 @@ namespace carve { } #if defined(_DEBUG) - if( numPointsNotInPlane > 0 && lengthOfNormalVector > 0.2 ) + if( numPointsNotInPlane > 0 && length2OfNormalVector > 0.2 * 0.2) { std::stringstream strs_out; strs_out << "Polyline{\nvertices{" << std::endl; diff --git a/IfcPlusPlus/src/external/Carve/src/include/carve/mesh_impl.hpp b/IfcPlusPlus/src/external/Carve/src/include/carve/mesh_impl.hpp index d1e0ed256..62202ce57 100644 --- a/IfcPlusPlus/src/external/Carve/src/include/carve/mesh_impl.hpp +++ b/IfcPlusPlus/src/external/Carve/src/include/carve/mesh_impl.hpp @@ -306,22 +306,110 @@ typename Face::aabb_t Face::getAABB() const { template bool Face::recalc(double CARVE_EPSILON) { - if (!carve::geom3d::fitPlane(begin(), end(), vector_mapping(), plane, CARVE_EPSILON)) { - return false; - } + //if (!carve::geom3d::fitPlane(begin(), end(), vector_mapping(), plane, CARVE_EPSILON)) { + // return false; + //} - int da = carve::geom::largestAxis(plane.N); - double A = carve::geom2d::signedArea( - begin(), end(), projection_mapping(getProjector(false, da))); - if ((A < 0.0) ^ (plane.N.v[da] < 0.0)) { - plane.negate(); - } + vector_t polygon_normal;// (carve::geom::VECTOR(0, 0, 0)); + + edge_t* edgePtr = edge; + + if (n_edges < 2) + { + return false; + } + + if (n_edges == 3) + { + const vector_t& A = edgePtr->vert->v; + edgePtr = edgePtr->next; + const vector_t& B = edgePtr->vert->v; + edgePtr = edgePtr->next; + const vector_t& C = edgePtr->vert->v; + vector_t AB(B - A); + vector_t AC(C - A); + vector_t crossProduct = cross(AB, AC); + crossProduct.normalize(); + polygon_normal = crossProduct; + } + else + { + // find triangle with largest area + edge_t* longestEdge = nullptr; + double longestEdgeLength = 0; + + double largestArea = 0; + for (size_t i_edge = 0; i_edge < n_edges; ++i_edge) + { + if (!edgePtr) + { + continue; + } + + double length2 = edgePtr->length2(); + if (length2 > longestEdgeLength) + { + longestEdge = edgePtr; + longestEdgeLength = length2; + } + edgePtr = edgePtr->next; + } + + edge_t* edge1 = longestEdge->next; + const vector_t& pA = longestEdge->v1()->v; // vert + const vector_t& B = longestEdge->v2()->v; // next->vert + + for (size_t i_edge = 0; i_edge < n_edges - 1; ++i_edge) + { + const vector_t& C = edge1->v2()->v; + + + vector_t AB(B - pA); + vector_t AC(C - pA); + vector_t crossProduct = cross(AB, AC); + double area = crossProduct.length() * 0.5; + + //double area = triangleArea(A, B, C); + if (std::abs(area) > largestArea) + { + largestArea = area; + + //vector_t AB(B - A); + //vector_t AC(C - A); + //vector_t crossProduct = cross(AB, AC); + crossProduct.normalize(); + polygon_normal = crossProduct; + } + + edge1 = edge1->next; + } + +#ifdef _DEBUG + if (edgePtr != edge) + { + std::cout << "edge1 != face->edge" << std::endl; + } +#endif + } + + vector_t centro = centroid(); + plane.N = polygon_normal; + plane.d = -dot(polygon_normal, centro); - project = getProjector(plane.N.v[da] > 0, da); - unproject = getUnprojector(plane.N.v[da] > 0, da); - return true; + int da = carve::geom::largestAxis(plane.N); + double A = carve::geom2d::signedArea( + begin(), end(), projection_mapping(getProjector(false, da))); + + if ((A < 0.0) ^ (plane.N.v[da] < 0.0)) { + plane.negate(); + } + + project = getProjector(plane.N.v[da] > 0, da); + unproject = getUnprojector(plane.N.v[da] > 0, da); + + return true; } template @@ -415,10 +503,18 @@ void Face::getVertices(std::vector& verts) const { verts.clear(); verts.reserve(n_edges); const edge_t* e = edge; - do { - verts.push_back(e->vert); - e = e->next; - } while (e != edge); + + for (size_t ii = 0; ii < n_edges; ++ii) + { + verts.push_back(e->vert); + e = e->next; + } + + // original version + //do { + // verts.push_back(e->vert); + // e = e->next; + //} while (e != edge); } template @@ -427,10 +523,17 @@ void Face::getProjectedVertices( verts.clear(); verts.reserve(n_edges); const edge_t* e = edge; - do { - verts.push_back(project(e->vert->v)); - e = e->next; - } while (e != edge); + + for (size_t ii = 0; ii < n_edges; ++ii) + { + verts.push_back(project(e->vert->v)); + e = e->next; + } + + //do { + // verts.push_back(project(e->vert->v)); + // e = e->next; + //} while (e != edge); } template @@ -675,25 +778,52 @@ inline int Mesh<3>::orientationAtVertex(edge_t* e_base) { } template -void Mesh::calcOrientation() { - if (open_edges.size() || !closed_edges.size()) { +void Mesh::calcOrientation() +{ + if (open_edges.size() || !closed_edges.size()) + { is_negative = false; return; } edge_t* emin = closed_edges[0]; + if (emin->rev == nullptr) + { + // emin is not a closed edge, something went wrong... + is_negative = false; + return; + } + if (emin->rev->v1()->v < emin->v1()->v) { emin = emin->rev; } - for (size_t i = 1; i < closed_edges.size(); ++i) { - if (closed_edges[i]->v1()->v < emin->v1()->v) { - emin = closed_edges[i]; - } - if (closed_edges[i]->rev->v1()->v < emin->v1()->v) { - emin = closed_edges[i]->rev; - } + for (size_t i = 1; i < closed_edges.size(); ++i) + { + edge_t* e = closed_edges[i]; + if (e != nullptr) + { + continue; + } + if (e->v1() != nullptr ) + { + if (e->v1()->v < emin->v1()->v) + { + emin = closed_edges[i]; + } + } + + if (e->rev != nullptr) + { + if (e->rev->v1() != nullptr) + { + if (e->rev->v1()->v < emin->v1()->v) + { + emin = closed_edges[i]->rev; + } + } + } } int orientation = orientationAtVertex(emin); @@ -709,29 +839,45 @@ void Mesh::calcOrientation() { } template -Mesh* Mesh::clone(const vertex_t* old_base, - vertex_t* new_base) const { - std::vector r_faces; - std::vector r_open_edges; - std::vector r_closed_edges; - std::unordered_map edge_map; - - r_faces.reserve(faces.size()); - r_open_edges.reserve(r_open_edges.size()); - r_closed_edges.reserve(r_closed_edges.size()); - - for (size_t i = 0; i < faces.size(); ++i) { - r_faces.push_back(faces[i]->clone(old_base, new_base, edge_map)); - } - for (size_t i = 0; i < closed_edges.size(); ++i) { - r_closed_edges.push_back(edge_map[closed_edges[i]]); - r_closed_edges.back()->rev = edge_map[closed_edges[i]->rev]; - } - for (size_t i = 0; i < open_edges.size(); ++i) { - r_open_edges.push_back(edge_map[open_edges[i]]); - } +Mesh* Mesh::clone(const vertex_t* old_base, vertex_t* new_base) const +{ + std::vector r_faces; + std::vector r_open_edges; + std::vector r_closed_edges; + std::unordered_map edge_map; + + r_faces.reserve(faces.size()); + r_open_edges.reserve(r_open_edges.size()); + r_closed_edges.reserve(r_closed_edges.size()); + + for (size_t i = 0; i < faces.size(); ++i) { + r_faces.push_back(faces[i]->clone(old_base, new_base, edge_map)); + } + + for (size_t i = 0; i < closed_edges.size(); ++i) + { + edge_t* closedEdge = closed_edges[i]; + if (closedEdge == nullptr) + { + continue; + } + + r_closed_edges.push_back(edge_map[closedEdge]); + + edge_t* r1 = r_closed_edges.back(); + if (r1 == nullptr) + { + continue; + } + r1->rev = edge_map[closedEdge->rev]; + } + + for (size_t i = 0; i < open_edges.size(); ++i) + { + r_open_edges.push_back(edge_map[open_edges[i]]); + } - return new Mesh(r_faces, r_open_edges, r_closed_edges, is_negative); + return new Mesh(r_faces, r_open_edges, r_closed_edges, is_negative); } template diff --git a/IfcPlusPlus/src/external/Carve/src/lib/csg_collector.cpp b/IfcPlusPlus/src/external/Carve/src/lib/csg_collector.cpp index f35177716..9fc240682 100644 --- a/IfcPlusPlus/src/external/Carve/src/lib/csg_collector.cpp +++ b/IfcPlusPlus/src/external/Carve/src/lib/csg_collector.cpp @@ -335,8 +335,7 @@ namespace carve { class BMinusACollector : public BaseCollector { public: - BMinusACollector(const carve::mesh::MeshSet<3>* _src_a, - const carve::mesh::MeshSet<3>* _src_b) + BMinusACollector(const carve::mesh::MeshSet<3>* _src_a, const carve::mesh::MeshSet<3>* _src_b) : BaseCollector(_src_a, _src_b) {} ~BMinusACollector() override {} void collect(const carve::mesh::MeshSet<3>::face_t* orig_face, @@ -354,8 +353,8 @@ namespace carve { }; } // namespace - CSG::Collector* makeCollector(CSG::OP op, const carve::mesh::MeshSet<3>* poly_a, - const carve::mesh::MeshSet<3>* poly_b) { + CSG::Collector* makeCollector(CSG::OP op, const carve::mesh::MeshSet<3>* poly_a, const carve::mesh::MeshSet<3>* poly_b) + { switch( op ) { case CSG::UNION: return new UnionCollector(poly_a, poly_b); diff --git a/IfcPlusPlus/src/external/Carve/src/lib/intersect.cpp b/IfcPlusPlus/src/external/Carve/src/lib/intersect.cpp index ad49c2366..604026351 100644 --- a/IfcPlusPlus/src/external/Carve/src/lib/intersect.cpp +++ b/IfcPlusPlus/src/external/Carve/src/lib/intersect.cpp @@ -637,25 +637,21 @@ void carve::csg::CSG::groupIntersections() { #endif } -static void recordEdgeIntersectionInfo( - carve::mesh::MeshSet<3>::vertex_t* intersection, - carve::mesh::MeshSet<3>::edge_t* edge, - const carve::csg::detail::VFSMap::mapped_type& intersected_faces, - carve::csg::detail::Data& data) { - carve::mesh::MeshSet<3>::vertex_t::vector_t edge_dir = - edge->v2()->v - edge->v1()->v; - carve::csg::detail::EdgeIntInfo::mapped_type& eint_info = - data.emap[edge][intersection]; - - for( carve::csg::detail::VFSMap::mapped_type::const_iterator i = - intersected_faces.begin(); - i != intersected_faces.end(); ++i ) { +static void recordEdgeIntersectionInfo( carve::mesh::MeshSet<3>::vertex_t* intersection, carve::mesh::MeshSet<3>::edge_t* edge, + const carve::csg::detail::VFSMap::mapped_type& intersected_faces, carve::csg::detail::Data& data) +{ + carve::mesh::MeshSet<3>::vertex_t::vector_t edge_dir = edge->v2()->v - edge->v1()->v; + carve::csg::detail::EdgeIntInfo::mapped_type& eint_info = data.emap[edge][intersection]; + + for( carve::csg::detail::VFSMap::mapped_type::const_iterator i = intersected_faces.begin(); i != intersected_faces.end(); ++i ) + { carve::mesh::MeshSet<3>::vertex_t::vector_t normal = (*i)->plane.N; eint_info.insert(std::make_pair((*i), carve::geom::dot(edge_dir, normal))); } } -void carve::csg::CSG::intersectingFacePairs(detail::Data& data) { +void carve::csg::CSG::intersectingFacePairs(detail::Data& data) +{ static carve::TimingName FUNC_NAME("CSG::intersectingFacePairs()"); carve::TimingBlock block(FUNC_NAME); @@ -840,8 +836,8 @@ void carve::csg::CSG::_generateEdgeEdgeIntersections(meshset_t::edge_t* ea, mesh } } -void carve::csg::CSG::generateEdgeEdgeIntersections( - meshset_t::face_t* a, const std::vector& b) { +void carve::csg::CSG::generateEdgeEdgeIntersections( meshset_t::face_t* a, const std::vector& b) +{ meshset_t::edge_t* ea, * eb; ea = a->edge; @@ -920,9 +916,8 @@ void carve::csg::CSG::generateEdgeFaceIntersections( meshset_t::face_t* a, const } } -void carve::csg::CSG::generateIntersectionCandidates( - meshset_t* a, const face_rtree_t* a_node, meshset_t* b, - const face_rtree_t* b_node, face_pairs_t& face_pairs, bool descend_a) { +void carve::csg::CSG::generateIntersectionCandidates( meshset_t* a, const face_rtree_t* a_node, meshset_t* b, const face_rtree_t* b_node, face_pairs_t& face_pairs, bool descend_a) +{ if( !a_node->bbox.intersects(b_node->bbox) ) { return; } @@ -982,16 +977,13 @@ void carve::csg::CSG::generateIntersectionCandidates( } } -void carve::csg::CSG::generateIntersections(meshset_t* a, - const face_rtree_t* a_rtree, - meshset_t* b, - const face_rtree_t* b_rtree, - detail::Data& data) { +void carve::csg::CSG::generateIntersections(meshset_t* a, const face_rtree_t* a_rtree, meshset_t* b, const face_rtree_t* b_rtree, detail::Data& data) +{ face_pairs_t face_pairs; generateIntersectionCandidates(a, a_rtree, b, b_rtree, face_pairs); - for( face_pairs_t::const_iterator i = face_pairs.begin(); - i != face_pairs.end(); ++i ) { + for( face_pairs_t::const_iterator i = face_pairs.begin(); i != face_pairs.end(); ++i ) + { meshset_t::face_t* f = (*i).first; meshset_t::edge_t* e = f->edge; do { @@ -1000,28 +992,28 @@ void carve::csg::CSG::generateIntersections(meshset_t* a, } while( e != f->edge ); } - for( face_pairs_t::const_iterator i = face_pairs.begin(); - i != face_pairs.end(); ++i ) { + for( face_pairs_t::const_iterator i = face_pairs.begin(); i != face_pairs.end(); ++i ) + { generateVertexVertexIntersections((*i).first, (*i).second); } - for( face_pairs_t::const_iterator i = face_pairs.begin(); - i != face_pairs.end(); ++i ) { + for( face_pairs_t::const_iterator i = face_pairs.begin(); i != face_pairs.end(); ++i ) + { generateVertexEdgeIntersections((*i).first, (*i).second); } - for( face_pairs_t::const_iterator i = face_pairs.begin(); - i != face_pairs.end(); ++i ) { + for( face_pairs_t::const_iterator i = face_pairs.begin(); i != face_pairs.end(); ++i ) + { generateEdgeEdgeIntersections((*i).first, (*i).second); } - for( face_pairs_t::const_iterator i = face_pairs.begin(); - i != face_pairs.end(); ++i ) { + for( face_pairs_t::const_iterator i = face_pairs.begin(); i != face_pairs.end(); ++i ) + { generateVertexFaceIntersections((*i).first, (*i).second); } - for( face_pairs_t::const_iterator i = face_pairs.begin(); - i != face_pairs.end(); ++i ) { + for( face_pairs_t::const_iterator i = face_pairs.begin(); i != face_pairs.end(); ++i ) + { generateEdgeFaceIntersections((*i).first, (*i).second); } @@ -1076,26 +1068,24 @@ carve::csg::CSG::CSG(double _CARVE_EPSILON) * @tparam[in,out] data Internal intersection data. data.emap is used to produce * data.divided_edges. */ -void carve::csg::CSG::divideIntersectedEdges(detail::Data& data) { +void carve::csg::CSG::divideIntersectedEdges(detail::Data& data) +{ static carve::TimingName FUNC_NAME("CSG::divideIntersectedEdges()"); carve::TimingBlock block(FUNC_NAME); - for( detail::EIntMap::const_iterator i = data.emap.begin(), - ei = data.emap.end(); - i != ei; ++i ) { + for( detail::EIntMap::const_iterator i = data.emap.begin(), ei = data.emap.end(); i != ei; ++i ) + { meshset_t::edge_t* edge = (*i).first; const detail::EIntMap::mapped_type& int_info = (*i).second; std::vector& verts = data.divided_edges[edge]; - orderEdgeIntersectionVertices(int_info.begin(), int_info.end(), - edge->v2()->v - edge->v1()->v, edge->v1()->v, - verts); + orderEdgeIntersectionVertices(int_info.begin(), int_info.end(), edge->v2()->v - edge->v1()->v, edge->v1()->v, verts); } } carve::csg::CSG::~CSG() {} -void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification& eclass, - detail::Data& data) { +void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification& eclass, detail::Data& data) +{ detail::FSet face_b_set; for( detail::FVSMap::const_iterator i = data.fmap.begin(), ie = data.fmap.end(); @@ -1295,12 +1285,14 @@ void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification& eclass, * * @param fll */ -static void checkFaceLoopIntegrity(carve::csg::FaceLoopList& fll) { +static void checkFaceLoopIntegrity(carve::csg::FaceLoopList& fll) +{ static carve::TimingName FUNC_NAME("CSG::checkFaceLoopIntegrity()"); carve::TimingBlock block(FUNC_NAME); std::unordered_map counts; - for( carve::csg::FaceLoop* fl = fll.head; fl; fl = fl->next ) { + for( carve::csg::FaceLoop* fl = fll.head; fl; fl = fl->next ) + { std::vector::vertex_t*>& loop = (fl->vertices); carve::mesh::MeshSet<3>::vertex_t* v1, * v2; v1 = loop[loop.size() - 1]; @@ -1336,13 +1328,9 @@ static void checkFaceLoopIntegrity(carve::csg::FaceLoopList& fll) { * @param b_edge_count * @param hooks */ -void carve::csg::CSG::calc(meshset_t* a, const face_rtree_t* a_rtree, - meshset_t* b, const face_rtree_t* b_rtree, - carve::csg::VertexClassification& vclass, - carve::csg::EdgeClassification& eclass, - carve::csg::FaceLoopList& a_face_loops, - carve::csg::FaceLoopList& b_face_loops, - size_t& a_edge_count, size_t& b_edge_count) { +void carve::csg::CSG::calc(meshset_t* a, const face_rtree_t* a_rtree, meshset_t* b, const face_rtree_t* b_rtree, carve::csg::VertexClassification& vclass, + carve::csg::EdgeClassification& eclass, carve::csg::FaceLoopList& a_face_loops, carve::csg::FaceLoopList& b_face_loops, size_t& a_edge_count, size_t& b_edge_count) +{ detail::Data data; #if defined(CARVE_DEBUG) @@ -1453,16 +1441,14 @@ void carve::csg::CSG::calc(meshset_t* a, const face_rtree_t* a_rtree, * @param result_list * @param shared_edge_ptr */ -void returnSharedEdges(carve::csg::V2Set& shared_edges, - std::list*>& result_list, - carve::csg::V2Set* shared_edge_ptr) { +void returnSharedEdges(carve::csg::V2Set& shared_edges, std::list*>& result_list, carve::csg::V2Set* shared_edge_ptr) +{ // need to convert shared edges to point into result - typedef std::map::vertex_t*> - remap_type; + typedef std::map::vertex_t*> remap_type; remap_type remap; - for( std::list*>::iterator list_it = - result_list.begin(); - list_it != result_list.end(); list_it++ ) { + + for( std::list*>::iterator list_it = result_list.begin(); list_it != result_list.end(); list_it++ ) + { carve::mesh::MeshSet<3>* result = *list_it; if( result ) { for( std::vector::vertex_t>::iterator it = @@ -1472,8 +1458,8 @@ void returnSharedEdges(carve::csg::V2Set& shared_edges, } } } - for( carve::csg::V2Set::iterator it = shared_edges.begin(); - it != shared_edges.end(); it++ ) { + for( carve::csg::V2Set::iterator it = shared_edges.begin(); it != shared_edges.end(); it++ ) + { remap_type::iterator first_it = remap.find(((*it).first)->v); remap_type::iterator second_it = remap.find(((*it).second)->v); CARVE_ASSERT(first_it != remap.end() && second_it != remap.end()); @@ -1494,9 +1480,8 @@ void returnSharedEdges(carve::csg::V2Set& shared_edges, * * @return */ -carve::mesh::MeshSet<3>* carve::csg::CSG::compute( - meshset_t* a, meshset_t* b, carve::csg::CSG::Collector& collector, - carve::csg::V2Set* shared_edges_ptr, CLASSIFY_TYPE classify_type) { +carve::mesh::MeshSet<3>* carve::csg::CSG::compute( meshset_t* a, meshset_t* b, carve::csg::CSG::Collector& collector, carve::csg::V2Set* shared_edges_ptr, CLASSIFY_TYPE classify_type) +{ static carve::TimingName FUNC_NAME("CSG::compute"); carve::TimingBlock block(FUNC_NAME); @@ -1512,16 +1497,13 @@ carve::mesh::MeshSet<3>* carve::csg::CSG::compute( size_t a_edge_count; size_t b_edge_count; - std::unique_ptr a_rtree( - face_rtree_t::construct_STR(a->faceBegin(), a->faceEnd(), 4, 4)); - std::unique_ptr b_rtree( - face_rtree_t::construct_STR(b->faceBegin(), b->faceEnd(), 4, 4)); + std::unique_ptr a_rtree( face_rtree_t::construct_STR(a->faceBegin(), a->faceEnd(), 4, 4)); + std::unique_ptr b_rtree( face_rtree_t::construct_STR(b->faceBegin(), b->faceEnd(), 4, 4)); { static carve::TimingName FUNC_NAME("CSG::compute - calc()"); carve::TimingBlock block(FUNC_NAME); - calc(a, a_rtree.get(), b, b_rtree.get(), vclass, eclass, a_face_loops, - b_face_loops, a_edge_count, b_edge_count); + calc(a, a_rtree.get(), b, b_rtree.get(), vclass, eclass, a_face_loops, b_face_loops, a_edge_count, b_edge_count); } detail::LoopEdges a_edge_map; @@ -1627,9 +1609,8 @@ carve::mesh::MeshSet<3>* carve::csg::CSG::compute( * * @return */ -carve::mesh::MeshSet<3>* carve::csg::CSG::compute( - meshset_t* a, meshset_t* b, carve::csg::CSG::OP op, - carve::csg::V2Set* shared_edges, CLASSIFY_TYPE classify_type) { +carve::mesh::MeshSet<3>* carve::csg::CSG::compute( meshset_t* a, meshset_t* b, carve::csg::CSG::OP op, carve::csg::V2Set* shared_edges, CLASSIFY_TYPE classify_type) +{ Collector* coll = makeCollector(op, a, b); if( !coll ) { return nullptr; @@ -1654,10 +1635,8 @@ carve::mesh::MeshSet<3>* carve::csg::CSG::compute( * * @return */ -bool carve::csg::CSG::sliceAndClassify( - meshset_t* closed, meshset_t* open, - std::list >& result, - carve::csg::V2Set* shared_edges_ptr) { +bool carve::csg::CSG::sliceAndClassify( meshset_t* closed, meshset_t* open, std::list >& result, carve::csg::V2Set* shared_edges_ptr) +{ if( !closed->isClosed() ) { return false; } @@ -1673,13 +1652,10 @@ bool carve::csg::CSG::sliceAndClassify( size_t a_edge_count; size_t b_edge_count; - std::unique_ptr closed_rtree(face_rtree_t::construct_STR( - closed->faceBegin(), closed->faceEnd(), 4, 4)); - std::unique_ptr open_rtree( - face_rtree_t::construct_STR(open->faceBegin(), open->faceEnd(), 4, 4)); + std::unique_ptr closed_rtree(face_rtree_t::construct_STR( closed->faceBegin(), closed->faceEnd(), 4, 4)); + std::unique_ptr open_rtree( face_rtree_t::construct_STR(open->faceBegin(), open->faceEnd(), 4, 4)); - calc(closed, closed_rtree.get(), open, open_rtree.get(), vclass, eclass, - a_face_loops, b_face_loops, a_edge_count, b_edge_count); + calc(closed, closed_rtree.get(), open, open_rtree.get(), vclass, eclass, a_face_loops, b_face_loops, a_edge_count, b_edge_count); detail::LoopEdges a_edge_map; detail::LoopEdges b_edge_map; @@ -1691,19 +1667,18 @@ bool carve::csg::CSG::sliceAndClassify( findSharedEdges(a_edge_map, b_edge_map, shared_edges); - groupFaceLoops(closed, a_face_loops, a_edge_map, shared_edges, - a_loops_grouped); + groupFaceLoops(closed, a_face_loops, a_edge_map, shared_edges, a_loops_grouped); groupFaceLoops(open, b_face_loops, b_edge_map, shared_edges, b_loops_grouped); halfClassifyFaceGroups(shared_edges, vclass, closed, closed_rtree.get(), a_loops_grouped, a_edge_map, open, open_rtree.get(), b_loops_grouped, b_edge_map, result); - if( shared_edges_ptr != nullptr ) { + if( shared_edges_ptr != nullptr ) + { std::list result_list; - for( std::list >::iterator it = - result.begin(); - it != result.end(); it++ ) { + for( std::list >::iterator it = result.begin(); it != result.end(); it++ ) + { result_list.push_back(it->second); } returnSharedEdges(shared_edges, result_list, shared_edges_ptr); @@ -1721,10 +1696,8 @@ bool carve::csg::CSG::sliceAndClassify( * @param hooks * @param shared_edges_ptr */ -void carve::csg::CSG::slice(meshset_t* a, meshset_t* b, - std::list& a_sliced, - std::list& b_sliced, - carve::csg::V2Set* shared_edges_ptr) { +void carve::csg::CSG::slice(meshset_t* a, meshset_t* b, std::list& a_sliced, std::list& b_sliced, carve::csg::V2Set* shared_edges_ptr) +{ carve::csg::VertexClassification vclass; carve::csg::EdgeClassification eclass; @@ -1737,13 +1710,10 @@ void carve::csg::CSG::slice(meshset_t* a, meshset_t* b, size_t a_edge_count; size_t b_edge_count; - std::unique_ptr a_rtree( - face_rtree_t::construct_STR(a->faceBegin(), a->faceEnd(), 4, 4)); - std::unique_ptr b_rtree( - face_rtree_t::construct_STR(b->faceBegin(), b->faceEnd(), 4, 4)); + std::unique_ptr a_rtree( face_rtree_t::construct_STR(a->faceBegin(), a->faceEnd(), 4, 4)); + std::unique_ptr b_rtree( face_rtree_t::construct_STR(b->faceBegin(), b->faceEnd(), 4, 4)); - calc(a, a_rtree.get(), b, b_rtree.get(), vclass, eclass, a_face_loops, - b_face_loops, a_edge_count, b_edge_count); + calc(a, a_rtree.get(), b, b_rtree.get(), vclass, eclass, a_face_loops, b_face_loops, a_edge_count, b_edge_count); detail::LoopEdges a_edge_map; detail::LoopEdges b_edge_map; @@ -1758,9 +1728,8 @@ void carve::csg::CSG::slice(meshset_t* a, meshset_t* b, groupFaceLoops(a, a_face_loops, a_edge_map, shared_edges, a_loops_grouped); groupFaceLoops(b, b_face_loops, b_edge_map, shared_edges, b_loops_grouped); - for( carve::csg::FLGroupList::iterator i = a_loops_grouped.begin(), - e = a_loops_grouped.end(); - i != e; ++i ) { + for( carve::csg::FLGroupList::iterator i = a_loops_grouped.begin(), e = a_loops_grouped.end(); i != e; ++i ) + { Collector* all = makeCollector(ALL, a, b); all->collect(&*i, hooks); a_sliced.push_back(all->done(hooks)); @@ -1768,9 +1737,8 @@ void carve::csg::CSG::slice(meshset_t* a, meshset_t* b, delete all; } - for( carve::csg::FLGroupList::iterator i = b_loops_grouped.begin(), - e = b_loops_grouped.end(); - i != e; ++i ) { + for( carve::csg::FLGroupList::iterator i = b_loops_grouped.begin(), e = b_loops_grouped.end(); i != e; ++i ) + { Collector* all = makeCollector(ALL, a, b); all->collect(&*i, hooks); b_sliced.push_back(all->done(hooks)); diff --git a/IfcPlusPlus/src/external/Carve/src/lib/mesh.cpp b/IfcPlusPlus/src/external/Carve/src/lib/mesh.cpp index 476a2b8ec..fb219d721 100644 --- a/IfcPlusPlus/src/external/Carve/src/lib/mesh.cpp +++ b/IfcPlusPlus/src/external/Carve/src/lib/mesh.cpp @@ -1132,6 +1132,11 @@ template class carve::mesh::Face<3>; template class carve::mesh::Mesh<3>; template class carve::mesh::MeshSet<3>; +#ifdef _DEBUG +static std::map countSuccessWithoutRand = { {0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}, {6,0}, {7,0}, {8,0}, {9,0} }; +static int countSuccessWithRand = 0; +#endif + carve::PointClass carve::mesh::classifyPoint(const carve::mesh::MeshSet<3>* meshset, const carve::geom::RTreeNode<3, carve::mesh::Face<3>*>* face_rtree, const carve::geom::vector<3>& v, double CARVE_EPSILON, bool even_odd, const carve::mesh::Mesh<3>* mesh, const carve::mesh::Face<3>** hit_face) { @@ -1158,15 +1163,15 @@ carve::PointClass carve::mesh::classifyPoint(const carve::mesh::MeshSet<3>* mesh std::vector*> near_faces; face_rtree->search(v, std::back_inserter(near_faces)); - for( size_t i = 0; i < near_faces.size(); i++ ) { - if( mesh != nullptr && mesh != near_faces[i]->mesh ) { + for( size_t i = 0; i < near_faces.size(); i++ ) + { + if( mesh != nullptr && mesh != near_faces[i]->mesh ) + { continue; } - // XXX: Do allow the tested vertex to be ON an open - // manifold. This was here originally because of the - // possibility of an open manifold contained within a closed - // manifold. + // XXX: Do allow the tested vertex to be ON an open manifold. This was here originally because of the + // possibility of an open manifold contained within a closed manifold. // if (!near_faces[i]->mesh->isClosed()) continue; @@ -1183,23 +1188,45 @@ carve::PointClass carve::mesh::classifyPoint(const carve::mesh::MeshSet<3>* mesh } double ray_len = face_rtree->bbox.extent.length() * 2; + std::vector*, carve::geom::vector<3> > > manifold_intersections; + +#ifdef _DEBUG + countSuccessWithoutRand[0] += 1; +#endif - std::vector*, carve::geom::vector<3> > > - manifold_intersections; - - for( ;;) { - double a1 = random() / double(RAND_MAX) * M_TWOPI; - double a2 = random() / double(RAND_MAX) * M_TWOPI; + double a1 = 0.1; + double a2 = 0.2; + for(size_t numIntersectionRuns = 1; numIntersectionRuns < 10000; ++numIntersectionRuns ) + { +#ifdef _DEBUG + if (numIntersectionRuns > 0) + { + countSuccessWithoutRand[0] -= 1; + } + if (numIntersectionRuns >= 10) + { + ++countSuccessWithRand; + } +#endif + if (numIntersectionRuns < 10) + { + // reduce randomness. In 99% of the cases, this already finds an intersection + a1 = numIntersectionRuns * 0.1 * M_TWOPI; + a2 = (10-numIntersectionRuns) * 0.1 * M_TWOPI; + } + else + { + a1 = random() / double(RAND_MAX) * M_TWOPI; + a2 = random() / double(RAND_MAX) * M_TWOPI; + } - carve::geom3d::Vector ray_dir = - carve::geom::VECTOR(sin(a1) * sin(a2), cos(a1) * sin(a2), cos(a2)); + carve::geom3d::Vector ray_dir = carve::geom::VECTOR(sin(a1) * sin(a2), cos(a1) * sin(a2), cos(a2)); #if defined(DEBUG_CONTAINS_VERTEX) std::cerr << "{testing ray: " << ray_dir << "}" << std::endl; #endif carve::geom::vector<3> v2 = v + ray_dir * ray_len; - bool failed = false; carve::geom::linesegment<3> line(v, v2); carve::geom::vector<3> intersection; @@ -1208,8 +1235,23 @@ carve::PointClass carve::mesh::classifyPoint(const carve::mesh::MeshSet<3>* mesh manifold_intersections.clear(); face_rtree->search(line, std::back_inserter(near_faces)); - for( unsigned i = 0; !failed && i < near_faces.size(); i++ ) { - if( mesh != nullptr && mesh != near_faces[i]->mesh ) { + if (numIntersectionRuns > 10000) + { + size_t edgeCount = 0; + for (unsigned i = 0; !failed && i < near_faces.size(); i++) + { + edgeCount += near_faces[i]->n_edges; + } +#ifdef _DEBUG + std::cout << "classifyPoint failed, numIntersectionRuns(" << numIntersectionRuns << "), near_faces(" << near_faces.size() << "), edgeCount(" << edgeCount << ")" << std::endl; +#endif + break; + } + + for( unsigned i = 0; !failed && i < near_faces.size(); i++ ) + { + if( mesh != nullptr && mesh != near_faces[i]->mesh ) + { continue; } @@ -1217,7 +1259,8 @@ carve::PointClass carve::mesh::classifyPoint(const carve::mesh::MeshSet<3>* mesh continue; } - switch( near_faces[i]->lineSegmentIntersection(line, intersection, CARVE_EPSILON) ) + auto intersectionResult = near_faces[i]->lineSegmentIntersection(line, intersection, CARVE_EPSILON); + switch( intersectionResult ) { case INTERSECT_FACE: { #if defined(DEBUG_CONTAINS_VERTEX) @@ -1324,4 +1367,5 @@ carve::PointClass carve::mesh::classifyPoint(const carve::mesh::MeshSet<3>* mesh return POINT_OUT; } } + return POINT_UNK; } diff --git a/IfcPlusPlus/src/external/XUnzip.cpp b/IfcPlusPlus/src/external/XUnzip.cpp deleted file mode 100644 index b1ab25a2d..000000000 --- a/IfcPlusPlus/src/external/XUnzip.cpp +++ /dev/null @@ -1,4636 +0,0 @@ -// XUnzip.cpp Version 1.3 -// -// Authors: Mark Adler et al. (see below) -// -// Modified by: Lucian Wischik -// lu@wischik.com -// -// Version 1.0 - Turned C files into just a single CPP file -// - Made them compile cleanly as C++ files -// - Gave them simpler APIs -// - Added the ability to zip/unzip directly in memory without -// any intermediate files -// -// Modified by: Hans Dietrich -// hdietrich@gmail.com -// -// Version 1.3: - Corrected size bug introduced by 1.2 -// -// Version 1.2: - Many bug fixes. See CodeProject article for list. -// -// Version 1.1: - Added Unicode support to CreateZip() and ZipAdd() -// - Changed file names to avoid conflicts with Lucian's files -// -/////////////////////////////////////////////////////////////////////////////// -// -// Lucian Wischik's comments: -// -------------------------- -// THIS FILE is almost entirely based upon code by Info-ZIP. -// It has been modified by Lucian Wischik. -// The original code may be found at http://www.info-zip.org -// The original copyright text follows. -// -/////////////////////////////////////////////////////////////////////////////// -// -// Original authors' comments: -// --------------------------- -// This is version 2002-Feb-16 of the Info-ZIP copyright and license. The -// definitive version of this document should be available at -// ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely. -// -// Copyright (c) 1990-2002 Info-ZIP. All rights reserved. -// -// For the purposes of this copyright and license, "Info-ZIP" is defined as -// the following set of individuals: -// -// Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, -// Jean-loup Gailly, Hunter Goatley, Ian Gorman, Chris Herborth, Dirk Haase, -// Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, -// David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, -// Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, -// Kai Uwe Rommel, Steve Salisbury, Dave Smith, Christian Spieler, -// Antoine Verheijen, Paul von Behren, Rich Wales, Mike White -// -// This software is provided "as is", without warranty of any kind, express -// or implied. In no event shall Info-ZIP or its contributors be held liable -// for any direct, indirect, incidental, special or consequential damages -// arising out of the use of or inability to use this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. Redistributions of source code must retain the above copyright notice, -// definition, disclaimer, and this list of conditions. -// -// 2. Redistributions in binary form (compiled executables) must reproduce -// the above copyright notice, definition, disclaimer, and this list of -// conditions in documentation and/or other materials provided with the -// distribution. The sole exception to this condition is redistribution -// of a standard UnZipSFX binary as part of a self-extracting archive; -// that is permitted without inclusion of this license, as long as the -// normal UnZipSFX banner has not been removed from the binary or disabled. -// -// 3. Altered versions--including, but not limited to, ports to new -// operating systems, existing ports with new graphical interfaces, and -// dynamic, shared, or static library versions--must be plainly marked -// as such and must not be misrepresented as being the original source. -// Such altered versions also must not be misrepresented as being -// Info-ZIP releases--including, but not limited to, labeling of the -// altered versions with the names "Info-ZIP" (or any variation thereof, -// including, but not limited to, different capitalizations), -// "Pocket UnZip", "WiZ" or "MacZip" without the explicit permission of -// Info-ZIP. Such altered versions are further prohibited from -// misrepresentative use of the Zip-Bugs or Info-ZIP e-mail addresses or -// of the Info-ZIP URL(s). -// -// 4. Info-ZIP retains the right to use the names "Info-ZIP", "Zip", "UnZip", -// "UnZipSFX", "WiZ", "Pocket UnZip", "Pocket Zip", and "MacZip" for its -// own source and binary releases. -// -/////////////////////////////////////////////////////////////////////////////// - - - -//#define STRICT -#define WIN32_LEAN_AND_MEAN -#include -#include -#include -#include -#include -#include -#include "XUnzip.h" - -#pragma warning(disable : 4996) // disable bogus deprecation warning - -// THIS FILE is almost entirely based upon code by Jean-loup Gailly -// and Mark Adler. It has been modified by Lucian Wischik. -// The original code may be found at http://www.gzip.org/zlib/ -// The original copyright text follows. -// -// -// -// zlib.h -- interface of the 'zlib' general purpose compression library -// version 1.1.3, July 9th, 1998 -// -// Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. -// -// Jean-loup Gailly Mark Adler -// jloup@gzip.org madler@alumni.caltech.edu -// -// -// The data format used by the zlib library is described by RFCs (Request for -// Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt -// (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). -// -// -// The 'zlib' compression library provides in-memory compression and -// decompression functions, including integrity checks of the uncompressed -// data. This version of the library supports only one compression method -// (deflation) but other algorithms will be added later and will have the same -// stream interface. -// -// Compression can be done in a single step if the buffers are large -// enough (for example if an input file is mmap'ed), or can be done by -// repeated calls of the compression function. In the latter case, the -// application must provide more input and/or consume the output -// (providing more output space) before each call. -// -// The library also supports reading and writing files in gzip (.gz) format -// with an interface similar to that of stdio. -// -// The library does not install any signal handler. The decoder checks -// the consistency of the compressed data, so the library should never -// crash even in case of corrupted input. -// -// for more info about .ZIP format, see ftp://ftp.cdrom.com/pub/infozip/doc/appnote-970311-iz.zip -// PkWare has also a specification at ftp://ftp.pkware.com/probdesc.zip - -#define zmalloc(len) malloc(len) - -#define zfree(p) free(p) - -/* -void *zmalloc(unsigned int len) -{ char *buf = new char[len+32]; - for (int i=0; i<16; i++) - { buf[i]=i; - buf[len+31-i]=i; - } - *((unsigned int*)buf) = len; - char c[1000]; wsprintf(c,"malloc 0x%lx - %lu",buf+16,len); - OutputDebugString(c); - return buf+16; -} - -void zfree(void *buf) -{ char c[1000]; wsprintf(c,"free 0x%lx",buf); - OutputDebugString(c); - char *p = ((char*)buf)-16; - unsigned int len = *((unsigned int*)p); - bool blown=false; - for (int i=0; i<16; i++) - { char lo = p[i]; - char hi = p[len+31-i]; - if (hi!=i || (lo!=i && i>4)) blown=true; - } - if (blown) - { OutputDebugString("BLOWN!!!"); - } - delete[] p; -} -*/ - -#pragma warning(disable : 4702) // unreachable code - -static ZRESULT zopenerror = ZR_OK; //+++1.2 - -typedef struct tm_unz_s -{ unsigned int tm_sec; // seconds after the minute - [0,59] - unsigned int tm_min; // minutes after the hour - [0,59] - unsigned int tm_hour; // hours since midnight - [0,23] - unsigned int tm_mday; // day of the month - [1,31] - unsigned int tm_mon; // months since January - [0,11] - unsigned int tm_year; // years - [1980..2044] -} tm_unz; - - -// unz_global_info structure contain global data about the ZIPfile -typedef struct unz_global_info_s -{ unsigned long number_entry; // total number of entries in the central dir on this disk - unsigned long size_comment; // size of the global comment of the zipfile -} unz_global_info; - -// unz_file_info contain information about a file in the zipfile -typedef struct unz_file_info_s -{ unsigned long version; // version made by 2 bytes - unsigned long version_needed; // version needed to extract 2 bytes - unsigned long flag; // general purpose bit flag 2 bytes - unsigned long compression_method; // compression method 2 bytes - unsigned long dosDate; // last mod file date in Dos fmt 4 bytes - unsigned long crc; // crc-32 4 bytes - unsigned long compressed_size; // compressed size 4 bytes - unsigned long uncompressed_size; // uncompressed size 4 bytes - unsigned long size_filename; // filename length 2 bytes - unsigned long size_file_extra; // extra field length 2 bytes - unsigned long size_file_comment; // file comment length 2 bytes - unsigned long disk_num_start; // disk number start 2 bytes - unsigned long internal_fa; // internal file attributes 2 bytes - unsigned long external_fa; // external file attributes 4 bytes - tm_unz tmu_date; -} unz_file_info; - - -#define UNZ_OK (0) -#define UNZ_END_OF_LIST_OF_FILE (-100) -#define UNZ_ERRNO (Z_ERRNO) -#define UNZ_EOF (0) -#define UNZ_PARAMERROR (-102) -#define UNZ_BADZIPFILE (-103) -#define UNZ_INTERNALERROR (-104) -#define UNZ_CRCERROR (-105) - - - - - - - -#define ZLIB_VERSION "1.1.3" - - -// Allowed flush values; see deflate() for details -#define Z_NO_FLUSH 0 -#define Z_SYNC_FLUSH 2 -#define Z_FULL_FLUSH 3 -#define Z_FINISH 4 - - -// compression levels -#define Z_NO_COMPRESSION 0 -#define Z_BEST_SPEED 1 -#define Z_BEST_COMPRESSION 9 -#define Z_DEFAULT_COMPRESSION (-1) - -// compression strategy; see deflateInit2() for details -#define Z_FILTERED 1 -#define Z_HUFFMAN_ONLY 2 -#define Z_DEFAULT_STRATEGY 0 - -// Possible values of the data_type field -#define Z_BINARY 0 -#define Z_ASCII 1 -#define Z_UNKNOWN 2 - -// The deflate compression method (the only one supported in this version) -#define Z_DEFLATED 8 - -// for initializing zalloc, zfree, opaque -#define Z_NULL 0 - -// case sensitivity when searching for filenames -#define CASE_SENSITIVE 1 -#define CASE_INSENSITIVE 2 - - -// Return codes for the compression/decompression functions. Negative -// values are errors, positive values are used for special but normal events. -#define Z_OK 0 -#define Z_STREAM_END 1 -#define Z_NEED_DICT 2 -#define Z_ERRNO (-1) -#define Z_STREAM_ERROR (-2) -#define Z_DATA_ERROR (-3) -#define Z_MEM_ERROR (-4) -#define Z_BUF_ERROR (-5) -#define Z_VERSION_ERROR (-6) - - - -// Basic data types -typedef unsigned char Byte; // 8 bits -typedef unsigned int uInt; // 16 bits or more -typedef unsigned long uLong; // 32 bits or more -typedef void *voidpf; -typedef void *voidp; -typedef long z_off_t; - - - - - - - - - - - - -typedef voidpf (*alloc_func) (voidpf opaque, uInt items, uInt size); -typedef void (*free_func) (voidpf opaque, voidpf address); - -struct internal_state; - -typedef struct z_stream_s { - Byte *next_in; // next input byte - uInt avail_in; // number of bytes available at next_in - uLong total_in; // total nb of input bytes read so far - - Byte *next_out; // next output byte should be put there - uInt avail_out; // remaining free space at next_out - uLong total_out; // total nb of bytes output so far - - char *msg; // last error message, NULL if no error - struct internal_state *state; // not visible by applications - - alloc_func zalloc; // used to allocate the internal state - free_func zfree; // used to free the internal state - voidpf opaque; // private data object passed to zalloc and zfree - - int data_type; // best guess about the data type: ascii or binary - uLong adler; // adler32 value of the uncompressed data - uLong reserved; // reserved for future use -} z_stream; - -typedef z_stream *z_streamp; - - -// The application must update next_in and avail_in when avail_in has -// dropped to zero. It must update next_out and avail_out when avail_out -// has dropped to zero. The application must initialize zalloc, zfree and -// opaque before calling the init function. All other fields are set by the -// compression library and must not be updated by the application. -// -// The opaque value provided by the application will be passed as the first -// parameter for calls of zalloc and zfree. This can be useful for custom -// memory management. The compression library attaches no meaning to the -// opaque value. -// -// zalloc must return Z_NULL if there is not enough memory for the object. -// If zlib is used in a multi-threaded application, zalloc and zfree must be -// thread safe. -// -// The fields total_in and total_out can be used for statistics or -// progress reports. After compression, total_in holds the total size of -// the uncompressed data and may be saved for use in the decompressor -// (particularly if the decompressor wants to decompress everything in -// a single step). -// - - -// basic functions - -const char *zlibVersion (); -// The application can compare zlibVersion and ZLIB_VERSION for consistency. -// If the first character differs, the library code actually used is -// not compatible with the zlib.h header file used by the application. -// This check is automatically made by inflateInit. - - - - - - -int inflate (z_streamp strm, int flush); -// -// inflate decompresses as much data as possible, and stops when the input -// buffer becomes empty or the output buffer becomes full. It may some -// introduce some output latency (reading input without producing any output) -// except when forced to flush. -// -// The detailed semantics are as follows. inflate performs one or both of the -// following actions: -// -// - Decompress more input starting at next_in and update next_in and avail_in -// accordingly. If not all input can be processed (because there is not -// enough room in the output buffer), next_in is updated and processing -// will resume at this point for the next call of inflate(). -// -// - Provide more output starting at next_out and update next_out and avail_out -// accordingly. inflate() provides as much output as possible, until there -// is no more input data or no more space in the output buffer (see below -// about the flush parameter). -// -// Before the call of inflate(), the application should ensure that at least -// one of the actions is possible, by providing more input and/or consuming -// more output, and updating the next_* and avail_* values accordingly. -// The application can consume the uncompressed output when it wants, for -// example when the output buffer is full (avail_out == 0), or after each -// call of inflate(). If inflate returns Z_OK and with zero avail_out, it -// must be called again after making room in the output buffer because there -// might be more output pending. -// -// If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much -// output as possible to the output buffer. The flushing behavior of inflate is -// not specified for values of the flush parameter other than Z_SYNC_FLUSH -// and Z_FINISH, but the current implementation actually flushes as much output -// as possible anyway. -// -// inflate() should normally be called until it returns Z_STREAM_END or an -// error. However if all decompression is to be performed in a single step -// (a single call of inflate), the parameter flush should be set to -// Z_FINISH. In this case all pending input is processed and all pending -// output is flushed; avail_out must be large enough to hold all the -// uncompressed data. (The size of the uncompressed data may have been saved -// by the compressor for this purpose.) The next operation on this stream must -// be inflateEnd to deallocate the decompression state. The use of Z_FINISH -// is never required, but can be used to inform inflate that a faster routine -// may be used for the single inflate() call. -// -// If a preset dictionary is needed at this point (see inflateSetDictionary -// below), inflate sets strm-adler to the adler32 checksum of the -// dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise -// it sets strm->adler to the adler32 checksum of all output produced -// so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or -// an error code as described below. At the end of the stream, inflate() -// checks that its computed adler32 checksum is equal to that saved by the -// compressor and returns Z_STREAM_END only if the checksum is correct. -// -// inflate() returns Z_OK if some progress has been made (more input processed -// or more output produced), Z_STREAM_END if the end of the compressed data has -// been reached and all uncompressed output has been produced, Z_NEED_DICT if a -// preset dictionary is needed at this point, Z_DATA_ERROR if the input data was -// corrupted (input stream not conforming to the zlib format or incorrect -// adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent -// (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not -// enough memory, Z_BUF_ERROR if no progress is possible or if there was not -// enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR -// case, the application may then call inflateSync to look for a good -// compression block. -// - - -int inflateEnd (z_streamp strm); -// -// All dynamically allocated data structures for this stream are freed. -// This function discards any unprocessed input and does not flush any -// pending output. -// -// inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state -// was inconsistent. In the error case, msg may be set but then points to a -// static string (which must not be deallocated). - - // Advanced functions - -// The following functions are needed only in some special applications. - - - - - -int inflateSetDictionary (z_streamp strm, - const Byte *dictionary, - uInt dictLength); -// -// Initializes the decompression dictionary from the given uncompressed byte -// sequence. This function must be called immediately after a call of inflate -// if this call returned Z_NEED_DICT. The dictionary chosen by the compressor -// can be determined from the Adler32 value returned by this call of -// inflate. The compressor and decompressor must use exactly the same -// dictionary. -// -// inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a -// parameter is invalid (such as NULL dictionary) or the stream state is -// inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the -// expected one (incorrect Adler32 value). inflateSetDictionary does not -// perform any decompression: this will be done by subsequent calls of -// inflate(). - - -int inflateSync (z_streamp strm); -// -// Skips invalid compressed data until a full flush point can be found, or until all -// available input is skipped. No output is provided. -// -// inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR -// if no more input was provided, Z_DATA_ERROR if no flush point has been found, -// or Z_STREAM_ERROR if the stream structure was inconsistent. In the success -// case, the application may save the current current value of total_in which -// indicates where valid compressed data was found. In the error case, the -// application may repeatedly call inflateSync, providing more input each time, -// until success or end of the input data. - - -int inflateReset (z_streamp strm); -// This function is equivalent to inflateEnd followed by inflateInit, -// but does not free and reallocate all the internal decompression state. -// The stream will keep attributes that may have been set by inflateInit2. -// -// inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source -// stream state was inconsistent (such as zalloc or state being NULL). -// - - - -// checksum functions -// These functions are not related to compression but are exported -// anyway because they might be useful in applications using the -// compression library. - -uLong adler32 (uLong adler, const Byte *buf, uInt len); -// Update a running Adler-32 checksum with the bytes buf[0..len-1] and -// return the updated checksum. If buf is NULL, this function returns -// the required initial value for the checksum. -// An Adler-32 checksum is almost as reliable as a CRC32 but can be computed -// much faster. Usage example: -// -// uLong adler = adler32(0L, Z_NULL, 0); -// -// while (read_buffer(buffer, length) != EOF) { -// adler = adler32(adler, buffer, length); -// } -// if (adler != original_adler) error(); - -uLong ucrc32 (uLong crc, const Byte *buf, uInt len); -// Update a running crc with the bytes buf[0..len-1] and return the updated -// crc. If buf is NULL, this function returns the required initial value -// for the crc. Pre- and post-conditioning (one's complement) is performed -// within this function so it shouldn't be done by the application. -// Usage example: -// -// uLong crc = crc32(0L, Z_NULL, 0); -// -// while (read_buffer(buffer, length) != EOF) { -// crc = crc32(crc, buffer, length); -// } -// if (crc != original_crc) error(); - - - - -const char *zError (int err); -int inflateSyncPoint (z_streamp z); -const uLong *get_crc_table (void); - - - -typedef unsigned char uch; -typedef uch uchf; -typedef unsigned short ush; -typedef ush ushf; -typedef unsigned long ulg; - - - -const char * const z_errmsg[10] = { // indexed by 2-zlib_error -"need dictionary", // Z_NEED_DICT 2 -"stream end", // Z_STREAM_END 1 -"", // Z_OK 0 -"file error", // Z_ERRNO (-1) -"stream error", // Z_STREAM_ERROR (-2) -"data error", // Z_DATA_ERROR (-3) -"insufficient memory", // Z_MEM_ERROR (-4) -"buffer error", // Z_BUF_ERROR (-5) -"incompatible version",// Z_VERSION_ERROR (-6) -""}; - - -#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] - -#define ERR_RETURN(strm,err) \ - return (strm->msg = (char*)ERR_MSG(err), (err)) -// To be used only when the state is known to be valid - - // common constants - - -#define STORED_BLOCK 0 -#define STATIC_TREES 1 -#define DYN_TREES 2 -// The three kinds of block type - -#define MIN_MATCH 3 -#define MAX_MATCH 258 -// The minimum and maximum match lengths - -#define PRESET_DICT 0x20 // preset dictionary flag in zlib header - - // target dependencies - -#define OS_CODE 0x0b // Window 95 & Windows NT - - - - // functions - -#define zmemzero(dest, len) memset(dest, 0, len) - -// Diagnostic functions -#undef Assert -#undef Trace -#undef Tracev -#undef Tracevv -#undef Tracec -#undef Tracecv - -#ifdef DEBUG - - int z_verbose = 0; - void z_error (char *m) {fprintf(stderr, "%s\n", m); exit(1);} - -#define Assert(cond,msg) {if(!(cond)) z_error(msg);} -#define Trace(x) {if (z_verbose>=0) fprintf x ;} -#define Tracev(x) {if (z_verbose>0) fprintf x ;} -#define Tracevv(x) {if (z_verbose>1) fprintf x ;} -#define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} -#define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} - -#else - -#ifndef __noop -#if _MSC_VER < 1300 -#define __noop ((void)0) -#endif -#endif - -#define Assert(cond,msg) __noop -#define Trace(x) __noop -#define Tracev(x) __noop -#define Tracevv(x) __noop -#define Tracec(c,x) __noop -#define Tracecv(c,x) __noop - -#endif - - -typedef uLong (*check_func) (uLong check, const Byte *buf, uInt len); -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size); -void zcfree (voidpf opaque, voidpf ptr); - -#define ZALLOC(strm, items, size) \ - (*((strm)->zalloc))((strm)->opaque, (items), (size)) -#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) - -//void ZFREE(z_streamp strm,voidpf addr) -//{ *((strm)->zfree))((strm)->opaque, addr); -//} - -#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} - - - - -// Huffman code lookup table entry--this entry is four bytes for machines -// that have 16-bit pointers (e.g. PC's in the small or medium model). - - -typedef struct inflate_huft_s inflate_huft; - -struct inflate_huft_s { - union { - struct { - Byte Exop; // number of extra bits or operation - Byte Bits; // number of bits in this code or subcode - } what; - uInt pad; // pad structure to a power of 2 (4 bytes for - } word; // 16-bit, 8 bytes for 32-bit int's) - uInt base; // literal, length base, distance base, or table offset -}; - -// Maximum size of dynamic tree. The maximum found in a long but non- -// exhaustive search was 1004 huft structures (850 for length/literals -// and 154 for distances, the latter actually the result of an -// exhaustive search). The actual maximum is not known, but the -// value below is more than safe. -#define MANY 1440 - -int inflate_trees_bits ( - uInt *, // 19 code lengths - uInt *, // bits tree desired/actual depth - inflate_huft * *, // bits tree result - inflate_huft *, // space for trees - z_streamp); // for messages - -int inflate_trees_dynamic ( - uInt, // number of literal/length codes - uInt, // number of distance codes - uInt *, // that many (total) code lengths - uInt *, // literal desired/actual bit depth - uInt *, // distance desired/actual bit depth - inflate_huft * *, // literal/length tree result - inflate_huft * *, // distance tree result - inflate_huft *, // space for trees - z_streamp); // for messages - -int inflate_trees_fixed ( - uInt *, // literal desired/actual bit depth - uInt *, // distance desired/actual bit depth - const inflate_huft * *, // literal/length tree result - const inflate_huft * *, // distance tree result - z_streamp); // for memory allocation - - - - - -struct inflate_blocks_state; -typedef struct inflate_blocks_state inflate_blocks_statef; - -inflate_blocks_statef * inflate_blocks_new ( - z_streamp z, - check_func c, // check function - uInt w); // window size - -int inflate_blocks ( - inflate_blocks_statef *, - z_streamp , - int); // initial return code - -void inflate_blocks_reset ( - inflate_blocks_statef *, - z_streamp , - uLong *); // check value on output - -int inflate_blocks_free ( - inflate_blocks_statef *, - z_streamp); - -void inflate_set_dictionary ( - inflate_blocks_statef *s, - const Byte *d, // dictionary - uInt n); // dictionary length - -int inflate_blocks_sync_point ( - inflate_blocks_statef *s); - - - - -struct inflate_codes_state; -typedef struct inflate_codes_state inflate_codes_statef; - -inflate_codes_statef *inflate_codes_new ( - uInt, uInt, - const inflate_huft *, const inflate_huft *, - z_streamp ); - -int inflate_codes ( - inflate_blocks_statef *, - z_streamp , - int); - -void inflate_codes_free ( - inflate_codes_statef *, - z_streamp ); - - - - -typedef enum { - IBM_TYPE, // get type bits (3, including end bit) - IBM_LENS, // get lengths for stored - IBM_STORED, // processing stored block - IBM_TABLE, // get table lengths - IBM_BTREE, // get bit lengths tree for a dynamic block - IBM_DTREE, // get length, distance trees for a dynamic block - IBM_CODES, // processing fixed or dynamic block - IBM_DRY, // output remaining window bytes - IBM_DONE, // finished last block, done - IBM_BAD} // got a data error--stuck here -inflate_block_mode; - -// inflate blocks semi-private state -struct inflate_blocks_state { - - // mode - inflate_block_mode mode; // current inflate_block mode - - // mode dependent information - union { - uInt left; // if STORED, bytes left to copy - struct { - uInt table; // table lengths (14 bits) - uInt index; // index into blens (or border) - uInt *blens; // bit lengths of codes - uInt bb; // bit length tree depth - inflate_huft *tb; // bit length decoding tree - } trees; // if DTREE, decoding info for trees - struct { - inflate_codes_statef - *codes; - } decode; // if CODES, current state - } sub; // submode - uInt last; // true if this block is the last block - - // mode independent information - uInt bitk; // bits in bit buffer - uLong bitb; // bit buffer - inflate_huft *hufts; // single malloc for tree space - Byte *window; // sliding window - Byte *end; // one byte after sliding window - Byte *read; // window read pointer - Byte *write; // window write pointer - check_func checkfn; // check function - uLong check; // check on output - -}; - - -// defines for inflate input/output -// update pointers and return -#define UPDBITS {s->bitb=b;s->bitk=k;} -#define UPDIN {z->avail_in=n;z->total_in+=(uLong)(p-z->next_in);z->next_in=p;} -#define UPDOUT {s->write=q;} -#define UPDATE {UPDBITS UPDIN UPDOUT} -#define LEAVE {UPDATE return inflate_flush(s,z,r);} -// get bytes and bits -#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;} -#define NEEDBYTE {if(n)r=Z_OK;else LEAVE} -#define NEXTBYTE (n--,*p++) -#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<>=(j);k-=(j);} -// output bytes -#define WAVAIL (uInt)(qread?s->read-q-1:s->end-q) -#define LOADOUT {q=s->write;m=(uInt)WAVAIL;m;} -#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}} -#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT} -#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;} -#define OUTBYTE(a) {*q++=(Byte)(a);m--;} -// load local pointers -#define LOAD {LOADIN LOADOUT} - -// masks for lower bits (size given to avoid silly warnings with Visual C++) -// And'ing with mask[n] masks the lower n bits -const uInt inflate_mask[17] = { - 0x0000, - 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, - 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff -}; - -// copy as much as possible from the sliding window to the output area -int inflate_flush (inflate_blocks_statef *, z_streamp, int); - -int inflate_fast (uInt, uInt, const inflate_huft *, const inflate_huft *, inflate_blocks_statef *, z_streamp ); - - - -const uInt fixed_bl = 9; -const uInt fixed_bd = 5; -const inflate_huft fixed_tl[] = { - {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115}, - {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},192}, - {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},160}, - {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},224}, - {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},144}, - {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},208}, - {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},176}, - {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},240}, - {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227}, - {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},200}, - {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},168}, - {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},232}, - {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},152}, - {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},216}, - {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},184}, - {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},248}, - {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163}, - {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},196}, - {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},164}, - {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},228}, - {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},148}, - {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},212}, - {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},180}, - {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},244}, - {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0}, - {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},204}, - {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},172}, - {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},236}, - {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},156}, - {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},220}, - {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},188}, - {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},252}, - {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131}, - {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},194}, - {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},162}, - {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},226}, - {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},146}, - {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},210}, - {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},178}, - {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},242}, - {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258}, - {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},202}, - {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},170}, - {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},234}, - {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},154}, - {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},218}, - {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},186}, - {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},250}, - {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195}, - {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},198}, - {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},166}, - {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},230}, - {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},150}, - {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},214}, - {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},182}, - {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},246}, - {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0}, - {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},206}, - {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},174}, - {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},238}, - {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},158}, - {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},222}, - {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},190}, - {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},254}, - {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115}, - {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},193}, - {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},161}, - {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},225}, - {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},145}, - {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},209}, - {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},177}, - {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},241}, - {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227}, - {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},201}, - {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},169}, - {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},233}, - {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},153}, - {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},217}, - {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},185}, - {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},249}, - {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163}, - {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},197}, - {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},165}, - {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},229}, - {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},149}, - {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},213}, - {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},181}, - {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},245}, - {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0}, - {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},205}, - {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},173}, - {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},237}, - {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},157}, - {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},221}, - {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},189}, - {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},253}, - {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131}, - {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},195}, - {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},163}, - {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},227}, - {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},147}, - {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},211}, - {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},179}, - {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},243}, - {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258}, - {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},203}, - {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},171}, - {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},235}, - {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},155}, - {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},219}, - {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},187}, - {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},251}, - {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195}, - {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},199}, - {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},167}, - {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},231}, - {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},151}, - {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},215}, - {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},183}, - {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},247}, - {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0}, - {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},207}, - {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},175}, - {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},239}, - {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},159}, - {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},223}, - {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},191}, - {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},255} - }; -const inflate_huft fixed_td[] = { - {{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097}, - {{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385}, - {{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193}, - {{{82,5}},9}, {{{90,5}},2049}, {{{86,5}},129}, {{{192,5}},24577}, - {{{80,5}},2}, {{{87,5}},385}, {{{83,5}},25}, {{{91,5}},6145}, - {{{81,5}},7}, {{{89,5}},1537}, {{{85,5}},97}, {{{93,5}},24577}, - {{{80,5}},4}, {{{88,5}},769}, {{{84,5}},49}, {{{92,5}},12289}, - {{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577} - }; - - - - - - - -// copy as much as possible from the sliding window to the output area -int inflate_flush(inflate_blocks_statef *s,z_streamp z,int r) -{ - uInt n; - Byte *p; - Byte *q; - - // local copies of source and destination pointers - p = z->next_out; - q = s->read; - - // compute number of bytes to copy as far as end of window - n = (uInt)((q <= s->write ? s->write : s->end) - q); - if (n > z->avail_out) n = z->avail_out; - if (n && r == Z_BUF_ERROR) r = Z_OK; - - // update counters - z->avail_out -= n; - z->total_out += n; - - // update check information - if (s->checkfn != Z_NULL) - z->adler = s->check = (*s->checkfn)(s->check, q, n); - - // copy as far as end of window - if (n!=0) // check for n!=0 to avoid waking up CodeGuard - { memcpy(p, q, n); - p += n; - q += n; - } - - // see if more to copy at beginning of window - if (q == s->end) - { - // wrap pointers - q = s->window; - if (s->write == s->end) - s->write = s->window; - - // compute bytes to copy - n = (uInt)(s->write - q); - if (n > z->avail_out) n = z->avail_out; - if (n && r == Z_BUF_ERROR) r = Z_OK; - - // update counters - z->avail_out -= n; - z->total_out += n; - - // update check information - if (s->checkfn != Z_NULL) - z->adler = s->check = (*s->checkfn)(s->check, q, n); - - // copy - memcpy(p, q, n); - p += n; - q += n; - } - - // update pointers - z->next_out = p; - s->read = q; - - // done - return r; -} - - - - - - -// simplify the use of the inflate_huft type with some defines -#define exop word.what.Exop -#define bits word.what.Bits - -typedef enum { // waiting for "i:"=input, "o:"=output, "x:"=nothing - START, // x: set up for LEN - LEN, // i: get length/literal/eob next - LENEXT, // i: getting length extra (have base) - DIST, // i: get distance next - DISTEXT, // i: getting distance extra - COPY, // o: copying bytes in window, waiting for space - LIT, // o: got literal, waiting for output space - WASH, // o: got eob, possibly still output waiting - END, // x: got eob and all data flushed - BADCODE} // x: got error -inflate_codes_mode; - -// inflate codes private state -struct inflate_codes_state { - - // mode - inflate_codes_mode mode; // current inflate_codes mode - - // mode dependent information - uInt len; - union { - struct { - const inflate_huft *tree; // pointer into tree - uInt need; // bits needed - } code; // if LEN or DIST, where in tree - uInt lit; // if LIT, literal - struct { - uInt get; // bits to get for extra - uInt dist; // distance back to copy from - } copy; // if EXT or COPY, where and how much - } sub; // submode - - // mode independent information - Byte lbits; // ltree bits decoded per branch - Byte dbits; // dtree bits decoder per branch - const inflate_huft *ltree; // literal/length/eob tree - const inflate_huft *dtree; // distance tree - -}; - - -inflate_codes_statef *inflate_codes_new( -uInt bl, uInt bd, -const inflate_huft *tl, -const inflate_huft *td, // need separate declaration for Borland C++ -z_streamp z) -{ - inflate_codes_statef *c; - - if ((c = (inflate_codes_statef *) - ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL) - { - c->mode = START; - c->lbits = (Byte)bl; - c->dbits = (Byte)bd; - c->ltree = tl; - c->dtree = td; - Tracev((stderr, "inflate: codes new\n")); - } - return c; -} - - -int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r) -{ - uInt j; // temporary storage - const inflate_huft *t; // temporary pointer - uInt e; // extra bits or operation - uLong b; // bit buffer - uInt k; // bits in bit buffer - Byte *p; // input data pointer - uInt n; // bytes available there - Byte *q; // output window write pointer - uInt m; // bytes to end of window or read pointer - Byte *f; // pointer to copy strings from - inflate_codes_statef *c = s->sub.decode.codes; // codes state - - // copy input/output information to locals (UPDATE macro restores) - LOAD - - // process input and output based on current state - for(;;) switch (c->mode) - { // waiting for "i:"=input, "o:"=output, "x:"=nothing - case START: // x: set up for LEN -#ifndef SLOW - if (m >= 258 && n >= 10) - { - UPDATE - r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z); - LOAD - if (r != Z_OK) - { - c->mode = r == Z_STREAM_END ? WASH : BADCODE; - break; - } - } -#endif // !SLOW - c->sub.code.need = c->lbits; - c->sub.code.tree = c->ltree; - c->mode = LEN; - case LEN: // i: get length/literal/eob next - j = c->sub.code.need; - NEEDBITS(j) - t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); - DUMPBITS(t->bits) - e = (uInt)(t->exop); - if (e == 0) // literal - { - c->sub.lit = t->base; - Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", t->base)); - c->mode = LIT; - break; - } - if (e & 16) // length - { - c->sub.copy.get = e & 15; - c->len = t->base; - c->mode = LENEXT; - break; - } - if ((e & 64) == 0) // next table - { - c->sub.code.need = e; - c->sub.code.tree = t + t->base; - break; - } - if (e & 32) // end of block - { - Tracevv((stderr, "inflate: end of block\n")); - c->mode = WASH; - break; - } - c->mode = BADCODE; // invalid code - z->msg = (char*)"invalid literal/length code"; - r = Z_DATA_ERROR; - LEAVE - case LENEXT: // i: getting length extra (have base) - j = c->sub.copy.get; - NEEDBITS(j) - c->len += (uInt)b & inflate_mask[j]; - DUMPBITS(j) - c->sub.code.need = c->dbits; - c->sub.code.tree = c->dtree; - Tracevv((stderr, "inflate: length %u\n", c->len)); - c->mode = DIST; - case DIST: // i: get distance next - j = c->sub.code.need; - NEEDBITS(j) - t = c->sub.code.tree + ((uInt)b & inflate_mask[j]); - DUMPBITS(t->bits) - e = (uInt)(t->exop); - if (e & 16) // distance - { - c->sub.copy.get = e & 15; - c->sub.copy.dist = t->base; - c->mode = DISTEXT; - break; - } - if ((e & 64) == 0) // next table - { - c->sub.code.need = e; - c->sub.code.tree = t + t->base; - break; - } - c->mode = BADCODE; // invalid code - z->msg = (char*)"invalid distance code"; - r = Z_DATA_ERROR; - LEAVE - case DISTEXT: // i: getting distance extra - j = c->sub.copy.get; - NEEDBITS(j) - c->sub.copy.dist += (uInt)b & inflate_mask[j]; - DUMPBITS(j) - Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist)); - c->mode = COPY; - case COPY: // o: copying bytes in window, waiting for space - f = (uInt)(q - s->window) < c->sub.copy.dist ? - s->end - (c->sub.copy.dist - (q - s->window)) : - q - c->sub.copy.dist; - while (c->len) - { - NEEDOUT - OUTBYTE(*f++) - if (f == s->end) - f = s->window; - c->len--; - } - c->mode = START; - break; - case LIT: // o: got literal, waiting for output space - NEEDOUT - OUTBYTE(c->sub.lit) - c->mode = START; - break; - case WASH: // o: got eob, possibly more output - if (k > 7) // return unused byte, if any - { - Assert(k < 16, "inflate_codes grabbed too many bytes"); - k -= 8; - n++; - p--; // can always return one - } - FLUSH - if (s->read != s->write) - LEAVE - c->mode = END; - case END: - r = Z_STREAM_END; - LEAVE - case BADCODE: // x: got error - r = Z_DATA_ERROR; - LEAVE - default: - r = Z_STREAM_ERROR; - LEAVE - } -} - - -void inflate_codes_free(inflate_codes_statef *c,z_streamp z) -{ ZFREE(z, c); - Tracev((stderr, "inflate: codes free\n")); -} - - - -// infblock.c -- interpret and process block types to last block -// Copyright (C) 1995-1998 Mark Adler -// For conditions of distribution and use, see copyright notice in zlib.h - -//struct inflate_codes_state {int dummy;}; // for buggy compilers - - - -// Table for deflate from PKZIP's appnote.txt. -const uInt border[] = { // Order of the bit length code lengths - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - -// -// Notes beyond the 1.93a appnote.txt: -// -// 1. Distance pointers never point before the beginning of the output stream. -// 2. Distance pointers can point back across blocks, up to 32k away. -// 3. There is an implied maximum of 7 bits for the bit length table and -// 15 bits for the actual data. -// 4. If only one code exists, then it is encoded using one bit. (Zero -// would be more efficient, but perhaps a little confusing.) If two -// codes exist, they are coded using one bit each (0 and 1). -// 5. There is no way of sending zero distance codes--a dummy must be -// sent if there are none. (History: a pre 2.0 version of PKZIP would -// store blocks with no distance codes, but this was discovered to be -// too harsh a criterion.) Valid only for 1.93a. 2.04c does allow -// zero distance codes, which is sent as one code of zero bits in -// length. -// 6. There are up to 286 literal/length codes. Code 256 represents the -// end-of-block. Note however that the static length tree defines -// 288 codes just to fill out the Huffman codes. Codes 286 and 287 -// cannot be used though, since there is no length base or extra bits -// defined for them. Similarily, there are up to 30 distance codes. -// However, static trees define 32 codes (all 5 bits) to fill out the -// Huffman codes, but the last two had better not show up in the data. -// 7. Unzip can check dynamic Huffman blocks for complete code sets. -// The exception is that a single code would not be complete (see #4). -// 8. The five bits following the block type is really the number of -// literal codes sent minus 257. -// 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits -// (1+6+6). Therefore, to output three times the length, you output -// three codes (1+1+1), whereas to output four times the same length, -// you only need two codes (1+3). Hmm. -//10. In the tree reconstruction algorithm, Code = Code + Increment -// only if BitLength(i) is not zero. (Pretty obvious.) -//11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) -//12. Note: length code 284 can represent 227-258, but length code 285 -// really is 258. The last length deserves its own, short code -// since it gets used a lot in very redundant files. The length -// 258 is special since 258 - 3 (the min match length) is 255. -//13. The literal/length and distance code bit lengths are read as a -// single stream of lengths. It is possible (and advantageous) for -// a repeat code (16, 17, or 18) to go across the boundary between -// the two sets of lengths. - - -void inflate_blocks_reset(inflate_blocks_statef *s, z_streamp z, uLong *c) -{ - if (c != Z_NULL) - *c = s->check; - if (s->mode == IBM_BTREE || s->mode == IBM_DTREE) - ZFREE(z, s->sub.trees.blens); - if (s->mode == IBM_CODES) - inflate_codes_free(s->sub.decode.codes, z); - s->mode = IBM_TYPE; - s->bitk = 0; - s->bitb = 0; - s->read = s->write = s->window; - if (s->checkfn != Z_NULL) - z->adler = s->check = (*s->checkfn)(0L, (const Byte *)Z_NULL, 0); - Tracev((stderr, "inflate: blocks reset\n")); -} - - -inflate_blocks_statef *inflate_blocks_new(z_streamp z, check_func c, uInt w) -{ - inflate_blocks_statef *s; - - if ((s = (inflate_blocks_statef *)ZALLOC - (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL) - return s; - if ((s->hufts = - (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL) - { - ZFREE(z, s); - return Z_NULL; - } - if ((s->window = (Byte *)ZALLOC(z, 1, w)) == Z_NULL) - { - ZFREE(z, s->hufts); - ZFREE(z, s); - return Z_NULL; - } - s->end = s->window + w; - s->checkfn = c; - s->mode = IBM_TYPE; - Tracev((stderr, "inflate: blocks allocated\n")); - inflate_blocks_reset(s, z, Z_NULL); - return s; -} - - -int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r) -{ - uInt t; // temporary storage - uLong b; // bit buffer - uInt k; // bits in bit buffer - Byte *p; // input data pointer - uInt n; // bytes available there - Byte *q; // output window write pointer - uInt m; // bytes to end of window or read pointer - - // copy input/output information to locals (UPDATE macro restores) - LOAD - - // process input based on current state - for(;;) switch (s->mode) - { - case IBM_TYPE: - NEEDBITS(3) - t = (uInt)b & 7; - s->last = t & 1; - switch (t >> 1) - { - case 0: // stored - Tracev((stderr, "inflate: stored block%s\n", - s->last ? " (last)" : "")); - DUMPBITS(3) - t = k & 7; // go to byte boundary - DUMPBITS(t) - s->mode = IBM_LENS; // get length of stored block - break; - case 1: // fixed - Tracev((stderr, "inflate: fixed codes block%s\n", - s->last ? " (last)" : "")); - { - uInt bl, bd; - const inflate_huft *tl, *td; - - inflate_trees_fixed(&bl, &bd, &tl, &td, z); - s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z); - if (s->sub.decode.codes == Z_NULL) - { - r = Z_MEM_ERROR; - LEAVE - } - } - DUMPBITS(3) - s->mode = IBM_CODES; - break; - case 2: // dynamic - Tracev((stderr, "inflate: dynamic codes block%s\n", - s->last ? " (last)" : "")); - DUMPBITS(3) - s->mode = IBM_TABLE; - break; - case 3: // illegal - DUMPBITS(3) - s->mode = IBM_BAD; - z->msg = (char*)"invalid block type"; - r = Z_DATA_ERROR; - LEAVE - } - break; - case IBM_LENS: - NEEDBITS(32) - if ((((~b) >> 16) & 0xffff) != (b & 0xffff)) - { - s->mode = IBM_BAD; - z->msg = (char*)"invalid stored block lengths"; - r = Z_DATA_ERROR; - LEAVE - } - s->sub.left = (uInt)b & 0xffff; - b = k = 0; // dump bits - Tracev((stderr, "inflate: stored length %u\n", s->sub.left)); - s->mode = s->sub.left ? IBM_STORED : (s->last ? IBM_DRY : IBM_TYPE); - break; - case IBM_STORED: - if (n == 0) - LEAVE - NEEDOUT - t = s->sub.left; - if (t > n) t = n; - if (t > m) t = m; - memcpy(q, p, t); - p += t; n -= t; - q += t; m -= t; - if ((s->sub.left -= t) != 0) - break; - Tracev((stderr, "inflate: stored end, %lu total out\n",(unsigned long)( - z->total_out + (q >= s->read ? q - s->read : - (s->end - s->read) + (q - s->window))))); - s->mode = s->last ? IBM_DRY : IBM_TYPE; - break; - case IBM_TABLE: - NEEDBITS(14) - s->sub.trees.table = t = (uInt)b & 0x3fff; - // remove this section to workaround bug in pkzip - if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) - { - s->mode = IBM_BAD; - z->msg = (char*)"too many length or distance symbols"; - r = Z_DATA_ERROR; - LEAVE - } - // end remove - t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); - if ((s->sub.trees.blens = (uInt*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL) - { - r = Z_MEM_ERROR; - LEAVE - } - DUMPBITS(14) - s->sub.trees.index = 0; - Tracev((stderr, "inflate: table sizes ok\n")); - s->mode = IBM_BTREE; - case IBM_BTREE: - while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10)) - { - NEEDBITS(3) - s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7; - DUMPBITS(3) - } - while (s->sub.trees.index < 19) - s->sub.trees.blens[border[s->sub.trees.index++]] = 0; - s->sub.trees.bb = 7; - t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb, - &s->sub.trees.tb, s->hufts, z); - if (t != Z_OK) - { - ZFREE(z, s->sub.trees.blens); - r = t; - if (r == Z_DATA_ERROR) - s->mode = IBM_BAD; - LEAVE - } - s->sub.trees.index = 0; - Tracev((stderr, "inflate: bits tree ok\n")); - s->mode = IBM_DTREE; - case IBM_DTREE: - while (t = s->sub.trees.table, - s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) - { - inflate_huft *h; - uInt i, j, c; - - t = s->sub.trees.bb; - NEEDBITS(t) - h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]); - t = h->bits; - c = h->base; - if (c < 16) - { - DUMPBITS(t) - s->sub.trees.blens[s->sub.trees.index++] = c; - } - else // c == 16..18 - { - i = c == 18 ? 7 : c - 14; - j = c == 18 ? 11 : 3; - NEEDBITS(t + i) - DUMPBITS(t) - j += (uInt)b & inflate_mask[i]; - DUMPBITS(i) - i = s->sub.trees.index; - t = s->sub.trees.table; - if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || - (c == 16 && i < 1)) - { - ZFREE(z, s->sub.trees.blens); - s->mode = IBM_BAD; - z->msg = (char*)"invalid bit length repeat"; - r = Z_DATA_ERROR; - LEAVE - } - c = c == 16 ? s->sub.trees.blens[i - 1] : 0; - do { - s->sub.trees.blens[i++] = c; - } while (--j); - s->sub.trees.index = i; - } - } - s->sub.trees.tb = Z_NULL; - { - uInt bl, bd; - inflate_huft *tl, *td; - inflate_codes_statef *c; - - bl = 9; // must be <= 9 for lookahead assumptions - bd = 6; // must be <= 9 for lookahead assumptions - t = s->sub.trees.table; - t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), - s->sub.trees.blens, &bl, &bd, &tl, &td, - s->hufts, z); - ZFREE(z, s->sub.trees.blens); - if (t != Z_OK) - { - if (t == (uInt)Z_DATA_ERROR) - s->mode = IBM_BAD; - r = t; - LEAVE - } - Tracev((stderr, "inflate: trees ok\n")); - if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL) - { - r = Z_MEM_ERROR; - LEAVE - } - s->sub.decode.codes = c; - } - s->mode = IBM_CODES; - case IBM_CODES: - UPDATE - if ((r = inflate_codes(s, z, r)) != Z_STREAM_END) - return inflate_flush(s, z, r); - r = Z_OK; - inflate_codes_free(s->sub.decode.codes, z); - LOAD - Tracev((stderr, "inflate: codes end, %lu total out\n", (unsigned long)( - z->total_out + (q >= s->read ? q - s->read : - (s->end - s->read) + (q - s->window))))); - if (!s->last) - { - s->mode = IBM_TYPE; - break; - } - s->mode = IBM_DRY; - case IBM_DRY: - FLUSH - if (s->read != s->write) - LEAVE - s->mode = IBM_DONE; - case IBM_DONE: - r = Z_STREAM_END; - LEAVE - case IBM_BAD: - r = Z_DATA_ERROR; - LEAVE - default: - r = Z_STREAM_ERROR; - LEAVE - } -} - - -int inflate_blocks_free(inflate_blocks_statef *s, z_streamp z) -{ - inflate_blocks_reset(s, z, Z_NULL); - ZFREE(z, s->window); - ZFREE(z, s->hufts); - ZFREE(z, s); - Tracev((stderr, "inflate: blocks freed\n")); - return Z_OK; -} - - - -// inftrees.c -- generate Huffman trees for efficient decoding -// Copyright (C) 1995-1998 Mark Adler -// For conditions of distribution and use, see copyright notice in zlib.h -// - - - -extern const char inflate_copyright[] = - " ";//inflate 1.1.3 Copyright 1995-1998 Mark Adler "; -// If you use the zlib library in a product, an acknowledgment is welcome -// in the documentation of your product. If for some reason you cannot -// include such an acknowledgment, I would appreciate that you keep this -// copyright string in the executable of your product. - - - -int huft_build ( - uInt *, // code lengths in bits - uInt, // number of codes - uInt, // number of "simple" codes - const uInt *, // list of base values for non-simple codes - const uInt *, // list of extra bits for non-simple codes - inflate_huft **,// result: starting table - uInt *, // maximum lookup bits (returns actual) - inflate_huft *, // space for trees - uInt *, // hufts used in space - uInt * ); // space for values - -// Tables for deflate from PKZIP's appnote.txt. -const uInt cplens[31] = { // Copy lengths for literal codes 257..285 - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; - // see note #13 above about 258 -const uInt cplext[31] = { // Extra bits for literal codes 257..285 - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, - 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; // 112==invalid -const uInt cpdist[30] = { // Copy offsets for distance codes 0..29 - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, - 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, - 8193, 12289, 16385, 24577}; -const uInt cpdext[30] = { // Extra bits for distance codes - 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, - 12, 12, 13, 13}; - -// -// Huffman code decoding is performed using a multi-level table lookup. -// The fastest way to decode is to simply build a lookup table whose -// size is determined by the longest code. However, the time it takes -// to build this table can also be a factor if the data being decoded -// is not very long. The most common codes are necessarily the -// shortest codes, so those codes dominate the decoding time, and hence -// the speed. The idea is you can have a shorter table that decodes the -// shorter, more probable codes, and then point to subsidiary tables for -// the longer codes. The time it costs to decode the longer codes is -// then traded against the time it takes to make longer tables. -// -// This results of this trade are in the variables lbits and dbits -// below. lbits is the number of bits the first level table for literal/ -// length codes can decode in one step, and dbits is the same thing for -// the distance codes. Subsequent tables are also less than or equal to -// those sizes. These values may be adjusted either when all of the -// codes are shorter than that, in which case the longest code length in -// bits is used, or when the shortest code is *longer* than the requested -// table size, in which case the length of the shortest code in bits is -// used. -// -// There are two different values for the two tables, since they code a -// different number of possibilities each. The literal/length table -// codes 286 possible values, or in a flat code, a little over eight -// bits. The distance table codes 30 possible values, or a little less -// than five bits, flat. The optimum values for speed end up being -// about one bit more than those, so lbits is 8+1 and dbits is 5+1. -// The optimum values may differ though from machine to machine, and -// possibly even between compilers. Your mileage may vary. -// - - -// If BMAX needs to be larger than 16, then h and x[] should be uLong. -#define BMAX 15 // maximum bit length of any code - -int huft_build( -uInt *b, // code lengths in bits (all assumed <= BMAX) -uInt n, // number of codes (assumed <= 288) -uInt s, // number of simple-valued codes (0..s-1) -const uInt *d, // list of base values for non-simple codes -const uInt *e, // list of extra bits for non-simple codes -inflate_huft * *t, // result: starting table -uInt *m, // maximum lookup bits, returns actual -inflate_huft *hp, // space for trees -uInt *hn, // hufts used in space -uInt *v) // working area: values in order of bit length -// Given a list of code lengths and a maximum table size, make a set of -// tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR -// if the given code set is incomplete (the tables are still built in this -// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of -// lengths), or Z_MEM_ERROR if not enough memory. -{ - - uInt a; // counter for codes of length k - uInt c[BMAX+1]; // bit length count table - uInt f; // i repeats in table every f entries - int g; // maximum code length - int h; // table level - register uInt i; // counter, current code - register uInt j; // counter - register int k; // number of bits in current code - int l; // bits per table (returned in m) - uInt mask; // (1 << w) - 1, to avoid cc -O bug on HP - register uInt *p; // pointer into c[], b[], or v[] - inflate_huft *q; // points to current table - struct inflate_huft_s r; // table entry for structure assignment - inflate_huft *u[BMAX]; // table stack - register int w; // bits before this table == (l * h) - uInt x[BMAX+1]; // bit offsets, then code stack - uInt *xp; // pointer into x - int y; // number of dummy codes added - uInt z; // number of entries in current table - - - // Generate counts for each bit length - p = c; -#define C0 *p++ = 0; -#define C2 C0 C0 C0 C0 -#define C4 C2 C2 C2 C2 - C4; p; // clear c[]--assume BMAX+1 is 16 - p = b; i = n; - do { - c[*p++]++; // assume all entries <= BMAX - } while (--i); - if (c[0] == n) // null input--all zero length codes - { - *t = (inflate_huft *)Z_NULL; - *m = 0; - return Z_OK; - } - - - // Find minimum and maximum length, bound *m by those - l = *m; - for (j = 1; j <= BMAX; j++) - if (c[j]) - break; - k = j; // minimum code length - if ((uInt)l < j) - l = j; - for (i = BMAX; i; i--) - if (c[i]) - break; - g = i; // maximum code length - if ((uInt)l > i) - l = i; - *m = l; - - - // Adjust last length count to fill out codes, if needed - for (y = 1 << j; j < i; j++, y <<= 1) - if ((y -= c[j]) < 0) - return Z_DATA_ERROR; - if ((y -= c[i]) < 0) - return Z_DATA_ERROR; - c[i] += y; - - - // Generate starting offsets into the value table for each length - x[1] = j = 0; - p = c + 1; xp = x + 2; - while (--i) { // note that i == g from above - *xp++ = (j += *p++); - } - - - // Make a table of values in order of bit lengths - p = b; i = 0; - do { - if ((j = *p++) != 0) - v[x[j]++] = i; - } while (++i < n); - n = x[g]; // set n to length of v - - - // Generate the Huffman codes and for each, make the table entries - x[0] = i = 0; // first Huffman code is zero - p = v; // grab values in bit order - h = -1; // no tables yet--level -1 - w = -l; // bits decoded == (l * h) - u[0] = (inflate_huft *)Z_NULL; // just to keep compilers happy - q = (inflate_huft *)Z_NULL; // ditto - z = 0; // ditto - - // go through the bit lengths (k already is bits in shortest code) - for (; k <= g; k++) - { - a = c[k]; - while (a--) - { - // here i is the Huffman code of length k bits for value *p - // make tables up to required level - while (k > w + l) - { - h++; - w += l; // previous table always l bits - - // compute minimum size table less than or equal to l bits - z = g - w; - z = z > (uInt)l ? l : z; // table size upper limit - if ((f = 1 << (j = k - w)) > a + 1) // try a k-w bit table - { // too few codes for k-w bit table - f -= a + 1; // deduct codes from patterns left - xp = c + k; - if (j < z) - while (++j < z) // try smaller tables up to z bits - { - if ((f <<= 1) <= *++xp) - break; // enough codes to use up j bits - f -= *xp; // else deduct codes from patterns - } - } - z = 1 << j; // table entries for j-bit table - - // allocate new table - if (*hn + z > MANY) // (note: doesn't matter for fixed) - return Z_MEM_ERROR; // not enough memory - u[h] = q = hp + *hn; - *hn += z; - - // connect to last table, if there is one - if (h) - { - x[h] = i; // save pattern for backing up - r.bits = (Byte)l; // bits to dump before this table - r.exop = (Byte)j; // bits in this table - j = i >> (w - l); - r.base = (uInt)(q - u[h-1] - j); // offset to this table - u[h-1][j] = r; // connect to last table - } - else - *t = q; // first table is returned result - } - - // set up table entry in r - r.bits = (Byte)(k - w); - if (p >= v + n) - r.exop = 128 + 64; // out of values--invalid code - else if (*p < s) - { - r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); // 256 is end-of-block - r.base = *p++; // simple code is just the value - } - else - { - r.exop = (Byte)(e[*p - s] + 16 + 64);// non-simple--look up in lists - r.base = d[*p++ - s]; - } - - // fill code-like entries with r - f = 1 << (k - w); - for (j = i >> w; j < z; j += f) - q[j] = r; - - // backwards increment the k-bit code i - for (j = 1 << (k - 1); i & j; j >>= 1) - i ^= j; - i ^= j; - - // backup over finished tables - mask = (1 << w) - 1; // needed on HP, cc -O bug - while ((i & mask) != x[h]) - { - h--; // don't need to update q - w -= l; - mask = (1 << w) - 1; - } - } - } - - - // Return Z_BUF_ERROR if we were given an incomplete table - return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK; -} - - -int inflate_trees_bits( -uInt *c, // 19 code lengths -uInt *bb, // bits tree desired/actual depth -inflate_huft * *tb, // bits tree result -inflate_huft *hp, // space for trees -z_streamp z) // for messages -{ - int r; - uInt hn = 0; // hufts used in space - uInt *v; // work area for huft_build - - if ((v = (uInt*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL) - return Z_MEM_ERROR; - r = huft_build(c, 19, 19, (uInt*)Z_NULL, (uInt*)Z_NULL, - tb, bb, hp, &hn, v); - if (r == Z_DATA_ERROR) - z->msg = (char*)"oversubscribed dynamic bit lengths tree"; - else if (r == Z_BUF_ERROR || *bb == 0) - { - z->msg = (char*)"incomplete dynamic bit lengths tree"; - r = Z_DATA_ERROR; - } - ZFREE(z, v); - return r; -} - - -int inflate_trees_dynamic( -uInt nl, // number of literal/length codes -uInt nd, // number of distance codes -uInt *c, // that many (total) code lengths -uInt *bl, // literal desired/actual bit depth -uInt *bd, // distance desired/actual bit depth -inflate_huft * *tl, // literal/length tree result -inflate_huft * *td, // distance tree result -inflate_huft *hp, // space for trees -z_streamp z) // for messages -{ - int r; - uInt hn = 0; // hufts used in space - uInt *v; // work area for huft_build - - // allocate work area - if ((v = (uInt*)ZALLOC(z, 288, sizeof(uInt))) == Z_NULL) - return Z_MEM_ERROR; - - // build literal/length tree - r = huft_build(c, nl, 257, cplens, cplext, tl, bl, hp, &hn, v); - if (r != Z_OK || *bl == 0) - { - if (r == Z_DATA_ERROR) - z->msg = (char*)"oversubscribed literal/length tree"; - else if (r != Z_MEM_ERROR) - { - z->msg = (char*)"incomplete literal/length tree"; - r = Z_DATA_ERROR; - } - ZFREE(z, v); - return r; - } - - // build distance tree - r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, hp, &hn, v); - if (r != Z_OK || (*bd == 0 && nl > 257)) - { - if (r == Z_DATA_ERROR) - z->msg = (char*)"oversubscribed distance tree"; - else if (r == Z_BUF_ERROR) { - z->msg = (char*)"incomplete distance tree"; - r = Z_DATA_ERROR; - } - else if (r != Z_MEM_ERROR) - { - z->msg = (char*)"empty distance tree with lengths"; - r = Z_DATA_ERROR; - } - ZFREE(z, v); - return r; - } - - // done - ZFREE(z, v); - return Z_OK; -} - - - - - -int inflate_trees_fixed( -uInt *bl, // literal desired/actual bit depth -uInt *bd, // distance desired/actual bit depth -const inflate_huft * * tl, // literal/length tree result -const inflate_huft * *td, // distance tree result -z_streamp ) // for memory allocation -{ - *bl = fixed_bl; - *bd = fixed_bd; - *tl = fixed_tl; - *td = fixed_td; - return Z_OK; -} - - -// inffast.c -- process literals and length/distance pairs fast -// Copyright (C) 1995-1998 Mark Adler -// For conditions of distribution and use, see copyright notice in zlib.h -// - - -//struct inflate_codes_state {int dummy;}; // for buggy compilers - - -// macros for bit input with no checking and for returning unused bytes -#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<avail_in-n;c=(k>>3)>3:c;n+=c;p-=c;k-=c<<3;} - -// Called with number of bytes left to write in window at least 258 -// (the maximum string length) and number of input bytes available -// at least ten. The ten bytes are six bytes for the longest length/ -// distance pair plus four bytes for overloading the bit buffer. - -int inflate_fast( -uInt bl, uInt bd, -const inflate_huft *tl, -const inflate_huft *td, // need separate declaration for Borland C++ -inflate_blocks_statef *s, -z_streamp z) -{ - const inflate_huft *t; // temporary pointer - uInt e; // extra bits or operation - uLong b; // bit buffer - uInt k; // bits in bit buffer - Byte *p; // input data pointer - uInt n; // bytes available there - Byte *q; // output window write pointer - uInt m; // bytes to end of window or read pointer - uInt ml; // mask for literal/length tree - uInt md; // mask for distance tree - uInt c; // bytes to copy - uInt d; // distance back to copy from - Byte *r; // copy source pointer - - // load input, output, bit values - LOAD - - // initialize masks - ml = inflate_mask[bl]; - md = inflate_mask[bd]; - - // do until not enough input or output space for fast loop - do { // assume called with m >= 258 && n >= 10 - // get literal/length code - GRABBITS(20) // max bits for literal/length code - if ((e = (t = tl + ((uInt)b & ml))->exop) == 0) - { - DUMPBITS(t->bits) - Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? - "inflate: * literal '%c'\n" : - "inflate: * literal 0x%02x\n", t->base)); - *q++ = (Byte)t->base; - m--; - continue; - } - for (;;) { - DUMPBITS(t->bits) - if (e & 16) - { - // get extra bits for length - e &= 15; - c = t->base + ((uInt)b & inflate_mask[e]); - DUMPBITS(e) - Tracevv((stderr, "inflate: * length %u\n", c)); - - // decode distance base of block to copy - GRABBITS(15); // max bits for distance code - e = (t = td + ((uInt)b & md))->exop; - for (;;) { - DUMPBITS(t->bits) - if (e & 16) - { - // get extra bits to add to distance base - e &= 15; - GRABBITS(e) // get extra bits (up to 13) - d = t->base + ((uInt)b & inflate_mask[e]); - DUMPBITS(e) - Tracevv((stderr, "inflate: * distance %u\n", d)); - - // do the copy - m -= c; - if ((uInt)(q - s->window) >= d) // offset before dest - { // just copy - r = q - d; - *q++ = *r++; c--; // minimum count is three, - *q++ = *r++; c--; // so unroll loop a little - } - else // else offset after destination - { - e = d - (uInt)(q - s->window); // bytes from offset to end - r = s->end - e; // pointer to offset - if (c > e) // if source crosses, - { - c -= e; // copy to end of window - do { - *q++ = *r++; - } while (--e); - r = s->window; // copy rest from start of window - } - } - do { // copy all or what's left - *q++ = *r++; - } while (--c); - break; - } - else if ((e & 64) == 0) - { - t += t->base; - e = (t += ((uInt)b & inflate_mask[e]))->exop; - } - else - { - z->msg = (char*)"invalid distance code"; - UNGRAB - UPDATE - return Z_DATA_ERROR; - } - }; - break; - } - if ((e & 64) == 0) - { - t += t->base; - if ((e = (t += ((uInt)b & inflate_mask[e]))->exop) == 0) - { - DUMPBITS(t->bits) - Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ? - "inflate: * literal '%c'\n" : - "inflate: * literal 0x%02x\n", t->base)); - *q++ = (Byte)t->base; - m--; - break; - } - } - else if (e & 32) - { - Tracevv((stderr, "inflate: * end of block\n")); - UNGRAB - UPDATE - return Z_STREAM_END; - } - else - { - z->msg = (char*)"invalid literal/length code"; - UNGRAB - UPDATE - return Z_DATA_ERROR; - } - }; - } while (m >= 258 && n >= 10); - - // not enough input or output--restore pointers and return - UNGRAB - UPDATE - return Z_OK; -} - - - - - - -// crc32.c -- compute the CRC-32 of a data stream -// Copyright (C) 1995-1998 Mark Adler -// For conditions of distribution and use, see copyright notice in zlib.h - -// @(#) $Id$ - - - - - - -// Table of CRC-32's of all single-byte values (made by make_crc_table) -const uLong crc_table[256] = { - 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, - 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, - 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, - 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, - 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, - 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, - 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, - 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, - 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, - 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, - 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, - 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, - 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, - 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, - 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, - 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, - 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, - 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, - 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, - 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, - 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, - 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, - 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, - 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, - 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, - 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, - 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, - 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, - 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, - 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, - 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, - 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, - 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, - 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, - 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, - 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, - 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, - 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, - 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, - 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, - 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, - 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, - 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, - 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, - 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, - 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, - 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, - 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, - 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, - 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, - 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, - 0x2d02ef8dL -}; - -const uLong * get_crc_table() -{ return (const uLong *)crc_table; -} - -#define CRC_DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8); -#define CRC_DO2(buf) CRC_DO1(buf); CRC_DO1(buf); -#define CRC_DO4(buf) CRC_DO2(buf); CRC_DO2(buf); -#define CRC_DO8(buf) CRC_DO4(buf); CRC_DO4(buf); - -uLong ucrc32(uLong crc, const Byte *buf, uInt len) -{ if (buf == Z_NULL) return 0L; - crc = crc ^ 0xffffffffL; - while (len >= 8) {CRC_DO8(buf); len -= 8;} - if (len) do {CRC_DO1(buf);} while (--len); - return crc ^ 0xffffffffL; -} - - -// adler32.c -- compute the Adler-32 checksum of a data stream -// Copyright (C) 1995-1998 Mark Adler -// For conditions of distribution and use, see copyright notice in zlib.h - -// @(#) $Id$ - - -#define BASE 65521L // largest prime smaller than 65536 -#define NMAX 5552 -// NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 - -#define AD_DO1(buf,i) {s1 += buf[i]; s2 += s1;} -#define AD_DO2(buf,i) AD_DO1(buf,i); AD_DO1(buf,i+1); -#define AD_DO4(buf,i) AD_DO2(buf,i); AD_DO2(buf,i+2); -#define AD_DO8(buf,i) AD_DO4(buf,i); AD_DO4(buf,i+4); -#define AD_DO16(buf) AD_DO8(buf,0); AD_DO8(buf,8); - -// ========================================================================= -uLong adler32(uLong adler, const Byte *buf, uInt len) -{ - unsigned long s1 = adler & 0xffff; - unsigned long s2 = (adler >> 16) & 0xffff; - int k; - - if (buf == Z_NULL) return 1L; - - while (len > 0) { - k = len < NMAX ? len : NMAX; - len -= k; - while (k >= 16) { - AD_DO16(buf); - buf += 16; - k -= 16; - } - if (k != 0) do { - s1 += *buf++; - s2 += s1; - } while (--k); - s1 %= BASE; - s2 %= BASE; - } - return (s2 << 16) | s1; -} - - - -// zutil.c -- target dependent utility functions for the compression library -// Copyright (C) 1995-1998 Jean-loup Gailly. -// For conditions of distribution and use, see copyright notice in zlib.h -// @(#) $Id$ - - - - - - -const char * zlibVersion() -{ - return ZLIB_VERSION; -} - -// exported to allow conversion of error code to string for compress() and -// uncompress() -const char * zError(int err) -{ return ERR_MSG(err); -} - - - - -voidpf zcalloc (voidpf opaque, unsigned items, unsigned size) -{ - if (opaque) items += size - size; // make compiler happy - return (voidpf)calloc(items, size); -} - -void zcfree (voidpf opaque, voidpf ptr) -{ - zfree(ptr); - if (opaque) return; // make compiler happy -} - - - -// inflate.c -- zlib interface to inflate modules -// Copyright (C) 1995-1998 Mark Adler -// For conditions of distribution and use, see copyright notice in zlib.h - -//struct inflate_blocks_state {int dummy;}; // for buggy compilers - -typedef enum { - IM_METHOD, // waiting for method byte - IM_FLAG, // waiting for flag byte - IM_DICT4, // four dictionary check bytes to go - IM_DICT3, // three dictionary check bytes to go - IM_DICT2, // two dictionary check bytes to go - IM_DICT1, // one dictionary check byte to go - IM_DICT0, // waiting for inflateSetDictionary - IM_BLOCKS, // decompressing blocks - IM_CHECK4, // four check bytes to go - IM_CHECK3, // three check bytes to go - IM_CHECK2, // two check bytes to go - IM_CHECK1, // one check byte to go - IM_DONE, // finished check, done - IM_BAD} // got an error--stay here -inflate_mode; - -// inflate private state -struct internal_state { - - // mode - inflate_mode mode; // current inflate mode - - // mode dependent information - union { - uInt method; // if IM_FLAGS, method byte - struct { - uLong was; // computed check value - uLong need; // stream check value - } check; // if CHECK, check values to compare - uInt marker; // if IM_BAD, inflateSync's marker bytes count - } sub; // submode - - // mode independent information - int nowrap; // flag for no wrapper - uInt wbits; // log2(window size) (8..15, defaults to 15) - inflate_blocks_statef - *blocks; // current inflate_blocks state - -}; - -int inflateReset(z_streamp z) -{ - if (z == Z_NULL || z->state == Z_NULL) - return Z_STREAM_ERROR; - z->total_in = z->total_out = 0; - z->msg = Z_NULL; - z->state->mode = z->state->nowrap ? IM_BLOCKS : IM_METHOD; - inflate_blocks_reset(z->state->blocks, z, Z_NULL); - Tracev((stderr, "inflate: reset\n")); - return Z_OK; -} - -int inflateEnd(z_streamp z) -{ - if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL) - return Z_STREAM_ERROR; - if (z->state->blocks != Z_NULL) - inflate_blocks_free(z->state->blocks, z); - ZFREE(z, z->state); - z->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); - return Z_OK; -} - - -int inflateInit2(z_streamp z) -{ const char *version = ZLIB_VERSION; int stream_size = sizeof(z_stream); - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || stream_size != sizeof(z_stream)) return Z_VERSION_ERROR; - - int w = -15; // MAX_WBITS: 32K LZ77 window. - // Warning: reducing MAX_WBITS makes minigzip unable to extract .gz files created by gzip. - // The memory requirements for deflate are (in bytes): - // (1 << (windowBits+2)) + (1 << (memLevel+9)) - // that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - // plus a few kilobytes for small objects. For example, if you want to reduce - // the default memory requirements from 256K to 128K, compile with - // make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - // Of course this will generally degrade compression (there's no free lunch). - // - // The memory requirements for inflate are (in bytes) 1 << windowBits - // that is, 32K for windowBits=15 (default value) plus a few kilobytes - // for small objects. - - // initialize state - if (z == Z_NULL) return Z_STREAM_ERROR; - z->msg = Z_NULL; - if (z->zalloc == Z_NULL) - { - z->zalloc = zcalloc; - z->opaque = (voidpf)0; - } - if (z->zfree == Z_NULL) z->zfree = zcfree; - if ((z->state = (struct internal_state *) - ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL) - return Z_MEM_ERROR; - z->state->blocks = Z_NULL; - - // handle undocumented nowrap option (no zlib header or check) - z->state->nowrap = 0; - if (w < 0) - { - w = - w; - z->state->nowrap = 1; - } - - // set window size - if (w < 8 || w > 15) - { - inflateEnd(z); - return Z_STREAM_ERROR; - } - z->state->wbits = (uInt)w; - - // create inflate_blocks state - if ((z->state->blocks = - inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w)) - == Z_NULL) - { - inflateEnd(z); - return Z_MEM_ERROR; - } - Tracev((stderr, "inflate: allocated\n")); - - // reset state - inflateReset(z); - return Z_OK; -} - - - -#define IM_NEEDBYTE {if(z->avail_in==0)return r;r=f;} -#define IM_NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++) - -int inflate(z_streamp z, int f) -{ - int r; - uInt b; - - if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL) - return Z_STREAM_ERROR; - f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; - r = Z_BUF_ERROR; - for (;;) switch (z->state->mode) - { - case IM_METHOD: - IM_NEEDBYTE - if (((z->state->sub.method = IM_NEXTBYTE) & 0xf) != Z_DEFLATED) - { - z->state->mode = IM_BAD; - z->msg = (char*)"unknown compression method"; - z->state->sub.marker = 5; // can't try inflateSync - break; - } - if ((z->state->sub.method >> 4) + 8 > z->state->wbits) - { - z->state->mode = IM_BAD; - z->msg = (char*)"invalid window size"; - z->state->sub.marker = 5; // can't try inflateSync - break; - } - z->state->mode = IM_FLAG; - case IM_FLAG: - IM_NEEDBYTE - b = IM_NEXTBYTE; - if (((z->state->sub.method << 8) + b) % 31) - { - z->state->mode = IM_BAD; - z->msg = (char*)"incorrect header check"; - z->state->sub.marker = 5; // can't try inflateSync - break; - } - Tracev((stderr, "inflate: zlib header ok\n")); - if (!(b & PRESET_DICT)) - { - z->state->mode = IM_BLOCKS; - break; - } - z->state->mode = IM_DICT4; - case IM_DICT4: - IM_NEEDBYTE - z->state->sub.check.need = (uLong)IM_NEXTBYTE << 24; - z->state->mode = IM_DICT3; - case IM_DICT3: - IM_NEEDBYTE - z->state->sub.check.need += (uLong)IM_NEXTBYTE << 16; - z->state->mode = IM_DICT2; - case IM_DICT2: - IM_NEEDBYTE - z->state->sub.check.need += (uLong)IM_NEXTBYTE << 8; - z->state->mode = IM_DICT1; - case IM_DICT1: - IM_NEEDBYTE; r; - z->state->sub.check.need += (uLong)IM_NEXTBYTE; - z->adler = z->state->sub.check.need; - z->state->mode = IM_DICT0; - return Z_NEED_DICT; - case IM_DICT0: - z->state->mode = IM_BAD; - z->msg = (char*)"need dictionary"; - z->state->sub.marker = 0; // can try inflateSync - return Z_STREAM_ERROR; - case IM_BLOCKS: - r = inflate_blocks(z->state->blocks, z, r); - if (r == Z_DATA_ERROR) - { - z->state->mode = IM_BAD; - z->state->sub.marker = 0; // can try inflateSync - break; - } - if (r == Z_OK) - r = f; - if (r != Z_STREAM_END) - return r; - r = f; - inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was); - if (z->state->nowrap) - { - z->state->mode = IM_DONE; - break; - } - z->state->mode = IM_CHECK4; - case IM_CHECK4: - IM_NEEDBYTE - z->state->sub.check.need = (uLong)IM_NEXTBYTE << 24; - z->state->mode = IM_CHECK3; - case IM_CHECK3: - IM_NEEDBYTE - z->state->sub.check.need += (uLong)IM_NEXTBYTE << 16; - z->state->mode = IM_CHECK2; - case IM_CHECK2: - IM_NEEDBYTE - z->state->sub.check.need += (uLong)IM_NEXTBYTE << 8; - z->state->mode = IM_CHECK1; - case IM_CHECK1: - IM_NEEDBYTE - z->state->sub.check.need += (uLong)IM_NEXTBYTE; - - if (z->state->sub.check.was != z->state->sub.check.need) - { - z->state->mode = IM_BAD; - z->msg = (char*)"incorrect data check"; - z->state->sub.marker = 5; // can't try inflateSync - break; - } - Tracev((stderr, "inflate: zlib check ok\n")); - z->state->mode = IM_DONE; - case IM_DONE: - return Z_STREAM_END; - case IM_BAD: - return Z_DATA_ERROR; - default: - return Z_STREAM_ERROR; - } -} - - - -#ifdef _UNICODE - -static int GetAnsiFileName(LPCWSTR name, char * buf, int nBufSize) -{ - memset(buf, 0, nBufSize); - - int n = WideCharToMultiByte(CP_ACP, // code page - 0, // performance and mapping flags - name, // wide-character string - -1, // number of chars in string - buf, // buffer for new string - nBufSize, // size of buffer - NULL, // default for unmappable chars - NULL); // set when default char used - return n; -} - -static int GetUnicodeFileName(const char * name, LPWSTR buf, int nBufSize) -{ - memset(buf, 0, nBufSize*sizeof(TCHAR)); - - int n = MultiByteToWideChar(CP_ACP, // code page - 0, // character-type options - name, // string to map - -1, // number of bytes in string - buf, // wide-character buffer - nBufSize); // size of buffer - - return n; -} - -#endif - - -// unzip.c -- IO on .zip files using zlib -// Version 0.15 beta, Mar 19th, 1998, -// Read unzip.h for more info - - - - -#define UNZ_BUFSIZE (16384) -#define UNZ_MAXFILENAMEINZIP (256) -#define SIZECENTRALDIRITEM (0x2e) -#define SIZEZIPLOCALHEADER (0x1e) - - - - -const char unz_copyright[] = " ";//unzip 0.15 Copyright 1998 Gilles Vollant "; - -// unz_file_info_interntal contain internal info about a file in zipfile -typedef struct unz_file_info_internal_s -{ - uLong offset_curfile;// relative offset of local header 4 bytes -} unz_file_info_internal; - - -typedef struct -{ bool is_handle; // either a handle or memory - bool canseek; - // for handles: - HANDLE h; bool herr; unsigned long initial_offset; - // for memory: - void *buf; unsigned int len,pos; // if it's a memory block -} LUFILE; - - - -LUFILE *lufopen(void *z,unsigned int len,DWORD flags,ZRESULT *err) -{ - if (flags!=ZIP_HANDLE && flags!=ZIP_FILENAME && flags!=ZIP_MEMORY) - { - *err=ZR_ARGS; - return NULL; - } - // - HANDLE h=0; bool canseek=false; *err=ZR_OK; - if (flags==ZIP_HANDLE||flags==ZIP_FILENAME) - { - if (flags==ZIP_HANDLE) - { - HANDLE hf = z; - - BOOL res = DuplicateHandle(GetCurrentProcess(),hf,GetCurrentProcess(),&h,0,FALSE,DUPLICATE_SAME_ACCESS); - - if (!res) - { - *err=ZR_NODUPH; - return NULL; - } - } - else - { - h = CreateFile((const TCHAR *)z, GENERIC_READ, FILE_SHARE_READ, - NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - - if (h == INVALID_HANDLE_VALUE) - { - *err = ZR_NOFILE; - return NULL; - } - } - DWORD type = GetFileType(h); - canseek = (type==FILE_TYPE_DISK); - } - LUFILE *lf = new LUFILE; - if (flags==ZIP_HANDLE||flags==ZIP_FILENAME) - { - lf->is_handle=true; - lf->canseek=canseek; - lf->h=h; lf->herr=false; - lf->initial_offset=0; - if (canseek) - lf->initial_offset = SetFilePointer(h,0,NULL,FILE_CURRENT); - } - else - { - lf->is_handle=false; - lf->canseek=true; - lf->buf=z; - lf->len=len; - lf->pos=0; - lf->initial_offset=0; - } - *err=ZR_OK; - return lf; -} - -LUFILE *lufopenw(void *z, unsigned int len, DWORD flags, ZRESULT *err) -{ - if (flags != ZIP_HANDLE && flags != ZIP_FILENAME && flags != ZIP_MEMORY) - { - *err = ZR_ARGS; - return NULL; - } - // - HANDLE h = 0; bool canseek = false; *err = ZR_OK; - if (flags == ZIP_HANDLE || flags == ZIP_FILENAME) - { - if (flags == ZIP_HANDLE) - { - HANDLE hf = z; - - BOOL res = DuplicateHandle(GetCurrentProcess(), hf, GetCurrentProcess(), &h, 0, FALSE, DUPLICATE_SAME_ACCESS); - - if (!res) - { - *err = ZR_NODUPH; - return NULL; - } - } - else - { - h = CreateFileW((const WCHAR *)z, GENERIC_READ, FILE_SHARE_READ, - NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - - if (h == INVALID_HANDLE_VALUE) - { - *err = ZR_NOFILE; - return NULL; - } - } - DWORD type = GetFileType(h); - canseek = (type == FILE_TYPE_DISK); - } - LUFILE *lf = new LUFILE; - if (flags == ZIP_HANDLE || flags == ZIP_FILENAME) - { - lf->is_handle = true; - lf->canseek = canseek; - lf->h = h; lf->herr = false; - lf->initial_offset = 0; - if (canseek) - lf->initial_offset = SetFilePointer(h, 0, NULL, FILE_CURRENT); - } - else - { - lf->is_handle = false; - lf->canseek = true; - lf->buf = z; - lf->len = len; - lf->pos = 0; - lf->initial_offset = 0; - } - *err = ZR_OK; - return lf; -} - - - - -int lufclose(LUFILE *stream) -{ if (stream==NULL) return EOF; - if (stream->is_handle) CloseHandle(stream->h); - delete stream; - return 0; -} - -int luferror(LUFILE *stream) -{ if (stream->is_handle && stream->herr) return 1; - else return 0; -} - -long int luftell(LUFILE *stream) -{ if (stream->is_handle && stream->canseek) return SetFilePointer(stream->h,0,NULL,FILE_CURRENT)-stream->initial_offset; - else if (stream->is_handle) return 0; - else return stream->pos; -} - -int lufseek(LUFILE *stream, long offset, int whence) -{ if (stream->is_handle && stream->canseek) - { if (whence==SEEK_SET) SetFilePointer(stream->h,stream->initial_offset+offset,0,FILE_BEGIN); - else if (whence==SEEK_CUR) SetFilePointer(stream->h,offset,NULL,FILE_CURRENT); - else if (whence==SEEK_END) SetFilePointer(stream->h,offset,NULL,FILE_END); - else return 19; // EINVAL - return 0; - } - else if (stream->is_handle) return 29; // ESPIPE - else - { if (whence==SEEK_SET) stream->pos=offset; - else if (whence==SEEK_CUR) stream->pos+=offset; - else if (whence==SEEK_END) stream->pos=stream->len+offset; - return 0; - } -} - - -size_t lufread(void *ptr,size_t size,size_t n,LUFILE *stream) -{ unsigned int toread = (unsigned int)(size*n); - if (stream->is_handle) - { DWORD red; BOOL res = ReadFile(stream->h,ptr,toread,&red,NULL); - if (!res) stream->herr=true; - return red/size; - } - if (stream->pos+toread > stream->len) toread = stream->len-stream->pos; - memcpy(ptr, (char*)stream->buf + stream->pos, toread); DWORD red = toread; - stream->pos += red; - return red/size; -} - - - - -// file_in_zip_read_info_s contain internal information about a file in zipfile, -// when reading and decompress it -typedef struct -{ - char *read_buffer; // internal buffer for compressed data - z_stream stream; // zLib stream structure for inflate - - uLong pos_in_zipfile; // position in byte on the zipfile, for fseek - uLong stream_initialised; // flag set if stream structure is initialised - - uLong offset_local_extrafield;// offset of the local extra field - uInt size_local_extrafield;// size of the local extra field - uLong pos_local_extrafield; // position in the local extra field in read - - uLong crc32; // crc32 of all data uncompressed - uLong crc32_wait; // crc32 we must obtain after decompress all - uLong rest_read_compressed; // number of byte to be decompressed - uLong rest_read_uncompressed;//number of byte to be obtained after decomp - LUFILE* file; // io structore of the zipfile - uLong compression_method; // compression method (0==store) - uLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx) -} file_in_zip_read_info_s; - - -// unz_s contain internal information about the zipfile -typedef struct -{ - LUFILE* file; // io structore of the zipfile - unz_global_info gi; // public global information - uLong byte_before_the_zipfile;// byte before the zipfile, (>0 for sfx) - uLong num_file; // number of the current file in the zipfile - uLong pos_in_central_dir; // pos of the current file in the central dir - uLong current_file_ok; // flag about the usability of the current file - uLong central_pos; // position of the beginning of the central dir - - uLong size_central_dir; // size of the central directory - uLong offset_central_dir; // offset of start of central directory with respect to the starting disk number - - unz_file_info cur_file_info; // public info about the current file in zip - unz_file_info_internal cur_file_info_internal; // private info about it - file_in_zip_read_info_s* pfile_in_zip_read; // structure about the current file if we are decompressing it -} unz_s, *unzFile; - - -int unzStringFileNameCompare (const char* fileName1,const char* fileName2,int iCaseSensitivity); -// Compare two filename (fileName1,fileName2). - -z_off_t unztell (unzFile file); -// Give the current position in uncompressed data - -int unzeof (unzFile file); -// return 1 if the end of file was reached, 0 elsewhere - -int unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len); -// Read extra field from the current file (opened by unzOpenCurrentFile) -// This is the local-header version of the extra field (sometimes, there is -// more info in the local-header version than in the central-header) -// -// if buf==NULL, it return the size of the local extra field -// -// if buf!=NULL, len is the size of the buffer, the extra header is copied in -// buf. -// the return value is the number of bytes copied in buf, or (if <0) -// the error code - - - -// =========================================================================== -// Read a byte from a gz_stream; update next_in and avail_in. Return EOF -// for end of file. -// IN assertion: the stream s has been sucessfully opened for reading. - -int unzlocal_getByte(LUFILE *fin,int *pi) -{ unsigned char c; - int err = (int)lufread(&c, 1, 1, fin); - if (err==1) - { *pi = (int)c; - return UNZ_OK; - } - else - { if (luferror(fin)) return UNZ_ERRNO; - else return UNZ_EOF; - } -} - - -// =========================================================================== -// Reads a long in LSB order from the given gz_stream. Sets -int unzlocal_getShort (LUFILE *fin,uLong *pX) -{ - uLong x ; - int i; - int err; - - err = unzlocal_getByte(fin,&i); - x = (uLong)i; - - if (err==UNZ_OK) - err = unzlocal_getByte(fin,&i); - x += ((uLong)i)<<8; - - if (err==UNZ_OK) - *pX = x; - else - *pX = 0; - return err; -} - -int unzlocal_getLong (LUFILE *fin,uLong *pX) -{ - uLong x ; - int i; - int err; - - err = unzlocal_getByte(fin,&i); - x = (uLong)i; - - if (err==UNZ_OK) - err = unzlocal_getByte(fin,&i); - x += ((uLong)i)<<8; - - if (err==UNZ_OK) - err = unzlocal_getByte(fin,&i); - x += ((uLong)i)<<16; - - if (err==UNZ_OK) - err = unzlocal_getByte(fin,&i); - x += ((uLong)i)<<24; - - if (err==UNZ_OK) - *pX = x; - else - *pX = 0; - return err; -} - - -// My own strcmpi / strcasecmp -int strcmpcasenosensitive_internal (const char* fileName1,const char *fileName2) -{ - for (;;) - { - char c1=*(fileName1++); - char c2=*(fileName2++); - if ((c1>='a') && (c1<='z')) - c1 -= (char)0x20; - if ((c2>='a') && (c2<='z')) - c2 -= (char)0x20; - if (c1=='\0') - return ((c2=='\0') ? 0 : -1); - if (c2=='\0') - return 1; - if (c1c2) - return 1; - } -} - - - - -// -// Compare two filename (fileName1,fileName2). -// If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp) -// If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi or strcasecmp) -// -int unzStringFileNameCompare (const char*fileName1,const char*fileName2,int iCaseSensitivity) -{ if (iCaseSensitivity==1) return strcmp(fileName1,fileName2); - else return strcmpcasenosensitive_internal(fileName1,fileName2); -} - -#define BUFREADCOMMENT (0x400) - - -// Locate the Central directory of a zipfile (at the end, just before -// the global comment) -uLong unzlocal_SearchCentralDir(LUFILE *fin) -{ if (lufseek(fin,0,SEEK_END) != 0) return 0; - uLong uSizeFile = luftell(fin); - - uLong uMaxBack=0xffff; // maximum size of global comment - if (uMaxBack>uSizeFile) uMaxBack = uSizeFile; - - unsigned char *buf = (unsigned char*)zmalloc(BUFREADCOMMENT+4); - if (buf==NULL) return 0; - uLong uPosFound=0; - - uLong uBackRead = 4; - while (uBackReaduMaxBack) uBackRead = uMaxBack; - else uBackRead+=BUFREADCOMMENT; - uReadPos = uSizeFile-uBackRead ; - uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? (BUFREADCOMMENT+4) : (uSizeFile-uReadPos); - if (lufseek(fin,uReadPos,SEEK_SET)!=0) break; - if (lufread(buf,(uInt)uReadSize,1,fin)!=1) break; - for (i=(int)uReadSize-3; (i--)>0;) - { if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) - { uPosFound = uReadPos+i; break; - } - } - if (uPosFound!=0) break; - } - if (buf) zfree(buf); - return uPosFound; -} - - -int unzGoToFirstFile (unzFile file); -int unzCloseCurrentFile (unzFile file); - -// Open a Zip file. -// If the zipfile cannot be opened (file don't exist or in not valid), return NULL. -// Otherwise, the return value is a unzFile Handle, usable with other unzip functions -unzFile unzOpenInternal(LUFILE *fin) -{ - zopenerror = ZR_OK; //+++1.2 - if (fin==NULL) { zopenerror = ZR_ARGS; return NULL; } //+++1.2 - if (unz_copyright[0]!=' ') {lufclose(fin); zopenerror = ZR_CORRUPT; return NULL; } //+++1.2 - - int err=UNZ_OK; - unz_s us; - uLong central_pos,uL; - central_pos = unzlocal_SearchCentralDir(fin); - if (central_pos==0) err=UNZ_ERRNO; - if (lufseek(fin,central_pos,SEEK_SET)!=0) err=UNZ_ERRNO; - // the signature, already checked - if (unzlocal_getLong(fin,&uL)!=UNZ_OK) err=UNZ_ERRNO; - // number of this disk - uLong number_disk; // number of the current dist, used for spanning ZIP, unsupported, always 0 - if (unzlocal_getShort(fin,&number_disk)!=UNZ_OK) err=UNZ_ERRNO; - // number of the disk with the start of the central directory - uLong number_disk_with_CD; // number the the disk with central dir, used for spaning ZIP, unsupported, always 0 - if (unzlocal_getShort(fin,&number_disk_with_CD)!=UNZ_OK) err=UNZ_ERRNO; - // total number of entries in the central dir on this disk - if (unzlocal_getShort(fin,&us.gi.number_entry)!=UNZ_OK) err=UNZ_ERRNO; - // total number of entries in the central dir - uLong number_entry_CD; // total number of entries in the central dir (same than number_entry on nospan) - if (unzlocal_getShort(fin,&number_entry_CD)!=UNZ_OK) err=UNZ_ERRNO; - if ((number_entry_CD!=us.gi.number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) err=UNZ_BADZIPFILE; - // size of the central directory - if (unzlocal_getLong(fin,&us.size_central_dir)!=UNZ_OK) err=UNZ_ERRNO; - // offset of start of central directory with respect to the starting disk number - if (unzlocal_getLong(fin,&us.offset_central_dir)!=UNZ_OK) err=UNZ_ERRNO; - // zipfile comment length - if (unzlocal_getShort(fin,&us.gi.size_comment)!=UNZ_OK) err=UNZ_ERRNO; - if ((central_pos+fin->initial_offsetinitial_offset - (us.offset_central_dir+us.size_central_dir); - us.central_pos = central_pos; - us.pfile_in_zip_read = NULL; - fin->initial_offset = 0; // since the zipfile itself is expected to handle this - - unz_s *s = (unz_s*)zmalloc(sizeof(unz_s)); - *s=us; - unzGoToFirstFile((unzFile)s); - return (unzFile)s; -} - - - -// Close a ZipFile opened with unzipOpen. -// If there is files inside the .Zip opened with unzipOpenCurrentFile (see later), -// these files MUST be closed with unzipCloseCurrentFile before call unzipClose. -// return UNZ_OK if there is no problem. -int unzClose (unzFile file) -{ - unz_s* s; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - - if (s->pfile_in_zip_read!=NULL) - unzCloseCurrentFile(file); - - lufclose(s->file); - if (s) zfree(s); // unused s=0; - return UNZ_OK; -} - - -// Write info about the ZipFile in the *pglobal_info structure. -// No preparation of the structure is needed -// return UNZ_OK if there is no problem. -int unzGetGlobalInfo (unzFile file,unz_global_info *pglobal_info) -{ - unz_s* s; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - *pglobal_info=s->gi; - return UNZ_OK; -} - - -// Translate date/time from Dos format to tm_unz (readable more easilty) -void unzlocal_DosDateToTmuDate (uLong ulDosDate, tm_unz* ptm) -{ - uLong uDate; - uDate = (uLong)(ulDosDate>>16); - ptm->tm_mday = (uInt)(uDate&0x1f) ; - ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; - ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; - - ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); - ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; - ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; -} - -// Get Info about the current file in the zipfile, with internal only info -int unzlocal_GetCurrentFileInfoInternal (unzFile file, - unz_file_info *pfile_info, - unz_file_info_internal - *pfile_info_internal, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize); - -int unzlocal_GetCurrentFileInfoInternal (unzFile file, unz_file_info *pfile_info, - unz_file_info_internal *pfile_info_internal, char *szFileName, - uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, - char *szComment, uLong commentBufferSize) -{ - unz_s* s; - unz_file_info file_info; - unz_file_info_internal file_info_internal; - int err=UNZ_OK; - uLong uMagic; - long lSeek=0; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - if (lufseek(s->file,s->pos_in_central_dir+s->byte_before_the_zipfile,SEEK_SET)!=0) - err=UNZ_ERRNO; - - - // we check the magic - if (err==UNZ_OK) - if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK) - err=UNZ_ERRNO; - else if (uMagic!=0x02014b50) - err=UNZ_BADZIPFILE; - - if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(s->file,&file_info.version_needed) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(s->file,&file_info.flag) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(s->file,&file_info.compression_method) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getLong(s->file,&file_info.dosDate) != UNZ_OK) - err=UNZ_ERRNO; - - unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date); - - if (unzlocal_getLong(s->file,&file_info.crc) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getLong(s->file,&file_info.compressed_size) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getLong(s->file,&file_info.uncompressed_size) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(s->file,&file_info.size_filename) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(s->file,&file_info.size_file_extra) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(s->file,&file_info.size_file_comment) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(s->file,&file_info.disk_num_start) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(s->file,&file_info.internal_fa) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getLong(s->file,&file_info.external_fa) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getLong(s->file,&file_info_internal.offset_curfile) != UNZ_OK) - err=UNZ_ERRNO; - - lSeek+=file_info.size_filename; - if ((err==UNZ_OK) && (szFileName!=NULL)) - { - uLong uSizeRead ; - if (file_info.size_filename0) && (fileNameBufferSize>0)) - if (lufread(szFileName,(uInt)uSizeRead,1,s->file)!=1) - err=UNZ_ERRNO; - lSeek -= uSizeRead; - } - - - if ((err==UNZ_OK) && (extraField!=NULL)) - { - uLong uSizeRead ; - if (file_info.size_file_extrafile,lSeek,SEEK_CUR)==0) - lSeek=0; - else - err=UNZ_ERRNO; - if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) - if (lufread(extraField,(uInt)uSizeRead,1,s->file)!=1) - err=UNZ_ERRNO; - lSeek += file_info.size_file_extra - uSizeRead; - } - else - lSeek+=file_info.size_file_extra; - - - if ((err==UNZ_OK) && (szComment!=NULL)) - { - uLong uSizeRead ; - if (file_info.size_file_commentfile,lSeek,SEEK_CUR)==0) - {} // unused lSeek=0; - else - err=UNZ_ERRNO; - if ((file_info.size_file_comment>0) && (commentBufferSize>0)) - if (lufread(szComment,(uInt)uSizeRead,1,s->file)!=1) - err=UNZ_ERRNO; - //unused lSeek+=file_info.size_file_comment - uSizeRead; - } - else {} //unused lSeek+=file_info.size_file_comment; - - if ((err==UNZ_OK) && (pfile_info!=NULL)) - *pfile_info=file_info; - - if ((err==UNZ_OK) && (pfile_info_internal!=NULL)) - *pfile_info_internal=file_info_internal; - - return err; -} - - - -// Write info about the ZipFile in the *pglobal_info structure. -// No preparation of the structure is needed -// return UNZ_OK if there is no problem. -int unzGetCurrentFileInfo (unzFile file, unz_file_info *pfile_info, - char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, - char *szComment, uLong commentBufferSize) -{ return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,szFileName,fileNameBufferSize, - extraField,extraFieldBufferSize, szComment,commentBufferSize); -} - - -// Set the current file of the zipfile to the first file. -// return UNZ_OK if there is no problem -int unzGoToFirstFile (unzFile file) -{ - int err; - unz_s* s; - if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; - s->pos_in_central_dir=s->offset_central_dir; - s->num_file=0; - err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, - &s->cur_file_info_internal, - NULL,0,NULL,0,NULL,0); - s->current_file_ok = (err == UNZ_OK); - return err; -} - - -// Set the current file of the zipfile to the next file. -// return UNZ_OK if there is no problem -// return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. -int unzGoToNextFile (unzFile file) -{ - unz_s* s; - int err; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - if (!s->current_file_ok) - return UNZ_END_OF_LIST_OF_FILE; - if (s->num_file+1==s->gi.number_entry) - return UNZ_END_OF_LIST_OF_FILE; - - s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + - s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; - s->num_file++; - err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, - &s->cur_file_info_internal, - NULL,0,NULL,0,NULL,0); - s->current_file_ok = (err == UNZ_OK); - return err; -} - - -// Try locate the file szFileName in the zipfile. -// For the iCaseSensitivity signification, see unzStringFileNameCompare -// return value : -// UNZ_OK if the file is found. It becomes the current file. -// UNZ_END_OF_LIST_OF_FILE if the file is not found -int unzLocateFile (unzFile file, const TCHAR *szFileName, int iCaseSensitivity) -{ - unz_s* s; - int err; - - uLong num_fileSaved; - uLong pos_in_central_dirSaved; - - if (file==NULL) - return UNZ_PARAMERROR; - - if (_tcslen(szFileName)>=UNZ_MAXFILENAMEINZIP) - return UNZ_PARAMERROR; - - char szFileNameA[MAX_PATH]; - -#ifdef _UNICODE - GetAnsiFileName(szFileName, szFileNameA, MAX_PATH-1); -#else - strcpy(szFileNameA, szFileName); -#endif - - s=(unz_s*)file; - if (!s->current_file_ok) - return UNZ_END_OF_LIST_OF_FILE; - - num_fileSaved = s->num_file; - pos_in_central_dirSaved = s->pos_in_central_dir; - - err = unzGoToFirstFile(file); - - while (err == UNZ_OK) - { - char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; - unzGetCurrentFileInfo(file,NULL, - szCurrentFileName,sizeof(szCurrentFileName)-1, - NULL,0,NULL,0); - if (unzStringFileNameCompare(szCurrentFileName,szFileNameA,iCaseSensitivity)==0) - return UNZ_OK; - err = unzGoToNextFile(file); - } - - s->num_file = num_fileSaved ; - s->pos_in_central_dir = pos_in_central_dirSaved ; - return err; -} - - -// Read the local header of the current zipfile -// Check the coherency of the local header and info in the end of central -// directory about this file -// store in *piSizeVar the size of extra info in local header -// (filename and size of extra field data) -int unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s,uInt *piSizeVar, - uLong *poffset_local_extrafield, uInt *psize_local_extrafield) -{ - uLong uMagic,uData,uFlags; - uLong size_filename; - uLong size_extra_field; - int err=UNZ_OK; - - *piSizeVar = 0; - *poffset_local_extrafield = 0; - *psize_local_extrafield = 0; - - if (lufseek(s->file,s->cur_file_info_internal.offset_curfile + s->byte_before_the_zipfile,SEEK_SET)!=0) - return UNZ_ERRNO; - - - if (err==UNZ_OK) - if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK) - err=UNZ_ERRNO; - else if (uMagic!=0x04034b50) - err=UNZ_BADZIPFILE; - - if (unzlocal_getShort(s->file,&uData) != UNZ_OK) - err=UNZ_ERRNO; -// else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion)) -// err=UNZ_BADZIPFILE; - if (unzlocal_getShort(s->file,&uFlags) != UNZ_OK) - err=UNZ_ERRNO; - - if (unzlocal_getShort(s->file,&uData) != UNZ_OK) - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) - err=UNZ_BADZIPFILE; - - if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && - (s->cur_file_info.compression_method!=Z_DEFLATED)) - err=UNZ_BADZIPFILE; - - if (unzlocal_getLong(s->file,&uData) != UNZ_OK) // date/time - err=UNZ_ERRNO; - - if (unzlocal_getLong(s->file,&uData) != UNZ_OK) // crc - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) && - ((uFlags & 8)==0)) - err=UNZ_BADZIPFILE; - - if (unzlocal_getLong(s->file,&uData) != UNZ_OK) // size compr - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) && - ((uFlags & 8)==0)) - err=UNZ_BADZIPFILE; - - if (unzlocal_getLong(s->file,&uData) != UNZ_OK) // size uncompr - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) && - ((uFlags & 8)==0)) - err=UNZ_BADZIPFILE; - - - if (unzlocal_getShort(s->file,&size_filename) != UNZ_OK) - err=UNZ_ERRNO; - else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename)) - err=UNZ_BADZIPFILE; - - *piSizeVar += (uInt)size_filename; - - if (unzlocal_getShort(s->file,&size_extra_field) != UNZ_OK) - err=UNZ_ERRNO; - *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile + - SIZEZIPLOCALHEADER + size_filename; - *psize_local_extrafield = (uInt)size_extra_field; - - *piSizeVar += (uInt)size_extra_field; - - return err; -} - - - - - -// Open for reading data the current file in the zipfile. -// If there is no error and the file is opened, the return value is UNZ_OK. -int unzOpenCurrentFile (unzFile file) -{ - int err; - int Store; - uInt iSizeVar; - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - uLong offset_local_extrafield; // offset of the local extra field - uInt size_local_extrafield; // size of the local extra field - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - if (!s->current_file_ok) - return UNZ_PARAMERROR; - - if (s->pfile_in_zip_read != NULL) - unzCloseCurrentFile(file); - - if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar, - &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) - return UNZ_BADZIPFILE; - - pfile_in_zip_read_info = (file_in_zip_read_info_s*)zmalloc(sizeof(file_in_zip_read_info_s)); - if (pfile_in_zip_read_info==NULL) - return UNZ_INTERNALERROR; - - pfile_in_zip_read_info->read_buffer=(char*)zmalloc(UNZ_BUFSIZE); - pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield; - pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield; - pfile_in_zip_read_info->pos_local_extrafield=0; - - if (pfile_in_zip_read_info->read_buffer==NULL) - { - if (pfile_in_zip_read_info!=0) zfree(pfile_in_zip_read_info); //unused pfile_in_zip_read_info=0; - return UNZ_INTERNALERROR; - } - - pfile_in_zip_read_info->stream_initialised=0; - - if ((s->cur_file_info.compression_method!=0) && (s->cur_file_info.compression_method!=Z_DEFLATED)) - { // unused err=UNZ_BADZIPFILE; - } - Store = s->cur_file_info.compression_method==0; - - pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc; - pfile_in_zip_read_info->crc32=0; - pfile_in_zip_read_info->compression_method = - s->cur_file_info.compression_method; - pfile_in_zip_read_info->file=s->file; - pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile; - - pfile_in_zip_read_info->stream.total_out = 0; - - if (!Store) - { - pfile_in_zip_read_info->stream.zalloc = (alloc_func)0; - pfile_in_zip_read_info->stream.zfree = (free_func)0; - pfile_in_zip_read_info->stream.opaque = (voidpf)0; - - err=inflateInit2(&pfile_in_zip_read_info->stream); - if (err == Z_OK) - pfile_in_zip_read_info->stream_initialised=1; - // windowBits is passed < 0 to tell that there is no zlib header. - // Note that in this case inflate *requires* an extra "dummy" byte - // after the compressed stream in order to complete decompression and - // return Z_STREAM_END. - // In unzip, i don't wait absolutely Z_STREAM_END because I known the - // size of both compressed and uncompressed data - } - pfile_in_zip_read_info->rest_read_compressed = - s->cur_file_info.compressed_size ; - pfile_in_zip_read_info->rest_read_uncompressed = - s->cur_file_info.uncompressed_size ; - - - pfile_in_zip_read_info->pos_in_zipfile = - s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER + - iSizeVar; - - pfile_in_zip_read_info->stream.avail_in = (uInt)0; - - - s->pfile_in_zip_read = pfile_in_zip_read_info; - return UNZ_OK; -} - - -// Read bytes from the current file. -// buf contain buffer where data must be copied -// len the size of buf. -// return the number of byte copied if somes bytes are copied -// return 0 if the end of file was reached -// return <0 with error code if there is an error -// (UNZ_ERRNO for IO error, or zLib error for uncompress error) -int unzReadCurrentFile (unzFile file, voidp buf, unsigned len) -{ int err=UNZ_OK; - uInt iRead = 0; - - unz_s *s = (unz_s*)file; - if (s==NULL) return UNZ_PARAMERROR; - - file_in_zip_read_info_s* pfile_in_zip_read_info = s->pfile_in_zip_read; - if (pfile_in_zip_read_info==NULL) return UNZ_PARAMERROR; - if ((pfile_in_zip_read_info->read_buffer == NULL)) return UNZ_END_OF_LIST_OF_FILE; - if (len==0) return 0; - - pfile_in_zip_read_info->stream.next_out = (Byte*)buf; - pfile_in_zip_read_info->stream.avail_out = (uInt)len; - - if (len>pfile_in_zip_read_info->rest_read_uncompressed) - { pfile_in_zip_read_info->stream.avail_out = (uInt)pfile_in_zip_read_info->rest_read_uncompressed; - } - - while (pfile_in_zip_read_info->stream.avail_out>0) - { if ((pfile_in_zip_read_info->stream.avail_in==0) && (pfile_in_zip_read_info->rest_read_compressed>0)) - { uInt uReadThis = UNZ_BUFSIZE; - if (pfile_in_zip_read_info->rest_read_compressedrest_read_compressed; - if (uReadThis == 0) return UNZ_EOF; - if (lufseek(pfile_in_zip_read_info->file, pfile_in_zip_read_info->pos_in_zipfile + pfile_in_zip_read_info->byte_before_the_zipfile,SEEK_SET)!=0) return UNZ_ERRNO; - if (lufread(pfile_in_zip_read_info->read_buffer,uReadThis,1,pfile_in_zip_read_info->file)!=1) return UNZ_ERRNO; - pfile_in_zip_read_info->pos_in_zipfile += uReadThis; - pfile_in_zip_read_info->rest_read_compressed-=uReadThis; - pfile_in_zip_read_info->stream.next_in = (Byte*)pfile_in_zip_read_info->read_buffer; - pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis; - } - - if (pfile_in_zip_read_info->compression_method==0) - { uInt uDoCopy,i ; - if (pfile_in_zip_read_info->stream.avail_out < pfile_in_zip_read_info->stream.avail_in) - { uDoCopy = pfile_in_zip_read_info->stream.avail_out ; - } - else - { uDoCopy = pfile_in_zip_read_info->stream.avail_in ; - } - for (i=0;istream.next_out+i) = *(pfile_in_zip_read_info->stream.next_in+i); - } - pfile_in_zip_read_info->crc32 = ucrc32(pfile_in_zip_read_info->crc32,pfile_in_zip_read_info->stream.next_out,uDoCopy); - pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy; - pfile_in_zip_read_info->stream.avail_in -= uDoCopy; - pfile_in_zip_read_info->stream.avail_out -= uDoCopy; - pfile_in_zip_read_info->stream.next_out += uDoCopy; - pfile_in_zip_read_info->stream.next_in += uDoCopy; - pfile_in_zip_read_info->stream.total_out += uDoCopy; - iRead += uDoCopy; - } - else - { uLong uTotalOutBefore,uTotalOutAfter; - const Byte *bufBefore; - uLong uOutThis; - int flush=Z_SYNC_FLUSH; - uTotalOutBefore = pfile_in_zip_read_info->stream.total_out; - bufBefore = pfile_in_zip_read_info->stream.next_out; - err=inflate(&pfile_in_zip_read_info->stream,flush); - uTotalOutAfter = pfile_in_zip_read_info->stream.total_out; - uOutThis = uTotalOutAfter-uTotalOutBefore; - pfile_in_zip_read_info->crc32 = ucrc32(pfile_in_zip_read_info->crc32,bufBefore,(uInt)(uOutThis)); - pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis; - iRead += (uInt)(uTotalOutAfter - uTotalOutBefore); - if (err==Z_STREAM_END) return (iRead==0) ? UNZ_EOF : iRead; //+++1.3 - //if (err==Z_STREAM_END) return (iRead==len) ? UNZ_EOF : iRead; //+++1.2 - - if (err != Z_OK) break; - } - } - - if (err==Z_OK) return iRead; - - return iRead; -} - - -// Give the current position in uncompressed data -z_off_t unztell (unzFile file) -{ - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - return (z_off_t)pfile_in_zip_read_info->stream.total_out; -} - - -// return 1 if the end of file was reached, 0 elsewhere -int unzeof (unzFile file) -{ - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - if (pfile_in_zip_read_info->rest_read_uncompressed == 0) - return 1; - else - return 0; -} - - - -// Read extra field from the current file (opened by unzOpenCurrentFile) -// This is the local-header version of the extra field (sometimes, there is -// more info in the local-header version than in the central-header) -// if buf==NULL, it return the size of the local extra field that can be read -// if buf!=NULL, len is the size of the buffer, the extra header is copied in buf. -// the return value is the number of bytes copied in buf, or (if <0) the error code -int unzGetLocalExtrafield (unzFile file,voidp buf,unsigned len) -{ - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - uInt read_now; - uLong size_to_read; - - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - size_to_read = (pfile_in_zip_read_info->size_local_extrafield - - pfile_in_zip_read_info->pos_local_extrafield); - - if (buf==NULL) - return (int)size_to_read; - - if (len>size_to_read) - read_now = (uInt)size_to_read; - else - read_now = (uInt)len ; - - if (read_now==0) - return 0; - - if (lufseek(pfile_in_zip_read_info->file, pfile_in_zip_read_info->offset_local_extrafield + pfile_in_zip_read_info->pos_local_extrafield,SEEK_SET)!=0) - return UNZ_ERRNO; - - if (lufread(buf,(uInt)size_to_read,1,pfile_in_zip_read_info->file)!=1) - return UNZ_ERRNO; - - return (int)read_now; -} - -// Close the file in zip opened with unzipOpenCurrentFile -// Return UNZ_CRCERROR if all the file was read but the CRC is not good -int unzCloseCurrentFile (unzFile file) -{ - int err=UNZ_OK; - - unz_s* s; - file_in_zip_read_info_s* pfile_in_zip_read_info; - if (file==NULL) - return UNZ_PARAMERROR; - s=(unz_s*)file; - pfile_in_zip_read_info=s->pfile_in_zip_read; - - if (pfile_in_zip_read_info==NULL) - return UNZ_PARAMERROR; - - - if (pfile_in_zip_read_info->rest_read_uncompressed == 0) - { - if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait) - err=UNZ_CRCERROR; - } - - - if (pfile_in_zip_read_info->read_buffer!=0) - { void *buf = pfile_in_zip_read_info->read_buffer; - zfree(buf); - pfile_in_zip_read_info->read_buffer=0; - } - pfile_in_zip_read_info->read_buffer = NULL; - if (pfile_in_zip_read_info->stream_initialised) - inflateEnd(&pfile_in_zip_read_info->stream); - - pfile_in_zip_read_info->stream_initialised = 0; - if (pfile_in_zip_read_info!=0) zfree(pfile_in_zip_read_info); // unused pfile_in_zip_read_info=0; - - s->pfile_in_zip_read=NULL; - - return err; -} - - -// Get the global comment string of the ZipFile, in the szComment buffer. -// uSizeBuf is the size of the szComment buffer. -// return the number of byte copied or an error code <0 -int unzGetGlobalComment (unzFile file, char *szComment, uLong uSizeBuf) -{ //int err=UNZ_OK; - unz_s* s; - uLong uReadThis ; - if (file==NULL) return UNZ_PARAMERROR; - s=(unz_s*)file; - uReadThis = uSizeBuf; - if (uReadThis>s->gi.size_comment) uReadThis = s->gi.size_comment; - if (lufseek(s->file,s->central_pos+22,SEEK_SET)!=0) return UNZ_ERRNO; - if (uReadThis>0) - { *szComment='\0'; - if (lufread(szComment,(uInt)uReadThis,1,s->file)!=1) return UNZ_ERRNO; - } - if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment)) *(szComment+s->gi.size_comment)='\0'; - return (int)uReadThis; -} - - - - - -int unzOpenCurrentFile (unzFile file); -int unzReadCurrentFile (unzFile file, void *buf, unsigned len); -int unzCloseCurrentFile (unzFile file); - - -FILETIME timet2filetime(__time32_t timer) -{ - struct tm *tm = _gmtime32(&timer); - SYSTEMTIME st; - st.wYear = (WORD)(tm->tm_year+1900); - st.wMonth = (WORD)(tm->tm_mon+1); - st.wDay = (WORD)(tm->tm_mday); - st.wHour = (WORD)(tm->tm_hour); - st.wMinute = (WORD)(tm->tm_min); - st.wSecond = (WORD)(tm->tm_sec); - st.wMilliseconds=0; - FILETIME ft; - SystemTimeToFileTime(&st,&ft); - return ft; -} - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -class TUnzip -{ public: - TUnzip() : uf(0), currentfile(-1), czei(-1) {} - - unzFile uf; int currentfile; ZIPENTRY cze; int czei; - TCHAR rootdir[MAX_PATH]; - - ZRESULT Open(void *z,unsigned int len,DWORD flags); - ZRESULT OpenW(void *z, unsigned int len, DWORD flags); - ZRESULT Get(int index,ZIPENTRY *ze); - ZRESULT Find(const TCHAR *name,bool ic,int *index,ZIPENTRY *ze); - ZRESULT Unzip(int index,void *dst,unsigned int len,DWORD flags); - ZRESULT UnzipW(int index, void *dst, unsigned int len, DWORD flags); - ZRESULT Close(); -}; - - -ZRESULT TUnzip::Open(void *z,unsigned int len,DWORD flags) -{ - if (uf!=0 || currentfile!=-1) - return ZR_NOTINITED; - GetCurrentDirectory(MAX_PATH,rootdir); - _tcscat(rootdir,_T("\\")); - if (flags==ZIP_HANDLE) - { - DWORD type = GetFileType(z); - if (type!=FILE_TYPE_DISK) - return ZR_SEEK; - } - ZRESULT e; - LUFILE *f = lufopen(z,len,flags,&e); - if (f==NULL) - return e; - uf = unzOpenInternal(f); - //return ZR_OK; - return zopenerror; //+++1.2 -} - - -ZRESULT TUnzip::OpenW(void *z, unsigned int len, DWORD flags) -{ - if (uf != 0 || currentfile != -1) - return ZR_NOTINITED; - GetCurrentDirectory(MAX_PATH, rootdir); - _tcscat(rootdir, _T("\\")); - if (flags == ZIP_HANDLE) - { - DWORD type = GetFileType(z); - if (type != FILE_TYPE_DISK) - return ZR_SEEK; - } - ZRESULT e; - LUFILE *f = lufopenw(z, len, flags, &e); - if (f == NULL) - return e; - uf = unzOpenInternal(f); - //return ZR_OK; - return zopenerror; //+++1.2 -} - - -ZRESULT TUnzip::Get(int index,ZIPENTRY *ze) -{ if (index<-1 || index>=(int)uf->gi.number_entry) - return ZR_ARGS; - if (currentfile!=-1) - unzCloseCurrentFile(uf); - currentfile=-1; - if (index==czei && index!=-1) {memcpy(ze,&cze,sizeof(ZIPENTRY)); return ZR_OK;} - if (index==-1) - { ze->index = uf->gi.number_entry; - ze->name[0]=0; - ze->attr=0; - ze->atime.dwLowDateTime=0; ze->atime.dwHighDateTime=0; - ze->ctime.dwLowDateTime=0; ze->ctime.dwHighDateTime=0; - ze->mtime.dwLowDateTime=0; ze->mtime.dwHighDateTime=0; - ze->comp_size=0; - ze->unc_size=0; - return ZR_OK; - } - if (index<(int)uf->num_file) unzGoToFirstFile(uf); - while ((int)uf->num_filefile,offset,SEEK_SET)!=0) return ZR_READ; - char *extra = new char[extralen]; - if (lufread(extra,1,(uInt)extralen,uf->file)!=extralen) {delete[] extra; return ZR_READ;} - // - ze->index=uf->num_file; - strcpy(ze->name,fn); - // zip has an 'attribute' 32bit value. Its lower half is windows stuff - // its upper half is standard unix attr. - unsigned long a = ufi.external_fa; - bool uisdir = (a&0x40000000)!=0; - //bool uwriteable= (a&0x08000000)!=0; - bool uwriteable= (a&0x00800000)!=0; // ***hd*** - //bool ureadable= (a&0x01000000)!=0; - //bool uexecutable=(a&0x00400000)!=0; - bool wreadonly= (a&0x00000001)!=0; - bool whidden= (a&0x00000002)!=0; - bool wsystem= (a&0x00000004)!=0; - bool wisdir= (a&0x00000010)!=0; - bool warchive= (a&0x00000020)!=0; - ze->attr=FILE_ATTRIBUTE_NORMAL; - if (uisdir || wisdir) ze->attr |= FILE_ATTRIBUTE_DIRECTORY; - if (warchive) ze->attr|=FILE_ATTRIBUTE_ARCHIVE; - if (whidden) ze->attr|=FILE_ATTRIBUTE_HIDDEN; - if (!uwriteable||wreadonly) ze->attr|=FILE_ATTRIBUTE_READONLY; - if (wsystem) ze->attr|=FILE_ATTRIBUTE_SYSTEM; - ze->comp_size = ufi.compressed_size; - ze->unc_size = ufi.uncompressed_size; - // - WORD dostime = (WORD)(ufi.dosDate&0xFFFF); - WORD dosdate = (WORD)((ufi.dosDate>>16)&0xFFFF); - - FILETIME ft; - SYSTEMTIME st; - GetSystemTime(&st); // Gets the current system time - SystemTimeToFileTime(&st, &ft); // Converts the current system time to file time format - - DosDateTimeToFileTime(dosdate,dostime,&ft); - ze->atime=ft; ze->ctime=ft; ze->mtime=ft; - // the zip will always have at least that dostime. But if it also has - // an extra header, then we'll instead get the info from that. - unsigned int epos=0; - while (epos+4mtime = timet2filetime(mtime); - } - if (hasatime) - { __time32_t atime = *(__time32_t*)(extra+epos); epos+=4; - ze->atime = timet2filetime(atime); - } - if (hasctime) - { __time32_t ctime = *(__time32_t*)(extra+epos); - ze->ctime = timet2filetime(ctime); - } - break; - } - // - if (extra!=0) delete[] extra; - memcpy(&cze,ze,sizeof(ZIPENTRY)); czei=index; - return ZR_OK; -} - -ZRESULT TUnzip::Find(const TCHAR *name, bool ic, int *index, ZIPENTRY *ze) -{ - int res = unzLocateFile(uf,name,ic?CASE_INSENSITIVE:CASE_SENSITIVE); - if (res!=UNZ_OK) - { - if (index!=0) - *index=-1; - if (ze!=NULL) - { - ZeroMemory(ze,sizeof(ZIPENTRY)); ze->index=-1; - } - return ZR_NOTFOUND; - } - if (currentfile!=-1) - unzCloseCurrentFile(uf); currentfile=-1; - int i = (int)uf->num_file; - if (index!=NULL) - *index=i; - if (ze!=NULL) - { - ZRESULT zres = Get(i,ze); - if (zres!=ZR_OK) - return zres; - } - return ZR_OK; -} - -void EnsureDirectory(const TCHAR *rootdir, const TCHAR *dir) -{ - if (dir==NULL || dir[0] == _T('\0')) - return; - const TCHAR *lastslash = dir, *c = lastslash; - while (*c != _T('\0')) - { - if (*c==_T('/') || *c==_T('\\')) - lastslash=c; - c++; - } - const TCHAR *name=lastslash; - if (lastslash!=dir) - { - TCHAR tmp[MAX_PATH]; - _tcsncpy(tmp, dir, lastslash-dir); - tmp[lastslash-dir] = _T('\0'); - EnsureDirectory(rootdir,tmp); - name++; - } - TCHAR cd[MAX_PATH]; - _tcscpy(cd,rootdir); - //_tcscat(cd,name); - _tcscat(cd,dir); //+++1.2 - CreateDirectory(cd,NULL); -} - -ZRESULT TUnzip::Unzip(int index,void *dst,unsigned int len,DWORD flags) -{ - if (flags!=ZIP_MEMORY && flags!=ZIP_FILENAME && flags!=ZIP_HANDLE) - return ZR_ARGS; - if (flags==ZIP_MEMORY) - { - if (index!=currentfile) - { - if (currentfile!=-1) - unzCloseCurrentFile(uf); - currentfile=-1; - if (index>=(int)uf->gi.number_entry) - return ZR_ARGS; - if (index<(int)uf->num_file) - unzGoToFirstFile(uf); - while ((int)uf->num_file(int)len) - return ZR_MORE; - unzCloseCurrentFile(uf); - currentfile=-1; - if (res==len) - return ZR_OK; - else - return ZR_FLATE; - } - - // otherwise we're writing to a handle or a file - if (currentfile!=-1) - unzCloseCurrentFile(uf); - currentfile=-1; - if (index >= (int)uf->gi.number_entry) - return ZR_ARGS; - if (index < (int)uf->num_file) - unzGoToFirstFile(uf); - while ((int)uf->num_file= (int)uf->gi.number_entry) - return ZR_ARGS; - if (index < (int)uf->num_file) - unzGoToFirstFile(uf); - while ((int)uf->num_file < index) - unzGoToNextFile(uf); - unzOpenCurrentFile(uf); - currentfile = index; - } - int res = unzReadCurrentFile(uf, dst, len); - if (res>(int)len) - return ZR_MORE; - unzCloseCurrentFile(uf); - currentfile = -1; - if (res == len) - return ZR_OK; - else - return ZR_FLATE; - } - - // otherwise we're writing to a handle or a file - if (currentfile != -1) - unzCloseCurrentFile(uf); - currentfile = -1; - if (index >= (int)uf->gi.number_entry) - return ZR_ARGS; - if (index < (int)uf->num_file) - unzGoToFirstFile(uf); - while ((int)uf->num_file < index) - unzGoToNextFile(uf); - ZIPENTRY ze; - Get(index, &ze); - - // zipentry=directory is handled specially - if ((ze.attr & FILE_ATTRIBUTE_DIRECTORY) != 0) - { - if (flags == ZIP_HANDLE) - return ZR_OK; // don't do anything -#ifdef _UNICODE - TCHAR uname[MAX_PATH]; - GetUnicodeFileName(ze.name, uname, MAX_PATH - 1); - EnsureDirectory(rootdir, uname); -#else - EnsureDirectory(rootdir, ze.name); -#endif - return ZR_OK; - } - - // otherwise, we write the zipentry to a file/handle - HANDLE h; - if (flags == ZIP_HANDLE) - h = dst; - else - { - const TCHAR *name = (const TCHAR *)dst; - const TCHAR *c = name; - while (*c) - { - if (*c == _T('/') || *c == _T('\\')) - name = c + 1; - c++; - } - // if it's a relative filename, ensure directories. We do this as a service - // to the caller so they can just unzip straight unto ze.name. - if (name != (const TCHAR *)dst) - { - TCHAR dir[MAX_PATH]; - _tcscpy(dir, (const TCHAR*)dst); - dir[name - (const TCHAR*)dst - 1] = _T('\0'); - bool isabsolute = (dir[0] == _T('/') || dir[0] == _T('\\') || dir[1] == _T(':')); - isabsolute |= (_tcsstr(dir, _T("../")) != 0) | (_tcsstr(dir, _T("..\\")) != 0); - if (!isabsolute) - EnsureDirectory(rootdir, dir); - } - h = ::CreateFileW((const WCHAR*)dst, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - ze.attr, NULL); - } - - if (h == INVALID_HANDLE_VALUE) - return ZR_NOFILE; - - unzOpenCurrentFile(uf); - BYTE buf[16384]; - bool haderr = false; - - for (;;) - { - int res = unzReadCurrentFile(uf, buf, 16384); - if (res < 0) - { - haderr = true; - break; - } - if (res == 0) - break; - DWORD writ; - BOOL bres = WriteFile(h, buf, res, &writ, NULL); - if (!bres) - { - haderr = true; - break; - } - } - bool settime = false; - DWORD type = GetFileType(h); - if (type == FILE_TYPE_DISK && !haderr) - settime = true; - if (settime) - SetFileTime(h, &ze.ctime, &ze.atime, &ze.mtime); - if (flags != ZIP_HANDLE) - CloseHandle(h); - unzCloseCurrentFile(uf); - if (haderr) - return ZR_WRITE; - return ZR_OK; -} - - -ZRESULT TUnzip::Close() -{ if (currentfile!=-1) unzCloseCurrentFile(uf); currentfile=-1; - if (uf!=0) unzClose(uf); uf=0; - return ZR_OK; -} - - - - - -ZRESULT lasterrorU=ZR_OK; - -unsigned int FormatZipMessageU(ZRESULT code, char *buf,unsigned int len) -{ if (code==ZR_RECENT) code=lasterrorU; - const char *msg="unknown zip result code"; - switch (code) - { case ZR_OK: msg="Success"; break; - case ZR_NODUPH: msg="Culdn't duplicate handle"; break; - case ZR_NOFILE: msg="Couldn't create/open file"; break; - case ZR_NOALLOC: msg="Failed to allocate memory"; break; - case ZR_WRITE: msg="Error writing to file"; break; - case ZR_NOTFOUND: msg="File not found in the zipfile"; break; - case ZR_MORE: msg="Still more data to unzip"; break; - case ZR_CORRUPT: msg="Zipfile is corrupt or not a zipfile"; break; - case ZR_READ: msg="Error reading file"; break; - case ZR_ARGS: msg="Caller: faulty arguments"; break; - case ZR_PARTIALUNZ: msg="Caller: the file had already been partially unzipped"; break; - case ZR_NOTMMAP: msg="Caller: can only get memory of a memory zipfile"; break; - case ZR_MEMSIZE: msg="Caller: not enough space allocated for memory zipfile"; break; - case ZR_FAILED: msg="Caller: there was a previous error"; break; - case ZR_ENDED: msg="Caller: additions to the zip have already been ended"; break; - case ZR_ZMODE: msg="Caller: mixing creation and opening of zip"; break; - case ZR_NOTINITED: msg="Zip-bug: internal initialisation not completed"; break; - case ZR_SEEK: msg="Zip-bug: trying to seek the unseekable"; break; - case ZR_MISSIZE: msg="Zip-bug: the anticipated size turned out wrong"; break; - case ZR_NOCHANGE: msg="Zip-bug: tried to change mind, but not allowed"; break; - case ZR_FLATE: msg="Zip-bug: an internal error during flation"; break; - } - unsigned int mlen=(unsigned int)strlen(msg); - if (buf==0 || len==0) return mlen; - unsigned int n=mlen; if (n+1>len) n=len-1; - strncpy(buf,msg,n); buf[n]=0; - return mlen; -} - - -typedef struct -{ DWORD flag; - TUnzip *unz; -} TUnzipHandleData; - -HZIP OpenZipU(void *z,unsigned int len,DWORD flags) -{ - TUnzip *unz = new TUnzip(); - lasterrorU = unz->Open(z,len,flags); - if (lasterrorU!=ZR_OK) - { - delete unz; - return 0; - } - TUnzipHandleData *han = new TUnzipHandleData; - han->flag=1; - han->unz=unz; - return (HZIP)han; -} - -HZIP OpenZipW(void *z, unsigned int len, DWORD flags) -{ - TUnzip *unz = new TUnzip(); - lasterrorU = unz->OpenW(z, len, flags); - if (lasterrorU != ZR_OK) - { - delete unz; - return 0; - } - TUnzipHandleData *han = new TUnzipHandleData; - han->flag = 1; - han->unz = unz; - return (HZIP)han; -} - - - - - -ZRESULT GetZipItemA(HZIP hz, int index, ZIPENTRY *ze) -{ - if (hz==0) - { - lasterrorU=ZR_ARGS; - return ZR_ARGS; - } - TUnzipHandleData *han = (TUnzipHandleData*)hz; - if (han->flag!=1) - { - lasterrorU=ZR_ZMODE; - return ZR_ZMODE; - } - TUnzip *unz = han->unz; - lasterrorU = unz->Get(index,ze); - return lasterrorU; -} - -ZRESULT GetZipItemW(HZIP hz, int index, ZIPENTRYW *zew) -{ - if (hz==0) - { - lasterrorU=ZR_ARGS; - return ZR_ARGS; - } - TUnzipHandleData *han = (TUnzipHandleData*)hz; - if (han->flag!=1) - { - lasterrorU=ZR_ZMODE; - return ZR_ZMODE; - } - TUnzip *unz = han->unz; - ZIPENTRY ze; - lasterrorU = unz->Get(index,&ze); - if (lasterrorU == ZR_OK) - { - zew->index = ze.index; - zew->attr = ze.attr; - zew->atime = ze.atime; - zew->ctime = ze.ctime; - zew->mtime = ze.mtime; - zew->comp_size = ze.comp_size; - zew->unc_size = ze.unc_size; -#ifdef _UNICODE - GetUnicodeFileName(ze.name, zew->name, MAX_PATH-1); -#else - strcpy(zew->name, ze.name); -#endif - } - return lasterrorU; -} - -ZRESULT FindZipItemA(HZIP hz, const TCHAR *name, bool ic, int *index, ZIPENTRY *ze) -{ - if (hz==0) - { - lasterrorU=ZR_ARGS; - return ZR_ARGS; - } - TUnzipHandleData *han = (TUnzipHandleData*)hz; - if (han->flag!=1) - { - lasterrorU=ZR_ZMODE; - return ZR_ZMODE; - } - TUnzip *unz = han->unz; - lasterrorU = unz->Find(name,ic,index,ze); - return lasterrorU; -} - -ZRESULT FindZipItemW(HZIP hz, const TCHAR *name, bool ic, int *index, ZIPENTRYW *zew) -{ - if (hz==0) - { - lasterrorU=ZR_ARGS; - return ZR_ARGS; - } - TUnzipHandleData *han = (TUnzipHandleData*)hz; - if (han->flag!=1) - { - lasterrorU=ZR_ZMODE; - return ZR_ZMODE; - } - TUnzip *unz = han->unz; - ZIPENTRY ze; - lasterrorU = unz->Find(name,ic,index,&ze); - if (lasterrorU == ZR_OK) - { - zew->index = ze.index; - zew->attr = ze.attr; - zew->atime = ze.atime; - zew->ctime = ze.ctime; - zew->mtime = ze.mtime; - zew->comp_size = ze.comp_size; - zew->unc_size = ze.unc_size; -#ifdef _UNICODE - GetUnicodeFileName(ze.name, zew->name, MAX_PATH-1); -#else - strcpy(zew->name, ze.name); -#endif - } - - return lasterrorU; -} - -ZRESULT UnzipItem(HZIP hz, int index, void *dst, unsigned int len, DWORD flags) -{ - if (hz==0) - { - lasterrorU=ZR_ARGS; - return ZR_ARGS; - } - TUnzipHandleData *han = (TUnzipHandleData*)hz; - if (han->flag!=1) - { - lasterrorU=ZR_ZMODE; - return ZR_ZMODE; - } - TUnzip *unz = han->unz; - lasterrorU = unz->Unzip(index,dst,len,flags); - return lasterrorU; -} -ZRESULT UnzipItemW(HZIP hz, int index, void *dst, unsigned int len, DWORD flags) -{ - if (hz == 0) - { - lasterrorU = ZR_ARGS; - return ZR_ARGS; - } - TUnzipHandleData *han = (TUnzipHandleData*)hz; - if (han->flag != 1) - { - lasterrorU = ZR_ZMODE; - return ZR_ZMODE; - } - TUnzip *unz = han->unz; - lasterrorU = unz->UnzipW(index, dst, len, flags); - return lasterrorU; -} - -ZRESULT CloseZipU(HZIP hz) -{ if (hz==0) {lasterrorU=ZR_ARGS;return ZR_ARGS;} - TUnzipHandleData *han = (TUnzipHandleData*)hz; - if (han->flag!=1) {lasterrorU=ZR_ZMODE;return ZR_ZMODE;} - TUnzip *unz = han->unz; - lasterrorU = unz->Close(); - delete unz; - delete han; - return lasterrorU; -} - -bool IsZipHandleU(HZIP hz) -{ if (hz==0) return true; - TUnzipHandleData *han = (TUnzipHandleData*)hz; - return (han->flag==1); -} - - diff --git a/IfcPlusPlus/src/external/XUnzip.h b/IfcPlusPlus/src/external/XUnzip.h deleted file mode 100644 index 118926ee4..000000000 --- a/IfcPlusPlus/src/external/XUnzip.h +++ /dev/null @@ -1,384 +0,0 @@ -// XUnzip.h Version 1.3 -// -// Authors: Mark Adler et al. (see below) -// -// Modified by: Lucian Wischik -// lu@wischik.com -// -// Version 1.0 - Turned C files into just a single CPP file -// - Made them compile cleanly as C++ files -// - Gave them simpler APIs -// - Added the ability to zip/unzip directly in memory without -// any intermediate files -// -// Modified by: Hans Dietrich -// hdietrich@gmail.com -// -/////////////////////////////////////////////////////////////////////////////// -// -// Lucian Wischik's comments: -// -------------------------- -// THIS FILE is almost entirely based upon code by info-zip. -// It has been modified by Lucian Wischik. -// The original code may be found at http://www.info-zip.org -// The original copyright text follows. -// -/////////////////////////////////////////////////////////////////////////////// -// -// Original authors' comments: -// --------------------------- -// This is version 2002-Feb-16 of the Info-ZIP copyright and license. The -// definitive version of this document should be available at -// ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely. -// -// Copyright (c) 1990-2002 Info-ZIP. All rights reserved. -// -// For the purposes of this copyright and license, "Info-ZIP" is defined as -// the following set of individuals: -// -// Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, -// Jean-loup Gailly, Hunter Goatley, Ian Gorman, Chris Herborth, Dirk Haase, -// Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, -// David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, -// Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, -// Kai Uwe Rommel, Steve Salisbury, Dave Smith, Christian Spieler, -// Antoine Verheijen, Paul von Behren, Rich Wales, Mike White -// -// This software is provided "as is", without warranty of any kind, express -// or implied. In no event shall Info-ZIP or its contributors be held liable -// for any direct, indirect, incidental, special or consequential damages -// arising out of the use of or inability to use this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. Redistributions of source code must retain the above copyright notice, -// definition, disclaimer, and this list of conditions. -// -// 2. Redistributions in binary form (compiled executables) must reproduce -// the above copyright notice, definition, disclaimer, and this list of -// conditions in documentation and/or other materials provided with the -// distribution. The sole exception to this condition is redistribution -// of a standard UnZipSFX binary as part of a self-extracting archive; -// that is permitted without inclusion of this license, as long as the -// normal UnZipSFX banner has not been removed from the binary or disabled. -// -// 3. Altered versions--including, but not limited to, ports to new -// operating systems, existing ports with new graphical interfaces, and -// dynamic, shared, or static library versions--must be plainly marked -// as such and must not be misrepresented as being the original source. -// Such altered versions also must not be misrepresented as being -// Info-ZIP releases--including, but not limited to, labeling of the -// altered versions with the names "Info-ZIP" (or any variation thereof, -// including, but not limited to, different capitalizations), -// "Pocket UnZip", "WiZ" or "MacZip" without the explicit permission of -// Info-ZIP. Such altered versions are further prohibited from -// misrepresentative use of the Zip-Bugs or Info-ZIP e-mail addresses or -// of the Info-ZIP URL(s). -// -// 4. Info-ZIP retains the right to use the names "Info-ZIP", "Zip", "UnZip", -// "UnZipSFX", "WiZ", "Pocket UnZip", "Pocket Zip", and "MacZip" for its -// own source and binary releases. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef XUNZIP_H -#define XUNZIP_H - -#ifndef XZIP_H -DECLARE_HANDLE(HZIP); // An HZIP identifies a zip file that has been opened -#endif - -typedef DWORD ZRESULT; -// return codes from any of the zip functions. Listed later. - -#define ZIP_HANDLE 1 -#define ZIP_FILENAME 2 -#define ZIP_MEMORY 3 - -typedef struct -{ int index; // index of this file within the zip - char name[MAX_PATH]; // filename within the zip - DWORD attr; // attributes, as in GetFileAttributes. - FILETIME atime,ctime,mtime;// access, create, modify filetimes - long comp_size; // sizes of item, compressed and uncompressed. These - long unc_size; // may be -1 if not yet known (e.g. being streamed in) -} ZIPENTRY; - -typedef struct -{ int index; // index of this file within the zip - TCHAR name[MAX_PATH]; // filename within the zip - DWORD attr; // attributes, as in GetFileAttributes. - FILETIME atime,ctime,mtime;// access, create, modify filetimes - long comp_size; // sizes of item, compressed and uncompressed. These - long unc_size; // may be -1 if not yet known (e.g. being streamed in) -} ZIPENTRYW; - - -/////////////////////////////////////////////////////////////////////////////// -// -// OpenZip() -// -// Purpose: Open an existing zip archive file -// -// Parameters: z - archive file name if flags is ZIP_FILENAME; for other -// uses see below -// len - for memory (ZIP_MEMORY) should be the buffer size; -// for other uses, should be 0 -// flags - indicates usage, see below; for files, this will be -// ZIP_FILENAME -// -// Returns: HZIP - non-zero if zip archive opened ok, otherwise 0 -// -HZIP OpenZip(void *z, unsigned int len, DWORD flags); -// OpenZip - opens a zip file and returns a handle with which you can -// subsequently examine its contents. You can open a zip file from: -// from a pipe: OpenZip(hpipe_read,0, ZIP_HANDLE); -// from a file (by handle): OpenZip(hfile,0, ZIP_HANDLE); -// from a file (by name): OpenZip("c:\\test.zip",0, ZIP_FILENAME); -// from a memory block: OpenZip(bufstart, buflen, ZIP_MEMORY); -// If the file is opened through a pipe, then items may only be -// accessed in increasing order, and an item may only be unzipped once, -// although GetZipItem can be called immediately before and after unzipping -// it. If it's opened i n any other way, then full random access is possible. -// Note: pipe input is not yet implemented. - - -/////////////////////////////////////////////////////////////////////////////// -// -// GetZipItem() -// -// Purpose: Get information about an item in an open zip archive -// -// Parameters: hz - handle of open zip archive -// index - index number (0 based) of item in zip -// ze - pointer to a ZIPENTRY (if ANSI) or ZIPENTRYW struct -// (if Unicode) -// -// Returns: ZRESULT - ZR_OK if success, otherwise some other value -// - -#ifdef _UNICODE -#define GetZipItem GetZipItemW -#else -#define GetZipItem GetZipItemA -#endif - -ZRESULT GetZipItemA(HZIP hz, int index, ZIPENTRY *ze); -ZRESULT GetZipItemW(HZIP hz, int index, ZIPENTRYW *ze); -// GetZipItem - call this to get information about an item in the zip. -// If index is -1 and the file wasn't opened through a pipe, -// then it returns information about the whole zipfile -// (and in particular ze.index returns the number of index items). -// Note: the item might be a directory (ze.attr & FILE_ATTRIBUTE_DIRECTORY) -// See below for notes on what happens when you unzip such an item. -// Note: if you are opening the zip through a pipe, then random access -// is not possible and GetZipItem(-1) fails and you can't discover the number -// of items except by calling GetZipItem on each one of them in turn, -// starting at 0, until eventually the call fails. Also, in the event that -// you are opening through a pipe and the zip was itself created into a pipe, -// then then comp_size and sometimes unc_size as well may not be known until -// after the item has been unzipped. - - -/////////////////////////////////////////////////////////////////////////////// -// -// FindZipItem() -// -// Purpose: Find item by name and return information about it -// -// Parameters: hz - handle of open zip archive -// name - name of file to look for inside zip archive -// ic - TRUE = case insensitive -// index - pointer to index number returned, or -1 -// ze - pointer to a ZIPENTRY (if ANSI) or ZIPENTRYW struct -// (if Unicode) -// -// Returns: ZRESULT - ZR_OK if success, otherwise some other value -// - -#ifdef _UNICODE -#define FindZipItem FindZipItemW -#else -#define FindZipItem FindZipItemA -#endif - -ZRESULT FindZipItemA(HZIP hz, const TCHAR *name, bool ic, int *index, ZIPENTRY *ze); -ZRESULT FindZipItemW(HZIP hz, const TCHAR *name, bool ic, int *index, ZIPENTRYW *ze); -// FindZipItem - finds an item by name. ic means 'insensitive to case'. -// It returns the index of the item, and returns information about it. -// If nothing was found, then index is set to -1 and the function returns -// an error code. - - -/////////////////////////////////////////////////////////////////////////////// -// -// UnzipItem() -// -// Purpose: Find item by index and unzip it -// -// Parameters: hz - handle of open zip archive -// index - index number of file to unzip -// dst - target file name of unzipped file -// len - for memory (ZIP_MEMORY. length of buffer; -// otherwise 0 -// flags - indicates usage, see below; for files, this will be -// ZIP_FILENAME -// -// Returns: ZRESULT - ZR_OK if success, otherwise some other value -// - -ZRESULT UnzipItem(HZIP hz, int index, void *dst, unsigned int len, DWORD flags); -// UnzipItem - given an index to an item, unzips it. You can unzip to: -// to a pipe: UnzipItem(hz,i, hpipe_write,0,ZIP_HANDLE); -// to a file (by handle): UnzipItem(hz,i, hfile,0,ZIP_HANDLE); -// to a file (by name): UnzipItem(hz,i, ze.name,0,ZIP_FILENAME); -// to a memory block: UnzipItem(hz,i, buf,buflen,ZIP_MEMORY); -// In the final case, if the buffer isn't large enough to hold it all, -// then the return code indicates that more is yet to come. If it was -// large enough, and you want to know precisely how big, GetZipItem. -// Note: zip files are normally stored with relative pathnames. If you -// unzip with ZIP_FILENAME a relative pathname then the item gets created -// relative to the current directory - it first ensures that all necessary -// subdirectories have been created. Also, the item may itself be a directory. -// If you unzip a directory with ZIP_FILENAME, then the directory gets created. -// If you unzip it to a handle or a memory block, then nothing gets created -// and it emits 0 bytes. - -ZRESULT UnzipItemW(HZIP hz, int index, void *dst, unsigned int len, DWORD flags); - -/////////////////////////////////////////////////////////////////////////////// -// -// CloseZip() -// -// Purpose: Close an open zip archive -// -// Parameters: hz - handle to an open zip archive -// -// Returns: ZRESULT - ZR_OK if success, otherwise some other value -// -ZRESULT CloseZip(HZIP hz); -// CloseZip - the zip handle must be closed with this function. - -unsigned int FormatZipMessage(ZRESULT code, char *buf,unsigned int len); -// FormatZipMessage - given an error code, formats it as a string. -// It returns the length of the error message. If buf/len points -// to a real buffer, then it also writes as much as possible into there. - - -// These are the result codes: -#define ZR_OK 0x00000000 // nb. the pseudo-code zr-recent is never returned, -#define ZR_RECENT 0x00000001 // but can be passed to FormatZipMessage. -// The following come from general system stuff (e.g. files not openable) -#define ZR_GENMASK 0x0000FF00 -#define ZR_NODUPH 0x00000100 // couldn't duplicate the handle -#define ZR_NOFILE 0x00000200 // couldn't create/open the file -#define ZR_NOALLOC 0x00000300 // failed to allocate some resource -#define ZR_WRITE 0x00000400 // a general error writing to the file -#define ZR_NOTFOUND 0x00000500 // couldn't find that file in the zip -#define ZR_MORE 0x00000600 // there's still more data to be unzipped -#define ZR_CORRUPT 0x00000700 // the zipfile is corrupt or not a zipfile -#define ZR_READ 0x00000800 // a general error reading the file -// The following come from mistakes on the part of the caller -#define ZR_CALLERMASK 0x00FF0000 -#define ZR_ARGS 0x00010000 // general mistake with the arguments -#define ZR_NOTMMAP 0x00020000 // tried to ZipGetMemory, but that only works on mmap zipfiles, which yours wasn't -#define ZR_MEMSIZE 0x00030000 // the memory size is too small -#define ZR_FAILED 0x00040000 // the thing was already failed when you called this function -#define ZR_ENDED 0x00050000 // the zip creation has already been closed -#define ZR_MISSIZE 0x00060000 // the indicated input file size turned out mistaken -#define ZR_PARTIALUNZ 0x00070000 // the file had already been partially unzipped -#define ZR_ZMODE 0x00080000 // tried to mix creating/opening a zip -// The following come from bugs within the zip library itself -#define ZR_BUGMASK 0xFF000000 -#define ZR_NOTINITED 0x01000000 // initialisation didn't work -#define ZR_SEEK 0x02000000 // trying to seek in an unseekable file -#define ZR_NOCHANGE 0x04000000 // changed its mind on storage, but not allowed -#define ZR_FLATE 0x05000000 // an internal error in the de/inflation code - - - - - -// e.g. -// -// SetCurrentDirectory("c:\\docs\\stuff"); -// HZIP hz = OpenZip("c:\\stuff.zip",0,ZIP_FILENAME); -// ZIPENTRY ze; GetZipItem(hz,-1,&ze); int numitems=ze.index; -// for (int i=0; i, last updated Oct. 13, + 2013 Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: + http://www.ietf.org/rfc/rfc1951.txt + + Most API's defined in miniz.c are optional. For example, to disable the + archive related functions just define MINIZ_NO_ARCHIVE_APIS, or to get rid of + all stdio usage define MINIZ_NO_STDIO (see the list below for more macros). + + * Low-level Deflate/Inflate implementation notes: + + Compression: Use the "tdefl" API's. The compressor supports raw, static, + and dynamic blocks, lazy or greedy parsing, match length filtering, RLE-only, + and Huffman-only streams. It performs and compresses approximately as well as + zlib. + + Decompression: Use the "tinfl" API's. The entire decompressor is + implemented as a single function coroutine: see tinfl_decompress(). It + supports decompression into a 32KB (or larger power of 2) wrapping buffer, or + into a memory block large enough to hold the entire file. + + The low-level tdefl/tinfl API's do not make any use of dynamic memory + allocation. + + * zlib-style API notes: + + miniz.c implements a fairly large subset of zlib. There's enough + functionality present for it to be a drop-in zlib replacement in many apps: + The z_stream struct, optional memory allocation callbacks + deflateInit/deflateInit2/deflate/deflateReset/deflateEnd/deflateBound + inflateInit/inflateInit2/inflate/inflateReset/inflateEnd + compress, compress2, compressBound, uncompress + CRC-32, Adler-32 - Using modern, minimal code size, CPU cache friendly + routines. Supports raw deflate streams or standard zlib streams with adler-32 + checking. + + Limitations: + The callback API's are not implemented yet. No support for gzip headers or + zlib static dictionaries. I've tried to closely emulate zlib's various + flavors of stream flushing and return status codes, but there are no + guarantees that miniz.c pulls this off perfectly. + + * PNG writing: See the tdefl_write_image_to_png_file_in_memory() function, + originally written by Alex Evans. Supports 1-4 bytes/pixel images. + + * ZIP archive API notes: + + The ZIP archive API's where designed with simplicity and efficiency in + mind, with just enough abstraction to get the job done with minimal fuss. + There are simple API's to retrieve file information, read files from existing + archives, create new archives, append new files to existing archives, or + clone archive data from one archive to another. It supports archives located + in memory or the heap, on disk (using stdio.h), or you can specify custom + file read/write callbacks. + + - Archive reading: Just call this function to read a single file from a + disk archive: + + void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const + char *pArchive_name, size_t *pSize, mz_uint zip_flags); + + For more complex cases, use the "mz_zip_reader" functions. Upon opening an + archive, the entire central directory is located and read as-is into memory, + and subsequent file access only occurs when reading individual files. + + - Archives file scanning: The simple way is to use this function to scan a + loaded archive for a specific file: + + int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, + const char *pComment, mz_uint flags); + + The locate operation can optionally check file comments too, which (as one + example) can be used to identify multiple versions of the same file in an + archive. This function uses a simple linear search through the central + directory, so it's not very fast. + + Alternately, you can iterate through all the files in an archive (using + mz_zip_reader_get_num_files()) and retrieve detailed info on each file by + calling mz_zip_reader_file_stat(). + + - Archive creation: Use the "mz_zip_writer" functions. The ZIP writer + immediately writes compressed file data to disk and builds an exact image of + the central directory in memory. The central directory image is written all + at once at the end of the archive file when the archive is finalized. + + The archive writer can optionally align each file's local header and file + data to any power of 2 alignment, which can be useful when the archive will + be read from optical media. Also, the writer supports placing arbitrary data + blobs at the very beginning of ZIP archives. Archives written using either + feature are still readable by any ZIP tool. + + - Archive appending: The simple way to add a single file to an archive is + to call this function: + + mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, + const char *pArchive_name, const void *pBuf, size_t buf_size, const void + *pComment, mz_uint16 comment_size, mz_uint level_and_flags); + + The archive will be created if it doesn't already exist, otherwise it'll be + appended to. Note the appending is done in-place and is not an atomic + operation, so if something goes wrong during the operation it's possible the + archive could be left without a central directory (although the local file + headers and file data will be fine, so the archive will be recoverable). + + For more complex archive modification scenarios: + 1. The safest way is to use a mz_zip_reader to read the existing archive, + cloning only those bits you want to preserve into a new archive using using + the mz_zip_writer_add_from_zip_reader() function (which compiles the + compressed file data as-is). When you're done, delete the old archive and + rename the newly written archive, and you're done. This is safe but requires + a bunch of temporary disk space or heap memory. + + 2. Or, you can convert an mz_zip_reader in-place to an mz_zip_writer using + mz_zip_writer_init_from_reader(), append new files as needed, then finalize + the archive which will write an updated central directory to the original + archive. (This is basically what mz_zip_add_mem_to_archive_file_in_place() + does.) There's a possibility that the archive's central directory could be + lost with this method if anything goes wrong, though. + + - ZIP archive support limitations: + No spanning support. Extraction functions can only handle unencrypted, + stored or deflated files. Requires streams capable of seeking. + + * This is a header file library, like stb_image.c. To get only a header file, + either cut and paste the below header, or create miniz.h, #define + MINIZ_HEADER_FILE_ONLY, and then include miniz.c from it. + + * Important: For best perf. be sure to customize the below macros for your + target platform: #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 #define + MINIZ_LITTLE_ENDIAN 1 #define MINIZ_HAS_64BIT_REGISTERS 1 + + * On platforms using glibc, Be sure to "#define _LARGEFILE64_SOURCE 1" before + including miniz.c to ensure miniz uses the 64-bit variants: fopen64(), + stat64(), etc. Otherwise you won't be able to process large files (i.e. + 32-bit stat() fails for me on files > 0x7FFFFFFF bytes). +*/ +#pragma once + +/* Defines to completely disable specific portions of miniz.c: + If all macros here are defined the only functionality remaining will be + CRC-32, adler-32, tinfl, and tdefl. */ + +/* Define MINIZ_NO_STDIO to disable all usage and any functions which rely on + * stdio for file I/O. */ +/*#define MINIZ_NO_STDIO */ + +/* If MINIZ_NO_TIME is specified then the ZIP archive functions will not be able + * to get the current time, or */ +/* get/set file times, and the C run-time funcs that get/set times won't be + * called. */ +/* The current downside is the times written to your archives will be from 1979. + */ +/*#define MINIZ_NO_TIME */ + +/* Define MINIZ_NO_ARCHIVE_APIS to disable all ZIP archive API's. */ +/*#define MINIZ_NO_ARCHIVE_APIS */ + +/* Define MINIZ_NO_ARCHIVE_WRITING_APIS to disable all writing related ZIP + * archive API's. */ +/*#define MINIZ_NO_ARCHIVE_WRITING_APIS */ + +/* Define MINIZ_NO_ZLIB_APIS to remove all ZLIB-style compression/decompression + * API's. */ +/*#define MINIZ_NO_ZLIB_APIS */ + +/* Define MINIZ_NO_ZLIB_COMPATIBLE_NAME to disable zlib names, to prevent + * conflicts against stock zlib. */ +/*#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES */ + +/* Define MINIZ_NO_MALLOC to disable all calls to malloc, free, and realloc. + Note if MINIZ_NO_MALLOC is defined then the user must always provide custom + user alloc/free/realloc callbacks to the zlib and archive API's, and a few + stand-alone helper API's which don't provide custom user functions (such as + tdefl_compress_mem_to_heap() and tinfl_decompress_mem_to_heap()) won't work. + */ +/*#define MINIZ_NO_MALLOC */ + +#if defined(__TINYC__) && (defined(__linux) || defined(__linux__)) +/* TODO: Work around "error: include file 'sys\utime.h' when compiling with tcc + * on Linux */ +#define MINIZ_NO_TIME +#endif + +#include + +#if !defined(MINIZ_NO_TIME) && !defined(MINIZ_NO_ARCHIVE_APIS) +#include +#endif + +#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || \ + defined(__i386) || defined(__i486__) || defined(__i486) || \ + defined(i386) || defined(__ia64__) || defined(__x86_64__) +/* MINIZ_X86_OR_X64_CPU is only used to help set the below macros. */ +#define MINIZ_X86_OR_X64_CPU 1 +#else +#define MINIZ_X86_OR_X64_CPU 0 +#endif + +#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU +/* Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian. */ +#define MINIZ_LITTLE_ENDIAN 1 +#else +#define MINIZ_LITTLE_ENDIAN 0 +#endif + +/* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES only if not set */ +#if !defined(MINIZ_USE_UNALIGNED_LOADS_AND_STORES) +#if MINIZ_X86_OR_X64_CPU +/* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient + * integer loads and stores from unaligned addresses. */ +#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 +#define MINIZ_UNALIGNED_USE_MEMCPY +#else +#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 0 +#endif +#endif + +#if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || \ + defined(_LP64) || defined(__LP64__) || defined(__ia64__) || \ + defined(__x86_64__) +/* Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are + * reasonably fast (and don't involve compiler generated calls to helper + * functions). */ +#define MINIZ_HAS_64BIT_REGISTERS 1 +#else +#define MINIZ_HAS_64BIT_REGISTERS 0 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* ------------------- zlib-style API Definitions. */ + +/* For more compatibility with zlib, miniz.c uses unsigned long for some + * parameters/struct members. Beware: mz_ulong can be either 32 or 64-bits! */ +typedef unsigned long mz_ulong; + +/* mz_free() internally uses the MZ_FREE() macro (which by default calls free() + * unless you've modified the MZ_MALLOC macro) to release a block allocated from + * the heap. */ +MINIZ_EXPORT void mz_free(void *p); + +#define MZ_ADLER32_INIT (1) +/* mz_adler32() returns the initial adler-32 value to use when called with + * ptr==NULL. */ +MINIZ_EXPORT mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, + size_t buf_len); + +#define MZ_CRC32_INIT (0) +/* mz_crc32() returns the initial CRC-32 value to use when called with + * ptr==NULL. */ +MINIZ_EXPORT mz_ulong mz_crc32(mz_ulong crc, const unsigned char *ptr, + size_t buf_len); + +/* Compression strategies. */ +enum { + MZ_DEFAULT_STRATEGY = 0, + MZ_FILTERED = 1, + MZ_HUFFMAN_ONLY = 2, + MZ_RLE = 3, + MZ_FIXED = 4 +}; + +/* Method */ +#define MZ_DEFLATED 8 + +/* Heap allocation callbacks. +Note that mz_alloc_func parameter types purposely differ from zlib's: items/size +is size_t, not unsigned long. */ +typedef void *(*mz_alloc_func)(void *opaque, size_t items, size_t size); +typedef void (*mz_free_func)(void *opaque, void *address); +typedef void *(*mz_realloc_func)(void *opaque, void *address, size_t items, + size_t size); + +/* Compression levels: 0-9 are the standard zlib-style levels, 10 is best + * possible compression (not zlib compatible, and may be very slow), + * MZ_DEFAULT_COMPRESSION=MZ_DEFAULT_LEVEL. */ +enum { + MZ_NO_COMPRESSION = 0, + MZ_BEST_SPEED = 1, + MZ_BEST_COMPRESSION = 9, + MZ_UBER_COMPRESSION = 10, + MZ_DEFAULT_LEVEL = 6, + MZ_DEFAULT_COMPRESSION = -1 +}; + +#define MZ_VERSION "10.2.0" +#define MZ_VERNUM 0xA100 +#define MZ_VER_MAJOR 10 +#define MZ_VER_MINOR 2 +#define MZ_VER_REVISION 0 +#define MZ_VER_SUBREVISION 0 + +#ifndef MINIZ_NO_ZLIB_APIS + +/* Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The + * other values are for advanced use (refer to the zlib docs). */ +enum { + MZ_NO_FLUSH = 0, + MZ_PARTIAL_FLUSH = 1, + MZ_SYNC_FLUSH = 2, + MZ_FULL_FLUSH = 3, + MZ_FINISH = 4, + MZ_BLOCK = 5 +}; + +/* Return status codes. MZ_PARAM_ERROR is non-standard. */ +enum { + MZ_OK = 0, + MZ_STREAM_END = 1, + MZ_NEED_DICT = 2, + MZ_ERRNO = -1, + MZ_STREAM_ERROR = -2, + MZ_DATA_ERROR = -3, + MZ_MEM_ERROR = -4, + MZ_BUF_ERROR = -5, + MZ_VERSION_ERROR = -6, + MZ_PARAM_ERROR = -10000 +}; + +/* Window bits */ +#define MZ_DEFAULT_WINDOW_BITS 15 + +struct mz_internal_state; + +/* Compression/decompression stream struct. */ +typedef struct mz_stream_s { + const unsigned char *next_in; /* pointer to next byte to read */ + unsigned int avail_in; /* number of bytes available at next_in */ + mz_ulong total_in; /* total number of bytes consumed so far */ + + unsigned char *next_out; /* pointer to next byte to write */ + unsigned int avail_out; /* number of bytes that can be written to next_out */ + mz_ulong total_out; /* total number of bytes produced so far */ + + char *msg; /* error msg (unused) */ + struct mz_internal_state + *state; /* internal state, allocated by zalloc/zfree */ + + mz_alloc_func + zalloc; /* optional heap allocation function (defaults to malloc) */ + mz_free_func zfree; /* optional heap free function (defaults to free) */ + void *opaque; /* heap alloc function user pointer */ + + int data_type; /* data_type (unused) */ + mz_ulong adler; /* adler32 of the source or uncompressed data */ + mz_ulong reserved; /* not used */ +} mz_stream; + +typedef mz_stream *mz_streamp; + +/* Returns the version string of miniz.c. */ +MINIZ_EXPORT const char *mz_version(void); + +/* mz_deflateInit() initializes a compressor with default options: */ +/* Parameters: */ +/* pStream must point to an initialized mz_stream struct. */ +/* level must be between [MZ_NO_COMPRESSION, MZ_BEST_COMPRESSION]. */ +/* level 1 enables a specially optimized compression function that's been + * optimized purely for performance, not ratio. */ +/* (This special func. is currently only enabled when + * MINIZ_USE_UNALIGNED_LOADS_AND_STORES and MINIZ_LITTLE_ENDIAN are defined.) */ +/* Return values: */ +/* MZ_OK on success. */ +/* MZ_STREAM_ERROR if the stream is bogus. */ +/* MZ_PARAM_ERROR if the input parameters are bogus. */ +/* MZ_MEM_ERROR on out of memory. */ +MINIZ_EXPORT int mz_deflateInit(mz_streamp pStream, int level); + +/* mz_deflateInit2() is like mz_deflate(), except with more control: */ +/* Additional parameters: */ +/* method must be MZ_DEFLATED */ +/* window_bits must be MZ_DEFAULT_WINDOW_BITS (to wrap the deflate stream with + * zlib header/adler-32 footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate/no + * header or footer) */ +/* mem_level must be between [1, 9] (it's checked but ignored by miniz.c) */ +MINIZ_EXPORT int mz_deflateInit2(mz_streamp pStream, int level, int method, + int window_bits, int mem_level, int strategy); + +/* Quickly resets a compressor without having to reallocate anything. Same as + * calling mz_deflateEnd() followed by mz_deflateInit()/mz_deflateInit2(). */ +MINIZ_EXPORT int mz_deflateReset(mz_streamp pStream); + +/* mz_deflate() compresses the input to output, consuming as much of the input + * and producing as much output as possible. */ +/* Parameters: */ +/* pStream is the stream to read from and write to. You must initialize/update + * the next_in, avail_in, next_out, and avail_out members. */ +/* flush may be MZ_NO_FLUSH, MZ_PARTIAL_FLUSH/MZ_SYNC_FLUSH, MZ_FULL_FLUSH, or + * MZ_FINISH. */ +/* Return values: */ +/* MZ_OK on success (when flushing, or if more input is needed but not + * available, and/or there's more output to be written but the output buffer is + * full). */ +/* MZ_STREAM_END if all input has been consumed and all output bytes have been + * written. Don't call mz_deflate() on the stream anymore. */ +/* MZ_STREAM_ERROR if the stream is bogus. */ +/* MZ_PARAM_ERROR if one of the parameters is invalid. */ +/* MZ_BUF_ERROR if no forward progress is possible because the input and/or + * output buffers are empty. (Fill up the input buffer or free up some output + * space and try again.) */ +MINIZ_EXPORT int mz_deflate(mz_streamp pStream, int flush); + +/* mz_deflateEnd() deinitializes a compressor: */ +/* Return values: */ +/* MZ_OK on success. */ +/* MZ_STREAM_ERROR if the stream is bogus. */ +MINIZ_EXPORT int mz_deflateEnd(mz_streamp pStream); + +/* mz_deflateBound() returns a (very) conservative upper bound on the amount of + * data that could be generated by deflate(), assuming flush is set to only + * MZ_NO_FLUSH or MZ_FINISH. */ +MINIZ_EXPORT mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len); + +/* Single-call compression functions mz_compress() and mz_compress2(): */ +/* Returns MZ_OK on success, or one of the error codes from mz_deflate() on + * failure. */ +MINIZ_EXPORT int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, + const unsigned char *pSource, mz_ulong source_len); +MINIZ_EXPORT int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, + const unsigned char *pSource, mz_ulong source_len, + int level); + +/* mz_compressBound() returns a (very) conservative upper bound on the amount of + * data that could be generated by calling mz_compress(). */ +MINIZ_EXPORT mz_ulong mz_compressBound(mz_ulong source_len); + +/* Initializes a decompressor. */ +MINIZ_EXPORT int mz_inflateInit(mz_streamp pStream); + +/* mz_inflateInit2() is like mz_inflateInit() with an additional option that + * controls the window size and whether or not the stream has been wrapped with + * a zlib header/footer: */ +/* window_bits must be MZ_DEFAULT_WINDOW_BITS (to parse zlib header/footer) or + * -MZ_DEFAULT_WINDOW_BITS (raw deflate). */ +MINIZ_EXPORT int mz_inflateInit2(mz_streamp pStream, int window_bits); + +/* Quickly resets a compressor without having to reallocate anything. Same as + * calling mz_inflateEnd() followed by mz_inflateInit()/mz_inflateInit2(). */ +MINIZ_EXPORT int mz_inflateReset(mz_streamp pStream); + +/* Decompresses the input stream to the output, consuming only as much of the + * input as needed, and writing as much to the output as possible. */ +/* Parameters: */ +/* pStream is the stream to read from and write to. You must initialize/update + * the next_in, avail_in, next_out, and avail_out members. */ +/* flush may be MZ_NO_FLUSH, MZ_SYNC_FLUSH, or MZ_FINISH. */ +/* On the first call, if flush is MZ_FINISH it's assumed the input and output + * buffers are both sized large enough to decompress the entire stream in a + * single call (this is slightly faster). */ +/* MZ_FINISH implies that there are no more source bytes available beside + * what's already in the input buffer, and that the output buffer is large + * enough to hold the rest of the decompressed data. */ +/* Return values: */ +/* MZ_OK on success. Either more input is needed but not available, and/or + * there's more output to be written but the output buffer is full. */ +/* MZ_STREAM_END if all needed input has been consumed and all output bytes + * have been written. For zlib streams, the adler-32 of the decompressed data + * has also been verified. */ +/* MZ_STREAM_ERROR if the stream is bogus. */ +/* MZ_DATA_ERROR if the deflate stream is invalid. */ +/* MZ_PARAM_ERROR if one of the parameters is invalid. */ +/* MZ_BUF_ERROR if no forward progress is possible because the input buffer is + * empty but the inflater needs more input to continue, or if the output buffer + * is not large enough. Call mz_inflate() again */ +/* with more input data, or with more room in the output buffer (except when + * using single call decompression, described above). */ +MINIZ_EXPORT int mz_inflate(mz_streamp pStream, int flush); + +/* Deinitializes a decompressor. */ +MINIZ_EXPORT int mz_inflateEnd(mz_streamp pStream); + +/* Single-call decompression. */ +/* Returns MZ_OK on success, or one of the error codes from mz_inflate() on + * failure. */ +MINIZ_EXPORT int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, + const unsigned char *pSource, + mz_ulong source_len); +MINIZ_EXPORT int mz_uncompress2(unsigned char *pDest, mz_ulong *pDest_len, + const unsigned char *pSource, + mz_ulong *pSource_len); + +/* Returns a string description of the specified error code, or NULL if the + * error code is invalid. */ +MINIZ_EXPORT const char *mz_error(int err); + +/* Redefine zlib-compatible names to miniz equivalents, so miniz.c can be used + * as a drop-in replacement for the subset of zlib that miniz.c supports. */ +/* Define MINIZ_NO_ZLIB_COMPATIBLE_NAMES to disable zlib-compatibility if you + * use zlib in the same project. */ +#ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES +typedef unsigned char Byte; +typedef unsigned int uInt; +typedef mz_ulong uLong; +typedef Byte Bytef; +typedef uInt uIntf; +typedef char charf; +typedef int intf; +typedef void *voidpf; +typedef uLong uLongf; +typedef void *voidp; +typedef void *const voidpc; +#define Z_NULL 0 +#define Z_NO_FLUSH MZ_NO_FLUSH +#define Z_PARTIAL_FLUSH MZ_PARTIAL_FLUSH +#define Z_SYNC_FLUSH MZ_SYNC_FLUSH +#define Z_FULL_FLUSH MZ_FULL_FLUSH +#define Z_FINISH MZ_FINISH +#define Z_BLOCK MZ_BLOCK +#define Z_OK MZ_OK +#define Z_STREAM_END MZ_STREAM_END +#define Z_NEED_DICT MZ_NEED_DICT +#define Z_ERRNO MZ_ERRNO +#define Z_STREAM_ERROR MZ_STREAM_ERROR +#define Z_DATA_ERROR MZ_DATA_ERROR +#define Z_MEM_ERROR MZ_MEM_ERROR +#define Z_BUF_ERROR MZ_BUF_ERROR +#define Z_VERSION_ERROR MZ_VERSION_ERROR +#define Z_PARAM_ERROR MZ_PARAM_ERROR +#define Z_NO_COMPRESSION MZ_NO_COMPRESSION +#define Z_BEST_SPEED MZ_BEST_SPEED +#define Z_BEST_COMPRESSION MZ_BEST_COMPRESSION +#define Z_DEFAULT_COMPRESSION MZ_DEFAULT_COMPRESSION +#define Z_DEFAULT_STRATEGY MZ_DEFAULT_STRATEGY +#define Z_FILTERED MZ_FILTERED +#define Z_HUFFMAN_ONLY MZ_HUFFMAN_ONLY +#define Z_RLE MZ_RLE +#define Z_FIXED MZ_FIXED +#define Z_DEFLATED MZ_DEFLATED +#define Z_DEFAULT_WINDOW_BITS MZ_DEFAULT_WINDOW_BITS +#define alloc_func mz_alloc_func +#define free_func mz_free_func +#define internal_state mz_internal_state +#define z_stream mz_stream +#define deflateInit mz_deflateInit +#define deflateInit2 mz_deflateInit2 +#define deflateReset mz_deflateReset +#define deflate mz_deflate +#define deflateEnd mz_deflateEnd +#define deflateBound mz_deflateBound +#define compress mz_compress +#define compress2 mz_compress2 +#define compressBound mz_compressBound +#define inflateInit mz_inflateInit +#define inflateInit2 mz_inflateInit2 +#define inflateReset mz_inflateReset +#define inflate mz_inflate +#define inflateEnd mz_inflateEnd +#define uncompress mz_uncompress +#define uncompress2 mz_uncompress2 +#define crc32 mz_crc32 +#define adler32 mz_adler32 +#define MAX_WBITS 15 +#define MAX_MEM_LEVEL 9 +#define zError mz_error +#define ZLIB_VERSION MZ_VERSION +#define ZLIB_VERNUM MZ_VERNUM +#define ZLIB_VER_MAJOR MZ_VER_MAJOR +#define ZLIB_VER_MINOR MZ_VER_MINOR +#define ZLIB_VER_REVISION MZ_VER_REVISION +#define ZLIB_VER_SUBREVISION MZ_VER_SUBREVISION +#define zlibVersion mz_version +#define zlib_version mz_version() +#endif /* #ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES */ + +#endif /* MINIZ_NO_ZLIB_APIS */ + +#ifdef __cplusplus +} +#endif + +#pragma once +#include +#include +#include +#include + +/* ------------------- Types and macros */ +typedef unsigned char mz_uint8; +typedef signed short mz_int16; +typedef unsigned short mz_uint16; +typedef unsigned int mz_uint32; +typedef unsigned int mz_uint; +typedef int64_t mz_int64; +typedef uint64_t mz_uint64; +typedef int mz_bool; + +#define MZ_FALSE (0) +#define MZ_TRUE (1) + +/* Works around MSVC's spammy "warning C4127: conditional expression is + * constant" message. */ +#ifdef _MSC_VER +#define MZ_MACRO_END while (0, 0) +#else +#define MZ_MACRO_END while (0) +#endif + +#ifdef MINIZ_NO_STDIO +#define MZ_FILE void * +#else +#include +#define MZ_FILE FILE +#endif /* #ifdef MINIZ_NO_STDIO */ + +#ifdef MINIZ_NO_TIME +typedef struct mz_dummy_time_t_tag { + int m_dummy; +} mz_dummy_time_t; +#define MZ_TIME_T mz_dummy_time_t +#else +#define MZ_TIME_T time_t +#endif + +#define MZ_ASSERT(x) assert(x) + +#ifdef MINIZ_NO_MALLOC +#define MZ_MALLOC(x) NULL +#define MZ_FREE(x) (void)x, ((void)0) +#define MZ_REALLOC(p, x) NULL +#else +#define MZ_MALLOC(x) malloc(x) +#define MZ_FREE(x) free(x) +#define MZ_REALLOC(p, x) realloc(p, x) +#endif + +#define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b)) +#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b)) +#define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj)) + +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN +#define MZ_READ_LE16(p) *((const mz_uint16 *)(p)) +#define MZ_READ_LE32(p) *((const mz_uint32 *)(p)) +#else +#define MZ_READ_LE16(p) \ + ((mz_uint32)(((const mz_uint8 *)(p))[0]) | \ + ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U)) +#define MZ_READ_LE32(p) \ + ((mz_uint32)(((const mz_uint8 *)(p))[0]) | \ + ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) | \ + ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) | \ + ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U)) +#endif + +#define MZ_READ_LE64(p) \ + (((mz_uint64)MZ_READ_LE32(p)) | \ + (((mz_uint64)MZ_READ_LE32((const mz_uint8 *)(p) + sizeof(mz_uint32))) \ + << 32U)) + +#ifdef _MSC_VER +#define MZ_FORCEINLINE __forceinline +#elif defined(__GNUC__) +#define MZ_FORCEINLINE __inline__ __attribute__((__always_inline__)) +#else +#define MZ_FORCEINLINE inline +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +extern MINIZ_EXPORT void *miniz_def_alloc_func(void *opaque, size_t items, + size_t size); +extern MINIZ_EXPORT void miniz_def_free_func(void *opaque, void *address); +extern MINIZ_EXPORT void *miniz_def_realloc_func(void *opaque, void *address, + size_t items, size_t size); + +#define MZ_UINT16_MAX (0xFFFFU) +#define MZ_UINT32_MAX (0xFFFFFFFFU) + +#ifdef __cplusplus +} +#endif +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif +/* ------------------- Low-level Compression API Definitions */ + +/* Set TDEFL_LESS_MEMORY to 1 to use less memory (compression will be slightly + * slower, and raw/dynamic blocks will be output more frequently). */ +#define TDEFL_LESS_MEMORY 0 + +/* tdefl_init() compression flags logically OR'd together (low 12 bits contain + * the max. number of probes per dictionary search): */ +/* TDEFL_DEFAULT_MAX_PROBES: The compressor defaults to 128 dictionary probes + * per dictionary search. 0=Huffman only, 1=Huffman+LZ (fastest/crap + * compression), 4095=Huffman+LZ (slowest/best compression). */ +enum { + TDEFL_HUFFMAN_ONLY = 0, + TDEFL_DEFAULT_MAX_PROBES = 128, + TDEFL_MAX_PROBES_MASK = 0xFFF +}; + +/* TDEFL_WRITE_ZLIB_HEADER: If set, the compressor outputs a zlib header before + * the deflate data, and the Adler-32 of the source data at the end. Otherwise, + * you'll get raw deflate data. */ +/* TDEFL_COMPUTE_ADLER32: Always compute the adler-32 of the input data (even + * when not writing zlib headers). */ +/* TDEFL_GREEDY_PARSING_FLAG: Set to use faster greedy parsing, instead of more + * efficient lazy parsing. */ +/* TDEFL_NONDETERMINISTIC_PARSING_FLAG: Enable to decrease the compressor's + * initialization time to the minimum, but the output may vary from run to run + * given the same input (depending on the contents of memory). */ +/* TDEFL_RLE_MATCHES: Only look for RLE matches (matches with a distance of 1) + */ +/* TDEFL_FILTER_MATCHES: Discards matches <= 5 chars if enabled. */ +/* TDEFL_FORCE_ALL_STATIC_BLOCKS: Disable usage of optimized Huffman tables. */ +/* TDEFL_FORCE_ALL_RAW_BLOCKS: Only use raw (uncompressed) deflate blocks. */ +/* The low 12 bits are reserved to control the max # of hash probes per + * dictionary lookup (see TDEFL_MAX_PROBES_MASK). */ +enum { + TDEFL_WRITE_ZLIB_HEADER = 0x01000, + TDEFL_COMPUTE_ADLER32 = 0x02000, + TDEFL_GREEDY_PARSING_FLAG = 0x04000, + TDEFL_NONDETERMINISTIC_PARSING_FLAG = 0x08000, + TDEFL_RLE_MATCHES = 0x10000, + TDEFL_FILTER_MATCHES = 0x20000, + TDEFL_FORCE_ALL_STATIC_BLOCKS = 0x40000, + TDEFL_FORCE_ALL_RAW_BLOCKS = 0x80000 +}; + +/* High level compression functions: */ +/* tdefl_compress_mem_to_heap() compresses a block in memory to a heap block + * allocated via malloc(). */ +/* On entry: */ +/* pSrc_buf, src_buf_len: Pointer and size of source block to compress. */ +/* flags: The max match finder probes (default is 128) logically OR'd against + * the above flags. Higher probes are slower but improve compression. */ +/* On return: */ +/* Function returns a pointer to the compressed data, or NULL on failure. */ +/* *pOut_len will be set to the compressed data's size, which could be larger + * than src_buf_len on uncompressible data. */ +/* The caller must free() the returned block when it's no longer needed. */ +MINIZ_EXPORT void *tdefl_compress_mem_to_heap(const void *pSrc_buf, + size_t src_buf_len, + size_t *pOut_len, int flags); + +/* tdefl_compress_mem_to_mem() compresses a block in memory to another block in + * memory. */ +/* Returns 0 on failure. */ +MINIZ_EXPORT size_t tdefl_compress_mem_to_mem(void *pOut_buf, + size_t out_buf_len, + const void *pSrc_buf, + size_t src_buf_len, int flags); + +/* Compresses an image to a compressed PNG file in memory. */ +/* On entry: */ +/* pImage, w, h, and num_chans describe the image to compress. num_chans may be + * 1, 2, 3, or 4. */ +/* The image pitch in bytes per scanline will be w*num_chans. The leftmost + * pixel on the top scanline is stored first in memory. */ +/* level may range from [0,10], use MZ_NO_COMPRESSION, MZ_BEST_SPEED, + * MZ_BEST_COMPRESSION, etc. or a decent default is MZ_DEFAULT_LEVEL */ +/* If flip is true, the image will be flipped on the Y axis (useful for OpenGL + * apps). */ +/* On return: */ +/* Function returns a pointer to the compressed data, or NULL on failure. */ +/* *pLen_out will be set to the size of the PNG image file. */ +/* The caller must mz_free() the returned heap block (which will typically be + * larger than *pLen_out) when it's no longer needed. */ +MINIZ_EXPORT void * +tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, + int num_chans, size_t *pLen_out, + mz_uint level, mz_bool flip); +MINIZ_EXPORT void *tdefl_write_image_to_png_file_in_memory(const void *pImage, + int w, int h, + int num_chans, + size_t *pLen_out); + +/* Output stream interface. The compressor uses this interface to write + * compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time. */ +typedef mz_bool (*tdefl_put_buf_func_ptr)(const void *pBuf, int len, + void *pUser); + +/* tdefl_compress_mem_to_output() compresses a block to an output stream. The + * above helpers use this function internally. */ +MINIZ_EXPORT mz_bool tdefl_compress_mem_to_output( + const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, + void *pPut_buf_user, int flags); + +enum { + TDEFL_MAX_HUFF_TABLES = 3, + TDEFL_MAX_HUFF_SYMBOLS_0 = 288, + TDEFL_MAX_HUFF_SYMBOLS_1 = 32, + TDEFL_MAX_HUFF_SYMBOLS_2 = 19, + TDEFL_LZ_DICT_SIZE = 32768, + TDEFL_LZ_DICT_SIZE_MASK = TDEFL_LZ_DICT_SIZE - 1, + TDEFL_MIN_MATCH_LEN = 3, + TDEFL_MAX_MATCH_LEN = 258 +}; + +/* TDEFL_OUT_BUF_SIZE MUST be large enough to hold a single entire compressed + * output block (using static/fixed Huffman codes). */ +#if TDEFL_LESS_MEMORY +enum { + TDEFL_LZ_CODE_BUF_SIZE = 24 * 1024, + TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13) / 10, + TDEFL_MAX_HUFF_SYMBOLS = 288, + TDEFL_LZ_HASH_BITS = 12, + TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, + TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, + TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS +}; +#else +enum { + TDEFL_LZ_CODE_BUF_SIZE = 64 * 1024, + TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13) / 10, + TDEFL_MAX_HUFF_SYMBOLS = 288, + TDEFL_LZ_HASH_BITS = 15, + TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, + TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, + TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS +}; +#endif + +/* The low-level tdefl functions below may be used directly if the above helper + * functions aren't flexible enough. The low-level functions don't make any heap + * allocations, unlike the above helper functions. */ +typedef enum { + TDEFL_STATUS_BAD_PARAM = -2, + TDEFL_STATUS_PUT_BUF_FAILED = -1, + TDEFL_STATUS_OKAY = 0, + TDEFL_STATUS_DONE = 1 +} tdefl_status; + +/* Must map to MZ_NO_FLUSH, MZ_SYNC_FLUSH, etc. enums */ +typedef enum { + TDEFL_NO_FLUSH = 0, + TDEFL_SYNC_FLUSH = 2, + TDEFL_FULL_FLUSH = 3, + TDEFL_FINISH = 4 +} tdefl_flush; + +/* tdefl's compression state structure. */ +typedef struct { + tdefl_put_buf_func_ptr m_pPut_buf_func; + void *m_pPut_buf_user; + mz_uint m_flags, m_max_probes[2]; + int m_greedy_parsing; + mz_uint m_adler32, m_lookahead_pos, m_lookahead_size, m_dict_size; + mz_uint8 *m_pLZ_code_buf, *m_pLZ_flags, *m_pOutput_buf, *m_pOutput_buf_end; + mz_uint m_num_flags_left, m_total_lz_bytes, m_lz_code_buf_dict_pos, m_bits_in, + m_bit_buffer; + mz_uint m_saved_match_dist, m_saved_match_len, m_saved_lit, + m_output_flush_ofs, m_output_flush_remaining, m_finished, m_block_index, + m_wants_to_finish; + tdefl_status m_prev_return_status; + const void *m_pIn_buf; + void *m_pOut_buf; + size_t *m_pIn_buf_size, *m_pOut_buf_size; + tdefl_flush m_flush; + const mz_uint8 *m_pSrc; + size_t m_src_buf_left, m_out_buf_ofs; + mz_uint8 m_dict[TDEFL_LZ_DICT_SIZE + TDEFL_MAX_MATCH_LEN - 1]; + mz_uint16 m_huff_count[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS]; + mz_uint16 m_huff_codes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS]; + mz_uint8 m_huff_code_sizes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS]; + mz_uint8 m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE]; + mz_uint16 m_next[TDEFL_LZ_DICT_SIZE]; + mz_uint16 m_hash[TDEFL_LZ_HASH_SIZE]; + mz_uint8 m_output_buf[TDEFL_OUT_BUF_SIZE]; +} tdefl_compressor; + +/* Initializes the compressor. */ +/* There is no corresponding deinit() function because the tdefl API's do not + * dynamically allocate memory. */ +/* pBut_buf_func: If NULL, output data will be supplied to the specified + * callback. In this case, the user should call the tdefl_compress_buffer() API + * for compression. */ +/* If pBut_buf_func is NULL the user should always call the tdefl_compress() + * API. */ +/* flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, + * etc.) */ +MINIZ_EXPORT tdefl_status tdefl_init(tdefl_compressor *d, + tdefl_put_buf_func_ptr pPut_buf_func, + void *pPut_buf_user, int flags); + +/* Compresses a block of data, consuming as much of the specified input buffer + * as possible, and writing as much compressed data to the specified output + * buffer as possible. */ +MINIZ_EXPORT tdefl_status tdefl_compress(tdefl_compressor *d, + const void *pIn_buf, + size_t *pIn_buf_size, void *pOut_buf, + size_t *pOut_buf_size, + tdefl_flush flush); + +/* tdefl_compress_buffer() is only usable when the tdefl_init() is called with a + * non-NULL tdefl_put_buf_func_ptr. */ +/* tdefl_compress_buffer() always consumes the entire input buffer. */ +MINIZ_EXPORT tdefl_status tdefl_compress_buffer(tdefl_compressor *d, + const void *pIn_buf, + size_t in_buf_size, + tdefl_flush flush); + +MINIZ_EXPORT tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d); +MINIZ_EXPORT mz_uint32 tdefl_get_adler32(tdefl_compressor *d); + +/* Create tdefl_compress() flags given zlib-style compression parameters. */ +/* level may range from [0,10] (where 10 is absolute max compression, but may be + * much slower on some files) */ +/* window_bits may be -15 (raw deflate) or 15 (zlib) */ +/* strategy may be either MZ_DEFAULT_STRATEGY, MZ_FILTERED, MZ_HUFFMAN_ONLY, + * MZ_RLE, or MZ_FIXED */ +MINIZ_EXPORT mz_uint tdefl_create_comp_flags_from_zip_params(int level, + int window_bits, + int strategy); + +#ifndef MINIZ_NO_MALLOC +/* Allocate the tdefl_compressor structure in C so that */ +/* non-C language bindings to tdefl_ API don't need to worry about */ +/* structure size and allocation mechanism. */ +MINIZ_EXPORT tdefl_compressor *tdefl_compressor_alloc(void); +MINIZ_EXPORT void tdefl_compressor_free(tdefl_compressor *pComp); +#endif + +#ifdef __cplusplus +} +#endif +#pragma once + +/* ------------------- Low-level Decompression API Definitions */ + +#ifdef __cplusplus +extern "C" { +#endif +/* Decompression flags used by tinfl_decompress(). */ +/* TINFL_FLAG_PARSE_ZLIB_HEADER: If set, the input has a valid zlib header and + * ends with an adler32 checksum (it's a valid zlib stream). Otherwise, the + * input is a raw deflate stream. */ +/* TINFL_FLAG_HAS_MORE_INPUT: If set, there are more input bytes available + * beyond the end of the supplied input buffer. If clear, the input buffer + * contains all remaining input. */ +/* TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF: If set, the output buffer is large + * enough to hold the entire decompressed stream. If clear, the output buffer is + * at least the size of the dictionary (typically 32KB). */ +/* TINFL_FLAG_COMPUTE_ADLER32: Force adler-32 checksum computation of the + * decompressed bytes. */ +enum { + TINFL_FLAG_PARSE_ZLIB_HEADER = 1, + TINFL_FLAG_HAS_MORE_INPUT = 2, + TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF = 4, + TINFL_FLAG_COMPUTE_ADLER32 = 8 +}; + +/* High level decompression functions: */ +/* tinfl_decompress_mem_to_heap() decompresses a block in memory to a heap block + * allocated via malloc(). */ +/* On entry: */ +/* pSrc_buf, src_buf_len: Pointer and size of the Deflate or zlib source data + * to decompress. */ +/* On return: */ +/* Function returns a pointer to the decompressed data, or NULL on failure. */ +/* *pOut_len will be set to the decompressed data's size, which could be larger + * than src_buf_len on uncompressible data. */ +/* The caller must call mz_free() on the returned block when it's no longer + * needed. */ +MINIZ_EXPORT void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, + size_t src_buf_len, + size_t *pOut_len, int flags); + +/* tinfl_decompress_mem_to_mem() decompresses a block in memory to another block + * in memory. */ +/* Returns TINFL_DECOMPRESS_MEM_TO_MEM_FAILED on failure, or the number of bytes + * written on success. */ +#define TINFL_DECOMPRESS_MEM_TO_MEM_FAILED ((size_t)(-1)) +MINIZ_EXPORT size_t tinfl_decompress_mem_to_mem(void *pOut_buf, + size_t out_buf_len, + const void *pSrc_buf, + size_t src_buf_len, int flags); + +/* tinfl_decompress_mem_to_callback() decompresses a block in memory to an + * internal 32KB buffer, and a user provided callback function will be called to + * flush the buffer. */ +/* Returns 1 on success or 0 on failure. */ +typedef int (*tinfl_put_buf_func_ptr)(const void *pBuf, int len, void *pUser); +MINIZ_EXPORT int +tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, + tinfl_put_buf_func_ptr pPut_buf_func, + void *pPut_buf_user, int flags); + +struct tinfl_decompressor_tag; +typedef struct tinfl_decompressor_tag tinfl_decompressor; + +#ifndef MINIZ_NO_MALLOC +/* Allocate the tinfl_decompressor structure in C so that */ +/* non-C language bindings to tinfl_ API don't need to worry about */ +/* structure size and allocation mechanism. */ +MINIZ_EXPORT tinfl_decompressor *tinfl_decompressor_alloc(void); +MINIZ_EXPORT void tinfl_decompressor_free(tinfl_decompressor *pDecomp); +#endif + +/* Max size of LZ dictionary. */ +#define TINFL_LZ_DICT_SIZE 32768 + +/* Return status. */ +typedef enum { + /* This flags indicates the inflator needs 1 or more input bytes to make + forward progress, but the caller is indicating that no more are available. + The compressed data */ + /* is probably corrupted. If you call the inflator again with more bytes it'll + try to continue processing the input but this is a BAD sign (either the + data is corrupted or you called it incorrectly). */ + /* If you call it again with no input you'll just get + TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS again. */ + TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS = -4, + + /* This flag indicates that one or more of the input parameters was obviously + bogus. (You can try calling it again, but if you get this error the calling + code is wrong.) */ + TINFL_STATUS_BAD_PARAM = -3, + + /* This flags indicate the inflator is finished but the adler32 check of the + uncompressed data didn't match. If you call it again it'll return + TINFL_STATUS_DONE. */ + TINFL_STATUS_ADLER32_MISMATCH = -2, + + /* This flags indicate the inflator has somehow failed (bad code, corrupted + input, etc.). If you call it again without resetting via tinfl_init() it + it'll just keep on returning the same status failure code. */ + TINFL_STATUS_FAILED = -1, + + /* Any status code less than TINFL_STATUS_DONE must indicate a failure. */ + + /* This flag indicates the inflator has returned every byte of uncompressed + data that it can, has consumed every byte that it needed, has successfully + reached the end of the deflate stream, and */ + /* if zlib headers and adler32 checking enabled that it has successfully + checked the uncompressed data's adler32. If you call it again you'll just + get TINFL_STATUS_DONE over and over again. */ + TINFL_STATUS_DONE = 0, + + /* This flag indicates the inflator MUST have more input data (even 1 byte) + before it can make any more forward progress, or you need to clear the + TINFL_FLAG_HAS_MORE_INPUT */ + /* flag on the next call if you don't have any more source data. If the source + data was somehow corrupted it's also possible (but unlikely) for the + inflator to keep on demanding input to */ + /* proceed, so be sure to properly set the TINFL_FLAG_HAS_MORE_INPUT flag. */ + TINFL_STATUS_NEEDS_MORE_INPUT = 1, + + /* This flag indicates the inflator definitely has 1 or more bytes of + uncompressed data available, but it cannot write this data into the output + buffer. */ + /* Note if the source compressed data was corrupted it's possible for the + inflator to return a lot of uncompressed data to the caller. I've been + assuming you know how much uncompressed data to expect */ + /* (either exact or worst case) and will stop calling the inflator and fail + after receiving too much. In pure streaming scenarios where you have no + idea how many bytes to expect this may not be possible */ + /* so I may need to add some code to address this. */ + TINFL_STATUS_HAS_MORE_OUTPUT = 2 +} tinfl_status; + +/* Initializes the decompressor to its initial state. */ +#define tinfl_init(r) \ + do { \ + (r)->m_state = 0; \ + } \ + MZ_MACRO_END +#define tinfl_get_adler32(r) (r)->m_check_adler32 + +/* Main low-level decompressor coroutine function. This is the only function + * actually needed for decompression. All the other functions are just + * high-level helpers for improved usability. */ +/* This is a universal API, i.e. it can be used as a building block to build any + * desired higher level decompression API. In the limit case, it can be called + * once per every byte input or output. */ +MINIZ_EXPORT tinfl_status tinfl_decompress( + tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, + mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, + const mz_uint32 decomp_flags); + +/* Internal/private bits follow. */ +enum { + TINFL_MAX_HUFF_TABLES = 3, + TINFL_MAX_HUFF_SYMBOLS_0 = 288, + TINFL_MAX_HUFF_SYMBOLS_1 = 32, + TINFL_MAX_HUFF_SYMBOLS_2 = 19, + TINFL_FAST_LOOKUP_BITS = 10, + TINFL_FAST_LOOKUP_SIZE = 1 << TINFL_FAST_LOOKUP_BITS +}; + +typedef struct { + mz_uint8 m_code_size[TINFL_MAX_HUFF_SYMBOLS_0]; + mz_int16 m_look_up[TINFL_FAST_LOOKUP_SIZE], + m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2]; +} tinfl_huff_table; + +#if MINIZ_HAS_64BIT_REGISTERS +#define TINFL_USE_64BIT_BITBUF 1 +#else +#define TINFL_USE_64BIT_BITBUF 0 +#endif + +#if TINFL_USE_64BIT_BITBUF +typedef mz_uint64 tinfl_bit_buf_t; +#define TINFL_BITBUF_SIZE (64) +#else +typedef mz_uint32 tinfl_bit_buf_t; +#define TINFL_BITBUF_SIZE (32) +#endif + +struct tinfl_decompressor_tag { + mz_uint32 m_state, m_num_bits, m_zhdr0, m_zhdr1, m_z_adler32, m_final, m_type, + m_check_adler32, m_dist, m_counter, m_num_extra, + m_table_sizes[TINFL_MAX_HUFF_TABLES]; + tinfl_bit_buf_t m_bit_buf; + size_t m_dist_from_out_buf_start; + tinfl_huff_table m_tables[TINFL_MAX_HUFF_TABLES]; + mz_uint8 m_raw_header[4], + m_len_codes[TINFL_MAX_HUFF_SYMBOLS_0 + TINFL_MAX_HUFF_SYMBOLS_1 + 137]; +}; + +#ifdef __cplusplus +} +#endif + +#pragma once + +/* ------------------- ZIP archive reading/writing */ + +#ifndef MINIZ_NO_ARCHIVE_APIS + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + /* Note: These enums can be reduced as needed to save memory or stack space - + they are pretty conservative. */ + MZ_ZIP_MAX_IO_BUF_SIZE = 8 * 1024, + MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE = 512, + MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE = 512 +}; + +typedef struct { + /* Central directory file index. */ + mz_uint32 m_file_index; + + /* Byte offset of this entry in the archive's central directory. Note we + * currently only support up to UINT_MAX or less bytes in the central dir. */ + mz_uint64 m_central_dir_ofs; + + /* These fields are copied directly from the zip's central dir. */ + mz_uint16 m_version_made_by; + mz_uint16 m_version_needed; + mz_uint16 m_bit_flag; + mz_uint16 m_method; + +#ifndef MINIZ_NO_TIME + MZ_TIME_T m_time; +#endif + + /* CRC-32 of uncompressed data. */ + mz_uint32 m_crc32; + + /* File's compressed size. */ + mz_uint64 m_comp_size; + + /* File's uncompressed size. Note, I've seen some old archives where directory + * entries had 512 bytes for their uncompressed sizes, but when you try to + * unpack them you actually get 0 bytes. */ + mz_uint64 m_uncomp_size; + + /* Zip internal and external file attributes. */ + mz_uint16 m_internal_attr; + mz_uint32 m_external_attr; + + /* Entry's local header file offset in bytes. */ + mz_uint64 m_local_header_ofs; + + /* Size of comment in bytes. */ + mz_uint32 m_comment_size; + + /* MZ_TRUE if the entry appears to be a directory. */ + mz_bool m_is_directory; + + /* MZ_TRUE if the entry uses encryption/strong encryption (which miniz_zip + * doesn't support) */ + mz_bool m_is_encrypted; + + /* MZ_TRUE if the file is not encrypted, a patch file, and if it uses a + * compression method we support. */ + mz_bool m_is_supported; + + /* Filename. If string ends in '/' it's a subdirectory entry. */ + /* Guaranteed to be zero terminated, may be truncated to fit. */ + char m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE]; + + /* Comment field. */ + /* Guaranteed to be zero terminated, may be truncated to fit. */ + char m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE]; + +} mz_zip_archive_file_stat; + +typedef size_t (*mz_file_read_func)(void *pOpaque, mz_uint64 file_ofs, + void *pBuf, size_t n); +typedef size_t (*mz_file_write_func)(void *pOpaque, mz_uint64 file_ofs, + const void *pBuf, size_t n); +typedef mz_bool (*mz_file_needs_keepalive)(void *pOpaque); + +struct mz_zip_internal_state_tag; +typedef struct mz_zip_internal_state_tag mz_zip_internal_state; + +typedef enum { + MZ_ZIP_MODE_INVALID = 0, + MZ_ZIP_MODE_READING = 1, + MZ_ZIP_MODE_WRITING = 2, + MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3 +} mz_zip_mode; + +typedef enum { + MZ_ZIP_FLAG_CASE_SENSITIVE = 0x0100, + MZ_ZIP_FLAG_IGNORE_PATH = 0x0200, + MZ_ZIP_FLAG_COMPRESSED_DATA = 0x0400, + MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY = 0x0800, + MZ_ZIP_FLAG_VALIDATE_LOCATE_FILE_FLAG = + 0x1000, /* if enabled, mz_zip_reader_locate_file() will be called on each + file as its validated to ensure the func finds the file in the + central dir (intended for testing) */ + MZ_ZIP_FLAG_VALIDATE_HEADERS_ONLY = + 0x2000, /* validate the local headers, but don't decompress the entire + file and check the crc32 */ + MZ_ZIP_FLAG_WRITE_ZIP64 = + 0x4000, /* always use the zip64 file format, instead of the original zip + file format with automatic switch to zip64. Use as flags + parameter with mz_zip_writer_init*_v2 */ + MZ_ZIP_FLAG_WRITE_ALLOW_READING = 0x8000, + MZ_ZIP_FLAG_ASCII_FILENAME = 0x10000, + /*After adding a compressed file, seek back + to local file header and set the correct sizes*/ + MZ_ZIP_FLAG_WRITE_HEADER_SET_SIZE = 0x20000 +} mz_zip_flags; + +typedef enum { + MZ_ZIP_TYPE_INVALID = 0, + MZ_ZIP_TYPE_USER, + MZ_ZIP_TYPE_MEMORY, + MZ_ZIP_TYPE_HEAP, + MZ_ZIP_TYPE_FILE, + MZ_ZIP_TYPE_CFILE, + MZ_ZIP_TOTAL_TYPES +} mz_zip_type; + +/* miniz error codes. Be sure to update mz_zip_get_error_string() if you add or + * modify this enum. */ +typedef enum { + MZ_ZIP_NO_ERROR = 0, + MZ_ZIP_UNDEFINED_ERROR, + MZ_ZIP_TOO_MANY_FILES, + MZ_ZIP_FILE_TOO_LARGE, + MZ_ZIP_UNSUPPORTED_METHOD, + MZ_ZIP_UNSUPPORTED_ENCRYPTION, + MZ_ZIP_UNSUPPORTED_FEATURE, + MZ_ZIP_FAILED_FINDING_CENTRAL_DIR, + MZ_ZIP_NOT_AN_ARCHIVE, + MZ_ZIP_INVALID_HEADER_OR_CORRUPTED, + MZ_ZIP_UNSUPPORTED_MULTIDISK, + MZ_ZIP_DECOMPRESSION_FAILED, + MZ_ZIP_COMPRESSION_FAILED, + MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE, + MZ_ZIP_CRC_CHECK_FAILED, + MZ_ZIP_UNSUPPORTED_CDIR_SIZE, + MZ_ZIP_ALLOC_FAILED, + MZ_ZIP_FILE_OPEN_FAILED, + MZ_ZIP_FILE_CREATE_FAILED, + MZ_ZIP_FILE_WRITE_FAILED, + MZ_ZIP_FILE_READ_FAILED, + MZ_ZIP_FILE_CLOSE_FAILED, + MZ_ZIP_FILE_SEEK_FAILED, + MZ_ZIP_FILE_STAT_FAILED, + MZ_ZIP_INVALID_PARAMETER, + MZ_ZIP_INVALID_FILENAME, + MZ_ZIP_BUF_TOO_SMALL, + MZ_ZIP_INTERNAL_ERROR, + MZ_ZIP_FILE_NOT_FOUND, + MZ_ZIP_ARCHIVE_TOO_LARGE, + MZ_ZIP_VALIDATION_FAILED, + MZ_ZIP_WRITE_CALLBACK_FAILED, + MZ_ZIP_TOTAL_ERRORS +} mz_zip_error; + +typedef struct { + mz_uint64 m_archive_size; + mz_uint64 m_central_directory_file_ofs; + + /* We only support up to UINT32_MAX files in zip64 mode. */ + mz_uint32 m_total_files; + mz_zip_mode m_zip_mode; + mz_zip_type m_zip_type; + mz_zip_error m_last_error; + + mz_uint64 m_file_offset_alignment; + + mz_alloc_func m_pAlloc; + mz_free_func m_pFree; + mz_realloc_func m_pRealloc; + void *m_pAlloc_opaque; + + mz_file_read_func m_pRead; + mz_file_write_func m_pWrite; + mz_file_needs_keepalive m_pNeeds_keepalive; + void *m_pIO_opaque; + + mz_zip_internal_state *m_pState; + +} mz_zip_archive; + +typedef struct { + mz_zip_archive *pZip; + mz_uint flags; + + int status; +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + mz_uint file_crc32; +#endif + mz_uint64 read_buf_size, read_buf_ofs, read_buf_avail, comp_remaining, + out_buf_ofs, cur_file_ofs; + mz_zip_archive_file_stat file_stat; + void *pRead_buf; + void *pWrite_buf; + + size_t out_blk_remain; + + tinfl_decompressor inflator; + +} mz_zip_reader_extract_iter_state; + +/* -------- ZIP reading */ + +/* Inits a ZIP archive reader. */ +/* These functions read and validate the archive's central directory. */ +MINIZ_EXPORT mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, + mz_uint flags); + +MINIZ_EXPORT mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, + const void *pMem, size_t size, + mz_uint flags); + +#ifndef MINIZ_NO_STDIO +/* Read a archive from a disk file. */ +/* file_start_ofs is the file offset where the archive actually begins, or 0. */ +/* actual_archive_size is the true total size of the archive, which may be + * smaller than the file's actual size on disk. If zero the entire file is + * treated as the archive. */ +MINIZ_EXPORT mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, + const char *pFilename, + mz_uint32 flags); +MINIZ_EXPORT mz_bool mz_zip_reader_init_file_v2(mz_zip_archive *pZip, + const char *pFilename, + mz_uint flags, + mz_uint64 file_start_ofs, + mz_uint64 archive_size); +MINIZ_EXPORT mz_bool mz_zip_reader_init_file_v2_rpb(mz_zip_archive *pZip, + const char *pFilename, + mz_uint flags, + mz_uint64 file_start_ofs, + mz_uint64 archive_size); + +/* Read an archive from an already opened FILE, beginning at the current file + * position. */ +/* The archive is assumed to be archive_size bytes long. If archive_size is 0, + * then the entire rest of the file is assumed to contain the archive. */ +/* The FILE will NOT be closed when mz_zip_reader_end() is called. */ +MINIZ_EXPORT mz_bool mz_zip_reader_init_cfile(mz_zip_archive *pZip, + MZ_FILE *pFile, + mz_uint64 archive_size, + mz_uint flags); +#endif + +/* Ends archive reading, freeing all allocations, and closing the input archive + * file if mz_zip_reader_init_file() was used. */ +MINIZ_EXPORT mz_bool mz_zip_reader_end(mz_zip_archive *pZip); + +/* -------- ZIP reading or writing */ + +/* Clears a mz_zip_archive struct to all zeros. */ +/* Important: This must be done before passing the struct to any mz_zip + * functions. */ +MINIZ_EXPORT void mz_zip_zero_struct(mz_zip_archive *pZip); + +MINIZ_EXPORT mz_zip_mode mz_zip_get_mode(mz_zip_archive *pZip); +MINIZ_EXPORT mz_zip_type mz_zip_get_type(mz_zip_archive *pZip); + +/* Returns the total number of files in the archive. */ +MINIZ_EXPORT mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip); + +MINIZ_EXPORT mz_uint64 mz_zip_get_archive_size(mz_zip_archive *pZip); +MINIZ_EXPORT mz_uint64 +mz_zip_get_archive_file_start_offset(mz_zip_archive *pZip); +MINIZ_EXPORT MZ_FILE *mz_zip_get_cfile(mz_zip_archive *pZip); + +/* Reads n bytes of raw archive data, starting at file offset file_ofs, to pBuf. + */ +MINIZ_EXPORT size_t mz_zip_read_archive_data(mz_zip_archive *pZip, + mz_uint64 file_ofs, void *pBuf, + size_t n); + +/* All mz_zip funcs set the m_last_error field in the mz_zip_archive struct. + * These functions retrieve/manipulate this field. */ +/* Note that the m_last_error functionality is not thread safe. */ +MINIZ_EXPORT mz_zip_error mz_zip_set_last_error(mz_zip_archive *pZip, + mz_zip_error err_num); +MINIZ_EXPORT mz_zip_error mz_zip_peek_last_error(mz_zip_archive *pZip); +MINIZ_EXPORT mz_zip_error mz_zip_clear_last_error(mz_zip_archive *pZip); +MINIZ_EXPORT mz_zip_error mz_zip_get_last_error(mz_zip_archive *pZip); +MINIZ_EXPORT const char *mz_zip_get_error_string(mz_zip_error mz_err); + +/* MZ_TRUE if the archive file entry is a directory entry. */ +MINIZ_EXPORT mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, + mz_uint file_index); + +/* MZ_TRUE if the file is encrypted/strong encrypted. */ +MINIZ_EXPORT mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, + mz_uint file_index); + +/* MZ_TRUE if the compression method is supported, and the file is not + * encrypted, and the file is not a compressed patch file. */ +MINIZ_EXPORT mz_bool mz_zip_reader_is_file_supported(mz_zip_archive *pZip, + mz_uint file_index); + +/* Retrieves the filename of an archive file entry. */ +/* Returns the number of bytes written to pFilename, or if filename_buf_size is + * 0 this function returns the number of bytes needed to fully store the + * filename. */ +MINIZ_EXPORT mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, + mz_uint file_index, + char *pFilename, + mz_uint filename_buf_size); + +/* Attempts to locates a file in the archive's central directory. */ +/* Valid flags: MZ_ZIP_FLAG_CASE_SENSITIVE, MZ_ZIP_FLAG_IGNORE_PATH */ +/* Returns -1 if the file cannot be found. */ +MINIZ_EXPORT int mz_zip_reader_locate_file(mz_zip_archive *pZip, + const char *pName, + const char *pComment, mz_uint flags); +MINIZ_EXPORT mz_bool mz_zip_reader_locate_file_v2(mz_zip_archive *pZip, + const char *pName, + const char *pComment, + mz_uint flags, + mz_uint32 *file_index); + +/* Returns detailed information about an archive file entry. */ +MINIZ_EXPORT mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, + mz_uint file_index, + mz_zip_archive_file_stat *pStat); + +/* MZ_TRUE if the file is in zip64 format. */ +/* A file is considered zip64 if it contained a zip64 end of central directory + * marker, or if it contained any zip64 extended file information fields in the + * central directory. */ +MINIZ_EXPORT mz_bool mz_zip_is_zip64(mz_zip_archive *pZip); + +/* Returns the total central directory size in bytes. */ +/* The current max supported size is <= MZ_UINT32_MAX. */ +MINIZ_EXPORT size_t mz_zip_get_central_dir_size(mz_zip_archive *pZip); + +/* Extracts a archive file to a memory buffer using no memory allocation. */ +/* There must be at least enough room on the stack to store the inflator's state + * (~34KB or so). */ +MINIZ_EXPORT mz_bool mz_zip_reader_extract_to_mem_no_alloc( + mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, + mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size); +MINIZ_EXPORT mz_bool mz_zip_reader_extract_file_to_mem_no_alloc( + mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, + mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size); + +/* Extracts a archive file to a memory buffer. */ +MINIZ_EXPORT mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, + mz_uint file_index, + void *pBuf, size_t buf_size, + mz_uint flags); +MINIZ_EXPORT mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, + const char *pFilename, + void *pBuf, + size_t buf_size, + mz_uint flags); + +/* Extracts a archive file to a dynamically allocated heap buffer. */ +/* The memory will be allocated via the mz_zip_archive's alloc/realloc + * functions. */ +/* Returns NULL and sets the last error on failure. */ +MINIZ_EXPORT void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, + mz_uint file_index, + size_t *pSize, mz_uint flags); +MINIZ_EXPORT void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, + const char *pFilename, + size_t *pSize, + mz_uint flags); + +/* Extracts a archive file using a callback function to output the file's data. + */ +MINIZ_EXPORT mz_bool mz_zip_reader_extract_to_callback( + mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, + void *pOpaque, mz_uint flags); +MINIZ_EXPORT mz_bool mz_zip_reader_extract_file_to_callback( + mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, + void *pOpaque, mz_uint flags); + +/* Extract a file iteratively */ +MINIZ_EXPORT mz_zip_reader_extract_iter_state * +mz_zip_reader_extract_iter_new(mz_zip_archive *pZip, mz_uint file_index, + mz_uint flags); +MINIZ_EXPORT mz_zip_reader_extract_iter_state * +mz_zip_reader_extract_file_iter_new(mz_zip_archive *pZip, const char *pFilename, + mz_uint flags); +MINIZ_EXPORT size_t mz_zip_reader_extract_iter_read( + mz_zip_reader_extract_iter_state *pState, void *pvBuf, size_t buf_size); +MINIZ_EXPORT mz_bool +mz_zip_reader_extract_iter_free(mz_zip_reader_extract_iter_state *pState); + +#ifndef MINIZ_NO_STDIO +/* Extracts a archive file to a disk file and sets its last accessed and + * modified times. */ +/* This function only extracts files, not archive directory records. */ +MINIZ_EXPORT mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, + mz_uint file_index, + const char *pDst_filename, + mz_uint flags); +MINIZ_EXPORT mz_bool mz_zip_reader_extract_file_to_file( + mz_zip_archive *pZip, const char *pArchive_filename, + const char *pDst_filename, mz_uint flags); + +/* Extracts a archive file starting at the current position in the destination + * FILE stream. */ +MINIZ_EXPORT mz_bool mz_zip_reader_extract_to_cfile(mz_zip_archive *pZip, + mz_uint file_index, + MZ_FILE *File, + mz_uint flags); +MINIZ_EXPORT mz_bool mz_zip_reader_extract_file_to_cfile( + mz_zip_archive *pZip, const char *pArchive_filename, MZ_FILE *pFile, + mz_uint flags); +#endif + +#if 0 +/* TODO */ + typedef void *mz_zip_streaming_extract_state_ptr; + mz_zip_streaming_extract_state_ptr mz_zip_streaming_extract_begin(mz_zip_archive *pZip, mz_uint file_index, mz_uint flags); + uint64_t mz_zip_streaming_extract_get_size(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState); + uint64_t mz_zip_streaming_extract_get_cur_ofs(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState); + mz_bool mz_zip_streaming_extract_seek(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState, uint64_t new_ofs); + size_t mz_zip_streaming_extract_read(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState, void *pBuf, size_t buf_size); + mz_bool mz_zip_streaming_extract_end(mz_zip_archive *pZip, mz_zip_streaming_extract_state_ptr pState); +#endif + +/* This function compares the archive's local headers, the optional local zip64 + * extended information block, and the optional descriptor following the + * compressed data vs. the data in the central directory. */ +/* It also validates that each file can be successfully uncompressed unless the + * MZ_ZIP_FLAG_VALIDATE_HEADERS_ONLY is specified. */ +MINIZ_EXPORT mz_bool mz_zip_validate_file(mz_zip_archive *pZip, + mz_uint file_index, mz_uint flags); + +/* Validates an entire archive by calling mz_zip_validate_file() on each file. + */ +MINIZ_EXPORT mz_bool mz_zip_validate_archive(mz_zip_archive *pZip, + mz_uint flags); + +/* Misc utils/helpers, valid for ZIP reading or writing */ +MINIZ_EXPORT mz_bool mz_zip_validate_mem_archive(const void *pMem, size_t size, + mz_uint flags, + mz_zip_error *pErr); +MINIZ_EXPORT mz_bool mz_zip_validate_file_archive(const char *pFilename, + mz_uint flags, + mz_zip_error *pErr); + +/* Universal end function - calls either mz_zip_reader_end() or + * mz_zip_writer_end(). */ +MINIZ_EXPORT mz_bool mz_zip_end(mz_zip_archive *pZip); + +/* -------- ZIP writing */ + +#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS + +/* Inits a ZIP archive writer. */ +/*Set pZip->m_pWrite (and pZip->m_pIO_opaque) before calling mz_zip_writer_init + * or mz_zip_writer_init_v2*/ +/*The output is streamable, i.e. file_ofs in mz_file_write_func always increases + * only by n*/ +MINIZ_EXPORT mz_bool mz_zip_writer_init(mz_zip_archive *pZip, + mz_uint64 existing_size); +MINIZ_EXPORT mz_bool mz_zip_writer_init_v2(mz_zip_archive *pZip, + mz_uint64 existing_size, + mz_uint flags); + +MINIZ_EXPORT mz_bool mz_zip_writer_init_heap( + mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, + size_t initial_allocation_size); +MINIZ_EXPORT mz_bool mz_zip_writer_init_heap_v2( + mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, + size_t initial_allocation_size, mz_uint flags); + +#ifndef MINIZ_NO_STDIO +MINIZ_EXPORT mz_bool +mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, + mz_uint64 size_to_reserve_at_beginning); +MINIZ_EXPORT mz_bool mz_zip_writer_init_file_v2( + mz_zip_archive *pZip, const char *pFilename, + mz_uint64 size_to_reserve_at_beginning, mz_uint flags); +MINIZ_EXPORT mz_bool mz_zip_writer_init_cfile(mz_zip_archive *pZip, + MZ_FILE *pFile, mz_uint flags); +#endif + +/* Converts a ZIP archive reader object into a writer object, to allow efficient + * in-place file appends to occur on an existing archive. */ +/* For archives opened using mz_zip_reader_init_file, pFilename must be the + * archive's filename so it can be reopened for writing. If the file can't be + * reopened, mz_zip_reader_end() will be called. */ +/* For archives opened using mz_zip_reader_init_mem, the memory block must be + * growable using the realloc callback (which defaults to realloc unless you've + * overridden it). */ +/* Finally, for archives opened using mz_zip_reader_init, the mz_zip_archive's + * user provided m_pWrite function cannot be NULL. */ +/* Note: In-place archive modification is not recommended unless you know what + * you're doing, because if execution stops or something goes wrong before */ +/* the archive is finalized the file's central directory will be hosed. */ +MINIZ_EXPORT mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, + const char *pFilename); +MINIZ_EXPORT mz_bool mz_zip_writer_init_from_reader_v2(mz_zip_archive *pZip, + const char *pFilename, + mz_uint flags); +MINIZ_EXPORT mz_bool mz_zip_writer_init_from_reader_v2_noreopen( + mz_zip_archive *pZip, const char *pFilename, mz_uint flags); + +/* Adds the contents of a memory buffer to an archive. These functions record + * the current local time into the archive. */ +/* To add a directory entry, call this method with an archive name ending in a + * forwardslash with an empty buffer. */ +/* level_and_flags - compression level (0-10, see MZ_BEST_SPEED, + * MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or + * just set to MZ_DEFAULT_COMPRESSION. */ +MINIZ_EXPORT mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, + const char *pArchive_name, + const void *pBuf, size_t buf_size, + mz_uint level_and_flags); + +/* Like mz_zip_writer_add_mem(), except you can specify a file comment field, + * and optionally supply the function with already compressed data. */ +/* uncomp_size/uncomp_crc32 are only used if the MZ_ZIP_FLAG_COMPRESSED_DATA + * flag is specified. */ +MINIZ_EXPORT mz_bool mz_zip_writer_add_mem_ex( + mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, + size_t buf_size, const void *pComment, mz_uint16 comment_size, + mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32); + +MINIZ_EXPORT mz_bool mz_zip_writer_add_mem_ex_v2( + mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, + size_t buf_size, const void *pComment, mz_uint16 comment_size, + mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32, + MZ_TIME_T *last_modified, const char *user_extra_data_local, + mz_uint user_extra_data_local_len, const char *user_extra_data_central, + mz_uint user_extra_data_central_len); + +/* Adds the contents of a file to an archive. This function also records the + * disk file's modified time into the archive. */ +/* File data is supplied via a read callback function. User + * mz_zip_writer_add_(c)file to add a file directly.*/ +MINIZ_EXPORT mz_bool mz_zip_writer_add_read_buf_callback( + mz_zip_archive *pZip, const char *pArchive_name, + mz_file_read_func read_callback, void *callback_opaque, mz_uint64 max_size, + const MZ_TIME_T *pFile_time, const void *pComment, mz_uint16 comment_size, + mz_uint level_and_flags, mz_uint32 ext_attributes, + const char *user_extra_data_local, mz_uint user_extra_data_local_len, + const char *user_extra_data_central, mz_uint user_extra_data_central_len); + +#ifndef MINIZ_NO_STDIO +/* Adds the contents of a disk file to an archive. This function also records + * the disk file's modified time into the archive. */ +/* level_and_flags - compression level (0-10, see MZ_BEST_SPEED, + * MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or + * just set to MZ_DEFAULT_COMPRESSION. */ +MINIZ_EXPORT mz_bool mz_zip_writer_add_file( + mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, + const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, + mz_uint32 ext_attributes); + +/* Like mz_zip_writer_add_file(), except the file data is read from the + * specified FILE stream. */ +MINIZ_EXPORT mz_bool mz_zip_writer_add_cfile( + mz_zip_archive *pZip, const char *pArchive_name, MZ_FILE *pSrc_file, + mz_uint64 max_size, const MZ_TIME_T *pFile_time, const void *pComment, + mz_uint16 comment_size, mz_uint level_and_flags, mz_uint32 ext_attributes, + const char *user_extra_data_local, mz_uint user_extra_data_local_len, + const char *user_extra_data_central, mz_uint user_extra_data_central_len); +#endif + +/* Adds a file to an archive by fully cloning the data from another archive. */ +/* This function fully clones the source file's compressed data (no + * recompression), along with its full filename, extra data (it may add or + * modify the zip64 local header extra data field), and the optional descriptor + * following the compressed data. */ +MINIZ_EXPORT mz_bool mz_zip_writer_add_from_zip_reader( + mz_zip_archive *pZip, mz_zip_archive *pSource_zip, mz_uint src_file_index); + +/* Finalizes the archive by writing the central directory records followed by + * the end of central directory record. */ +/* After an archive is finalized, the only valid call on the mz_zip_archive + * struct is mz_zip_writer_end(). */ +/* An archive must be manually finalized by calling this function for it to be + * valid. */ +MINIZ_EXPORT mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip); + +/* Finalizes a heap archive, returning a poiner to the heap block and its size. + */ +/* The heap block will be allocated using the mz_zip_archive's alloc/realloc + * callbacks. */ +MINIZ_EXPORT mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, + void **ppBuf, + size_t *pSize); + +/* Ends archive writing, freeing all allocations, and closing the output file if + * mz_zip_writer_init_file() was used. */ +/* Note for the archive to be valid, it *must* have been finalized before ending + * (this function will not do it for you). */ +MINIZ_EXPORT mz_bool mz_zip_writer_end(mz_zip_archive *pZip); + +/* -------- Misc. high-level helper functions: */ + +/* mz_zip_add_mem_to_archive_file_in_place() efficiently (but not atomically) + * appends a memory blob to a ZIP archive. */ +/* Note this is NOT a fully safe operation. If it crashes or dies in some way + * your archive can be left in a screwed up state (without a central directory). + */ +/* level_and_flags - compression level (0-10, see MZ_BEST_SPEED, + * MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or + * just set to MZ_DEFAULT_COMPRESSION. */ +/* TODO: Perhaps add an option to leave the existing central dir in place in + * case the add dies? We could then truncate the file (so the old central dir + * would be at the end) if something goes wrong. */ +MINIZ_EXPORT mz_bool mz_zip_add_mem_to_archive_file_in_place( + const char *pZip_filename, const char *pArchive_name, const void *pBuf, + size_t buf_size, const void *pComment, mz_uint16 comment_size, + mz_uint level_and_flags); +MINIZ_EXPORT mz_bool mz_zip_add_mem_to_archive_file_in_place_v2( + const char *pZip_filename, const char *pArchive_name, const void *pBuf, + size_t buf_size, const void *pComment, mz_uint16 comment_size, + mz_uint level_and_flags, mz_zip_error *pErr); + +/* Reads a single file from an archive into a heap block. */ +/* If pComment is not NULL, only the file with the specified comment will be + * extracted. */ +/* Returns NULL on failure. */ +MINIZ_EXPORT void * +mz_zip_extract_archive_file_to_heap(const char *pZip_filename, + const char *pArchive_name, size_t *pSize, + mz_uint flags); +MINIZ_EXPORT void *mz_zip_extract_archive_file_to_heap_v2( + const char *pZip_filename, const char *pArchive_name, const char *pComment, + size_t *pSize, mz_uint flags, mz_zip_error *pErr); + +#endif /* #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS */ + +#ifdef __cplusplus +} +#endif + +#endif /* MINIZ_NO_ARCHIVE_APIS */ +/************************************************************************** + * + * Copyright 2013-2014 RAD Game Tools and Valve Software + * Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + **************************************************************************/ + +typedef unsigned char mz_validate_uint16[sizeof(mz_uint16) == 2 ? 1 : -1]; +typedef unsigned char mz_validate_uint32[sizeof(mz_uint32) == 4 ? 1 : -1]; +typedef unsigned char mz_validate_uint64[sizeof(mz_uint64) == 8 ? 1 : -1]; + +#ifdef __cplusplus +extern "C" { +#endif + +/* ------------------- zlib-style API's */ + +mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len) { + mz_uint32 i, s1 = (mz_uint32)(adler & 0xffff), s2 = (mz_uint32)(adler >> 16); + size_t block_len = buf_len % 5552; + if (!ptr) + return MZ_ADLER32_INIT; + while (buf_len) { + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) { + s1 += ptr[0], s2 += s1; + s1 += ptr[1], s2 += s1; + s1 += ptr[2], s2 += s1; + s1 += ptr[3], s2 += s1; + s1 += ptr[4], s2 += s1; + s1 += ptr[5], s2 += s1; + s1 += ptr[6], s2 += s1; + s1 += ptr[7], s2 += s1; + } + for (; i < block_len; ++i) + s1 += *ptr++, s2 += s1; + s1 %= 65521U, s2 %= 65521U; + buf_len -= block_len; + block_len = 5552; + } + return (s2 << 16) + s1; +} + +/* Karl Malbrain's compact CRC-32. See "A compact CCITT crc16 and crc32 C + * implementation that balances processor cache usage against speed": + * http://www.geocities.com/malbrain/ */ +#if 0 + mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len) + { + static const mz_uint32 s_crc32[16] = { 0, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c, + 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c }; + mz_uint32 crcu32 = (mz_uint32)crc; + if (!ptr) + return MZ_CRC32_INIT; + crcu32 = ~crcu32; + while (buf_len--) + { + mz_uint8 b = *ptr++; + crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b & 0xF)]; + crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b >> 4)]; + } + return ~crcu32; + } +#elif defined(USE_EXTERNAL_MZCRC) +/* If USE_EXTERNAL_CRC is defined, an external module will export the + * mz_crc32() symbol for us to use, e.g. an SSE-accelerated version. + * Depending on the impl, it may be necessary to ~ the input/output crc values. + */ +mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len); +#else +/* Faster, but larger CPU cache footprint. + */ +mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len) { + static const mz_uint32 s_crc_table[256] = { + 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, + 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, + 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, + 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, + 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, + 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, + 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, + 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, + 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, + 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, + 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106, + 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, + 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, + 0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, + 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, + 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, + 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, + 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, + 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, + 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, + 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, + 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, + 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, + 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, + 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, + 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, + 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, + 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, + 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, + 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, + 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, + 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, + 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, + 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, + 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, + 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, + 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, + 0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, + 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, + 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, + 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, + 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, + 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D}; + + mz_uint32 crc32 = (mz_uint32)crc ^ 0xFFFFFFFF; + const mz_uint8 *pByte_buf = (const mz_uint8 *)ptr; + + while (buf_len >= 4) { + crc32 = (crc32 >> 8) ^ s_crc_table[(crc32 ^ pByte_buf[0]) & 0xFF]; + crc32 = (crc32 >> 8) ^ s_crc_table[(crc32 ^ pByte_buf[1]) & 0xFF]; + crc32 = (crc32 >> 8) ^ s_crc_table[(crc32 ^ pByte_buf[2]) & 0xFF]; + crc32 = (crc32 >> 8) ^ s_crc_table[(crc32 ^ pByte_buf[3]) & 0xFF]; + pByte_buf += 4; + buf_len -= 4; + } + + while (buf_len) { + crc32 = (crc32 >> 8) ^ s_crc_table[(crc32 ^ pByte_buf[0]) & 0xFF]; + ++pByte_buf; + --buf_len; + } + + return ~crc32; +} +#endif + +void mz_free(void *p) { MZ_FREE(p); } + +MINIZ_EXPORT void *miniz_def_alloc_func(void *opaque, size_t items, + size_t size) { + (void)opaque, (void)items, (void)size; + return MZ_MALLOC(items * size); +} +MINIZ_EXPORT void miniz_def_free_func(void *opaque, void *address) { + (void)opaque, (void)address; + MZ_FREE(address); +} +MINIZ_EXPORT void *miniz_def_realloc_func(void *opaque, void *address, + size_t items, size_t size) { + (void)opaque, (void)address, (void)items, (void)size; + return MZ_REALLOC(address, items * size); +} + +const char *mz_version(void) { return MZ_VERSION; } + +#ifndef MINIZ_NO_ZLIB_APIS + +int mz_deflateInit(mz_streamp pStream, int level) { + return mz_deflateInit2(pStream, level, MZ_DEFLATED, MZ_DEFAULT_WINDOW_BITS, 9, + MZ_DEFAULT_STRATEGY); +} + +int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, + int mem_level, int strategy) { + tdefl_compressor *pComp; + mz_uint comp_flags = + TDEFL_COMPUTE_ADLER32 | + tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy); + + if (!pStream) + return MZ_STREAM_ERROR; + if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || + ((window_bits != MZ_DEFAULT_WINDOW_BITS) && + (-window_bits != MZ_DEFAULT_WINDOW_BITS))) + return MZ_PARAM_ERROR; + + pStream->data_type = 0; + pStream->adler = MZ_ADLER32_INIT; + pStream->msg = NULL; + pStream->reserved = 0; + pStream->total_in = 0; + pStream->total_out = 0; + if (!pStream->zalloc) + pStream->zalloc = miniz_def_alloc_func; + if (!pStream->zfree) + pStream->zfree = miniz_def_free_func; + + pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, + sizeof(tdefl_compressor)); + if (!pComp) + return MZ_MEM_ERROR; + + pStream->state = (struct mz_internal_state *)pComp; + + if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY) { + mz_deflateEnd(pStream); + return MZ_PARAM_ERROR; + } + + return MZ_OK; +} + +int mz_deflateReset(mz_streamp pStream) { + if ((!pStream) || (!pStream->state) || (!pStream->zalloc) || + (!pStream->zfree)) + return MZ_STREAM_ERROR; + pStream->total_in = pStream->total_out = 0; + tdefl_init((tdefl_compressor *)pStream->state, NULL, NULL, + ((tdefl_compressor *)pStream->state)->m_flags); + return MZ_OK; +} + +int mz_deflate(mz_streamp pStream, int flush) { + size_t in_bytes, out_bytes; + mz_ulong orig_total_in, orig_total_out; + int mz_status = MZ_OK; + + if ((!pStream) || (!pStream->state) || (flush < 0) || (flush > MZ_FINISH) || + (!pStream->next_out)) + return MZ_STREAM_ERROR; + if (!pStream->avail_out) + return MZ_BUF_ERROR; + + if (flush == MZ_PARTIAL_FLUSH) + flush = MZ_SYNC_FLUSH; + + if (((tdefl_compressor *)pStream->state)->m_prev_return_status == + TDEFL_STATUS_DONE) + return (flush == MZ_FINISH) ? MZ_STREAM_END : MZ_BUF_ERROR; + + orig_total_in = pStream->total_in; + orig_total_out = pStream->total_out; + for (;;) { + tdefl_status defl_status; + in_bytes = pStream->avail_in; + out_bytes = pStream->avail_out; + + defl_status = tdefl_compress((tdefl_compressor *)pStream->state, + pStream->next_in, &in_bytes, pStream->next_out, + &out_bytes, (tdefl_flush)flush); + pStream->next_in += (mz_uint)in_bytes; + pStream->avail_in -= (mz_uint)in_bytes; + pStream->total_in += (mz_uint)in_bytes; + pStream->adler = tdefl_get_adler32((tdefl_compressor *)pStream->state); + + pStream->next_out += (mz_uint)out_bytes; + pStream->avail_out -= (mz_uint)out_bytes; + pStream->total_out += (mz_uint)out_bytes; + + if (defl_status < 0) { + mz_status = MZ_STREAM_ERROR; + break; + } else if (defl_status == TDEFL_STATUS_DONE) { + mz_status = MZ_STREAM_END; + break; + } else if (!pStream->avail_out) + break; + else if ((!pStream->avail_in) && (flush != MZ_FINISH)) { + if ((flush) || (pStream->total_in != orig_total_in) || + (pStream->total_out != orig_total_out)) + break; + return MZ_BUF_ERROR; /* Can't make forward progress without some input. + */ + } + } + return mz_status; +} + +int mz_deflateEnd(mz_streamp pStream) { + if (!pStream) + return MZ_STREAM_ERROR; + if (pStream->state) { + pStream->zfree(pStream->opaque, pStream->state); + pStream->state = NULL; + } + return MZ_OK; +} + +mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len) { + (void)pStream; + /* This is really over conservative. (And lame, but it's actually pretty + * tricky to compute a true upper bound given the way tdefl's blocking works.) + */ + return MZ_MAX(128 + (source_len * 110) / 100, + 128 + source_len + ((source_len / (31 * 1024)) + 1) * 5); +} + +int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, + const unsigned char *pSource, mz_ulong source_len, int level) { + int status; + mz_stream stream; + memset(&stream, 0, sizeof(stream)); + + /* In case mz_ulong is 64-bits (argh I hate longs). */ + if ((source_len | *pDest_len) > 0xFFFFFFFFU) + return MZ_PARAM_ERROR; + + stream.next_in = pSource; + stream.avail_in = (mz_uint32)source_len; + stream.next_out = pDest; + stream.avail_out = (mz_uint32)*pDest_len; + + status = mz_deflateInit(&stream, level); + if (status != MZ_OK) + return status; + + status = mz_deflate(&stream, MZ_FINISH); + if (status != MZ_STREAM_END) { + mz_deflateEnd(&stream); + return (status == MZ_OK) ? MZ_BUF_ERROR : status; + } + + *pDest_len = stream.total_out; + return mz_deflateEnd(&stream); +} + +int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, + const unsigned char *pSource, mz_ulong source_len) { + return mz_compress2(pDest, pDest_len, pSource, source_len, + MZ_DEFAULT_COMPRESSION); +} + +mz_ulong mz_compressBound(mz_ulong source_len) { + return mz_deflateBound(NULL, source_len); +} + +typedef struct { + tinfl_decompressor m_decomp; + mz_uint m_dict_ofs, m_dict_avail, m_first_call, m_has_flushed; + int m_window_bits; + mz_uint8 m_dict[TINFL_LZ_DICT_SIZE]; + tinfl_status m_last_status; +} inflate_state; + +int mz_inflateInit2(mz_streamp pStream, int window_bits) { + inflate_state *pDecomp; + if (!pStream) + return MZ_STREAM_ERROR; + if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && + (-window_bits != MZ_DEFAULT_WINDOW_BITS)) + return MZ_PARAM_ERROR; + + pStream->data_type = 0; + pStream->adler = 0; + pStream->msg = NULL; + pStream->total_in = 0; + pStream->total_out = 0; + pStream->reserved = 0; + if (!pStream->zalloc) + pStream->zalloc = miniz_def_alloc_func; + if (!pStream->zfree) + pStream->zfree = miniz_def_free_func; + + pDecomp = (inflate_state *)pStream->zalloc(pStream->opaque, 1, + sizeof(inflate_state)); + if (!pDecomp) + return MZ_MEM_ERROR; + + pStream->state = (struct mz_internal_state *)pDecomp; + + tinfl_init(&pDecomp->m_decomp); + pDecomp->m_dict_ofs = 0; + pDecomp->m_dict_avail = 0; + pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT; + pDecomp->m_first_call = 1; + pDecomp->m_has_flushed = 0; + pDecomp->m_window_bits = window_bits; + + return MZ_OK; +} + +int mz_inflateInit(mz_streamp pStream) { + return mz_inflateInit2(pStream, MZ_DEFAULT_WINDOW_BITS); +} + +int mz_inflateReset(mz_streamp pStream) { + inflate_state *pDecomp; + if (!pStream) + return MZ_STREAM_ERROR; + + pStream->data_type = 0; + pStream->adler = 0; + pStream->msg = NULL; + pStream->total_in = 0; + pStream->total_out = 0; + pStream->reserved = 0; + + pDecomp = (inflate_state *)pStream->state; + + tinfl_init(&pDecomp->m_decomp); + pDecomp->m_dict_ofs = 0; + pDecomp->m_dict_avail = 0; + pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT; + pDecomp->m_first_call = 1; + pDecomp->m_has_flushed = 0; + /* pDecomp->m_window_bits = window_bits */; + + return MZ_OK; +} + +int mz_inflate(mz_streamp pStream, int flush) { + inflate_state *pState; + mz_uint n, first_call, decomp_flags = TINFL_FLAG_COMPUTE_ADLER32; + size_t in_bytes, out_bytes, orig_avail_in; + tinfl_status status; + + if ((!pStream) || (!pStream->state)) + return MZ_STREAM_ERROR; + if (flush == MZ_PARTIAL_FLUSH) + flush = MZ_SYNC_FLUSH; + if ((flush) && (flush != MZ_SYNC_FLUSH) && (flush != MZ_FINISH)) + return MZ_STREAM_ERROR; + + pState = (inflate_state *)pStream->state; + if (pState->m_window_bits > 0) + decomp_flags |= TINFL_FLAG_PARSE_ZLIB_HEADER; + orig_avail_in = pStream->avail_in; + + first_call = pState->m_first_call; + pState->m_first_call = 0; + if (pState->m_last_status < 0) + return MZ_DATA_ERROR; + + if (pState->m_has_flushed && (flush != MZ_FINISH)) + return MZ_STREAM_ERROR; + pState->m_has_flushed |= (flush == MZ_FINISH); + + if ((flush == MZ_FINISH) && (first_call)) { + /* MZ_FINISH on the first call implies that the input and output buffers are + * large enough to hold the entire compressed/decompressed file. */ + decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; + in_bytes = pStream->avail_in; + out_bytes = pStream->avail_out; + status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, + pStream->next_out, pStream->next_out, &out_bytes, + decomp_flags); + pState->m_last_status = status; + pStream->next_in += (mz_uint)in_bytes; + pStream->avail_in -= (mz_uint)in_bytes; + pStream->total_in += (mz_uint)in_bytes; + pStream->adler = tinfl_get_adler32(&pState->m_decomp); + pStream->next_out += (mz_uint)out_bytes; + pStream->avail_out -= (mz_uint)out_bytes; + pStream->total_out += (mz_uint)out_bytes; + + if (status < 0) + return MZ_DATA_ERROR; + else if (status != TINFL_STATUS_DONE) { + pState->m_last_status = TINFL_STATUS_FAILED; + return MZ_BUF_ERROR; + } + return MZ_STREAM_END; + } + /* flush != MZ_FINISH then we must assume there's more input. */ + if (flush != MZ_FINISH) + decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; + + if (pState->m_dict_avail) { + n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); + memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); + pStream->next_out += n; + pStream->avail_out -= n; + pStream->total_out += n; + pState->m_dict_avail -= n; + pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); + return ((pState->m_last_status == TINFL_STATUS_DONE) && + (!pState->m_dict_avail)) + ? MZ_STREAM_END + : MZ_OK; + } + + for (;;) { + in_bytes = pStream->avail_in; + out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; + + status = tinfl_decompress( + &pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, + pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); + pState->m_last_status = status; + + pStream->next_in += (mz_uint)in_bytes; + pStream->avail_in -= (mz_uint)in_bytes; + pStream->total_in += (mz_uint)in_bytes; + pStream->adler = tinfl_get_adler32(&pState->m_decomp); + + pState->m_dict_avail = (mz_uint)out_bytes; + + n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); + memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); + pStream->next_out += n; + pStream->avail_out -= n; + pStream->total_out += n; + pState->m_dict_avail -= n; + pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); + + if (status < 0) + return MZ_DATA_ERROR; /* Stream is corrupted (there could be some + uncompressed data left in the output dictionary - + oh well). */ + else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) + return MZ_BUF_ERROR; /* Signal caller that we can't make forward progress + without supplying more input or by setting flush + to MZ_FINISH. */ + else if (flush == MZ_FINISH) { + /* The output buffer MUST be large to hold the remaining uncompressed data + * when flush==MZ_FINISH. */ + if (status == TINFL_STATUS_DONE) + return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; + /* status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's + * at least 1 more byte on the way. If there's no more room left in the + * output buffer then something is wrong. */ + else if (!pStream->avail_out) + return MZ_BUF_ERROR; + } else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || + (!pStream->avail_out) || (pState->m_dict_avail)) + break; + } + + return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) + ? MZ_STREAM_END + : MZ_OK; +} + +int mz_inflateEnd(mz_streamp pStream) { + if (!pStream) + return MZ_STREAM_ERROR; + if (pStream->state) { + pStream->zfree(pStream->opaque, pStream->state); + pStream->state = NULL; + } + return MZ_OK; +} +int mz_uncompress2(unsigned char *pDest, mz_ulong *pDest_len, + const unsigned char *pSource, mz_ulong *pSource_len) { + mz_stream stream; + int status; + memset(&stream, 0, sizeof(stream)); + + /* In case mz_ulong is 64-bits (argh I hate longs). */ + if ((*pSource_len | *pDest_len) > 0xFFFFFFFFU) + return MZ_PARAM_ERROR; + + stream.next_in = pSource; + stream.avail_in = (mz_uint32)*pSource_len; + stream.next_out = pDest; + stream.avail_out = (mz_uint32)*pDest_len; + + status = mz_inflateInit(&stream); + if (status != MZ_OK) + return status; + + status = mz_inflate(&stream, MZ_FINISH); + *pSource_len = *pSource_len - stream.avail_in; + if (status != MZ_STREAM_END) { + mz_inflateEnd(&stream); + return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR + : status; + } + *pDest_len = stream.total_out; + + return mz_inflateEnd(&stream); +} + +int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, + const unsigned char *pSource, mz_ulong source_len) { + return mz_uncompress2(pDest, pDest_len, pSource, &source_len); +} + +const char *mz_error(int err) { + static struct { + int m_err; + const char *m_pDesc; + } s_error_descs[] = {{MZ_OK, ""}, + {MZ_STREAM_END, "stream end"}, + {MZ_NEED_DICT, "need dictionary"}, + {MZ_ERRNO, "file error"}, + {MZ_STREAM_ERROR, "stream error"}, + {MZ_DATA_ERROR, "data error"}, + {MZ_MEM_ERROR, "out of memory"}, + {MZ_BUF_ERROR, "buf error"}, + {MZ_VERSION_ERROR, "version error"}, + {MZ_PARAM_ERROR, "parameter error"}}; + mz_uint i; + for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) + if (s_error_descs[i].m_err == err) + return s_error_descs[i].m_pDesc; + return NULL; +} + +#endif /*MINIZ_NO_ZLIB_APIS */ + +#ifdef __cplusplus +} +#endif + +/* + This is free and unencumbered software released into the public domain. + + Anyone is free to copy, modify, publish, use, compile, sell, or + distribute this software, either in source code form or as a compiled + binary, for any purpose, commercial or non-commercial, and by any + means. + + In jurisdictions that recognize copyright laws, the author or authors + of this software dedicate any and all copyright interest in the + software to the public domain. We make this dedication for the benefit + of the public at large and to the detriment of our heirs and + successors. We intend this dedication to be an overt act of + relinquishment in perpetuity of all present and future rights to this + software under copyright law. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + For more information, please refer to +*/ +/************************************************************************** + * + * Copyright 2013-2014 RAD Game Tools and Valve Software + * Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + **************************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + +/* ------------------- Low-level Compression (independent from all decompression + * API's) */ + +/* Purposely making these tables static for faster init and thread safety. */ +static const mz_uint16 s_tdefl_len_sym[256] = { + 257, 258, 259, 260, 261, 262, 263, 264, 265, 265, 266, 266, 267, 267, 268, + 268, 269, 269, 269, 269, 270, 270, 270, 270, 271, 271, 271, 271, 272, 272, + 272, 272, 273, 273, 273, 273, 273, 273, 273, 273, 274, 274, 274, 274, 274, + 274, 274, 274, 275, 275, 275, 275, 275, 275, 275, 275, 276, 276, 276, 276, + 276, 276, 276, 276, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, + 277, 277, 277, 277, 277, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + 278, 278, 278, 278, 278, 278, 279, 279, 279, 279, 279, 279, 279, 279, 279, + 279, 279, 279, 279, 279, 279, 279, 280, 280, 280, 280, 280, 280, 280, 280, + 280, 280, 280, 280, 280, 280, 280, 280, 281, 281, 281, 281, 281, 281, 281, + 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 282, 282, 282, 282, 282, + 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, + 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 285}; + +static const mz_uint8 s_tdefl_len_extra[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0}; + +static const mz_uint8 s_tdefl_small_dist_sym[512] = { + 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17}; + +static const mz_uint8 s_tdefl_small_dist_extra[512] = { + 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}; + +static const mz_uint8 s_tdefl_large_dist_sym[128] = { + 0, 0, 18, 19, 20, 20, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, + 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29}; + +static const mz_uint8 s_tdefl_large_dist_extra[128] = { + 0, 0, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13}; + +/* Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted + * values. */ +typedef struct { + mz_uint16 m_key, m_sym_index; +} tdefl_sym_freq; +static tdefl_sym_freq *tdefl_radix_sort_syms(mz_uint num_syms, + tdefl_sym_freq *pSyms0, + tdefl_sym_freq *pSyms1) { + mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; + tdefl_sym_freq *pCur_syms = pSyms0, *pNew_syms = pSyms1; + MZ_CLEAR_OBJ(hist); + for (i = 0; i < num_syms; i++) { + mz_uint freq = pSyms0[i].m_key; + hist[freq & 0xFF]++; + hist[256 + ((freq >> 8) & 0xFF)]++; + } + while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) + total_passes--; + for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) { + const mz_uint32 *pHist = &hist[pass << 8]; + mz_uint offsets[256], cur_ofs = 0; + for (i = 0; i < 256; i++) { + offsets[i] = cur_ofs; + cur_ofs += pHist[i]; + } + for (i = 0; i < num_syms; i++) + pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = + pCur_syms[i]; + { + tdefl_sym_freq *t = pCur_syms; + pCur_syms = pNew_syms; + pNew_syms = t; + } + } + return pCur_syms; +} + +/* tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, + * alistair@cs.mu.oz.au, Jyrki Katajainen, jyrki@diku.dk, November 1996. */ +static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) { + int root, leaf, next, avbl, used, dpth; + if (n == 0) + return; + else if (n == 1) { + A[0].m_key = 1; + return; + } + A[0].m_key += A[1].m_key; + root = 0; + leaf = 2; + for (next = 1; next < n - 1; next++) { + if (leaf >= n || A[root].m_key < A[leaf].m_key) { + A[next].m_key = A[root].m_key; + A[root++].m_key = (mz_uint16)next; + } else + A[next].m_key = A[leaf++].m_key; + if (leaf >= n || (root < next && A[root].m_key < A[leaf].m_key)) { + A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); + A[root++].m_key = (mz_uint16)next; + } else + A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); + } + A[n - 2].m_key = 0; + for (next = n - 3; next >= 0; next--) + A[next].m_key = A[A[next].m_key].m_key + 1; + avbl = 1; + used = dpth = 0; + root = n - 2; + next = n - 1; + while (avbl > 0) { + while (root >= 0 && (int)A[root].m_key == dpth) { + used++; + root--; + } + while (avbl > used) { + A[next--].m_key = (mz_uint16)(dpth); + avbl--; + } + avbl = 2 * used; + dpth++; + used = 0; + } +} + +/* Limits canonical Huffman code table's max code size. */ +enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; +static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, + int code_list_len, + int max_code_size) { + int i; + mz_uint32 total = 0; + if (code_list_len <= 1) + return; + for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) + pNum_codes[max_code_size] += pNum_codes[i]; + for (i = max_code_size; i > 0; i--) + total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); + while (total != (1UL << max_code_size)) { + pNum_codes[max_code_size]--; + for (i = max_code_size - 1; i > 0; i--) + if (pNum_codes[i]) { + pNum_codes[i]--; + pNum_codes[i + 1] += 2; + break; + } + total--; + } +} + +static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, + int table_len, int code_size_limit, + int static_table) { + int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; + mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; + MZ_CLEAR_OBJ(num_codes); + if (static_table) { + for (i = 0; i < table_len; i++) + num_codes[d->m_huff_code_sizes[table_num][i]]++; + } else { + tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], + *pSyms; + int num_used_syms = 0; + const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; + for (i = 0; i < table_len; i++) + if (pSym_count[i]) { + syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; + syms0[num_used_syms++].m_sym_index = (mz_uint16)i; + } + + pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); + tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); + + for (i = 0; i < num_used_syms; i++) + num_codes[pSyms[i].m_key]++; + + tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, + code_size_limit); + + MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); + MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); + for (i = 1, j = num_used_syms; i <= code_size_limit; i++) + for (l = num_codes[i]; l > 0; l--) + d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); + } + + next_code[1] = 0; + for (j = 0, i = 2; i <= code_size_limit; i++) + next_code[i] = j = ((j + num_codes[i - 1]) << 1); + + for (i = 0; i < table_len; i++) { + mz_uint rev_code = 0, code, code_size; + if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) + continue; + code = next_code[code_size]++; + for (l = code_size; l > 0; l--, code >>= 1) + rev_code = (rev_code << 1) | (code & 1); + d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; + } +} + +#define TDEFL_PUT_BITS(b, l) \ + do { \ + mz_uint bits = b; \ + mz_uint len = l; \ + MZ_ASSERT(bits <= ((1U << len) - 1U)); \ + d->m_bit_buffer |= (bits << d->m_bits_in); \ + d->m_bits_in += len; \ + while (d->m_bits_in >= 8) { \ + if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ + *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ + d->m_bit_buffer >>= 8; \ + d->m_bits_in -= 8; \ + } \ + } \ + MZ_MACRO_END + +#define TDEFL_RLE_PREV_CODE_SIZE() \ + { \ + if (rle_repeat_count) { \ + if (rle_repeat_count < 3) { \ + d->m_huff_count[2][prev_code_size] = \ + (mz_uint16)(d->m_huff_count[2][prev_code_size] + \ + rle_repeat_count); \ + while (rle_repeat_count--) \ + packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ + } else { \ + d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); \ + packed_code_sizes[num_packed_code_sizes++] = 16; \ + packed_code_sizes[num_packed_code_sizes++] = \ + (mz_uint8)(rle_repeat_count - 3); \ + } \ + rle_repeat_count = 0; \ + } \ + } + +#define TDEFL_RLE_ZERO_CODE_SIZE() \ + { \ + if (rle_z_count) { \ + if (rle_z_count < 3) { \ + d->m_huff_count[2][0] = \ + (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); \ + while (rle_z_count--) \ + packed_code_sizes[num_packed_code_sizes++] = 0; \ + } else if (rle_z_count <= 10) { \ + d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); \ + packed_code_sizes[num_packed_code_sizes++] = 17; \ + packed_code_sizes[num_packed_code_sizes++] = \ + (mz_uint8)(rle_z_count - 3); \ + } else { \ + d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); \ + packed_code_sizes[num_packed_code_sizes++] = 18; \ + packed_code_sizes[num_packed_code_sizes++] = \ + (mz_uint8)(rle_z_count - 11); \ + } \ + rle_z_count = 0; \ + } \ + } + +static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + +static void tdefl_start_dynamic_block(tdefl_compressor *d) { + int num_lit_codes, num_dist_codes, num_bit_lengths; + mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, + rle_repeat_count, packed_code_sizes_index; + mz_uint8 + code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], + packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], + prev_code_size = 0xFF; + + d->m_huff_count[0][256] = 1; + + tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE); + tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE); + + for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) + if (d->m_huff_code_sizes[0][num_lit_codes - 1]) + break; + for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) + if (d->m_huff_code_sizes[1][num_dist_codes - 1]) + break; + + memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes); + memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], + num_dist_codes); + total_code_sizes_to_pack = num_lit_codes + num_dist_codes; + num_packed_code_sizes = 0; + rle_z_count = 0; + rle_repeat_count = 0; + + memset(&d->m_huff_count[2][0], 0, + sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2); + for (i = 0; i < total_code_sizes_to_pack; i++) { + mz_uint8 code_size = code_sizes_to_pack[i]; + if (!code_size) { + TDEFL_RLE_PREV_CODE_SIZE(); + if (++rle_z_count == 138) { + TDEFL_RLE_ZERO_CODE_SIZE(); + } + } else { + TDEFL_RLE_ZERO_CODE_SIZE(); + if (code_size != prev_code_size) { + TDEFL_RLE_PREV_CODE_SIZE(); + d->m_huff_count[2][code_size] = + (mz_uint16)(d->m_huff_count[2][code_size] + 1); + packed_code_sizes[num_packed_code_sizes++] = code_size; + } else if (++rle_repeat_count == 6) { + TDEFL_RLE_PREV_CODE_SIZE(); + } + } + prev_code_size = code_size; + } + if (rle_repeat_count) { + TDEFL_RLE_PREV_CODE_SIZE(); + } else { + TDEFL_RLE_ZERO_CODE_SIZE(); + } + + tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE); + + TDEFL_PUT_BITS(2, 2); + + TDEFL_PUT_BITS(num_lit_codes - 257, 5); + TDEFL_PUT_BITS(num_dist_codes - 1, 5); + + for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) + if (d->m_huff_code_sizes + [2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) + break; + num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); + TDEFL_PUT_BITS(num_bit_lengths - 4, 4); + for (i = 0; (int)i < num_bit_lengths; i++) + TDEFL_PUT_BITS( + d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); + + for (packed_code_sizes_index = 0; + packed_code_sizes_index < num_packed_code_sizes;) { + mz_uint code = packed_code_sizes[packed_code_sizes_index++]; + MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); + TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); + if (code >= 16) + TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], + "\02\03\07"[code - 16]); + } +} + +static void tdefl_start_static_block(tdefl_compressor *d) { + mz_uint i; + mz_uint8 *p = &d->m_huff_code_sizes[0][0]; + + for (i = 0; i <= 143; ++i) + *p++ = 8; + for (; i <= 255; ++i) + *p++ = 9; + for (; i <= 279; ++i) + *p++ = 7; + for (; i <= 287; ++i) + *p++ = 8; + + memset(d->m_huff_code_sizes[1], 5, 32); + + tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); + tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); + + TDEFL_PUT_BITS(1, 2); +} + +static const mz_uint mz_bitmasks[17] = { + 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, + 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF}; + +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && \ + MINIZ_HAS_64BIT_REGISTERS +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) { + mz_uint flags; + mz_uint8 *pLZ_codes; + mz_uint8 *pOutput_buf = d->m_pOutput_buf; + mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; + mz_uint64 bit_buffer = d->m_bit_buffer; + mz_uint bits_in = d->m_bits_in; + +#define TDEFL_PUT_BITS_FAST(b, l) \ + { \ + bit_buffer |= (((mz_uint64)(b)) << bits_in); \ + bits_in += (l); \ + } + + flags = 1; + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; + flags >>= 1) { + if (flags == 1) + flags = *pLZ_codes++ | 0x100; + + if (flags & 1) { + mz_uint s0, s1, n0, n1, sym, num_extra_bits; + mz_uint match_len = pLZ_codes[0], + match_dist = *(const mz_uint16 *)(pLZ_codes + 1); + pLZ_codes += 3; + + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], + d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); + TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], + s_tdefl_len_extra[match_len]); + + /* This sequence coaxes MSVC into using cmov's vs. jmp's. */ + s0 = s_tdefl_small_dist_sym[match_dist & 511]; + n0 = s_tdefl_small_dist_extra[match_dist & 511]; + s1 = s_tdefl_large_dist_sym[match_dist >> 8]; + n1 = s_tdefl_large_dist_extra[match_dist >> 8]; + sym = (match_dist < 512) ? s0 : s1; + num_extra_bits = (match_dist < 512) ? n0 : n1; + + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); + TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], + d->m_huff_code_sizes[1][sym]); + TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], + num_extra_bits); + } else { + mz_uint lit = *pLZ_codes++; + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], + d->m_huff_code_sizes[0][lit]); + + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) { + flags >>= 1; + lit = *pLZ_codes++; + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], + d->m_huff_code_sizes[0][lit]); + + if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) { + flags >>= 1; + lit = *pLZ_codes++; + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); + TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], + d->m_huff_code_sizes[0][lit]); + } + } + } + + if (pOutput_buf >= d->m_pOutput_buf_end) + return MZ_FALSE; + + *(mz_uint64 *)pOutput_buf = bit_buffer; + pOutput_buf += (bits_in >> 3); + bit_buffer >>= (bits_in & ~7); + bits_in &= 7; + } + +#undef TDEFL_PUT_BITS_FAST + + d->m_pOutput_buf = pOutput_buf; + d->m_bits_in = 0; + d->m_bit_buffer = 0; + + while (bits_in) { + mz_uint32 n = MZ_MIN(bits_in, 16); + TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); + bit_buffer >>= n; + bits_in -= n; + } + + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); + + return (d->m_pOutput_buf < d->m_pOutput_buf_end); +} +#else +static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) { + mz_uint flags; + mz_uint8 *pLZ_codes; + + flags = 1; + for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; + flags >>= 1) { + if (flags == 1) + flags = *pLZ_codes++ | 0x100; + if (flags & 1) { + mz_uint sym, num_extra_bits; + mz_uint match_len = pLZ_codes[0], + match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); + pLZ_codes += 3; + + MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); + TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], + d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); + TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], + s_tdefl_len_extra[match_len]); + + if (match_dist < 512) { + sym = s_tdefl_small_dist_sym[match_dist]; + num_extra_bits = s_tdefl_small_dist_extra[match_dist]; + } else { + sym = s_tdefl_large_dist_sym[match_dist >> 8]; + num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; + } + MZ_ASSERT(d->m_huff_code_sizes[1][sym]); + TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); + TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); + } else { + mz_uint lit = *pLZ_codes++; + MZ_ASSERT(d->m_huff_code_sizes[0][lit]); + TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); + } + } + + TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); + + return (d->m_pOutput_buf < d->m_pOutput_buf_end); +} +#endif /* MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && \ + MINIZ_HAS_64BIT_REGISTERS */ + +static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) { + if (static_block) + tdefl_start_static_block(d); + else + tdefl_start_dynamic_block(d); + return tdefl_compress_lz_codes(d); +} + +static int tdefl_flush_block(tdefl_compressor *d, int flush) { + mz_uint saved_bit_buf, saved_bits_in; + mz_uint8 *pSaved_output_buf; + mz_bool comp_block_succeeded = MZ_FALSE; + int n, use_raw_block = + ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && + (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; + mz_uint8 *pOutput_buf_start = + ((d->m_pPut_buf_func == NULL) && + ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) + ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) + : d->m_output_buf; + + d->m_pOutput_buf = pOutput_buf_start; + d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; + + MZ_ASSERT(!d->m_output_flush_remaining); + d->m_output_flush_ofs = 0; + d->m_output_flush_remaining = 0; + + *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); + d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); + + if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) { + TDEFL_PUT_BITS(0x78, 8); + TDEFL_PUT_BITS(0x01, 8); + } + + TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); + + pSaved_output_buf = d->m_pOutput_buf; + saved_bit_buf = d->m_bit_buffer; + saved_bits_in = d->m_bits_in; + + if (!use_raw_block) + comp_block_succeeded = + tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || + (d->m_total_lz_bytes < 48)); + + /* If the block gets expanded, forget the current contents of the output + * buffer and send a raw block instead. */ + if (((use_raw_block) || + ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= + d->m_total_lz_bytes))) && + ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size)) { + mz_uint i; + d->m_pOutput_buf = pSaved_output_buf; + d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; + TDEFL_PUT_BITS(0, 2); + if (d->m_bits_in) { + TDEFL_PUT_BITS(0, 8 - d->m_bits_in); + } + for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF) { + TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16); + } + for (i = 0; i < d->m_total_lz_bytes; ++i) { + TDEFL_PUT_BITS( + d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], + 8); + } + } + /* Check for the extremely unlikely (if not impossible) case of the compressed + block not fitting into the output buffer when using dynamic codes. */ + else if (!comp_block_succeeded) { + d->m_pOutput_buf = pSaved_output_buf; + d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; + tdefl_compress_block(d, MZ_TRUE); + } + + if (flush) { + if (flush == TDEFL_FINISH) { + if (d->m_bits_in) { + TDEFL_PUT_BITS(0, 8 - d->m_bits_in); + } + if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { + mz_uint i, a = d->m_adler32; + for (i = 0; i < 4; i++) { + TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); + a <<= 8; + } + } + } else { + mz_uint i, z = 0; + TDEFL_PUT_BITS(0, 3); + if (d->m_bits_in) { + TDEFL_PUT_BITS(0, 8 - d->m_bits_in); + } + for (i = 2; i; --i, z ^= 0xFFFF) { + TDEFL_PUT_BITS(z & 0xFFFF, 16); + } + } + } + + MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end); + + memset(&d->m_huff_count[0][0], 0, + sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); + memset(&d->m_huff_count[1][0], 0, + sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); + + d->m_pLZ_code_buf = d->m_lz_code_buf + 1; + d->m_pLZ_flags = d->m_lz_code_buf; + d->m_num_flags_left = 8; + d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; + d->m_total_lz_bytes = 0; + d->m_block_index++; + + if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0) { + if (d->m_pPut_buf_func) { + *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; + if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user)) + return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED); + } else if (pOutput_buf_start == d->m_output_buf) { + int bytes_to_copy = (int)MZ_MIN( + (size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs)); + memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, + bytes_to_copy); + d->m_out_buf_ofs += bytes_to_copy; + if ((n -= bytes_to_copy) != 0) { + d->m_output_flush_ofs = bytes_to_copy; + d->m_output_flush_remaining = n; + } + } else { + d->m_out_buf_ofs += n; + } + } + + return d->m_output_flush_remaining; +} + +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES +#ifdef MINIZ_UNALIGNED_USE_MEMCPY +static mz_uint16 TDEFL_READ_UNALIGNED_WORD(const mz_uint8 *p) { + mz_uint16 ret; + memcpy(&ret, p, sizeof(mz_uint16)); + return ret; +} +static mz_uint16 TDEFL_READ_UNALIGNED_WORD2(const mz_uint16 *p) { + mz_uint16 ret; + memcpy(&ret, p, sizeof(mz_uint16)); + return ret; +} +#else +#define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16 *)(p) +#define TDEFL_READ_UNALIGNED_WORD2(p) *(const mz_uint16 *)(p) +#endif +static MZ_FORCEINLINE void +tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, + mz_uint max_match_len, mz_uint *pMatch_dist, + mz_uint *pMatch_len) { + mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, + match_len = *pMatch_len, probe_pos = pos, next_probe_pos, + probe_len; + mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; + const mz_uint16 *s = (const mz_uint16 *)(d->m_dict + pos), *p, *q; + mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), + s01 = TDEFL_READ_UNALIGNED_WORD2(s); + MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); + if (max_match_len <= match_len) + return; + for (;;) { + for (;;) { + if (--num_probes_left == 0) + return; +#define TDEFL_PROBE \ + next_probe_pos = d->m_next[probe_pos]; \ + if ((!next_probe_pos) || \ + ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) \ + return; \ + probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ + if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) \ + break; + TDEFL_PROBE; + TDEFL_PROBE; + TDEFL_PROBE; + } + if (!dist) + break; + q = (const mz_uint16 *)(d->m_dict + probe_pos); + if (TDEFL_READ_UNALIGNED_WORD2(q) != s01) + continue; + p = s; + probe_len = 32; + do { + } while ( + (TDEFL_READ_UNALIGNED_WORD2(++p) == TDEFL_READ_UNALIGNED_WORD2(++q)) && + (TDEFL_READ_UNALIGNED_WORD2(++p) == TDEFL_READ_UNALIGNED_WORD2(++q)) && + (TDEFL_READ_UNALIGNED_WORD2(++p) == TDEFL_READ_UNALIGNED_WORD2(++q)) && + (TDEFL_READ_UNALIGNED_WORD2(++p) == TDEFL_READ_UNALIGNED_WORD2(++q)) && + (--probe_len > 0)); + if (!probe_len) { + *pMatch_dist = dist; + *pMatch_len = MZ_MIN(max_match_len, (mz_uint)TDEFL_MAX_MATCH_LEN); + break; + } else if ((probe_len = ((mz_uint)(p - s) * 2) + + (mz_uint)(*(const mz_uint8 *)p == + *(const mz_uint8 *)q)) > match_len) { + *pMatch_dist = dist; + if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == + max_match_len) + break; + c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]); + } + } +} +#else +static MZ_FORCEINLINE void +tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, + mz_uint max_match_len, mz_uint *pMatch_dist, + mz_uint *pMatch_len) { + mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, + match_len = *pMatch_len, probe_pos = pos, next_probe_pos, + probe_len; + mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; + const mz_uint8 *s = d->m_dict + pos, *p, *q; + mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1]; + MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); + if (max_match_len <= match_len) + return; + for (;;) { + for (;;) { + if (--num_probes_left == 0) + return; +#define TDEFL_PROBE \ + next_probe_pos = d->m_next[probe_pos]; \ + if ((!next_probe_pos) || \ + ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) \ + return; \ + probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ + if ((d->m_dict[probe_pos + match_len] == c0) && \ + (d->m_dict[probe_pos + match_len - 1] == c1)) \ + break; + TDEFL_PROBE; + TDEFL_PROBE; + TDEFL_PROBE; + } + if (!dist) + break; + p = s; + q = d->m_dict + probe_pos; + for (probe_len = 0; probe_len < max_match_len; probe_len++) + if (*p++ != *q++) + break; + if (probe_len > match_len) { + *pMatch_dist = dist; + if ((*pMatch_len = match_len = probe_len) == max_match_len) + return; + c0 = d->m_dict[pos + match_len]; + c1 = d->m_dict[pos + match_len - 1]; + } + } +} +#endif /* #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES */ + +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN +#ifdef MINIZ_UNALIGNED_USE_MEMCPY +static mz_uint32 TDEFL_READ_UNALIGNED_WORD32(const mz_uint8 *p) { + mz_uint32 ret; + memcpy(&ret, p, sizeof(mz_uint32)); + return ret; +} +#else +#define TDEFL_READ_UNALIGNED_WORD32(p) *(const mz_uint32 *)(p) +#endif +static mz_bool tdefl_compress_fast(tdefl_compressor *d) { + /* Faster, minimally featured LZRW1-style match+parse loop with better + * register utilization. Intended for applications where raw throughput is + * valued more highly than ratio. */ + mz_uint lookahead_pos = d->m_lookahead_pos, + lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, + total_lz_bytes = d->m_total_lz_bytes, + num_flags_left = d->m_num_flags_left; + mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags; + mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; + + while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size))) { + const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096; + mz_uint dst_pos = + (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK; + mz_uint num_bytes_to_process = (mz_uint)MZ_MIN( + d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size); + d->m_src_buf_left -= num_bytes_to_process; + lookahead_size += num_bytes_to_process; + + while (num_bytes_to_process) { + mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process); + memcpy(d->m_dict + dst_pos, d->m_pSrc, n); + if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) + memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, + MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos)); + d->m_pSrc += n; + dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK; + num_bytes_to_process -= n; + } + + dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size); + if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) + break; + + while (lookahead_size >= 4) { + mz_uint cur_match_dist, cur_match_len = 1; + mz_uint8 *pCur_dict = d->m_dict + cur_pos; + mz_uint first_trigram = TDEFL_READ_UNALIGNED_WORD32(pCur_dict) & 0xFFFFFF; + mz_uint hash = + (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & + TDEFL_LEVEL1_HASH_SIZE_MASK; + mz_uint probe_pos = d->m_hash[hash]; + d->m_hash[hash] = (mz_uint16)lookahead_pos; + + if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= + dict_size) && + ((TDEFL_READ_UNALIGNED_WORD32( + d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & + 0xFFFFFF) == first_trigram)) { + const mz_uint16 *p = (const mz_uint16 *)pCur_dict; + const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos); + mz_uint32 probe_len = 32; + do { + } while ((TDEFL_READ_UNALIGNED_WORD2(++p) == + TDEFL_READ_UNALIGNED_WORD2(++q)) && + (TDEFL_READ_UNALIGNED_WORD2(++p) == + TDEFL_READ_UNALIGNED_WORD2(++q)) && + (TDEFL_READ_UNALIGNED_WORD2(++p) == + TDEFL_READ_UNALIGNED_WORD2(++q)) && + (TDEFL_READ_UNALIGNED_WORD2(++p) == + TDEFL_READ_UNALIGNED_WORD2(++q)) && + (--probe_len > 0)); + cur_match_len = ((mz_uint)(p - (const mz_uint16 *)pCur_dict) * 2) + + (mz_uint)(*(const mz_uint8 *)p == *(const mz_uint8 *)q); + if (!probe_len) + cur_match_len = cur_match_dist ? TDEFL_MAX_MATCH_LEN : 0; + + if ((cur_match_len < TDEFL_MIN_MATCH_LEN) || + ((cur_match_len == TDEFL_MIN_MATCH_LEN) && + (cur_match_dist >= 8U * 1024U))) { + cur_match_len = 1; + *pLZ_code_buf++ = (mz_uint8)first_trigram; + *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); + d->m_huff_count[0][(mz_uint8)first_trigram]++; + } else { + mz_uint32 s0, s1; + cur_match_len = MZ_MIN(cur_match_len, lookahead_size); + + MZ_ASSERT((cur_match_len >= TDEFL_MIN_MATCH_LEN) && + (cur_match_dist >= 1) && + (cur_match_dist <= TDEFL_LZ_DICT_SIZE)); + + cur_match_dist--; + + pLZ_code_buf[0] = (mz_uint8)(cur_match_len - TDEFL_MIN_MATCH_LEN); +#ifdef MINIZ_UNALIGNED_USE_MEMCPY + memcpy(&pLZ_code_buf[1], &cur_match_dist, sizeof(cur_match_dist)); +#else + *(mz_uint16 *)(&pLZ_code_buf[1]) = (mz_uint16)cur_match_dist; +#endif + pLZ_code_buf += 3; + *pLZ_flags = (mz_uint8)((*pLZ_flags >> 1) | 0x80); + + s0 = s_tdefl_small_dist_sym[cur_match_dist & 511]; + s1 = s_tdefl_large_dist_sym[cur_match_dist >> 8]; + d->m_huff_count[1][(cur_match_dist < 512) ? s0 : s1]++; + + d->m_huff_count[0][s_tdefl_len_sym[cur_match_len - + TDEFL_MIN_MATCH_LEN]]++; + } + } else { + *pLZ_code_buf++ = (mz_uint8)first_trigram; + *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); + d->m_huff_count[0][(mz_uint8)first_trigram]++; + } + + if (--num_flags_left == 0) { + num_flags_left = 8; + pLZ_flags = pLZ_code_buf++; + } + + total_lz_bytes += cur_match_len; + lookahead_pos += cur_match_len; + dict_size = + MZ_MIN(dict_size + cur_match_len, (mz_uint)TDEFL_LZ_DICT_SIZE); + cur_pos = (cur_pos + cur_match_len) & TDEFL_LZ_DICT_SIZE_MASK; + MZ_ASSERT(lookahead_size >= cur_match_len); + lookahead_size -= cur_match_len; + + if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) { + int n; + d->m_lookahead_pos = lookahead_pos; + d->m_lookahead_size = lookahead_size; + d->m_dict_size = dict_size; + d->m_total_lz_bytes = total_lz_bytes; + d->m_pLZ_code_buf = pLZ_code_buf; + d->m_pLZ_flags = pLZ_flags; + d->m_num_flags_left = num_flags_left; + if ((n = tdefl_flush_block(d, 0)) != 0) + return (n < 0) ? MZ_FALSE : MZ_TRUE; + total_lz_bytes = d->m_total_lz_bytes; + pLZ_code_buf = d->m_pLZ_code_buf; + pLZ_flags = d->m_pLZ_flags; + num_flags_left = d->m_num_flags_left; + } + } + + while (lookahead_size) { + mz_uint8 lit = d->m_dict[cur_pos]; + + total_lz_bytes++; + *pLZ_code_buf++ = lit; + *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); + if (--num_flags_left == 0) { + num_flags_left = 8; + pLZ_flags = pLZ_code_buf++; + } + + d->m_huff_count[0][lit]++; + + lookahead_pos++; + dict_size = MZ_MIN(dict_size + 1, (mz_uint)TDEFL_LZ_DICT_SIZE); + cur_pos = (cur_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK; + lookahead_size--; + + if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) { + int n; + d->m_lookahead_pos = lookahead_pos; + d->m_lookahead_size = lookahead_size; + d->m_dict_size = dict_size; + d->m_total_lz_bytes = total_lz_bytes; + d->m_pLZ_code_buf = pLZ_code_buf; + d->m_pLZ_flags = pLZ_flags; + d->m_num_flags_left = num_flags_left; + if ((n = tdefl_flush_block(d, 0)) != 0) + return (n < 0) ? MZ_FALSE : MZ_TRUE; + total_lz_bytes = d->m_total_lz_bytes; + pLZ_code_buf = d->m_pLZ_code_buf; + pLZ_flags = d->m_pLZ_flags; + num_flags_left = d->m_num_flags_left; + } + } + } + + d->m_lookahead_pos = lookahead_pos; + d->m_lookahead_size = lookahead_size; + d->m_dict_size = dict_size; + d->m_total_lz_bytes = total_lz_bytes; + d->m_pLZ_code_buf = pLZ_code_buf; + d->m_pLZ_flags = pLZ_flags; + d->m_num_flags_left = num_flags_left; + return MZ_TRUE; +} +#endif /* MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN */ + +static MZ_FORCEINLINE void tdefl_record_literal(tdefl_compressor *d, + mz_uint8 lit) { + d->m_total_lz_bytes++; + *d->m_pLZ_code_buf++ = lit; + *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1); + if (--d->m_num_flags_left == 0) { + d->m_num_flags_left = 8; + d->m_pLZ_flags = d->m_pLZ_code_buf++; + } + d->m_huff_count[0][lit]++; +} + +static MZ_FORCEINLINE void +tdefl_record_match(tdefl_compressor *d, mz_uint match_len, mz_uint match_dist) { + mz_uint32 s0, s1; + + MZ_ASSERT((match_len >= TDEFL_MIN_MATCH_LEN) && (match_dist >= 1) && + (match_dist <= TDEFL_LZ_DICT_SIZE)); + + d->m_total_lz_bytes += match_len; + + d->m_pLZ_code_buf[0] = (mz_uint8)(match_len - TDEFL_MIN_MATCH_LEN); + + match_dist -= 1; + d->m_pLZ_code_buf[1] = (mz_uint8)(match_dist & 0xFF); + d->m_pLZ_code_buf[2] = (mz_uint8)(match_dist >> 8); + d->m_pLZ_code_buf += 3; + + *d->m_pLZ_flags = (mz_uint8)((*d->m_pLZ_flags >> 1) | 0x80); + if (--d->m_num_flags_left == 0) { + d->m_num_flags_left = 8; + d->m_pLZ_flags = d->m_pLZ_code_buf++; + } + + s0 = s_tdefl_small_dist_sym[match_dist & 511]; + s1 = s_tdefl_large_dist_sym[(match_dist >> 8) & 127]; + d->m_huff_count[1][(match_dist < 512) ? s0 : s1]++; + d->m_huff_count[0][s_tdefl_len_sym[match_len - TDEFL_MIN_MATCH_LEN]]++; +} + +static mz_bool tdefl_compress_normal(tdefl_compressor *d) { + const mz_uint8 *pSrc = d->m_pSrc; + size_t src_buf_left = d->m_src_buf_left; + tdefl_flush flush = d->m_flush; + + while ((src_buf_left) || ((flush) && (d->m_lookahead_size))) { + mz_uint len_to_move, cur_match_dist, cur_match_len, cur_pos; + /* Update dictionary and hash chains. Keeps the lookahead size equal to + * TDEFL_MAX_MATCH_LEN. */ + if ((d->m_lookahead_size + d->m_dict_size) >= (TDEFL_MIN_MATCH_LEN - 1)) { + mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & + TDEFL_LZ_DICT_SIZE_MASK, + ins_pos = d->m_lookahead_pos + d->m_lookahead_size - 2; + mz_uint hash = (d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] + << TDEFL_LZ_HASH_SHIFT) ^ + d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK]; + mz_uint num_bytes_to_process = (mz_uint)MZ_MIN( + src_buf_left, TDEFL_MAX_MATCH_LEN - d->m_lookahead_size); + const mz_uint8 *pSrc_end = pSrc + num_bytes_to_process; + src_buf_left -= num_bytes_to_process; + d->m_lookahead_size += num_bytes_to_process; + while (pSrc != pSrc_end) { + mz_uint8 c = *pSrc++; + d->m_dict[dst_pos] = c; + if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) + d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c; + hash = ((hash << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1); + d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; + d->m_hash[hash] = (mz_uint16)(ins_pos); + dst_pos = (dst_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK; + ins_pos++; + } + } else { + while ((src_buf_left) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN)) { + mz_uint8 c = *pSrc++; + mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & + TDEFL_LZ_DICT_SIZE_MASK; + src_buf_left--; + d->m_dict[dst_pos] = c; + if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) + d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c; + if ((++d->m_lookahead_size + d->m_dict_size) >= TDEFL_MIN_MATCH_LEN) { + mz_uint ins_pos = d->m_lookahead_pos + (d->m_lookahead_size - 1) - 2; + mz_uint hash = ((d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] + << (TDEFL_LZ_HASH_SHIFT * 2)) ^ + (d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK] + << TDEFL_LZ_HASH_SHIFT) ^ + c) & + (TDEFL_LZ_HASH_SIZE - 1); + d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; + d->m_hash[hash] = (mz_uint16)(ins_pos); + } + } + } + d->m_dict_size = + MZ_MIN(TDEFL_LZ_DICT_SIZE - d->m_lookahead_size, d->m_dict_size); + if ((!flush) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN)) + break; + + /* Simple lazy/greedy parsing state machine. */ + len_to_move = 1; + cur_match_dist = 0; + cur_match_len = + d->m_saved_match_len ? d->m_saved_match_len : (TDEFL_MIN_MATCH_LEN - 1); + cur_pos = d->m_lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; + if (d->m_flags & (TDEFL_RLE_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS)) { + if ((d->m_dict_size) && (!(d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS))) { + mz_uint8 c = d->m_dict[(cur_pos - 1) & TDEFL_LZ_DICT_SIZE_MASK]; + cur_match_len = 0; + while (cur_match_len < d->m_lookahead_size) { + if (d->m_dict[cur_pos + cur_match_len] != c) + break; + cur_match_len++; + } + if (cur_match_len < TDEFL_MIN_MATCH_LEN) + cur_match_len = 0; + else + cur_match_dist = 1; + } + } else { + tdefl_find_match(d, d->m_lookahead_pos, d->m_dict_size, + d->m_lookahead_size, &cur_match_dist, &cur_match_len); + } + if (((cur_match_len == TDEFL_MIN_MATCH_LEN) && + (cur_match_dist >= 8U * 1024U)) || + (cur_pos == cur_match_dist) || + ((d->m_flags & TDEFL_FILTER_MATCHES) && (cur_match_len <= 5))) { + cur_match_dist = cur_match_len = 0; + } + if (d->m_saved_match_len) { + if (cur_match_len > d->m_saved_match_len) { + tdefl_record_literal(d, (mz_uint8)d->m_saved_lit); + if (cur_match_len >= 128) { + tdefl_record_match(d, cur_match_len, cur_match_dist); + d->m_saved_match_len = 0; + len_to_move = cur_match_len; + } else { + d->m_saved_lit = d->m_dict[cur_pos]; + d->m_saved_match_dist = cur_match_dist; + d->m_saved_match_len = cur_match_len; + } + } else { + tdefl_record_match(d, d->m_saved_match_len, d->m_saved_match_dist); + len_to_move = d->m_saved_match_len - 1; + d->m_saved_match_len = 0; + } + } else if (!cur_match_dist) + tdefl_record_literal(d, + d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]); + else if ((d->m_greedy_parsing) || (d->m_flags & TDEFL_RLE_MATCHES) || + (cur_match_len >= 128)) { + tdefl_record_match(d, cur_match_len, cur_match_dist); + len_to_move = cur_match_len; + } else { + d->m_saved_lit = d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]; + d->m_saved_match_dist = cur_match_dist; + d->m_saved_match_len = cur_match_len; + } + /* Move the lookahead forward by len_to_move bytes. */ + d->m_lookahead_pos += len_to_move; + MZ_ASSERT(d->m_lookahead_size >= len_to_move); + d->m_lookahead_size -= len_to_move; + d->m_dict_size = + MZ_MIN(d->m_dict_size + len_to_move, (mz_uint)TDEFL_LZ_DICT_SIZE); + /* Check if it's time to flush the current LZ codes to the internal output + * buffer. */ + if ((d->m_pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) || + ((d->m_total_lz_bytes > 31 * 1024) && + (((((mz_uint)(d->m_pLZ_code_buf - d->m_lz_code_buf) * 115) >> 7) >= + d->m_total_lz_bytes) || + (d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS)))) { + int n; + d->m_pSrc = pSrc; + d->m_src_buf_left = src_buf_left; + if ((n = tdefl_flush_block(d, 0)) != 0) + return (n < 0) ? MZ_FALSE : MZ_TRUE; + } + } + + d->m_pSrc = pSrc; + d->m_src_buf_left = src_buf_left; + return MZ_TRUE; +} + +static tdefl_status tdefl_flush_output_buffer(tdefl_compressor *d) { + if (d->m_pIn_buf_size) { + *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; + } + + if (d->m_pOut_buf_size) { + size_t n = MZ_MIN(*d->m_pOut_buf_size - d->m_out_buf_ofs, + d->m_output_flush_remaining); + memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, + d->m_output_buf + d->m_output_flush_ofs, n); + d->m_output_flush_ofs += (mz_uint)n; + d->m_output_flush_remaining -= (mz_uint)n; + d->m_out_buf_ofs += n; + + *d->m_pOut_buf_size = d->m_out_buf_ofs; + } + + return (d->m_finished && !d->m_output_flush_remaining) ? TDEFL_STATUS_DONE + : TDEFL_STATUS_OKAY; +} + +tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, + size_t *pIn_buf_size, void *pOut_buf, + size_t *pOut_buf_size, tdefl_flush flush) { + if (!d) { + if (pIn_buf_size) + *pIn_buf_size = 0; + if (pOut_buf_size) + *pOut_buf_size = 0; + return TDEFL_STATUS_BAD_PARAM; + } + + d->m_pIn_buf = pIn_buf; + d->m_pIn_buf_size = pIn_buf_size; + d->m_pOut_buf = pOut_buf; + d->m_pOut_buf_size = pOut_buf_size; + d->m_pSrc = (const mz_uint8 *)(pIn_buf); + d->m_src_buf_left = pIn_buf_size ? *pIn_buf_size : 0; + d->m_out_buf_ofs = 0; + d->m_flush = flush; + + if (((d->m_pPut_buf_func != NULL) == + ((pOut_buf != NULL) || (pOut_buf_size != NULL))) || + (d->m_prev_return_status != TDEFL_STATUS_OKAY) || + (d->m_wants_to_finish && (flush != TDEFL_FINISH)) || + (pIn_buf_size && *pIn_buf_size && !pIn_buf) || + (pOut_buf_size && *pOut_buf_size && !pOut_buf)) { + if (pIn_buf_size) + *pIn_buf_size = 0; + if (pOut_buf_size) + *pOut_buf_size = 0; + return (d->m_prev_return_status = TDEFL_STATUS_BAD_PARAM); + } + d->m_wants_to_finish |= (flush == TDEFL_FINISH); + + if ((d->m_output_flush_remaining) || (d->m_finished)) + return (d->m_prev_return_status = tdefl_flush_output_buffer(d)); + +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN + if (((d->m_flags & TDEFL_MAX_PROBES_MASK) == 1) && + ((d->m_flags & TDEFL_GREEDY_PARSING_FLAG) != 0) && + ((d->m_flags & (TDEFL_FILTER_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS | + TDEFL_RLE_MATCHES)) == 0)) { + if (!tdefl_compress_fast(d)) + return d->m_prev_return_status; + } else +#endif /* #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN */ + { + if (!tdefl_compress_normal(d)) + return d->m_prev_return_status; + } + + if ((d->m_flags & (TDEFL_WRITE_ZLIB_HEADER | TDEFL_COMPUTE_ADLER32)) && + (pIn_buf)) + d->m_adler32 = + (mz_uint32)mz_adler32(d->m_adler32, (const mz_uint8 *)pIn_buf, + d->m_pSrc - (const mz_uint8 *)pIn_buf); + + if ((flush) && (!d->m_lookahead_size) && (!d->m_src_buf_left) && + (!d->m_output_flush_remaining)) { + if (tdefl_flush_block(d, flush) < 0) + return d->m_prev_return_status; + d->m_finished = (flush == TDEFL_FINISH); + if (flush == TDEFL_FULL_FLUSH) { + MZ_CLEAR_OBJ(d->m_hash); + MZ_CLEAR_OBJ(d->m_next); + d->m_dict_size = 0; + } + } + + return (d->m_prev_return_status = tdefl_flush_output_buffer(d)); +} + +tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, + size_t in_buf_size, tdefl_flush flush) { + MZ_ASSERT(d->m_pPut_buf_func); + return tdefl_compress(d, pIn_buf, &in_buf_size, NULL, NULL, flush); +} + +tdefl_status tdefl_init(tdefl_compressor *d, + tdefl_put_buf_func_ptr pPut_buf_func, + void *pPut_buf_user, int flags) { + d->m_pPut_buf_func = pPut_buf_func; + d->m_pPut_buf_user = pPut_buf_user; + d->m_flags = (mz_uint)(flags); + d->m_max_probes[0] = 1 + ((flags & 0xFFF) + 2) / 3; + d->m_greedy_parsing = (flags & TDEFL_GREEDY_PARSING_FLAG) != 0; + d->m_max_probes[1] = 1 + (((flags & 0xFFF) >> 2) + 2) / 3; + if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG)) + MZ_CLEAR_OBJ(d->m_hash); + d->m_lookahead_pos = d->m_lookahead_size = d->m_dict_size = + d->m_total_lz_bytes = d->m_lz_code_buf_dict_pos = d->m_bits_in = 0; + d->m_output_flush_ofs = d->m_output_flush_remaining = d->m_finished = + d->m_block_index = d->m_bit_buffer = d->m_wants_to_finish = 0; + d->m_pLZ_code_buf = d->m_lz_code_buf + 1; + d->m_pLZ_flags = d->m_lz_code_buf; + *d->m_pLZ_flags = 0; + d->m_num_flags_left = 8; + d->m_pOutput_buf = d->m_output_buf; + d->m_pOutput_buf_end = d->m_output_buf; + d->m_prev_return_status = TDEFL_STATUS_OKAY; + d->m_saved_match_dist = d->m_saved_match_len = d->m_saved_lit = 0; + d->m_adler32 = 1; + d->m_pIn_buf = NULL; + d->m_pOut_buf = NULL; + d->m_pIn_buf_size = NULL; + d->m_pOut_buf_size = NULL; + d->m_flush = TDEFL_NO_FLUSH; + d->m_pSrc = NULL; + d->m_src_buf_left = 0; + d->m_out_buf_ofs = 0; + if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG)) + MZ_CLEAR_OBJ(d->m_dict); + memset(&d->m_huff_count[0][0], 0, + sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); + memset(&d->m_huff_count[1][0], 0, + sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); + return TDEFL_STATUS_OKAY; +} + +tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d) { + return d->m_prev_return_status; +} + +mz_uint32 tdefl_get_adler32(tdefl_compressor *d) { return d->m_adler32; } + +mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, + tdefl_put_buf_func_ptr pPut_buf_func, + void *pPut_buf_user, int flags) { + tdefl_compressor *pComp; + mz_bool succeeded; + if (((buf_len) && (!pBuf)) || (!pPut_buf_func)) + return MZ_FALSE; + pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); + if (!pComp) + return MZ_FALSE; + succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) == + TDEFL_STATUS_OKAY); + succeeded = + succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) == + TDEFL_STATUS_DONE); + MZ_FREE(pComp); + return succeeded; +} + +typedef struct { + size_t m_size, m_capacity; + mz_uint8 *m_pBuf; + mz_bool m_expandable; +} tdefl_output_buffer; + +static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, + void *pUser) { + tdefl_output_buffer *p = (tdefl_output_buffer *)pUser; + size_t new_size = p->m_size + len; + if (new_size > p->m_capacity) { + size_t new_capacity = p->m_capacity; + mz_uint8 *pNew_buf; + if (!p->m_expandable) + return MZ_FALSE; + do { + new_capacity = MZ_MAX(128U, new_capacity << 1U); + } while (new_size > new_capacity); + pNew_buf = (mz_uint8 *)MZ_REALLOC(p->m_pBuf, new_capacity); + if (!pNew_buf) + return MZ_FALSE; + p->m_pBuf = pNew_buf; + p->m_capacity = new_capacity; + } + memcpy((mz_uint8 *)p->m_pBuf + p->m_size, pBuf, len); + p->m_size = new_size; + return MZ_TRUE; +} + +void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, + size_t *pOut_len, int flags) { + tdefl_output_buffer out_buf; + MZ_CLEAR_OBJ(out_buf); + if (!pOut_len) + return MZ_FALSE; + else + *pOut_len = 0; + out_buf.m_expandable = MZ_TRUE; + if (!tdefl_compress_mem_to_output( + pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) + return NULL; + *pOut_len = out_buf.m_size; + return out_buf.m_pBuf; +} + +size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, + const void *pSrc_buf, size_t src_buf_len, + int flags) { + tdefl_output_buffer out_buf; + MZ_CLEAR_OBJ(out_buf); + if (!pOut_buf) + return 0; + out_buf.m_pBuf = (mz_uint8 *)pOut_buf; + out_buf.m_capacity = out_buf_len; + if (!tdefl_compress_mem_to_output( + pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) + return 0; + return out_buf.m_size; +} + +static const mz_uint s_tdefl_num_probes[11] = {0, 1, 6, 32, 16, 32, + 128, 256, 512, 768, 1500}; + +/* level may actually range from [0,10] (10 is a "hidden" max level, where we + * want a bit more compression and it's fine if throughput to fall off a cliff + * on some files). */ +mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, + int strategy) { + mz_uint comp_flags = + s_tdefl_num_probes[(level >= 0) ? MZ_MIN(10, level) : MZ_DEFAULT_LEVEL] | + ((level <= 3) ? TDEFL_GREEDY_PARSING_FLAG : 0); + if (window_bits > 0) + comp_flags |= TDEFL_WRITE_ZLIB_HEADER; + + if (!level) + comp_flags |= TDEFL_FORCE_ALL_RAW_BLOCKS; + else if (strategy == MZ_FILTERED) + comp_flags |= TDEFL_FILTER_MATCHES; + else if (strategy == MZ_HUFFMAN_ONLY) + comp_flags &= ~TDEFL_MAX_PROBES_MASK; + else if (strategy == MZ_FIXED) + comp_flags |= TDEFL_FORCE_ALL_STATIC_BLOCKS; + else if (strategy == MZ_RLE) + comp_flags |= TDEFL_RLE_MATCHES; + + return comp_flags; +} + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4204) /* nonstandard extension used : non-constant \ + aggregate initializer (also supported by \ + GNU C and C99, so no big deal) */ +#endif + +/* Simple PNG writer function by Alex Evans, 2011. Released into the public + domain: https://gist.github.com/908299, more context at + http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/. + This is actually a modification of Alex's original code so PNG files generated + by this function pass pngcheck. */ +void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, + int h, int num_chans, + size_t *pLen_out, + mz_uint level, mz_bool flip) { + /* Using a local copy of this array here in case MINIZ_NO_ZLIB_APIS was + * defined. */ + static const mz_uint s_tdefl_png_num_probes[11] = { + 0, 1, 6, 32, 16, 32, 128, 256, 512, 768, 1500}; + tdefl_compressor *pComp = + (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); + tdefl_output_buffer out_buf; + int i, bpl = w * num_chans, y, z; + mz_uint32 c; + *pLen_out = 0; + if (!pComp) + return NULL; + MZ_CLEAR_OBJ(out_buf); + out_buf.m_expandable = MZ_TRUE; + out_buf.m_capacity = 57 + MZ_MAX(64, (1 + bpl) * h); + if (NULL == (out_buf.m_pBuf = (mz_uint8 *)MZ_MALLOC(out_buf.m_capacity))) { + MZ_FREE(pComp); + return NULL; + } + /* write dummy header */ + for (z = 41; z; --z) + tdefl_output_buffer_putter(&z, 1, &out_buf); + /* compress image data */ + tdefl_init(pComp, tdefl_output_buffer_putter, &out_buf, + s_tdefl_png_num_probes[MZ_MIN(10, level)] | + TDEFL_WRITE_ZLIB_HEADER); + for (y = 0; y < h; ++y) { + tdefl_compress_buffer(pComp, &z, 1, TDEFL_NO_FLUSH); + tdefl_compress_buffer(pComp, + (mz_uint8 *)pImage + (flip ? (h - 1 - y) : y) * bpl, + bpl, TDEFL_NO_FLUSH); + } + if (tdefl_compress_buffer(pComp, NULL, 0, TDEFL_FINISH) != + TDEFL_STATUS_DONE) { + MZ_FREE(pComp); + MZ_FREE(out_buf.m_pBuf); + return NULL; + } + /* write real header */ + *pLen_out = out_buf.m_size - 41; + { + static const mz_uint8 chans[] = {0x00, 0x00, 0x04, 0x02, 0x06}; + mz_uint8 pnghdr[41] = {0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, + 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x49, 0x44, 0x41, 0x54}; + pnghdr[18] = (mz_uint8)(w >> 8); + pnghdr[19] = (mz_uint8)w; + pnghdr[22] = (mz_uint8)(h >> 8); + pnghdr[23] = (mz_uint8)h; + pnghdr[25] = chans[num_chans]; + pnghdr[33] = (mz_uint8)(*pLen_out >> 24); + pnghdr[34] = (mz_uint8)(*pLen_out >> 16); + pnghdr[35] = (mz_uint8)(*pLen_out >> 8); + pnghdr[36] = (mz_uint8)*pLen_out; + c = (mz_uint32)mz_crc32(MZ_CRC32_INIT, pnghdr + 12, 17); + for (i = 0; i < 4; ++i, c <<= 8) + ((mz_uint8 *)(pnghdr + 29))[i] = (mz_uint8)(c >> 24); + memcpy(out_buf.m_pBuf, pnghdr, 41); + } + /* write footer (IDAT CRC-32, followed by IEND chunk) */ + if (!tdefl_output_buffer_putter( + "\0\0\0\0\0\0\0\0\x49\x45\x4e\x44\xae\x42\x60\x82", 16, &out_buf)) { + *pLen_out = 0; + MZ_FREE(pComp); + MZ_FREE(out_buf.m_pBuf); + return NULL; + } + c = (mz_uint32)mz_crc32(MZ_CRC32_INIT, out_buf.m_pBuf + 41 - 4, + *pLen_out + 4); + for (i = 0; i < 4; ++i, c <<= 8) + (out_buf.m_pBuf + out_buf.m_size - 16)[i] = (mz_uint8)(c >> 24); + /* compute final size of file, grab compressed data buffer and return */ + *pLen_out += 57; + MZ_FREE(pComp); + return out_buf.m_pBuf; +} +void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, + int num_chans, size_t *pLen_out) { + /* Level 6 corresponds to TDEFL_DEFAULT_MAX_PROBES or MZ_DEFAULT_LEVEL (but we + * can't depend on MZ_DEFAULT_LEVEL being available in case the zlib API's + * where #defined out) */ + return tdefl_write_image_to_png_file_in_memory_ex(pImage, w, h, num_chans, + pLen_out, 6, MZ_FALSE); +} + +#ifndef MINIZ_NO_MALLOC +/* Allocate the tdefl_compressor and tinfl_decompressor structures in C so that + */ +/* non-C language bindings to tdefL_ and tinfl_ API don't need to worry about */ +/* structure size and allocation mechanism. */ +tdefl_compressor *tdefl_compressor_alloc(void) { + return (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); +} + +void tdefl_compressor_free(tdefl_compressor *pComp) { MZ_FREE(pComp); } +#endif + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +#ifdef __cplusplus +} +#endif +/************************************************************************** + * + * Copyright 2013-2014 RAD Game Tools and Valve Software + * Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + **************************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + +/* ------------------- Low-level Decompression (completely independent from all + * compression API's) */ + +#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) +#define TINFL_MEMSET(p, c, l) memset(p, c, l) + +#define TINFL_CR_BEGIN \ + switch (r->m_state) { \ + case 0: +#define TINFL_CR_RETURN(state_index, result) \ + do { \ + status = result; \ + r->m_state = state_index; \ + goto common_exit; \ + case state_index:; \ + } \ + MZ_MACRO_END +#define TINFL_CR_RETURN_FOREVER(state_index, result) \ + do { \ + for (;;) { \ + TINFL_CR_RETURN(state_index, result); \ + } \ + } \ + MZ_MACRO_END +#define TINFL_CR_FINISH } + +#define TINFL_GET_BYTE(state_index, c) \ + do { \ + while (pIn_buf_cur >= pIn_buf_end) { \ + TINFL_CR_RETURN(state_index, \ + (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) \ + ? TINFL_STATUS_NEEDS_MORE_INPUT \ + : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS); \ + } \ + c = *pIn_buf_cur++; \ + } \ + MZ_MACRO_END + +#define TINFL_NEED_BITS(state_index, n) \ + do { \ + mz_uint c; \ + TINFL_GET_BYTE(state_index, c); \ + bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \ + num_bits += 8; \ + } while (num_bits < (mz_uint)(n)) +#define TINFL_SKIP_BITS(state_index, n) \ + do { \ + if (num_bits < (mz_uint)(n)) { \ + TINFL_NEED_BITS(state_index, n); \ + } \ + bit_buf >>= (n); \ + num_bits -= (n); \ + } \ + MZ_MACRO_END +#define TINFL_GET_BITS(state_index, b, n) \ + do { \ + if (num_bits < (mz_uint)(n)) { \ + TINFL_NEED_BITS(state_index, n); \ + } \ + b = bit_buf & ((1 << (n)) - 1); \ + bit_buf >>= (n); \ + num_bits -= (n); \ + } \ + MZ_MACRO_END + +/* TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes + * remaining in the input buffer falls below 2. */ +/* It reads just enough bytes from the input stream that are needed to decode + * the next Huffman code (and absolutely no more). It works by trying to fully + * decode a */ +/* Huffman code by using whatever bits are currently present in the bit buffer. + * If this fails, it reads another byte, and tries again until it succeeds or + * until the */ +/* bit buffer contains >=15 bits (deflate's max. Huffman code size). */ +#define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ + do { \ + temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ + if (temp >= 0) { \ + code_len = temp >> 9; \ + if ((code_len) && (num_bits >= code_len)) \ + break; \ + } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ + code_len = TINFL_FAST_LOOKUP_BITS; \ + do { \ + temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ + } while ((temp < 0) && (num_bits >= (code_len + 1))); \ + if (temp >= 0) \ + break; \ + } \ + TINFL_GET_BYTE(state_index, c); \ + bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \ + num_bits += 8; \ + } while (num_bits < 15); + +/* TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex + * than you would initially expect because the zlib API expects the decompressor + * to never read */ +/* beyond the final byte of the deflate stream. (In other words, when this macro + * wants to read another byte from the input, it REALLY needs another byte in + * order to fully */ +/* decode the next Huffman code.) Handling this properly is particularly + * important on raw deflate (non-zlib) streams, which aren't followed by a byte + * aligned adler-32. */ +/* The slow path is only executed at the very end of the input buffer. */ +/* v1.16: The original macro handled the case at the very end of the passed-in + * input buffer, but we also need to handle the case where the user passes in + * 1+zillion bytes */ +/* following the deflate data and our non-conservative read-ahead path won't + * kick in here on this code. This is much trickier. */ +#define TINFL_HUFF_DECODE(state_index, sym, pHuff) \ + do { \ + int temp; \ + mz_uint code_len, c; \ + if (num_bits < 15) { \ + if ((pIn_buf_end - pIn_buf_cur) < 2) { \ + TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ + } else { \ + bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | \ + (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); \ + pIn_buf_cur += 2; \ + num_bits += 16; \ + } \ + } \ + if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= \ + 0) \ + code_len = temp >> 9, temp &= 511; \ + else { \ + code_len = TINFL_FAST_LOOKUP_BITS; \ + do { \ + temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ + } while (temp < 0); \ + } \ + sym = temp; \ + bit_buf >>= code_len; \ + num_bits -= code_len; \ + } \ + MZ_MACRO_END + +tinfl_status tinfl_decompress(tinfl_decompressor *r, + const mz_uint8 *pIn_buf_next, + size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, + mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, + const mz_uint32 decomp_flags) { + static const int s_length_base[31] = { + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + static const int s_length_extra[31] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, + 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, + 4, 4, 5, 5, 5, 5, 0, 0, 0}; + static const int s_dist_base[32] = { + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, + 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, + 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0}; + static const int s_dist_extra[32] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, + 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, + 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; + static const mz_uint8 s_length_dezigzag[19] = { + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + static const int s_min_table_sizes[3] = {257, 1, 4}; + + tinfl_status status = TINFL_STATUS_FAILED; + mz_uint32 num_bits, dist, counter, num_extra; + tinfl_bit_buf_t bit_buf; + const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = + pIn_buf_next + *pIn_buf_size; + mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = + pOut_buf_next + *pOut_buf_size; + size_t out_buf_size_mask = + (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) + ? (size_t)-1 + : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, + dist_from_out_buf_start; + + /* Ensure the output buffer's size is a power of 2, unless the output buffer + * is large enough to hold the entire output file (in which case it doesn't + * matter). */ + if (((out_buf_size_mask + 1) & out_buf_size_mask) || + (pOut_buf_next < pOut_buf_start)) { + *pIn_buf_size = *pOut_buf_size = 0; + return TINFL_STATUS_BAD_PARAM; + } + + num_bits = r->m_num_bits; + bit_buf = r->m_bit_buf; + dist = r->m_dist; + counter = r->m_counter; + num_extra = r->m_num_extra; + dist_from_out_buf_start = r->m_dist_from_out_buf_start; + TINFL_CR_BEGIN + + bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; + r->m_z_adler32 = r->m_check_adler32 = 1; + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) { + TINFL_GET_BYTE(1, r->m_zhdr0); + TINFL_GET_BYTE(2, r->m_zhdr1); + counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || + (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); + if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) + counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || + ((out_buf_size_mask + 1) < + (size_t)(1U << (8U + (r->m_zhdr0 >> 4))))); + if (counter) { + TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); + } + } + + do { + TINFL_GET_BITS(3, r->m_final, 3); + r->m_type = r->m_final >> 1; + if (r->m_type == 0) { + TINFL_SKIP_BITS(5, num_bits & 7); + for (counter = 0; counter < 4; ++counter) { + if (num_bits) + TINFL_GET_BITS(6, r->m_raw_header[counter], 8); + else + TINFL_GET_BYTE(7, r->m_raw_header[counter]); + } + if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != + (mz_uint)(0xFFFF ^ + (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { + TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); + } + while ((counter) && (num_bits)) { + TINFL_GET_BITS(51, dist, 8); + while (pOut_buf_cur >= pOut_buf_end) { + TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); + } + *pOut_buf_cur++ = (mz_uint8)dist; + counter--; + } + while (counter) { + size_t n; + while (pOut_buf_cur >= pOut_buf_end) { + TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); + } + while (pIn_buf_cur >= pIn_buf_end) { + TINFL_CR_RETURN(38, (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) + ? TINFL_STATUS_NEEDS_MORE_INPUT + : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS); + } + n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), + (size_t)(pIn_buf_end - pIn_buf_cur)), + counter); + TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); + pIn_buf_cur += n; + pOut_buf_cur += n; + counter -= (mz_uint)n; + } + } else if (r->m_type == 3) { + TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); + } else { + if (r->m_type == 1) { + mz_uint8 *p = r->m_tables[0].m_code_size; + mz_uint i; + r->m_table_sizes[0] = 288; + r->m_table_sizes[1] = 32; + TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); + for (i = 0; i <= 143; ++i) + *p++ = 8; + for (; i <= 255; ++i) + *p++ = 9; + for (; i <= 279; ++i) + *p++ = 7; + for (; i <= 287; ++i) + *p++ = 8; + } else { + for (counter = 0; counter < 3; counter++) { + TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); + r->m_table_sizes[counter] += s_min_table_sizes[counter]; + } + MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); + for (counter = 0; counter < r->m_table_sizes[2]; counter++) { + mz_uint s; + TINFL_GET_BITS(14, s, 3); + r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; + } + r->m_table_sizes[2] = 19; + } + for (; (int)r->m_type >= 0; r->m_type--) { + int tree_next, tree_cur; + tinfl_huff_table *pTable; + mz_uint i, j, used_syms, total, sym_index, next_code[17], + total_syms[16]; + pTable = &r->m_tables[r->m_type]; + MZ_CLEAR_OBJ(total_syms); + MZ_CLEAR_OBJ(pTable->m_look_up); + MZ_CLEAR_OBJ(pTable->m_tree); + for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) + total_syms[pTable->m_code_size[i]]++; + used_syms = 0, total = 0; + next_code[0] = next_code[1] = 0; + for (i = 1; i <= 15; ++i) { + used_syms += total_syms[i]; + next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); + } + if ((65536 != total) && (used_syms > 1)) { + TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); + } + for (tree_next = -1, sym_index = 0; + sym_index < r->m_table_sizes[r->m_type]; ++sym_index) { + mz_uint rev_code = 0, l, cur_code, + code_size = pTable->m_code_size[sym_index]; + + if (!code_size) + continue; + cur_code = next_code[code_size]++; + for (l = code_size; l > 0; l--, cur_code >>= 1) + rev_code = (rev_code << 1) | (cur_code & 1); + if (code_size <= TINFL_FAST_LOOKUP_BITS) { + mz_int16 k = (mz_int16)((code_size << 9) | sym_index); + while (rev_code < TINFL_FAST_LOOKUP_SIZE) { + pTable->m_look_up[rev_code] = k; + rev_code += (1 << code_size); + } + continue; + } + if (0 == + (tree_cur = pTable->m_look_up[rev_code & + (TINFL_FAST_LOOKUP_SIZE - 1)])) { + pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = + (mz_int16)tree_next; + tree_cur = tree_next; + tree_next -= 2; + } + rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); + for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) { + tree_cur -= ((rev_code >>= 1) & 1); + if (!pTable->m_tree[-tree_cur - 1]) { + pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; + tree_cur = tree_next; + tree_next -= 2; + } else + tree_cur = pTable->m_tree[-tree_cur - 1]; + } + tree_cur -= ((rev_code >>= 1) & 1); + (void)rev_code; // unused + pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; + } + if (r->m_type == 2) { + for (counter = 0; + counter < (r->m_table_sizes[0] + r->m_table_sizes[1]);) { + mz_uint s; + TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); + if (dist < 16) { + r->m_len_codes[counter++] = (mz_uint8)dist; + continue; + } + if ((dist == 16) && (!counter)) { + TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); + } + num_extra = "\02\03\07"[dist - 16]; + TINFL_GET_BITS(18, s, num_extra); + s += "\03\03\013"[dist - 16]; + TINFL_MEMSET(r->m_len_codes + counter, + (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); + counter += s; + } + if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) { + TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); + } + TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, + r->m_table_sizes[0]); + TINFL_MEMCPY(r->m_tables[1].m_code_size, + r->m_len_codes + r->m_table_sizes[0], + r->m_table_sizes[1]); + } + } + for (;;) { + mz_uint8 *pSrc; + for (;;) { + if (((pIn_buf_end - pIn_buf_cur) < 4) || + ((pOut_buf_end - pOut_buf_cur) < 2)) { + TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); + if (counter >= 256) + break; + while (pOut_buf_cur >= pOut_buf_end) { + TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); + } + *pOut_buf_cur++ = (mz_uint8)counter; + } else { + int sym2; + mz_uint code_len; +#if TINFL_USE_64BIT_BITBUF + if (num_bits < 30) { + bit_buf |= + (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); + pIn_buf_cur += 4; + num_bits += 32; + } +#else + if (num_bits < 15) { + bit_buf |= + (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); + pIn_buf_cur += 2; + num_bits += 16; + } +#endif + if ((sym2 = + r->m_tables[0] + .m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= + 0) + code_len = sym2 >> 9; + else { + code_len = TINFL_FAST_LOOKUP_BITS; + do { + sym2 = r->m_tables[0] + .m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; + } while (sym2 < 0); + } + counter = sym2; + bit_buf >>= code_len; + num_bits -= code_len; + if (counter & 256) + break; + +#if !TINFL_USE_64BIT_BITBUF + if (num_bits < 15) { + bit_buf |= + (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); + pIn_buf_cur += 2; + num_bits += 16; + } +#endif + if ((sym2 = + r->m_tables[0] + .m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= + 0) + code_len = sym2 >> 9; + else { + code_len = TINFL_FAST_LOOKUP_BITS; + do { + sym2 = r->m_tables[0] + .m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; + } while (sym2 < 0); + } + bit_buf >>= code_len; + num_bits -= code_len; + + pOut_buf_cur[0] = (mz_uint8)counter; + if (sym2 & 256) { + pOut_buf_cur++; + counter = sym2; + break; + } + pOut_buf_cur[1] = (mz_uint8)sym2; + pOut_buf_cur += 2; + } + } + if ((counter &= 511) == 256) + break; + + num_extra = s_length_extra[counter - 257]; + counter = s_length_base[counter - 257]; + if (num_extra) { + mz_uint extra_bits; + TINFL_GET_BITS(25, extra_bits, num_extra); + counter += extra_bits; + } + + TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); + num_extra = s_dist_extra[dist]; + dist = s_dist_base[dist]; + if (num_extra) { + mz_uint extra_bits; + TINFL_GET_BITS(27, extra_bits, num_extra); + dist += extra_bits; + } + + dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; + if ((dist == 0 || dist > dist_from_out_buf_start || + dist_from_out_buf_start == 0) && + (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) { + TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); + } + + pSrc = pOut_buf_start + + ((dist_from_out_buf_start - dist) & out_buf_size_mask); + + if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) { + while (counter--) { + while (pOut_buf_cur >= pOut_buf_end) { + TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); + } + *pOut_buf_cur++ = + pOut_buf_start[(dist_from_out_buf_start++ - dist) & + out_buf_size_mask]; + } + continue; + } +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES + else if ((counter >= 9) && (counter <= dist)) { + const mz_uint8 *pSrc_end = pSrc + (counter & ~7); + do { +#ifdef MINIZ_UNALIGNED_USE_MEMCPY + memcpy(pOut_buf_cur, pSrc, sizeof(mz_uint32) * 2); +#else + ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; + ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; +#endif + pOut_buf_cur += 8; + } while ((pSrc += 8) < pSrc_end); + if ((counter &= 7) < 3) { + if (counter) { + pOut_buf_cur[0] = pSrc[0]; + if (counter > 1) + pOut_buf_cur[1] = pSrc[1]; + pOut_buf_cur += counter; + } + continue; + } + } +#endif + while (counter > 2) { + pOut_buf_cur[0] = pSrc[0]; + pOut_buf_cur[1] = pSrc[1]; + pOut_buf_cur[2] = pSrc[2]; + pOut_buf_cur += 3; + pSrc += 3; + counter -= 3; + } + if (counter > 0) { + pOut_buf_cur[0] = pSrc[0]; + if (counter > 1) + pOut_buf_cur[1] = pSrc[1]; + pOut_buf_cur += counter; + } + } + } + } while (!(r->m_final & 1)); + + /* Ensure byte alignment and put back any bytes from the bitbuf if we've + * looked ahead too far on gzip, or other Deflate streams followed by + * arbitrary data. */ + /* I'm being super conservative here. A number of simplifications can be made + * to the byte alignment part, and the Adler32 check shouldn't ever need to + * worry about reading from the bitbuf now. */ + TINFL_SKIP_BITS(32, num_bits & 7); + while ((pIn_buf_cur > pIn_buf_next) && (num_bits >= 8)) { + --pIn_buf_cur; + num_bits -= 8; + } + bit_buf &= (tinfl_bit_buf_t)((((mz_uint64)1) << num_bits) - (mz_uint64)1); + MZ_ASSERT(!num_bits); /* if this assert fires then we've read beyond the end + of non-deflate/zlib streams with following data (such + as gzip streams). */ + + if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) { + for (counter = 0; counter < 4; ++counter) { + mz_uint s; + if (num_bits) + TINFL_GET_BITS(41, s, 8); + else + TINFL_GET_BYTE(42, s); + r->m_z_adler32 = (r->m_z_adler32 << 8) | s; + } + } + TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); + + TINFL_CR_FINISH + +common_exit: + /* As long as we aren't telling the caller that we NEED more input to make + * forward progress: */ + /* Put back any bytes from the bitbuf in case we've looked ahead too far on + * gzip, or other Deflate streams followed by arbitrary data. */ + /* We need to be very careful here to NOT push back any bytes we definitely + * know we need to make forward progress, though, or we'll lock the caller up + * into an inf loop. */ + if ((status != TINFL_STATUS_NEEDS_MORE_INPUT) && + (status != TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS)) { + while ((pIn_buf_cur > pIn_buf_next) && (num_bits >= 8)) { + --pIn_buf_cur; + num_bits -= 8; + } + } + r->m_num_bits = num_bits; + r->m_bit_buf = + bit_buf & (tinfl_bit_buf_t)((((mz_uint64)1) << num_bits) - (mz_uint64)1); + r->m_dist = dist; + r->m_counter = counter; + r->m_num_extra = num_extra; + r->m_dist_from_out_buf_start = dist_from_out_buf_start; + *pIn_buf_size = pIn_buf_cur - pIn_buf_next; + *pOut_buf_size = pOut_buf_cur - pOut_buf_next; + if ((decomp_flags & + (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && + (status >= 0)) { + const mz_uint8 *ptr = pOut_buf_next; + size_t buf_len = *pOut_buf_size; + mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, + s2 = r->m_check_adler32 >> 16; + size_t block_len = buf_len % 5552; + while (buf_len) { + for (i = 0; i + 7 < block_len; i += 8, ptr += 8) { + s1 += ptr[0], s2 += s1; + s1 += ptr[1], s2 += s1; + s1 += ptr[2], s2 += s1; + s1 += ptr[3], s2 += s1; + s1 += ptr[4], s2 += s1; + s1 += ptr[5], s2 += s1; + s1 += ptr[6], s2 += s1; + s1 += ptr[7], s2 += s1; + } + for (; i < block_len; ++i) + s1 += *ptr++, s2 += s1; + s1 %= 65521U, s2 %= 65521U; + buf_len -= block_len; + block_len = 5552; + } + r->m_check_adler32 = (s2 << 16) + s1; + if ((status == TINFL_STATUS_DONE) && + (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && + (r->m_check_adler32 != r->m_z_adler32)) + status = TINFL_STATUS_ADLER32_MISMATCH; + } + return status; +} + +/* Higher level helper functions. */ +void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, + size_t *pOut_len, int flags) { + tinfl_decompressor decomp; + void *pBuf = NULL, *pNew_buf; + size_t src_buf_ofs = 0, out_buf_capacity = 0; + *pOut_len = 0; + tinfl_init(&decomp); + for (;;) { + size_t src_buf_size = src_buf_len - src_buf_ofs, + dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; + tinfl_status status = tinfl_decompress( + &decomp, (const mz_uint8 *)pSrc_buf + src_buf_ofs, &src_buf_size, + (mz_uint8 *)pBuf, pBuf ? (mz_uint8 *)pBuf + *pOut_len : NULL, + &dst_buf_size, + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | + TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); + if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) { + MZ_FREE(pBuf); + *pOut_len = 0; + return NULL; + } + src_buf_ofs += src_buf_size; + *pOut_len += dst_buf_size; + if (status == TINFL_STATUS_DONE) + break; + new_out_buf_capacity = out_buf_capacity * 2; + if (new_out_buf_capacity < 128) + new_out_buf_capacity = 128; + pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); + if (!pNew_buf) { + MZ_FREE(pBuf); + *pOut_len = 0; + return NULL; + } + pBuf = pNew_buf; + out_buf_capacity = new_out_buf_capacity; + } + return pBuf; +} + +size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, + const void *pSrc_buf, size_t src_buf_len, + int flags) { + tinfl_decompressor decomp; + tinfl_status status; + tinfl_init(&decomp); + status = + tinfl_decompress(&decomp, (const mz_uint8 *)pSrc_buf, &src_buf_len, + (mz_uint8 *)pOut_buf, (mz_uint8 *)pOut_buf, &out_buf_len, + (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | + TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); + return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED + : out_buf_len; +} + +int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, + tinfl_put_buf_func_ptr pPut_buf_func, + void *pPut_buf_user, int flags) { + int result = 0; + tinfl_decompressor decomp; + mz_uint8 *pDict = (mz_uint8 *)MZ_MALLOC(TINFL_LZ_DICT_SIZE); + size_t in_buf_ofs = 0, dict_ofs = 0; + if (!pDict) + return TINFL_STATUS_FAILED; + tinfl_init(&decomp); + for (;;) { + size_t in_buf_size = *pIn_buf_size - in_buf_ofs, + dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; + tinfl_status status = + tinfl_decompress(&decomp, (const mz_uint8 *)pIn_buf + in_buf_ofs, + &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, + (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | + TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); + in_buf_ofs += in_buf_size; + if ((dst_buf_size) && + (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) + break; + if (status != TINFL_STATUS_HAS_MORE_OUTPUT) { + result = (status == TINFL_STATUS_DONE); + break; + } + dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); + } + MZ_FREE(pDict); + *pIn_buf_size = in_buf_ofs; + return result; +} + +#ifndef MINIZ_NO_MALLOC +tinfl_decompressor *tinfl_decompressor_alloc(void) { + tinfl_decompressor *pDecomp = + (tinfl_decompressor *)MZ_MALLOC(sizeof(tinfl_decompressor)); + if (pDecomp) + tinfl_init(pDecomp); + return pDecomp; +} + +void tinfl_decompressor_free(tinfl_decompressor *pDecomp) { MZ_FREE(pDecomp); } +#endif + +#ifdef __cplusplus +} +#endif +/************************************************************************** + * + * Copyright 2013-2014 RAD Game Tools and Valve Software + * Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC + * Copyright 2016 Martin Raiber + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + **************************************************************************/ + +#ifndef MINIZ_NO_ARCHIVE_APIS + +#ifdef __cplusplus +extern "C" { +#endif + +/* ------------------- .ZIP archive reading */ + +#ifdef MINIZ_NO_STDIO +#define MZ_FILE void * +#else +#include + +#if defined(_MSC_VER) +#include +#ifndef MINIZ_NO_TIME +#include +#endif +static wchar_t *str2wstr(const char *str) { + size_t len = strlen(str) + 1; + wchar_t *wstr = (wchar_t *)malloc(len * sizeof(wchar_t)); + MultiByteToWideChar(CP_UTF8, 0, str, (int)(len * sizeof(char)), wstr, + (int)len); + return wstr; +} + +static FILE *mz_fopen(const char *pFilename, const char *pMode) { + FILE *pFile = NULL; + wchar_t *wFilename = str2wstr(pFilename); + wchar_t *wMode = str2wstr(pMode); + +#ifdef ZIP_ENABLE_SHARABLE_FILE_OPEN + pFile = _wfopen(wFilename, wMode); +#else + _wfopen_s(&pFile, wFilename, wMode); +#endif + free(wFilename); + free(wMode); + + return pFile; +} + +static FILE *mz_freopen(const char *pPath, const char *pMode, FILE *pStream) { + FILE *pFile = NULL; + int res = 0; + + wchar_t *wPath = str2wstr(pPath); + wchar_t *wMode = str2wstr(pMode); + +#ifdef ZIP_ENABLE_SHARABLE_FILE_OPEN + pFile = _wfreopen(wPath, wMode, pStream); +#else + res = _wfreopen_s(&pFile, wPath, wMode, pStream); +#endif + + free(wPath); + free(wMode); + +#ifndef ZIP_ENABLE_SHARABLE_FILE_OPEN + if (res) { + return NULL; + } +#endif + + return pFile; +} + +static int mz_stat(const char *pPath, struct _stat64 *buffer) { + wchar_t *wPath = str2wstr(pPath); + int res = _wstat64(wPath, buffer); + + free(wPath); + + return res; +} + +static int mz_mkdir(const char *pDirname) { + wchar_t *wDirname = str2wstr(pDirname); + int res = _wmkdir(wDirname); + + free(wDirname); + + return res; +} + +#define MZ_FOPEN mz_fopen +#define MZ_FCLOSE fclose +#define MZ_FREAD fread +#define MZ_FWRITE fwrite +#define MZ_FTELL64 _ftelli64 +#define MZ_FSEEK64 _fseeki64 +#define MZ_FILE_STAT_STRUCT _stat64 +#define MZ_FILE_STAT mz_stat +#define MZ_FFLUSH fflush +#define MZ_FREOPEN mz_freopen +#define MZ_DELETE_FILE remove +#define MZ_MKDIR(d) mz_mkdir(d) + +#elif defined(__MINGW32__) || defined(__MINGW64__) +#include +#ifndef MINIZ_NO_TIME +#include +#endif + +#define MZ_FOPEN(f, m) fopen(f, m) +#define MZ_FCLOSE fclose +#define MZ_FREAD fread +#define MZ_FWRITE fwrite +#define MZ_FTELL64 ftell +#define MZ_FSEEK64 fseek +#define MZ_FILE_STAT_STRUCT stat +#define MZ_FILE_STAT stat +#define MZ_FFLUSH fflush +#define MZ_FREOPEN(f, m, s) freopen(f, m, s) +#define MZ_DELETE_FILE remove +#define MZ_MKDIR(d) _mkdir(d) + +#elif defined(__TINYC__) +#ifndef MINIZ_NO_TIME +#include +#endif + +#define MZ_FOPEN(f, m) fopen(f, m) +#define MZ_FCLOSE fclose +#define MZ_FREAD fread +#define MZ_FWRITE fwrite +#define MZ_FTELL64 ftell +#define MZ_FSEEK64 fseek +#define MZ_FILE_STAT_STRUCT stat +#define MZ_FILE_STAT stat +#define MZ_FFLUSH fflush +#define MZ_FREOPEN(f, m, s) freopen(f, m, s) +#define MZ_DELETE_FILE remove +#if defined(_WIN32) || defined(_WIN64) +#define MZ_MKDIR(d) _mkdir(d) +#else +#define MZ_MKDIR(d) mkdir(d, 0755) +#endif + +#elif defined(__USE_LARGEFILE64) /* gcc, clang */ +#ifndef MINIZ_NO_TIME +#include +#endif + +#define MZ_FOPEN(f, m) fopen64(f, m) +#define MZ_FCLOSE fclose +#define MZ_FREAD fread +#define MZ_FWRITE fwrite +#define MZ_FTELL64 ftello64 +#define MZ_FSEEK64 fseeko64 +#define MZ_FILE_STAT_STRUCT stat64 +#define MZ_FILE_STAT stat64 +#define MZ_FFLUSH fflush +#define MZ_FREOPEN(p, m, s) freopen64(p, m, s) +#define MZ_DELETE_FILE remove +#define MZ_MKDIR(d) mkdir(d, 0755) + +#elif defined(__APPLE__) +#ifndef MINIZ_NO_TIME +#include +#endif + +#define MZ_FOPEN(f, m) fopen(f, m) +#define MZ_FCLOSE fclose +#define MZ_FREAD fread +#define MZ_FWRITE fwrite +#define MZ_FTELL64 ftello +#define MZ_FSEEK64 fseeko +#define MZ_FILE_STAT_STRUCT stat +#define MZ_FILE_STAT stat +#define MZ_FFLUSH fflush +#define MZ_FREOPEN(p, m, s) freopen(p, m, s) +#define MZ_DELETE_FILE remove +#define MZ_MKDIR(d) mkdir(d, 0755) + +#else +#pragma message( \ + "Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.") +#ifndef MINIZ_NO_TIME +#include +#endif + +#define MZ_FOPEN(f, m) fopen(f, m) +#define MZ_FCLOSE fclose +#define MZ_FREAD fread +#define MZ_FWRITE fwrite +#ifdef __STRICT_ANSI__ +#define MZ_FTELL64 ftell +#define MZ_FSEEK64 fseek +#else +#define MZ_FTELL64 ftello +#define MZ_FSEEK64 fseeko +#endif +#define MZ_FILE_STAT_STRUCT stat +#define MZ_FILE_STAT stat +#define MZ_FFLUSH fflush +#define MZ_FREOPEN(f, m, s) freopen(f, m, s) +#define MZ_DELETE_FILE remove +#define MZ_MKDIR(d) mkdir(d, 0755) + +#endif /* #ifdef _MSC_VER */ +#endif /* #ifdef MINIZ_NO_STDIO */ + +#ifndef CHMOD +// Upon successful completion, a value of 0 is returned. +// Otherwise, a value of -1 is returned and errno is set to indicate the error. +// int chmod(const char *path, mode_t mode); +#define CHMOD(f, m) chmod(f, m) +#endif + +#define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c)) + +/* Various ZIP archive enums. To completely avoid cross platform compiler + * alignment and platform endian issues, miniz.c doesn't use structs for any of + * this stuff. */ +enum { + /* ZIP archive identifiers and record sizes */ + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06054b50, + MZ_ZIP_CENTRAL_DIR_HEADER_SIG = 0x02014b50, + MZ_ZIP_LOCAL_DIR_HEADER_SIG = 0x04034b50, + MZ_ZIP_LOCAL_DIR_HEADER_SIZE = 30, + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE = 46, + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE = 22, + + /* ZIP64 archive identifier and record sizes */ + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06064b50, + MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG = 0x07064b50, + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE = 56, + MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE = 20, + MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID = 0x0001, + MZ_ZIP_DATA_DESCRIPTOR_ID = 0x08074b50, + MZ_ZIP_DATA_DESCRIPTER_SIZE64 = 24, + MZ_ZIP_DATA_DESCRIPTER_SIZE32 = 16, + + /* Central directory header record offsets */ + MZ_ZIP_CDH_SIG_OFS = 0, + MZ_ZIP_CDH_VERSION_MADE_BY_OFS = 4, + MZ_ZIP_CDH_VERSION_NEEDED_OFS = 6, + MZ_ZIP_CDH_BIT_FLAG_OFS = 8, + MZ_ZIP_CDH_METHOD_OFS = 10, + MZ_ZIP_CDH_FILE_TIME_OFS = 12, + MZ_ZIP_CDH_FILE_DATE_OFS = 14, + MZ_ZIP_CDH_CRC32_OFS = 16, + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS = 20, + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS = 24, + MZ_ZIP_CDH_FILENAME_LEN_OFS = 28, + MZ_ZIP_CDH_EXTRA_LEN_OFS = 30, + MZ_ZIP_CDH_COMMENT_LEN_OFS = 32, + MZ_ZIP_CDH_DISK_START_OFS = 34, + MZ_ZIP_CDH_INTERNAL_ATTR_OFS = 36, + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS = 38, + MZ_ZIP_CDH_LOCAL_HEADER_OFS = 42, + + /* Local directory header offsets */ + MZ_ZIP_LDH_SIG_OFS = 0, + MZ_ZIP_LDH_VERSION_NEEDED_OFS = 4, + MZ_ZIP_LDH_BIT_FLAG_OFS = 6, + MZ_ZIP_LDH_METHOD_OFS = 8, + MZ_ZIP_LDH_FILE_TIME_OFS = 10, + MZ_ZIP_LDH_FILE_DATE_OFS = 12, + MZ_ZIP_LDH_CRC32_OFS = 14, + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS = 18, + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS = 22, + MZ_ZIP_LDH_FILENAME_LEN_OFS = 26, + MZ_ZIP_LDH_EXTRA_LEN_OFS = 28, + MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR = 1 << 3, + + /* End of central directory offsets */ + MZ_ZIP_ECDH_SIG_OFS = 0, + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS = 4, + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS = 6, + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS = 8, + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS = 10, + MZ_ZIP_ECDH_CDIR_SIZE_OFS = 12, + MZ_ZIP_ECDH_CDIR_OFS_OFS = 16, + MZ_ZIP_ECDH_COMMENT_SIZE_OFS = 20, + + /* ZIP64 End of central directory locator offsets */ + MZ_ZIP64_ECDL_SIG_OFS = 0, /* 4 bytes */ + MZ_ZIP64_ECDL_NUM_DISK_CDIR_OFS = 4, /* 4 bytes */ + MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS = 8, /* 8 bytes */ + MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS = 16, /* 4 bytes */ + + /* ZIP64 End of central directory header offsets */ + MZ_ZIP64_ECDH_SIG_OFS = 0, /* 4 bytes */ + MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS = 4, /* 8 bytes */ + MZ_ZIP64_ECDH_VERSION_MADE_BY_OFS = 12, /* 2 bytes */ + MZ_ZIP64_ECDH_VERSION_NEEDED_OFS = 14, /* 2 bytes */ + MZ_ZIP64_ECDH_NUM_THIS_DISK_OFS = 16, /* 4 bytes */ + MZ_ZIP64_ECDH_NUM_DISK_CDIR_OFS = 20, /* 4 bytes */ + MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS = 24, /* 8 bytes */ + MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS = 32, /* 8 bytes */ + MZ_ZIP64_ECDH_CDIR_SIZE_OFS = 40, /* 8 bytes */ + MZ_ZIP64_ECDH_CDIR_OFS_OFS = 48, /* 8 bytes */ + MZ_ZIP_VERSION_MADE_BY_DOS_FILESYSTEM_ID = 0, + MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG = 0x10, + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED = 1, + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG = 32, + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION = 64, + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED = 8192, + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 = 1 << 11 +}; + +typedef struct { + void *m_p; + size_t m_size, m_capacity; + mz_uint m_element_size; +} mz_zip_array; + +struct mz_zip_internal_state_tag { + mz_zip_array m_central_dir; + mz_zip_array m_central_dir_offsets; + mz_zip_array m_sorted_central_dir_offsets; + + /* The flags passed in when the archive is initially opened. */ + uint32_t m_init_flags; + + /* MZ_TRUE if the archive has a zip64 end of central directory headers, etc. + */ + mz_bool m_zip64; + + /* MZ_TRUE if we found zip64 extended info in the central directory (m_zip64 + * will also be slammed to true too, even if we didn't find a zip64 end of + * central dir header, etc.) */ + mz_bool m_zip64_has_extended_info_fields; + + /* These fields are used by the file, FILE, memory, and memory/heap read/write + * helpers. */ + MZ_FILE *m_pFile; + mz_uint64 m_file_archive_start_ofs; + + void *m_pMem; + size_t m_mem_size; + size_t m_mem_capacity; +}; + +#define MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(array_ptr, element_size) \ + (array_ptr)->m_element_size = element_size + +#if defined(DEBUG) || defined(_DEBUG) +static MZ_FORCEINLINE mz_uint +mz_zip_array_range_check(const mz_zip_array *pArray, mz_uint index) { + MZ_ASSERT(index < pArray->m_size); + return index; +} +#define MZ_ZIP_ARRAY_ELEMENT(array_ptr, element_type, index) \ + ((element_type *)((array_ptr) \ + ->m_p))[mz_zip_array_range_check(array_ptr, index)] +#else +#define MZ_ZIP_ARRAY_ELEMENT(array_ptr, element_type, index) \ + ((element_type *)((array_ptr)->m_p))[index] +#endif + +static MZ_FORCEINLINE void mz_zip_array_init(mz_zip_array *pArray, + mz_uint32 element_size) { + memset(pArray, 0, sizeof(mz_zip_array)); + pArray->m_element_size = element_size; +} + +static MZ_FORCEINLINE void mz_zip_array_clear(mz_zip_archive *pZip, + mz_zip_array *pArray) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pArray->m_p); + memset(pArray, 0, sizeof(mz_zip_array)); +} + +static mz_bool mz_zip_array_ensure_capacity(mz_zip_archive *pZip, + mz_zip_array *pArray, + size_t min_new_capacity, + mz_uint growing) { + void *pNew_p; + size_t new_capacity = min_new_capacity; + MZ_ASSERT(pArray->m_element_size); + if (pArray->m_capacity >= min_new_capacity) + return MZ_TRUE; + if (growing) { + new_capacity = MZ_MAX(1, pArray->m_capacity); + while (new_capacity < min_new_capacity) + new_capacity *= 2; + } + if (NULL == (pNew_p = pZip->m_pRealloc(pZip->m_pAlloc_opaque, pArray->m_p, + pArray->m_element_size, new_capacity))) + return MZ_FALSE; + pArray->m_p = pNew_p; + pArray->m_capacity = new_capacity; + return MZ_TRUE; +} + +static MZ_FORCEINLINE mz_bool mz_zip_array_reserve(mz_zip_archive *pZip, + mz_zip_array *pArray, + size_t new_capacity, + mz_uint growing) { + if (new_capacity > pArray->m_capacity) { + if (!mz_zip_array_ensure_capacity(pZip, pArray, new_capacity, growing)) + return MZ_FALSE; + } + return MZ_TRUE; +} + +static MZ_FORCEINLINE mz_bool mz_zip_array_resize(mz_zip_archive *pZip, + mz_zip_array *pArray, + size_t new_size, + mz_uint growing) { + if (new_size > pArray->m_capacity) { + if (!mz_zip_array_ensure_capacity(pZip, pArray, new_size, growing)) + return MZ_FALSE; + } + pArray->m_size = new_size; + return MZ_TRUE; +} + +static MZ_FORCEINLINE mz_bool mz_zip_array_ensure_room(mz_zip_archive *pZip, + mz_zip_array *pArray, + size_t n) { + return mz_zip_array_reserve(pZip, pArray, pArray->m_size + n, MZ_TRUE); +} + +static MZ_FORCEINLINE mz_bool mz_zip_array_push_back(mz_zip_archive *pZip, + mz_zip_array *pArray, + const void *pElements, + size_t n) { + size_t orig_size = pArray->m_size; + if (!mz_zip_array_resize(pZip, pArray, orig_size + n, MZ_TRUE)) + return MZ_FALSE; + if (n > 0) + memcpy((mz_uint8 *)pArray->m_p + orig_size * pArray->m_element_size, + pElements, n * pArray->m_element_size); + return MZ_TRUE; +} + +#ifndef MINIZ_NO_TIME +static MZ_TIME_T mz_zip_dos_to_time_t(int dos_time, int dos_date) { + struct tm tm; + memset(&tm, 0, sizeof(tm)); + tm.tm_isdst = -1; + tm.tm_year = ((dos_date >> 9) & 127) + 1980 - 1900; + tm.tm_mon = ((dos_date >> 5) & 15) - 1; + tm.tm_mday = dos_date & 31; + tm.tm_hour = (dos_time >> 11) & 31; + tm.tm_min = (dos_time >> 5) & 63; + tm.tm_sec = (dos_time << 1) & 62; + return mktime(&tm); +} + +#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS +static void mz_zip_time_t_to_dos_time(MZ_TIME_T time, mz_uint16 *pDOS_time, + mz_uint16 *pDOS_date) { +#ifdef _MSC_VER + struct tm tm_struct; + struct tm *tm = &tm_struct; + errno_t err = localtime_s(tm, &time); + if (err) { + *pDOS_date = 0; + *pDOS_time = 0; + return; + } +#else + struct tm *tm = localtime(&time); +#endif /* #ifdef _MSC_VER */ + + *pDOS_time = (mz_uint16)(((tm->tm_hour) << 11) + ((tm->tm_min) << 5) + + ((tm->tm_sec) >> 1)); + *pDOS_date = (mz_uint16)(((tm->tm_year + 1900 - 1980) << 9) + + ((tm->tm_mon + 1) << 5) + tm->tm_mday); +} +#endif /* MINIZ_NO_ARCHIVE_WRITING_APIS */ + +#ifndef MINIZ_NO_STDIO +#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS +static mz_bool mz_zip_get_file_modified_time(const char *pFilename, + MZ_TIME_T *pTime) { + struct MZ_FILE_STAT_STRUCT file_stat; + + /* On Linux with x86 glibc, this call will fail on large files (I think >= + * 0x80000000 bytes) unless you compiled with _LARGEFILE64_SOURCE. Argh. */ + if (MZ_FILE_STAT(pFilename, &file_stat) != 0) + return MZ_FALSE; + + *pTime = file_stat.st_mtime; + + return MZ_TRUE; +} +#endif /* #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS*/ + +static mz_bool mz_zip_set_file_times(const char *pFilename, + MZ_TIME_T access_time, + MZ_TIME_T modified_time) { + struct utimbuf t; + + memset(&t, 0, sizeof(t)); + t.actime = access_time; + t.modtime = modified_time; + + return !utime(pFilename, &t); +} +#endif /* #ifndef MINIZ_NO_STDIO */ +#endif /* #ifndef MINIZ_NO_TIME */ + +static MZ_FORCEINLINE mz_bool mz_zip_set_error(mz_zip_archive *pZip, + mz_zip_error err_num) { + if (pZip) + pZip->m_last_error = err_num; + return MZ_FALSE; +} + +static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, + mz_uint flags) { + (void)flags; + if ((!pZip) || (pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (!pZip->m_pAlloc) + pZip->m_pAlloc = miniz_def_alloc_func; + if (!pZip->m_pFree) + pZip->m_pFree = miniz_def_free_func; + if (!pZip->m_pRealloc) + pZip->m_pRealloc = miniz_def_realloc_func; + + pZip->m_archive_size = 0; + pZip->m_central_directory_file_ofs = 0; + pZip->m_total_files = 0; + pZip->m_last_error = MZ_ZIP_NO_ERROR; + + if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc( + pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state)))) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state)); + MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, + sizeof(mz_uint8)); + MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, + sizeof(mz_uint32)); + MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, + sizeof(mz_uint32)); + pZip->m_pState->m_init_flags = flags; + pZip->m_pState->m_zip64 = MZ_FALSE; + pZip->m_pState->m_zip64_has_extended_info_fields = MZ_FALSE; + + pZip->m_zip_mode = MZ_ZIP_MODE_READING; + + return MZ_TRUE; +} + +static MZ_FORCEINLINE mz_bool +mz_zip_reader_filename_less(const mz_zip_array *pCentral_dir_array, + const mz_zip_array *pCentral_dir_offsets, + mz_uint l_index, mz_uint r_index) { + const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT( + pCentral_dir_array, mz_uint8, + MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, + l_index)), + *pE; + const mz_uint8 *pR = &MZ_ZIP_ARRAY_ELEMENT( + pCentral_dir_array, mz_uint8, + MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, r_index)); + mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS), + r_len = MZ_READ_LE16(pR + MZ_ZIP_CDH_FILENAME_LEN_OFS); + mz_uint8 l = 0, r = 0; + pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; + pR += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; + pE = pL + MZ_MIN(l_len, r_len); + while (pL < pE) { + if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR))) + break; + pL++; + pR++; + } + return (pL == pE) ? (l_len < r_len) : (l < r); +} + +#define MZ_SWAP_UINT32(a, b) \ + do { \ + mz_uint32 t = a; \ + a = b; \ + b = t; \ + } \ + MZ_MACRO_END + +/* Heap sort of lowercased filenames, used to help accelerate plain central + * directory searches by mz_zip_reader_locate_file(). (Could also use qsort(), + * but it could allocate memory.) */ +static void +mz_zip_reader_sort_central_dir_offsets_by_filename(mz_zip_archive *pZip) { + mz_zip_internal_state *pState = pZip->m_pState; + const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets; + const mz_zip_array *pCentral_dir = &pState->m_central_dir; + mz_uint32 *pIndices; + mz_uint32 start, end; + const mz_uint32 size = pZip->m_total_files; + + if (size <= 1U) + return; + + pIndices = &MZ_ZIP_ARRAY_ELEMENT(&pState->m_sorted_central_dir_offsets, + mz_uint32, 0); + + start = (size - 2U) >> 1U; + for (;;) { + mz_uint64 child, root = start; + for (;;) { + if ((child = (root << 1U) + 1U) >= size) + break; + child += (((child + 1U) < size) && + (mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, + pIndices[child], + pIndices[child + 1U]))); + if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, + pIndices[root], pIndices[child])) + break; + MZ_SWAP_UINT32(pIndices[root], pIndices[child]); + root = child; + } + if (!start) + break; + start--; + } + + end = size - 1; + while (end > 0) { + mz_uint64 child, root = 0; + MZ_SWAP_UINT32(pIndices[end], pIndices[0]); + for (;;) { + if ((child = (root << 1U) + 1U) >= end) + break; + child += + (((child + 1U) < end) && + mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, + pIndices[child], pIndices[child + 1U])); + if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, + pIndices[root], pIndices[child])) + break; + MZ_SWAP_UINT32(pIndices[root], pIndices[child]); + root = child; + } + end--; + } +} + +static mz_bool mz_zip_reader_locate_header_sig(mz_zip_archive *pZip, + mz_uint32 record_sig, + mz_uint32 record_size, + mz_int64 *pOfs) { + mz_int64 cur_file_ofs; + mz_uint32 buf_u32[4096 / sizeof(mz_uint32)]; + mz_uint8 *pBuf = (mz_uint8 *)buf_u32; + + /* Basic sanity checks - reject files which are too small */ + if (pZip->m_archive_size < record_size) + return MZ_FALSE; + + /* Find the record by scanning the file from the end towards the beginning. */ + cur_file_ofs = + MZ_MAX((mz_int64)pZip->m_archive_size - (mz_int64)sizeof(buf_u32), 0); + for (;;) { + int i, + n = (int)MZ_MIN(sizeof(buf_u32), pZip->m_archive_size - cur_file_ofs); + + if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, n) != (mz_uint)n) + return MZ_FALSE; + + for (i = n - 4; i >= 0; --i) { + mz_uint s = MZ_READ_LE32(pBuf + i); + if (s == record_sig) { + if ((pZip->m_archive_size - (cur_file_ofs + i)) >= record_size) + break; + } + } + + if (i >= 0) { + cur_file_ofs += i; + break; + } + + /* Give up if we've searched the entire file, or we've gone back "too far" + * (~64kb) */ + if ((!cur_file_ofs) || ((pZip->m_archive_size - cur_file_ofs) >= + (MZ_UINT16_MAX + record_size))) + return MZ_FALSE; + + cur_file_ofs = MZ_MAX(cur_file_ofs - (sizeof(buf_u32) - 3), 0); + } + + *pOfs = cur_file_ofs; + return MZ_TRUE; +} + +static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, + mz_uint flags) { + mz_uint cdir_size = 0, cdir_entries_on_this_disk = 0, num_this_disk = 0, + cdir_disk_index = 0; + mz_uint64 cdir_ofs = 0; + mz_int64 cur_file_ofs = 0; + const mz_uint8 *p; + + mz_uint32 buf_u32[4096 / sizeof(mz_uint32)]; + mz_uint8 *pBuf = (mz_uint8 *)buf_u32; + mz_bool sort_central_dir = + ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0); + mz_uint32 zip64_end_of_central_dir_locator_u32 + [(MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE + sizeof(mz_uint32) - 1) / + sizeof(mz_uint32)]; + mz_uint8 *pZip64_locator = (mz_uint8 *)zip64_end_of_central_dir_locator_u32; + + mz_uint32 zip64_end_of_central_dir_header_u32 + [(MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / + sizeof(mz_uint32)]; + mz_uint8 *pZip64_end_of_central_dir = + (mz_uint8 *)zip64_end_of_central_dir_header_u32; + + mz_uint64 zip64_end_of_central_dir_ofs = 0; + + /* Basic sanity checks - reject files which are too small, and check the first + * 4 bytes of the file to make sure a local header is there. */ + if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); + + if (!mz_zip_reader_locate_header_sig( + pZip, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG, + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE, &cur_file_ofs)) + return mz_zip_set_error(pZip, MZ_ZIP_FAILED_FINDING_CENTRAL_DIR); + + /* Read and verify the end of central directory record. */ + if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) != + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + + if (MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) != + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) + return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); + + if (cur_file_ofs >= (MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE + + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE)) { + if (pZip->m_pRead(pZip->m_pIO_opaque, + cur_file_ofs - MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE, + pZip64_locator, + MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) == + MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) { + if (MZ_READ_LE32(pZip64_locator + MZ_ZIP64_ECDL_SIG_OFS) == + MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG) { + zip64_end_of_central_dir_ofs = MZ_READ_LE64( + pZip64_locator + MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS); + if (zip64_end_of_central_dir_ofs > + (pZip->m_archive_size - MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE)) + return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); + + if (pZip->m_pRead(pZip->m_pIO_opaque, zip64_end_of_central_dir_ofs, + pZip64_end_of_central_dir, + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) == + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) { + if (MZ_READ_LE32(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_SIG_OFS) == + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG) { + pZip->m_pState->m_zip64 = MZ_TRUE; + } + } + } + } + } + + pZip->m_total_files = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS); + cdir_entries_on_this_disk = + MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS); + num_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS); + cdir_disk_index = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS); + cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS); + cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS); + + if (pZip->m_pState->m_zip64) { + mz_uint32 zip64_total_num_of_disks = + MZ_READ_LE32(pZip64_locator + MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS); + mz_uint64 zip64_cdir_total_entries = MZ_READ_LE64( + pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS); + mz_uint64 zip64_cdir_total_entries_on_this_disk = MZ_READ_LE64( + pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS); + mz_uint64 zip64_size_of_end_of_central_dir_record = MZ_READ_LE64( + pZip64_end_of_central_dir + MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS); + mz_uint64 zip64_size_of_central_directory = + MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_SIZE_OFS); + + if (zip64_size_of_end_of_central_dir_record < + (MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE - 12)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + if (zip64_total_num_of_disks != 1U) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK); + + /* Check for miniz's practical limits */ + if (zip64_cdir_total_entries > MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + + pZip->m_total_files = (mz_uint32)zip64_cdir_total_entries; + + if (zip64_cdir_total_entries_on_this_disk > MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + + cdir_entries_on_this_disk = + (mz_uint32)zip64_cdir_total_entries_on_this_disk; + + /* Check for miniz's current practical limits (sorry, this should be enough + * for millions of files) */ + if (zip64_size_of_central_directory > MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE); + + cdir_size = (mz_uint32)zip64_size_of_central_directory; + + num_this_disk = MZ_READ_LE32(pZip64_end_of_central_dir + + MZ_ZIP64_ECDH_NUM_THIS_DISK_OFS); + + cdir_disk_index = MZ_READ_LE32(pZip64_end_of_central_dir + + MZ_ZIP64_ECDH_NUM_DISK_CDIR_OFS); + + cdir_ofs = + MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_OFS_OFS); + } + + if (pZip->m_total_files != cdir_entries_on_this_disk) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK); + + if (((num_this_disk | cdir_disk_index) != 0) && + ((num_this_disk != 1) || (cdir_disk_index != 1))) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK); + + if (cdir_size < pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + if ((cdir_ofs + (mz_uint64)cdir_size) > pZip->m_archive_size) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + pZip->m_central_directory_file_ofs = cdir_ofs; + + if (pZip->m_total_files) { + mz_uint i, n; + /* Read the entire central directory into a heap block, and allocate another + * heap block to hold the unsorted central dir file record offsets, and + * possibly another to hold the sorted indices. */ + if ((!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir, cdir_size, + MZ_FALSE)) || + (!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir_offsets, + pZip->m_total_files, MZ_FALSE))) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + if (sort_central_dir) { + if (!mz_zip_array_resize(pZip, + &pZip->m_pState->m_sorted_central_dir_offsets, + pZip->m_total_files, MZ_FALSE)) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + if (pZip->m_pRead(pZip->m_pIO_opaque, cdir_ofs, + pZip->m_pState->m_central_dir.m_p, + cdir_size) != cdir_size) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + + /* Now create an index into the central directory file records, do some + * basic sanity checking on each record */ + p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p; + for (n = cdir_size, i = 0; i < pZip->m_total_files; ++i) { + mz_uint total_header_size, disk_index, bit_flags, filename_size, + ext_data_size; + mz_uint64 comp_size, decomp_size, local_header_ofs; + + if ((n < MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) || + (MZ_READ_LE32(p) != MZ_ZIP_CENTRAL_DIR_HEADER_SIG)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, + i) = + (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p); + + if (sort_central_dir) + MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_sorted_central_dir_offsets, + mz_uint32, i) = i; + + comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); + decomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS); + local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS); + filename_size = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); + ext_data_size = MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS); + + if ((!pZip->m_pState->m_zip64_has_extended_info_fields) && + (ext_data_size) && + (MZ_MAX(MZ_MAX(comp_size, decomp_size), local_header_ofs) == + MZ_UINT32_MAX)) { + /* Attempt to find zip64 extended information field in the entry's extra + * data */ + mz_uint32 extra_size_remaining = ext_data_size; + + if (extra_size_remaining) { + const mz_uint8 *pExtra_data; + void *buf = NULL; + + if (MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size + ext_data_size > + n) { + buf = MZ_MALLOC(ext_data_size); + if (buf == NULL) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + if (pZip->m_pRead(pZip->m_pIO_opaque, + cdir_ofs + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + + filename_size, + buf, ext_data_size) != ext_data_size) { + MZ_FREE(buf); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + } + + pExtra_data = (mz_uint8 *)buf; + } else { + pExtra_data = p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size; + } + + do { + mz_uint32 field_id; + mz_uint32 field_data_size; + + if (extra_size_remaining < (sizeof(mz_uint16) * 2)) { + MZ_FREE(buf); + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + } + + field_id = MZ_READ_LE16(pExtra_data); + field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16)); + + if ((field_data_size + sizeof(mz_uint16) * 2) > + extra_size_remaining) { + MZ_FREE(buf); + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + } + + if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) { + /* Ok, the archive didn't have any zip64 headers but it uses a + * zip64 extended information field so mark it as zip64 anyway + * (this can occur with infozip's zip util when it reads + * compresses files from stdin). */ + pZip->m_pState->m_zip64 = MZ_TRUE; + pZip->m_pState->m_zip64_has_extended_info_fields = MZ_TRUE; + break; + } + + pExtra_data += sizeof(mz_uint16) * 2 + field_data_size; + extra_size_remaining = + extra_size_remaining - sizeof(mz_uint16) * 2 - field_data_size; + } while (extra_size_remaining); + + MZ_FREE(buf); + } + } + + /* I've seen archives that aren't marked as zip64 that uses zip64 ext + * data, argh */ + if ((comp_size != MZ_UINT32_MAX) && (decomp_size != MZ_UINT32_MAX)) { + if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) && + (decomp_size != comp_size)) || + (decomp_size && !comp_size)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + } + + disk_index = MZ_READ_LE16(p + MZ_ZIP_CDH_DISK_START_OFS); + if ((disk_index == MZ_UINT16_MAX) || + ((disk_index != num_this_disk) && (disk_index != 1))) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK); + + if (comp_size != MZ_UINT32_MAX) { + if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) + + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + } + + bit_flags = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); + if (bit_flags & MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION); + + if ((total_header_size = MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS) + + MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS)) > + n) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + n -= total_header_size; + p += total_header_size; + } + } + + if (sort_central_dir) + mz_zip_reader_sort_central_dir_offsets_by_filename(pZip); + + return MZ_TRUE; +} + +void mz_zip_zero_struct(mz_zip_archive *pZip) { + if (pZip) + MZ_CLEAR_OBJ(*pZip); +} + +static mz_bool mz_zip_reader_end_internal(mz_zip_archive *pZip, + mz_bool set_last_error) { + mz_bool status = MZ_TRUE; + + if (!pZip) + return MZ_FALSE; + + if ((!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || + (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) { + if (set_last_error) + pZip->m_last_error = MZ_ZIP_INVALID_PARAMETER; + + return MZ_FALSE; + } + + if (pZip->m_pState) { + mz_zip_internal_state *pState = pZip->m_pState; + pZip->m_pState = NULL; + + mz_zip_array_clear(pZip, &pState->m_central_dir); + mz_zip_array_clear(pZip, &pState->m_central_dir_offsets); + mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets); + +#ifndef MINIZ_NO_STDIO + if (pState->m_pFile) { + if (pZip->m_zip_type == MZ_ZIP_TYPE_FILE) { + if (MZ_FCLOSE(pState->m_pFile) == EOF) { + if (set_last_error) + pZip->m_last_error = MZ_ZIP_FILE_CLOSE_FAILED; + status = MZ_FALSE; + } + } + pState->m_pFile = NULL; + } +#endif /* #ifndef MINIZ_NO_STDIO */ + + pZip->m_pFree(pZip->m_pAlloc_opaque, pState); + } + pZip->m_zip_mode = MZ_ZIP_MODE_INVALID; + + return status; +} + +mz_bool mz_zip_reader_end(mz_zip_archive *pZip) { + return mz_zip_reader_end_internal(pZip, MZ_TRUE); +} +mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, + mz_uint flags) { + if ((!pZip) || (!pZip->m_pRead)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (!mz_zip_reader_init_internal(pZip, flags)) + return MZ_FALSE; + + pZip->m_zip_type = MZ_ZIP_TYPE_USER; + pZip->m_archive_size = size; + + if (!mz_zip_reader_read_central_dir(pZip, flags)) { + mz_zip_reader_end_internal(pZip, MZ_FALSE); + return MZ_FALSE; + } + + return MZ_TRUE; +} + +static size_t mz_zip_mem_read_func(void *pOpaque, mz_uint64 file_ofs, + void *pBuf, size_t n) { + mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; + size_t s = (file_ofs >= pZip->m_archive_size) + ? 0 + : (size_t)MZ_MIN(pZip->m_archive_size - file_ofs, n); + memcpy(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s); + return s; +} + +mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, + size_t size, mz_uint flags) { + if (!pMem) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); + + if (!mz_zip_reader_init_internal(pZip, flags)) + return MZ_FALSE; + + pZip->m_zip_type = MZ_ZIP_TYPE_MEMORY; + pZip->m_archive_size = size; + pZip->m_pRead = mz_zip_mem_read_func; + pZip->m_pIO_opaque = pZip; + pZip->m_pNeeds_keepalive = NULL; + +#ifdef __cplusplus + pZip->m_pState->m_pMem = const_cast(pMem); +#else + pZip->m_pState->m_pMem = (void *)pMem; +#endif + + pZip->m_pState->m_mem_size = size; + + if (!mz_zip_reader_read_central_dir(pZip, flags)) { + mz_zip_reader_end_internal(pZip, MZ_FALSE); + return MZ_FALSE; + } + + return MZ_TRUE; +} + +#ifndef MINIZ_NO_STDIO +static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs, + void *pBuf, size_t n) { + mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; + mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile); + + file_ofs += pZip->m_pState->m_file_archive_start_ofs; + + if (((mz_int64)file_ofs < 0) || + (((cur_ofs != (mz_int64)file_ofs)) && + (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET)))) + return 0; + + return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile); +} + +mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, + mz_uint32 flags) { + return mz_zip_reader_init_file_v2(pZip, pFilename, flags, 0, 0); +} + +mz_bool mz_zip_reader_init_file_v2(mz_zip_archive *pZip, const char *pFilename, + mz_uint flags, mz_uint64 file_start_ofs, + mz_uint64 archive_size) { + mz_uint64 file_size; + MZ_FILE *pFile; + + if ((!pZip) || (!pFilename) || + ((archive_size) && + (archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE))) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + pFile = MZ_FOPEN(pFilename, "rb"); + if (!pFile) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED); + + file_size = archive_size; + if (!file_size) { + if (MZ_FSEEK64(pFile, 0, SEEK_END)) { + MZ_FCLOSE(pFile); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_SEEK_FAILED); + } + + file_size = MZ_FTELL64(pFile); + } + + /* TODO: Better sanity check archive_size and the # of actual remaining bytes + */ + + if (file_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) { + MZ_FCLOSE(pFile); + return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); + } + + if (!mz_zip_reader_init_internal(pZip, flags)) { + MZ_FCLOSE(pFile); + return MZ_FALSE; + } + + pZip->m_zip_type = MZ_ZIP_TYPE_FILE; + pZip->m_pRead = mz_zip_file_read_func; + pZip->m_pIO_opaque = pZip; + pZip->m_pState->m_pFile = pFile; + pZip->m_archive_size = file_size; + pZip->m_pState->m_file_archive_start_ofs = file_start_ofs; + + if (!mz_zip_reader_read_central_dir(pZip, flags)) { + mz_zip_reader_end_internal(pZip, MZ_FALSE); + return MZ_FALSE; + } + + return MZ_TRUE; +} + +mz_bool mz_zip_reader_init_file_v2_rpb(mz_zip_archive *pZip, + const char *pFilename, mz_uint flags, + mz_uint64 file_start_ofs, + mz_uint64 archive_size) { + mz_uint64 file_size; + MZ_FILE *pFile; + + if ((!pZip) || (!pFilename) || + ((archive_size) && + (archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE))) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + pFile = MZ_FOPEN(pFilename, "r+b"); + if (!pFile) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED); + + file_size = archive_size; + if (!file_size) { + if (MZ_FSEEK64(pFile, 0, SEEK_END)) { + MZ_FCLOSE(pFile); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_SEEK_FAILED); + } + + file_size = MZ_FTELL64(pFile); + } + + /* TODO: Better sanity check archive_size and the # of actual remaining bytes + */ + + if (file_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) { + MZ_FCLOSE(pFile); + return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); + } + + if (!mz_zip_reader_init_internal(pZip, flags)) { + MZ_FCLOSE(pFile); + return MZ_FALSE; + } + + pZip->m_zip_type = MZ_ZIP_TYPE_FILE; + pZip->m_pRead = mz_zip_file_read_func; + pZip->m_pIO_opaque = pZip; + pZip->m_pState->m_pFile = pFile; + pZip->m_archive_size = file_size; + pZip->m_pState->m_file_archive_start_ofs = file_start_ofs; + + if (!mz_zip_reader_read_central_dir(pZip, flags)) { + mz_zip_reader_end_internal(pZip, MZ_FALSE); + return MZ_FALSE; + } + + return MZ_TRUE; +} + +mz_bool mz_zip_reader_init_cfile(mz_zip_archive *pZip, MZ_FILE *pFile, + mz_uint64 archive_size, mz_uint flags) { + mz_uint64 cur_file_ofs; + + if ((!pZip) || (!pFile)) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED); + + cur_file_ofs = MZ_FTELL64(pFile); + + if (!archive_size) { + if (MZ_FSEEK64(pFile, 0, SEEK_END)) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_SEEK_FAILED); + + archive_size = MZ_FTELL64(pFile) - cur_file_ofs; + + if (archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); + } + + if (!mz_zip_reader_init_internal(pZip, flags)) + return MZ_FALSE; + + pZip->m_zip_type = MZ_ZIP_TYPE_CFILE; + pZip->m_pRead = mz_zip_file_read_func; + + pZip->m_pIO_opaque = pZip; + pZip->m_pState->m_pFile = pFile; + pZip->m_archive_size = archive_size; + pZip->m_pState->m_file_archive_start_ofs = cur_file_ofs; + + if (!mz_zip_reader_read_central_dir(pZip, flags)) { + mz_zip_reader_end_internal(pZip, MZ_FALSE); + return MZ_FALSE; + } + + return MZ_TRUE; +} + +#endif /* #ifndef MINIZ_NO_STDIO */ + +static MZ_FORCEINLINE const mz_uint8 *mz_zip_get_cdh(mz_zip_archive *pZip, + mz_uint file_index) { + if ((!pZip) || (!pZip->m_pState) || (file_index >= pZip->m_total_files)) + return NULL; + return &MZ_ZIP_ARRAY_ELEMENT( + &pZip->m_pState->m_central_dir, mz_uint8, + MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, + file_index)); +} + +mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, + mz_uint file_index) { + mz_uint m_bit_flag; + const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index); + if (!p) { + mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + return MZ_FALSE; + } + + m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); + return (m_bit_flag & + (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION)) != 0; +} + +mz_bool mz_zip_reader_is_file_supported(mz_zip_archive *pZip, + mz_uint file_index) { + mz_uint bit_flag; + mz_uint method; + + const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index); + if (!p) { + mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + return MZ_FALSE; + } + + method = MZ_READ_LE16(p + MZ_ZIP_CDH_METHOD_OFS); + bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); + + if ((method != 0) && (method != MZ_DEFLATED)) { + mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD); + return MZ_FALSE; + } + + if (bit_flag & (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION)) { + mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION); + return MZ_FALSE; + } + + if (bit_flag & MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG) { + mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE); + return MZ_FALSE; + } + + return MZ_TRUE; +} + +mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, + mz_uint file_index) { + mz_uint filename_len, attribute_mapping_id, external_attr; + const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index); + if (!p) { + mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + return MZ_FALSE; + } + + filename_len = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); + if (filename_len) { + if (*(p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_len - 1) == '/') + return MZ_TRUE; + } + + /* Bugfix: This code was also checking if the internal attribute was non-zero, + * which wasn't correct. */ + /* Most/all zip writers (hopefully) set DOS file/directory attributes in the + * low 16-bits, so check for the DOS directory flag and ignore the source OS + * ID in the created by field. */ + /* FIXME: Remove this check? Is it necessary - we already check the filename. + */ + attribute_mapping_id = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_MADE_BY_OFS) >> 8; + (void)attribute_mapping_id; + + external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS); + if ((external_attr & MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG) != 0) { + return MZ_TRUE; + } + + return MZ_FALSE; +} + +static mz_bool mz_zip_file_stat_internal(mz_zip_archive *pZip, + mz_uint file_index, + const mz_uint8 *pCentral_dir_header, + mz_zip_archive_file_stat *pStat, + mz_bool *pFound_zip64_extra_data) { + mz_uint n; + const mz_uint8 *p = pCentral_dir_header; + + if (pFound_zip64_extra_data) + *pFound_zip64_extra_data = MZ_FALSE; + + if ((!p) || (!pStat)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + /* Extract fields from the central directory record. */ + pStat->m_file_index = file_index; + pStat->m_central_dir_ofs = MZ_ZIP_ARRAY_ELEMENT( + &pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index); + pStat->m_version_made_by = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_MADE_BY_OFS); + pStat->m_version_needed = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_NEEDED_OFS); + pStat->m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); + pStat->m_method = MZ_READ_LE16(p + MZ_ZIP_CDH_METHOD_OFS); +#ifndef MINIZ_NO_TIME + pStat->m_time = + mz_zip_dos_to_time_t(MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_TIME_OFS), + MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_DATE_OFS)); +#endif + pStat->m_crc32 = MZ_READ_LE32(p + MZ_ZIP_CDH_CRC32_OFS); + pStat->m_comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); + pStat->m_uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS); + pStat->m_internal_attr = MZ_READ_LE16(p + MZ_ZIP_CDH_INTERNAL_ATTR_OFS); + pStat->m_external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS); + pStat->m_local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS); + + /* Copy as much of the filename and comment as possible. */ + n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); + n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE - 1); + memcpy(pStat->m_filename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); + pStat->m_filename[n] = '\0'; + + n = MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS); + n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE - 1); + pStat->m_comment_size = n; + memcpy(pStat->m_comment, + p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS), + n); + pStat->m_comment[n] = '\0'; + + /* Set some flags for convienance */ + pStat->m_is_directory = mz_zip_reader_is_file_a_directory(pZip, file_index); + pStat->m_is_encrypted = mz_zip_reader_is_file_encrypted(pZip, file_index); + pStat->m_is_supported = mz_zip_reader_is_file_supported(pZip, file_index); + + /* See if we need to read any zip64 extended information fields. */ + /* Confusingly, these zip64 fields can be present even on non-zip64 archives + * (Debian zip on a huge files from stdin piped to stdout creates them). */ + if (MZ_MAX(MZ_MAX(pStat->m_comp_size, pStat->m_uncomp_size), + pStat->m_local_header_ofs) == MZ_UINT32_MAX) { + /* Attempt to find zip64 extended information field in the entry's extra + * data */ + mz_uint32 extra_size_remaining = MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS); + + if (extra_size_remaining) { + const mz_uint8 *pExtra_data = + p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); + + do { + mz_uint32 field_id; + mz_uint32 field_data_size; + + if (extra_size_remaining < (sizeof(mz_uint16) * 2)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + field_id = MZ_READ_LE16(pExtra_data); + field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16)); + + if ((field_data_size + sizeof(mz_uint16) * 2) > extra_size_remaining) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) { + const mz_uint8 *pField_data = pExtra_data + sizeof(mz_uint16) * 2; + mz_uint32 field_data_remaining = field_data_size; + + if (pFound_zip64_extra_data) + *pFound_zip64_extra_data = MZ_TRUE; + + if (pStat->m_uncomp_size == MZ_UINT32_MAX) { + if (field_data_remaining < sizeof(mz_uint64)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + pStat->m_uncomp_size = MZ_READ_LE64(pField_data); + pField_data += sizeof(mz_uint64); + field_data_remaining -= sizeof(mz_uint64); + } + + if (pStat->m_comp_size == MZ_UINT32_MAX) { + if (field_data_remaining < sizeof(mz_uint64)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + pStat->m_comp_size = MZ_READ_LE64(pField_data); + pField_data += sizeof(mz_uint64); + field_data_remaining -= sizeof(mz_uint64); + } + + if (pStat->m_local_header_ofs == MZ_UINT32_MAX) { + if (field_data_remaining < sizeof(mz_uint64)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + pStat->m_local_header_ofs = MZ_READ_LE64(pField_data); + pField_data += sizeof(mz_uint64); + (void)pField_data; // unused + + field_data_remaining -= sizeof(mz_uint64); + (void)field_data_remaining; // unused + } + + break; + } + + pExtra_data += sizeof(mz_uint16) * 2 + field_data_size; + extra_size_remaining = + extra_size_remaining - sizeof(mz_uint16) * 2 - field_data_size; + } while (extra_size_remaining); + } + } + + return MZ_TRUE; +} + +static MZ_FORCEINLINE mz_bool mz_zip_string_equal(const char *pA, + const char *pB, mz_uint len, + mz_uint flags) { + mz_uint i; + if (flags & MZ_ZIP_FLAG_CASE_SENSITIVE) + return 0 == memcmp(pA, pB, len); + for (i = 0; i < len; ++i) + if (MZ_TOLOWER(pA[i]) != MZ_TOLOWER(pB[i])) + return MZ_FALSE; + return MZ_TRUE; +} + +static MZ_FORCEINLINE int +mz_zip_filename_compare(const mz_zip_array *pCentral_dir_array, + const mz_zip_array *pCentral_dir_offsets, + mz_uint l_index, const char *pR, mz_uint r_len) { + const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT( + pCentral_dir_array, mz_uint8, + MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, + l_index)), + *pE; + mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS); + mz_uint8 l = 0, r = 0; + pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; + pE = pL + MZ_MIN(l_len, r_len); + while (pL < pE) { + if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR))) + break; + pL++; + pR++; + } + return (pL == pE) ? (int)(l_len - r_len) : (l - r); +} + +static mz_bool mz_zip_locate_file_binary_search(mz_zip_archive *pZip, + const char *pFilename, + mz_uint32 *pIndex) { + mz_zip_internal_state *pState = pZip->m_pState; + const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets; + const mz_zip_array *pCentral_dir = &pState->m_central_dir; + mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT( + &pState->m_sorted_central_dir_offsets, mz_uint32, 0); + const uint32_t size = pZip->m_total_files; + const mz_uint filename_len = (mz_uint)strlen(pFilename); + + if (pIndex) + *pIndex = 0; + + if (size) { + /* yes I could use uint32_t's, but then we would have to add some special + * case checks in the loop, argh, and */ + /* honestly the major expense here on 32-bit CPU's will still be the + * filename compare */ + mz_int64 l = 0, h = (mz_int64)size - 1; + + while (l <= h) { + mz_int64 m = l + ((h - l) >> 1); + uint32_t file_index = pIndices[(uint32_t)m]; + + int comp = mz_zip_filename_compare(pCentral_dir, pCentral_dir_offsets, + file_index, pFilename, filename_len); + if (!comp) { + if (pIndex) + *pIndex = file_index; + return MZ_TRUE; + } else if (comp < 0) + l = m + 1; + else + h = m - 1; + } + } + + return mz_zip_set_error(pZip, MZ_ZIP_FILE_NOT_FOUND); +} + +int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, + const char *pComment, mz_uint flags) { + mz_uint32 index; + if (!mz_zip_reader_locate_file_v2(pZip, pName, pComment, flags, &index)) + return -1; + else + return (int)index; +} + +mz_bool mz_zip_reader_locate_file_v2(mz_zip_archive *pZip, const char *pName, + const char *pComment, mz_uint flags, + mz_uint32 *pIndex) { + mz_uint file_index; + size_t name_len, comment_len; + + if (pIndex) + *pIndex = 0; + + if ((!pZip) || (!pZip->m_pState) || (!pName)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + /* See if we can use a binary search */ + if (((pZip->m_pState->m_init_flags & + MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0) && + (pZip->m_zip_mode == MZ_ZIP_MODE_READING) && + ((flags & (MZ_ZIP_FLAG_IGNORE_PATH | MZ_ZIP_FLAG_CASE_SENSITIVE)) == 0) && + (!pComment) && (pZip->m_pState->m_sorted_central_dir_offsets.m_size)) { + return mz_zip_locate_file_binary_search(pZip, pName, pIndex); + } + + /* Locate the entry by scanning the entire central directory */ + name_len = strlen(pName); + if (name_len > MZ_UINT16_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + comment_len = pComment ? strlen(pComment) : 0; + if (comment_len > MZ_UINT16_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + for (file_index = 0; file_index < pZip->m_total_files; file_index++) { + const mz_uint8 *pHeader = &MZ_ZIP_ARRAY_ELEMENT( + &pZip->m_pState->m_central_dir, mz_uint8, + MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, + file_index)); + mz_uint filename_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_FILENAME_LEN_OFS); + const char *pFilename = + (const char *)pHeader + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; + if (filename_len < name_len) + continue; + if (comment_len) { + mz_uint file_extra_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_EXTRA_LEN_OFS), + file_comment_len = + MZ_READ_LE16(pHeader + MZ_ZIP_CDH_COMMENT_LEN_OFS); + const char *pFile_comment = pFilename + filename_len + file_extra_len; + if ((file_comment_len != comment_len) || + (!mz_zip_string_equal(pComment, pFile_comment, file_comment_len, + flags))) + continue; + } + if ((flags & MZ_ZIP_FLAG_IGNORE_PATH) && (filename_len)) { + int ofs = filename_len - 1; + do { + if ((pFilename[ofs] == '/') || (pFilename[ofs] == '\\') || + (pFilename[ofs] == ':')) + break; + } while (--ofs >= 0); + ofs++; + pFilename += ofs; + filename_len -= ofs; + } + if ((filename_len == name_len) && + (mz_zip_string_equal(pName, pFilename, filename_len, flags))) { + if (pIndex) + *pIndex = file_index; + return MZ_TRUE; + } + } + + return mz_zip_set_error(pZip, MZ_ZIP_FILE_NOT_FOUND); +} + +static mz_bool mz_zip_reader_extract_to_mem_no_alloc1( + mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, + mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size, + const mz_zip_archive_file_stat *st) { + int status = TINFL_STATUS_DONE; + mz_uint64 needed_size, cur_file_ofs, comp_remaining, + out_buf_ofs = 0, read_buf_size, read_buf_ofs = 0, read_buf_avail; + mz_zip_archive_file_stat file_stat; + void *pRead_buf; + mz_uint32 + local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / + sizeof(mz_uint32)]; + mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; + tinfl_decompressor inflator; + + if ((!pZip) || (!pZip->m_pState) || ((buf_size) && (!pBuf)) || + ((user_read_buf_size) && (!pUser_read_buf)) || (!pZip->m_pRead)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (st) { + file_stat = *st; + } else if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) + return MZ_FALSE; + + /* A directory or zero length file */ + if ((file_stat.m_is_directory) || (!file_stat.m_comp_size)) + return MZ_TRUE; + + /* Encryption and patch files are not supported. */ + if (file_stat.m_bit_flag & + (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION | + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG)) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION); + + /* This function only supports decompressing stored and deflate. */ + if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && + (file_stat.m_method != MZ_DEFLATED)) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD); + + /* Ensure supplied output buffer is large enough. */ + needed_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? file_stat.m_comp_size + : file_stat.m_uncomp_size; + if (buf_size < needed_size) + return mz_zip_set_error(pZip, MZ_ZIP_BUF_TOO_SMALL); + + /* Read and parse the local directory entry. */ + cur_file_ofs = file_stat.m_local_header_ofs; + if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + + if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); + if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method)) { + /* The file is stored or the caller has requested the compressed data. */ + if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, + (size_t)needed_size) != needed_size) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) == 0) { + if (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, + (size_t)file_stat.m_uncomp_size) != file_stat.m_crc32) + return mz_zip_set_error(pZip, MZ_ZIP_CRC_CHECK_FAILED); + } +#endif + + return MZ_TRUE; + } + + /* Decompress the file either directly from memory or from a file input + * buffer. */ + tinfl_init(&inflator); + + if (pZip->m_pState->m_pMem) { + /* Read directly from the archive in memory. */ + pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs; + read_buf_size = read_buf_avail = file_stat.m_comp_size; + comp_remaining = 0; + } else if (pUser_read_buf) { + /* Use a user provided read buffer. */ + if (!user_read_buf_size) + return MZ_FALSE; + pRead_buf = (mz_uint8 *)pUser_read_buf; + read_buf_size = user_read_buf_size; + read_buf_avail = 0; + comp_remaining = file_stat.m_comp_size; + } else { + /* Temporarily allocate a read buffer. */ + read_buf_size = + MZ_MIN(file_stat.m_comp_size, (mz_uint64)MZ_ZIP_MAX_IO_BUF_SIZE); + if (((sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF)) + return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR); + + if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, + (size_t)read_buf_size))) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + read_buf_avail = 0; + comp_remaining = file_stat.m_comp_size; + } + + do { + /* The size_t cast here should be OK because we've verified that the output + * buffer is >= file_stat.m_uncomp_size above */ + size_t in_buf_size, + out_buf_size = (size_t)(file_stat.m_uncomp_size - out_buf_ofs); + if ((!read_buf_avail) && (!pZip->m_pState->m_pMem)) { + read_buf_avail = MZ_MIN(read_buf_size, comp_remaining); + if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, + (size_t)read_buf_avail) != read_buf_avail) { + status = TINFL_STATUS_FAILED; + mz_zip_set_error(pZip, MZ_ZIP_DECOMPRESSION_FAILED); + break; + } + cur_file_ofs += read_buf_avail; + comp_remaining -= read_buf_avail; + read_buf_ofs = 0; + } + in_buf_size = (size_t)read_buf_avail; + status = tinfl_decompress( + &inflator, (mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, + (mz_uint8 *)pBuf, (mz_uint8 *)pBuf + out_buf_ofs, &out_buf_size, + TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | + (comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0)); + read_buf_avail -= in_buf_size; + read_buf_ofs += in_buf_size; + out_buf_ofs += out_buf_size; + } while (status == TINFL_STATUS_NEEDS_MORE_INPUT); + + if (status == TINFL_STATUS_DONE) { + /* Make sure the entire file was decompressed, and check its CRC. */ + if (out_buf_ofs != file_stat.m_uncomp_size) { + mz_zip_set_error(pZip, MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE); + status = TINFL_STATUS_FAILED; + } +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + else if (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, + (size_t)file_stat.m_uncomp_size) != file_stat.m_crc32) { + mz_zip_set_error(pZip, MZ_ZIP_CRC_CHECK_FAILED); + status = TINFL_STATUS_FAILED; + } +#endif + } + + if ((!pZip->m_pState->m_pMem) && (!pUser_read_buf)) + pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); + + return status == TINFL_STATUS_DONE; +} + +mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, + mz_uint file_index, void *pBuf, + size_t buf_size, mz_uint flags, + void *pUser_read_buf, + size_t user_read_buf_size) { + return mz_zip_reader_extract_to_mem_no_alloc1(pZip, file_index, pBuf, + buf_size, flags, pUser_read_buf, + user_read_buf_size, NULL); +} + +mz_bool mz_zip_reader_extract_file_to_mem_no_alloc( + mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, + mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size) { + mz_uint32 file_index; + if (!mz_zip_reader_locate_file_v2(pZip, pFilename, NULL, flags, &file_index)) + return MZ_FALSE; + return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, + flags, pUser_read_buf, + user_read_buf_size); +} + +mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, + void *pBuf, size_t buf_size, + mz_uint flags) { + return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, + flags, NULL, 0); +} + +mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, + const char *pFilename, void *pBuf, + size_t buf_size, mz_uint flags) { + return mz_zip_reader_extract_file_to_mem_no_alloc(pZip, pFilename, pBuf, + buf_size, flags, NULL, 0); +} + +void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, + size_t *pSize, mz_uint flags) { + mz_zip_archive_file_stat file_stat; + mz_uint64 alloc_size; + void *pBuf; + + if (pSize) + *pSize = 0; + + if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) + return NULL; + + alloc_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? file_stat.m_comp_size + : file_stat.m_uncomp_size; + if (((sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF)) { + mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR); + return NULL; + } + + if (NULL == + (pBuf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)alloc_size))) { + mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + return NULL; + } + + if (!mz_zip_reader_extract_to_mem_no_alloc1(pZip, file_index, pBuf, + (size_t)alloc_size, flags, NULL, + 0, &file_stat)) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); + return NULL; + } + + if (pSize) + *pSize = (size_t)alloc_size; + return pBuf; +} + +void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, + const char *pFilename, size_t *pSize, + mz_uint flags) { + mz_uint32 file_index; + if (!mz_zip_reader_locate_file_v2(pZip, pFilename, NULL, flags, + &file_index)) { + if (pSize) + *pSize = 0; + return MZ_FALSE; + } + return mz_zip_reader_extract_to_heap(pZip, file_index, pSize, flags); +} + +mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, + mz_uint file_index, + mz_file_write_func pCallback, + void *pOpaque, mz_uint flags) { + int status = TINFL_STATUS_DONE; +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + mz_uint file_crc32 = MZ_CRC32_INIT; +#endif + mz_uint64 read_buf_size, read_buf_ofs = 0, read_buf_avail, comp_remaining, + out_buf_ofs = 0, cur_file_ofs; + mz_zip_archive_file_stat file_stat; + void *pRead_buf = NULL; + void *pWrite_buf = NULL; + mz_uint32 + local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / + sizeof(mz_uint32)]; + mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; + + if ((!pZip) || (!pZip->m_pState) || (!pCallback) || (!pZip->m_pRead)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) + return MZ_FALSE; + + /* A directory or zero length file */ + if (file_stat.m_is_directory || (!file_stat.m_comp_size)) + return MZ_TRUE; + + /* Encryption and patch files are not supported. */ + if (file_stat.m_bit_flag & + (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION | + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG)) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION); + + /* This function only supports decompressing stored and deflate. */ + if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && + (file_stat.m_method != MZ_DEFLATED)) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD); + + /* Read and do some minimal validation of the local directory entry (this + * doesn't crack the zip64 stuff, which we already have from the central dir) + */ + cur_file_ofs = file_stat.m_local_header_ofs; + if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + + if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); + if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + /* Decompress the file either directly from memory or from a file input + * buffer. */ + if (pZip->m_pState->m_pMem) { + pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs; + read_buf_size = read_buf_avail = file_stat.m_comp_size; + comp_remaining = 0; + } else { + read_buf_size = + MZ_MIN(file_stat.m_comp_size, (mz_uint64)MZ_ZIP_MAX_IO_BUF_SIZE); + if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, + (size_t)read_buf_size))) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + read_buf_avail = 0; + comp_remaining = file_stat.m_comp_size; + } + + if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method)) { + /* The file is stored or the caller has requested the compressed data. */ + if (pZip->m_pState->m_pMem) { + if (((sizeof(size_t) == sizeof(mz_uint32))) && + (file_stat.m_comp_size > MZ_UINT32_MAX)) + return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR); + + if (pCallback(pOpaque, out_buf_ofs, pRead_buf, + (size_t)file_stat.m_comp_size) != file_stat.m_comp_size) { + mz_zip_set_error(pZip, MZ_ZIP_WRITE_CALLBACK_FAILED); + status = TINFL_STATUS_FAILED; + } else if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) { +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + file_crc32 = + (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, + (size_t)file_stat.m_comp_size); +#endif + } + + cur_file_ofs += file_stat.m_comp_size; + out_buf_ofs += file_stat.m_comp_size; + comp_remaining = 0; + } else { + while (comp_remaining) { + read_buf_avail = MZ_MIN(read_buf_size, comp_remaining); + if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, + (size_t)read_buf_avail) != read_buf_avail) { + mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + status = TINFL_STATUS_FAILED; + break; + } + +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) { + file_crc32 = (mz_uint32)mz_crc32( + file_crc32, (const mz_uint8 *)pRead_buf, (size_t)read_buf_avail); + } +#endif + + if (pCallback(pOpaque, out_buf_ofs, pRead_buf, + (size_t)read_buf_avail) != read_buf_avail) { + mz_zip_set_error(pZip, MZ_ZIP_WRITE_CALLBACK_FAILED); + status = TINFL_STATUS_FAILED; + break; + } + + cur_file_ofs += read_buf_avail; + out_buf_ofs += read_buf_avail; + comp_remaining -= read_buf_avail; + } + } + } else { + tinfl_decompressor inflator; + tinfl_init(&inflator); + + if (NULL == (pWrite_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, + TINFL_LZ_DICT_SIZE))) { + mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + status = TINFL_STATUS_FAILED; + } else { + do { + mz_uint8 *pWrite_buf_cur = + (mz_uint8 *)pWrite_buf + (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1)); + size_t in_buf_size, + out_buf_size = + TINFL_LZ_DICT_SIZE - (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1)); + if ((!read_buf_avail) && (!pZip->m_pState->m_pMem)) { + read_buf_avail = MZ_MIN(read_buf_size, comp_remaining); + if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, + (size_t)read_buf_avail) != read_buf_avail) { + mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + status = TINFL_STATUS_FAILED; + break; + } + cur_file_ofs += read_buf_avail; + comp_remaining -= read_buf_avail; + read_buf_ofs = 0; + } + + in_buf_size = (size_t)read_buf_avail; + status = tinfl_decompress( + &inflator, (const mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, + (mz_uint8 *)pWrite_buf, pWrite_buf_cur, &out_buf_size, + comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0); + read_buf_avail -= in_buf_size; + read_buf_ofs += in_buf_size; + + if (out_buf_size) { + if (pCallback(pOpaque, out_buf_ofs, pWrite_buf_cur, out_buf_size) != + out_buf_size) { + mz_zip_set_error(pZip, MZ_ZIP_WRITE_CALLBACK_FAILED); + status = TINFL_STATUS_FAILED; + break; + } + +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + file_crc32 = + (mz_uint32)mz_crc32(file_crc32, pWrite_buf_cur, out_buf_size); +#endif + if ((out_buf_ofs += out_buf_size) > file_stat.m_uncomp_size) { + mz_zip_set_error(pZip, MZ_ZIP_DECOMPRESSION_FAILED); + status = TINFL_STATUS_FAILED; + break; + } + } + } while ((status == TINFL_STATUS_NEEDS_MORE_INPUT) || + (status == TINFL_STATUS_HAS_MORE_OUTPUT)); + } + } + + if ((status == TINFL_STATUS_DONE) && + (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA))) { + /* Make sure the entire file was decompressed, and check its CRC. */ + if (out_buf_ofs != file_stat.m_uncomp_size) { + mz_zip_set_error(pZip, MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE); + status = TINFL_STATUS_FAILED; + } +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + else if (file_crc32 != file_stat.m_crc32) { + mz_zip_set_error(pZip, MZ_ZIP_DECOMPRESSION_FAILED); + status = TINFL_STATUS_FAILED; + } +#endif + } + + if (!pZip->m_pState->m_pMem) + pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); + + if (pWrite_buf) + pZip->m_pFree(pZip->m_pAlloc_opaque, pWrite_buf); + + return status == TINFL_STATUS_DONE; +} + +mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, + const char *pFilename, + mz_file_write_func pCallback, + void *pOpaque, mz_uint flags) { + mz_uint32 file_index; + if (!mz_zip_reader_locate_file_v2(pZip, pFilename, NULL, flags, &file_index)) + return MZ_FALSE; + + return mz_zip_reader_extract_to_callback(pZip, file_index, pCallback, pOpaque, + flags); +} + +mz_zip_reader_extract_iter_state * +mz_zip_reader_extract_iter_new(mz_zip_archive *pZip, mz_uint file_index, + mz_uint flags) { + mz_zip_reader_extract_iter_state *pState; + mz_uint32 + local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / + sizeof(mz_uint32)]; + mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; + + /* Argument sanity check */ + if ((!pZip) || (!pZip->m_pState)) + return NULL; + + /* Allocate an iterator status structure */ + pState = (mz_zip_reader_extract_iter_state *)pZip->m_pAlloc( + pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_reader_extract_iter_state)); + if (!pState) { + mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + return NULL; + } + + /* Fetch file details */ + if (!mz_zip_reader_file_stat(pZip, file_index, &pState->file_stat)) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pState); + return NULL; + } + + /* Encryption and patch files are not supported. */ + if (pState->file_stat.m_bit_flag & + (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION | + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG)) { + mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION); + pZip->m_pFree(pZip->m_pAlloc_opaque, pState); + return NULL; + } + + /* This function only supports decompressing stored and deflate. */ + if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && + (pState->file_stat.m_method != 0) && + (pState->file_stat.m_method != MZ_DEFLATED)) { + mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD); + pZip->m_pFree(pZip->m_pAlloc_opaque, pState); + return NULL; + } + + /* Init state - save args */ + pState->pZip = pZip; + pState->flags = flags; + + /* Init state - reset variables to defaults */ + pState->status = TINFL_STATUS_DONE; +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + pState->file_crc32 = MZ_CRC32_INIT; +#endif + pState->read_buf_ofs = 0; + pState->out_buf_ofs = 0; + pState->pRead_buf = NULL; + pState->pWrite_buf = NULL; + pState->out_blk_remain = 0; + + /* Read and parse the local directory entry. */ + pState->cur_file_ofs = pState->file_stat.m_local_header_ofs; + if (pZip->m_pRead(pZip->m_pIO_opaque, pState->cur_file_ofs, pLocal_header, + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) { + mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + pZip->m_pFree(pZip->m_pAlloc_opaque, pState); + return NULL; + } + + if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) { + mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + pZip->m_pFree(pZip->m_pAlloc_opaque, pState); + return NULL; + } + + pState->cur_file_ofs += + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); + if ((pState->cur_file_ofs + pState->file_stat.m_comp_size) > + pZip->m_archive_size) { + mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + pZip->m_pFree(pZip->m_pAlloc_opaque, pState); + return NULL; + } + + /* Decompress the file either directly from memory or from a file input + * buffer. */ + if (pZip->m_pState->m_pMem) { + pState->pRead_buf = + (mz_uint8 *)pZip->m_pState->m_pMem + pState->cur_file_ofs; + pState->read_buf_size = pState->read_buf_avail = + pState->file_stat.m_comp_size; + pState->comp_remaining = pState->file_stat.m_comp_size; + } else { + if (!((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || + (!pState->file_stat.m_method))) { + /* Decompression required, therefore intermediate read buffer required */ + pState->read_buf_size = MZ_MIN(pState->file_stat.m_comp_size, + (mz_uint64)MZ_ZIP_MAX_IO_BUF_SIZE); + if (NULL == + (pState->pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, + (size_t)pState->read_buf_size))) { + mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + pZip->m_pFree(pZip->m_pAlloc_opaque, pState); + return NULL; + } + } else { + /* Decompression not required - we will be reading directly into user + * buffer, no temp buf required */ + pState->read_buf_size = 0; + } + pState->read_buf_avail = 0; + pState->comp_remaining = pState->file_stat.m_comp_size; + } + + if (!((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || + (!pState->file_stat.m_method))) { + /* Decompression required, init decompressor */ + tinfl_init(&pState->inflator); + + /* Allocate write buffer */ + if (NULL == (pState->pWrite_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, + TINFL_LZ_DICT_SIZE))) { + mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + if (pState->pRead_buf) + pZip->m_pFree(pZip->m_pAlloc_opaque, pState->pRead_buf); + pZip->m_pFree(pZip->m_pAlloc_opaque, pState); + return NULL; + } + } + + return pState; +} + +mz_zip_reader_extract_iter_state * +mz_zip_reader_extract_file_iter_new(mz_zip_archive *pZip, const char *pFilename, + mz_uint flags) { + mz_uint32 file_index; + + /* Locate file index by name */ + if (!mz_zip_reader_locate_file_v2(pZip, pFilename, NULL, flags, &file_index)) + return NULL; + + /* Construct iterator */ + return mz_zip_reader_extract_iter_new(pZip, file_index, flags); +} + +size_t mz_zip_reader_extract_iter_read(mz_zip_reader_extract_iter_state *pState, + void *pvBuf, size_t buf_size) { + size_t copied_to_caller = 0; + + /* Argument sanity check */ + if ((!pState) || (!pState->pZip) || (!pState->pZip->m_pState) || (!pvBuf)) + return 0; + + if ((pState->flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || + (!pState->file_stat.m_method)) { + /* The file is stored or the caller has requested the compressed data, calc + * amount to return. */ + copied_to_caller = (size_t)MZ_MIN(buf_size, pState->comp_remaining); + + /* Zip is in memory....or requires reading from a file? */ + if (pState->pZip->m_pState->m_pMem) { + /* Copy data to caller's buffer */ + memcpy(pvBuf, pState->pRead_buf, copied_to_caller); + pState->pRead_buf = ((mz_uint8 *)pState->pRead_buf) + copied_to_caller; + } else { + /* Read directly into caller's buffer */ + if (pState->pZip->m_pRead(pState->pZip->m_pIO_opaque, + pState->cur_file_ofs, pvBuf, + copied_to_caller) != copied_to_caller) { + /* Failed to read all that was asked for, flag failure and alert user */ + mz_zip_set_error(pState->pZip, MZ_ZIP_FILE_READ_FAILED); + pState->status = TINFL_STATUS_FAILED; + copied_to_caller = 0; + } + } + +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + /* Compute CRC if not returning compressed data only */ + if (!(pState->flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) + pState->file_crc32 = (mz_uint32)mz_crc32( + pState->file_crc32, (const mz_uint8 *)pvBuf, copied_to_caller); +#endif + + /* Advance offsets, dec counters */ + pState->cur_file_ofs += copied_to_caller; + pState->out_buf_ofs += copied_to_caller; + pState->comp_remaining -= copied_to_caller; + } else { + do { + /* Calc ptr to write buffer - given current output pos and block size */ + mz_uint8 *pWrite_buf_cur = + (mz_uint8 *)pState->pWrite_buf + + (pState->out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1)); + + /* Calc max output size - given current output pos and block size */ + size_t in_buf_size, + out_buf_size = TINFL_LZ_DICT_SIZE - + (pState->out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1)); + + if (!pState->out_blk_remain) { + /* Read more data from file if none available (and reading from file) */ + if ((!pState->read_buf_avail) && (!pState->pZip->m_pState->m_pMem)) { + /* Calc read size */ + pState->read_buf_avail = + MZ_MIN(pState->read_buf_size, pState->comp_remaining); + if (pState->pZip->m_pRead(pState->pZip->m_pIO_opaque, + pState->cur_file_ofs, pState->pRead_buf, + (size_t)pState->read_buf_avail) != + pState->read_buf_avail) { + mz_zip_set_error(pState->pZip, MZ_ZIP_FILE_READ_FAILED); + pState->status = TINFL_STATUS_FAILED; + break; + } + + /* Advance offsets, dec counters */ + pState->cur_file_ofs += pState->read_buf_avail; + pState->comp_remaining -= pState->read_buf_avail; + pState->read_buf_ofs = 0; + } + + /* Perform decompression */ + in_buf_size = (size_t)pState->read_buf_avail; + pState->status = tinfl_decompress( + &pState->inflator, + (const mz_uint8 *)pState->pRead_buf + pState->read_buf_ofs, + &in_buf_size, (mz_uint8 *)pState->pWrite_buf, pWrite_buf_cur, + &out_buf_size, + pState->comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0); + pState->read_buf_avail -= in_buf_size; + pState->read_buf_ofs += in_buf_size; + + /* Update current output block size remaining */ + pState->out_blk_remain = out_buf_size; + } + + if (pState->out_blk_remain) { + /* Calc amount to return. */ + size_t to_copy = + MZ_MIN((buf_size - copied_to_caller), pState->out_blk_remain); + + /* Copy data to caller's buffer */ + memcpy((uint8_t *)pvBuf + copied_to_caller, pWrite_buf_cur, to_copy); + +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + /* Perform CRC */ + pState->file_crc32 = + (mz_uint32)mz_crc32(pState->file_crc32, pWrite_buf_cur, to_copy); +#endif + + /* Decrement data consumed from block */ + pState->out_blk_remain -= to_copy; + + /* Inc output offset, while performing sanity check */ + if ((pState->out_buf_ofs += to_copy) > + pState->file_stat.m_uncomp_size) { + mz_zip_set_error(pState->pZip, MZ_ZIP_DECOMPRESSION_FAILED); + pState->status = TINFL_STATUS_FAILED; + break; + } + + /* Increment counter of data copied to caller */ + copied_to_caller += to_copy; + } + } while ((copied_to_caller < buf_size) && + ((pState->status == TINFL_STATUS_NEEDS_MORE_INPUT) || + (pState->status == TINFL_STATUS_HAS_MORE_OUTPUT))); + } + + /* Return how many bytes were copied into user buffer */ + return copied_to_caller; +} + +mz_bool +mz_zip_reader_extract_iter_free(mz_zip_reader_extract_iter_state *pState) { + int status; + + /* Argument sanity check */ + if ((!pState) || (!pState->pZip) || (!pState->pZip->m_pState)) + return MZ_FALSE; + + /* Was decompression completed and requested? */ + if ((pState->status == TINFL_STATUS_DONE) && + (!(pState->flags & MZ_ZIP_FLAG_COMPRESSED_DATA))) { + /* Make sure the entire file was decompressed, and check its CRC. */ + if (pState->out_buf_ofs != pState->file_stat.m_uncomp_size) { + mz_zip_set_error(pState->pZip, MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE); + pState->status = TINFL_STATUS_FAILED; + } +#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS + else if (pState->file_crc32 != pState->file_stat.m_crc32) { + mz_zip_set_error(pState->pZip, MZ_ZIP_DECOMPRESSION_FAILED); + pState->status = TINFL_STATUS_FAILED; + } +#endif + } + + /* Free buffers */ + if (!pState->pZip->m_pState->m_pMem) + pState->pZip->m_pFree(pState->pZip->m_pAlloc_opaque, pState->pRead_buf); + if (pState->pWrite_buf) + pState->pZip->m_pFree(pState->pZip->m_pAlloc_opaque, pState->pWrite_buf); + + /* Save status */ + status = pState->status; + + /* Free context */ + pState->pZip->m_pFree(pState->pZip->m_pAlloc_opaque, pState); + + return status == TINFL_STATUS_DONE; +} + +#ifndef MINIZ_NO_STDIO +static size_t mz_zip_file_write_callback(void *pOpaque, mz_uint64 ofs, + const void *pBuf, size_t n) { + (void)ofs; + + return MZ_FWRITE(pBuf, 1, n, (MZ_FILE *)pOpaque); +} + +mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, + const char *pDst_filename, + mz_uint flags) { + mz_bool status; + mz_zip_archive_file_stat file_stat; + MZ_FILE *pFile; + + if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) + return MZ_FALSE; + + if (file_stat.m_is_directory || (!file_stat.m_is_supported)) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE); + + pFile = MZ_FOPEN(pDst_filename, "wb"); + if (!pFile) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED); + + status = mz_zip_reader_extract_to_callback( + pZip, file_index, mz_zip_file_write_callback, pFile, flags); + + if (MZ_FCLOSE(pFile) == EOF) { + if (status) + mz_zip_set_error(pZip, MZ_ZIP_FILE_CLOSE_FAILED); + + status = MZ_FALSE; + } + +#if !defined(MINIZ_NO_TIME) && !defined(MINIZ_NO_STDIO) + if (status) + mz_zip_set_file_times(pDst_filename, file_stat.m_time, file_stat.m_time); +#endif + + return status; +} + +mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, + const char *pArchive_filename, + const char *pDst_filename, + mz_uint flags) { + mz_uint32 file_index; + if (!mz_zip_reader_locate_file_v2(pZip, pArchive_filename, NULL, flags, + &file_index)) + return MZ_FALSE; + + return mz_zip_reader_extract_to_file(pZip, file_index, pDst_filename, flags); +} + +mz_bool mz_zip_reader_extract_to_cfile(mz_zip_archive *pZip, mz_uint file_index, + MZ_FILE *pFile, mz_uint flags) { + mz_zip_archive_file_stat file_stat; + + if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) + return MZ_FALSE; + + if (file_stat.m_is_directory || (!file_stat.m_is_supported)) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE); + + return mz_zip_reader_extract_to_callback( + pZip, file_index, mz_zip_file_write_callback, pFile, flags); +} + +mz_bool mz_zip_reader_extract_file_to_cfile(mz_zip_archive *pZip, + const char *pArchive_filename, + MZ_FILE *pFile, mz_uint flags) { + mz_uint32 file_index; + if (!mz_zip_reader_locate_file_v2(pZip, pArchive_filename, NULL, flags, + &file_index)) + return MZ_FALSE; + + return mz_zip_reader_extract_to_cfile(pZip, file_index, pFile, flags); +} +#endif /* #ifndef MINIZ_NO_STDIO */ + +static size_t mz_zip_compute_crc32_callback(void *pOpaque, mz_uint64 file_ofs, + const void *pBuf, size_t n) { + mz_uint32 *p = (mz_uint32 *)pOpaque; + (void)file_ofs; + *p = (mz_uint32)mz_crc32(*p, (const mz_uint8 *)pBuf, n); + return n; +} + +mz_bool mz_zip_validate_file(mz_zip_archive *pZip, mz_uint file_index, + mz_uint flags) { + mz_zip_archive_file_stat file_stat; + mz_zip_internal_state *pState; + const mz_uint8 *pCentral_dir_header; + mz_bool found_zip64_ext_data_in_cdir = MZ_FALSE; + mz_bool found_zip64_ext_data_in_ldir = MZ_FALSE; + mz_uint32 + local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / + sizeof(mz_uint32)]; + mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; + mz_uint64 local_header_ofs = 0; + mz_uint32 local_header_filename_len, local_header_extra_len, + local_header_crc32; + mz_uint64 local_header_comp_size, local_header_uncomp_size; + mz_uint32 uncomp_crc32 = MZ_CRC32_INIT; + mz_bool has_data_descriptor; + mz_uint32 local_header_bit_flags; + + mz_zip_array file_data_array; + mz_zip_array_init(&file_data_array, 1); + + if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || + (!pZip->m_pRead)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (file_index > pZip->m_total_files) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + pState = pZip->m_pState; + + pCentral_dir_header = mz_zip_get_cdh(pZip, file_index); + + if (!mz_zip_file_stat_internal(pZip, file_index, pCentral_dir_header, + &file_stat, &found_zip64_ext_data_in_cdir)) + return MZ_FALSE; + + /* A directory or zero length file */ + if (file_stat.m_is_directory || (!file_stat.m_uncomp_size)) + return MZ_TRUE; + + /* Encryption and patch files are not supported. */ + if (file_stat.m_is_encrypted) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION); + + /* This function only supports stored and deflate. */ + if ((file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED)) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD); + + if (!file_stat.m_is_supported) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE); + + /* Read and parse the local directory entry. */ + local_header_ofs = file_stat.m_local_header_ofs; + if (pZip->m_pRead(pZip->m_pIO_opaque, local_header_ofs, pLocal_header, + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + + if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + local_header_filename_len = + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS); + local_header_extra_len = + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); + local_header_comp_size = + MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS); + local_header_uncomp_size = + MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS); + local_header_crc32 = MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_CRC32_OFS); + local_header_bit_flags = + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_BIT_FLAG_OFS); + has_data_descriptor = (local_header_bit_flags & 8) != 0; + + if (local_header_filename_len != strlen(file_stat.m_filename)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + if ((local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + + local_header_filename_len + local_header_extra_len + + file_stat.m_comp_size) > pZip->m_archive_size) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + if (!mz_zip_array_resize( + pZip, &file_data_array, + MZ_MAX(local_header_filename_len, local_header_extra_len), + MZ_FALSE)) { + mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + goto handle_failure; + } + + if (local_header_filename_len) { + if (pZip->m_pRead(pZip->m_pIO_opaque, + local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE, + file_data_array.m_p, + local_header_filename_len) != local_header_filename_len) { + mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + goto handle_failure; + } + + /* I've seen 1 archive that had the same pathname, but used backslashes in + * the local dir and forward slashes in the central dir. Do we care about + * this? For now, this case will fail validation. */ + if (memcmp(file_stat.m_filename, file_data_array.m_p, + local_header_filename_len) != 0) { + mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); + goto handle_failure; + } + } + + if ((local_header_extra_len) && + ((local_header_comp_size == MZ_UINT32_MAX) || + (local_header_uncomp_size == MZ_UINT32_MAX))) { + mz_uint32 extra_size_remaining = local_header_extra_len; + const mz_uint8 *pExtra_data = (const mz_uint8 *)file_data_array.m_p; + + if (pZip->m_pRead(pZip->m_pIO_opaque, + local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + + local_header_filename_len, + file_data_array.m_p, + local_header_extra_len) != local_header_extra_len) { + mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + goto handle_failure; + } + + do { + mz_uint32 field_id, field_data_size, field_total_size; + + if (extra_size_remaining < (sizeof(mz_uint16) * 2)) { + mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + goto handle_failure; + } + + field_id = MZ_READ_LE16(pExtra_data); + field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16)); + field_total_size = field_data_size + sizeof(mz_uint16) * 2; + + if (field_total_size > extra_size_remaining) { + mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + goto handle_failure; + } + + if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) { + const mz_uint8 *pSrc_field_data = pExtra_data + sizeof(mz_uint32); + + if (field_data_size < sizeof(mz_uint64) * 2) { + mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + goto handle_failure; + } + + local_header_uncomp_size = MZ_READ_LE64(pSrc_field_data); + local_header_comp_size = + MZ_READ_LE64(pSrc_field_data + sizeof(mz_uint64)); + + found_zip64_ext_data_in_ldir = MZ_TRUE; + break; + } + + pExtra_data += field_total_size; + extra_size_remaining -= field_total_size; + } while (extra_size_remaining); + } + + /* TODO: parse local header extra data when local_header_comp_size is + * 0xFFFFFFFF! (big_descriptor.zip) */ + /* I've seen zips in the wild with the data descriptor bit set, but proper + * local header values and bogus data descriptors */ + if ((has_data_descriptor) && (!local_header_comp_size) && + (!local_header_crc32)) { + mz_uint8 descriptor_buf[32]; + mz_bool has_id; + const mz_uint8 *pSrc; + mz_uint32 file_crc32; + mz_uint64 comp_size = 0, uncomp_size = 0; + + mz_uint32 num_descriptor_uint32s = + ((pState->m_zip64) || (found_zip64_ext_data_in_ldir)) ? 6 : 4; + + if (pZip->m_pRead(pZip->m_pIO_opaque, + local_header_ofs + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + + local_header_filename_len + local_header_extra_len + + file_stat.m_comp_size, + descriptor_buf, + sizeof(mz_uint32) * num_descriptor_uint32s) != + (sizeof(mz_uint32) * num_descriptor_uint32s)) { + mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + goto handle_failure; + } + + has_id = (MZ_READ_LE32(descriptor_buf) == MZ_ZIP_DATA_DESCRIPTOR_ID); + pSrc = has_id ? (descriptor_buf + sizeof(mz_uint32)) : descriptor_buf; + + file_crc32 = MZ_READ_LE32(pSrc); + + if ((pState->m_zip64) || (found_zip64_ext_data_in_ldir)) { + comp_size = MZ_READ_LE64(pSrc + sizeof(mz_uint32)); + uncomp_size = MZ_READ_LE64(pSrc + sizeof(mz_uint32) + sizeof(mz_uint64)); + } else { + comp_size = MZ_READ_LE32(pSrc + sizeof(mz_uint32)); + uncomp_size = MZ_READ_LE32(pSrc + sizeof(mz_uint32) + sizeof(mz_uint32)); + } + + if ((file_crc32 != file_stat.m_crc32) || + (comp_size != file_stat.m_comp_size) || + (uncomp_size != file_stat.m_uncomp_size)) { + mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); + goto handle_failure; + } + } else { + if ((local_header_crc32 != file_stat.m_crc32) || + (local_header_comp_size != file_stat.m_comp_size) || + (local_header_uncomp_size != file_stat.m_uncomp_size)) { + mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); + goto handle_failure; + } + } + + mz_zip_array_clear(pZip, &file_data_array); + + if ((flags & MZ_ZIP_FLAG_VALIDATE_HEADERS_ONLY) == 0) { + if (!mz_zip_reader_extract_to_callback( + pZip, file_index, mz_zip_compute_crc32_callback, &uncomp_crc32, 0)) + return MZ_FALSE; + + /* 1 more check to be sure, although the extract checks too. */ + if (uncomp_crc32 != file_stat.m_crc32) { + mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); + return MZ_FALSE; + } + } + + return MZ_TRUE; + +handle_failure: + mz_zip_array_clear(pZip, &file_data_array); + return MZ_FALSE; +} + +mz_bool mz_zip_validate_archive(mz_zip_archive *pZip, mz_uint flags) { + mz_zip_internal_state *pState; + uint32_t i; + + if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || + (!pZip->m_pRead)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + pState = pZip->m_pState; + + /* Basic sanity checks */ + if (!pState->m_zip64) { + if (pZip->m_total_files > MZ_UINT16_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + + if (pZip->m_archive_size > MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + } else { + if (pZip->m_total_files >= MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + + if (pState->m_central_dir.m_size >= MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + } + + for (i = 0; i < pZip->m_total_files; i++) { + if (MZ_ZIP_FLAG_VALIDATE_LOCATE_FILE_FLAG & flags) { + mz_uint32 found_index; + mz_zip_archive_file_stat stat; + + if (!mz_zip_reader_file_stat(pZip, i, &stat)) + return MZ_FALSE; + + if (!mz_zip_reader_locate_file_v2(pZip, stat.m_filename, NULL, 0, + &found_index)) + return MZ_FALSE; + + /* This check can fail if there are duplicate filenames in the archive + * (which we don't check for when writing - that's up to the user) */ + if (found_index != i) + return mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED); + } + + if (!mz_zip_validate_file(pZip, i, flags)) + return MZ_FALSE; + } + + return MZ_TRUE; +} + +mz_bool mz_zip_validate_mem_archive(const void *pMem, size_t size, + mz_uint flags, mz_zip_error *pErr) { + mz_bool success = MZ_TRUE; + mz_zip_archive zip; + mz_zip_error actual_err = MZ_ZIP_NO_ERROR; + + if ((!pMem) || (!size)) { + if (pErr) + *pErr = MZ_ZIP_INVALID_PARAMETER; + return MZ_FALSE; + } + + mz_zip_zero_struct(&zip); + + if (!mz_zip_reader_init_mem(&zip, pMem, size, flags)) { + if (pErr) + *pErr = zip.m_last_error; + return MZ_FALSE; + } + + if (!mz_zip_validate_archive(&zip, flags)) { + actual_err = zip.m_last_error; + success = MZ_FALSE; + } + + if (!mz_zip_reader_end_internal(&zip, success)) { + if (!actual_err) + actual_err = zip.m_last_error; + success = MZ_FALSE; + } + + if (pErr) + *pErr = actual_err; + + return success; +} + +#ifndef MINIZ_NO_STDIO +mz_bool mz_zip_validate_file_archive(const char *pFilename, mz_uint flags, + mz_zip_error *pErr) { + mz_bool success = MZ_TRUE; + mz_zip_archive zip; + mz_zip_error actual_err = MZ_ZIP_NO_ERROR; + + if (!pFilename) { + if (pErr) + *pErr = MZ_ZIP_INVALID_PARAMETER; + return MZ_FALSE; + } + + mz_zip_zero_struct(&zip); + + if (!mz_zip_reader_init_file_v2(&zip, pFilename, flags, 0, 0)) { + if (pErr) + *pErr = zip.m_last_error; + return MZ_FALSE; + } + + if (!mz_zip_validate_archive(&zip, flags)) { + actual_err = zip.m_last_error; + success = MZ_FALSE; + } + + if (!mz_zip_reader_end_internal(&zip, success)) { + if (!actual_err) + actual_err = zip.m_last_error; + success = MZ_FALSE; + } + + if (pErr) + *pErr = actual_err; + + return success; +} +#endif /* #ifndef MINIZ_NO_STDIO */ + +/* ------------------- .ZIP archive writing */ + +#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS + +static MZ_FORCEINLINE void mz_write_le16(mz_uint8 *p, mz_uint16 v) { + p[0] = (mz_uint8)v; + p[1] = (mz_uint8)(v >> 8); +} +static MZ_FORCEINLINE void mz_write_le32(mz_uint8 *p, mz_uint32 v) { + p[0] = (mz_uint8)v; + p[1] = (mz_uint8)(v >> 8); + p[2] = (mz_uint8)(v >> 16); + p[3] = (mz_uint8)(v >> 24); +} +static MZ_FORCEINLINE void mz_write_le64(mz_uint8 *p, mz_uint64 v) { + mz_write_le32(p, (mz_uint32)v); + mz_write_le32(p + sizeof(mz_uint32), (mz_uint32)(v >> 32)); +} + +#define MZ_WRITE_LE16(p, v) mz_write_le16((mz_uint8 *)(p), (mz_uint16)(v)) +#define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v)) +#define MZ_WRITE_LE64(p, v) mz_write_le64((mz_uint8 *)(p), (mz_uint64)(v)) + +static size_t mz_zip_heap_write_func(void *pOpaque, mz_uint64 file_ofs, + const void *pBuf, size_t n) { + mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; + mz_zip_internal_state *pState = pZip->m_pState; + mz_uint64 new_size = MZ_MAX(file_ofs + n, pState->m_mem_size); + + if (!n) + return 0; + + /* An allocation this big is likely to just fail on 32-bit systems, so don't + * even go there. */ + if ((sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF)) { + mz_zip_set_error(pZip, MZ_ZIP_FILE_TOO_LARGE); + return 0; + } + + if (new_size > pState->m_mem_capacity) { + void *pNew_block; + size_t new_capacity = MZ_MAX(64, pState->m_mem_capacity); + + while (new_capacity < new_size) + new_capacity *= 2; + + if (NULL == (pNew_block = pZip->m_pRealloc( + pZip->m_pAlloc_opaque, pState->m_pMem, 1, new_capacity))) { + mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + return 0; + } + + pState->m_pMem = pNew_block; + pState->m_mem_capacity = new_capacity; + } + memcpy((mz_uint8 *)pState->m_pMem + file_ofs, pBuf, n); + pState->m_mem_size = (size_t)new_size; + return n; +} + +static mz_bool mz_zip_writer_end_internal(mz_zip_archive *pZip, + mz_bool set_last_error) { + mz_zip_internal_state *pState; + mz_bool status = MZ_TRUE; + + if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || + ((pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) && + (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED))) { + if (set_last_error) + mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + return MZ_FALSE; + } + + pState = pZip->m_pState; + pZip->m_pState = NULL; + mz_zip_array_clear(pZip, &pState->m_central_dir); + mz_zip_array_clear(pZip, &pState->m_central_dir_offsets); + mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets); + +#ifndef MINIZ_NO_STDIO + if (pState->m_pFile) { + if (pZip->m_zip_type == MZ_ZIP_TYPE_FILE) { + if (MZ_FCLOSE(pState->m_pFile) == EOF) { + if (set_last_error) + mz_zip_set_error(pZip, MZ_ZIP_FILE_CLOSE_FAILED); + status = MZ_FALSE; + } + } + + pState->m_pFile = NULL; + } +#endif /* #ifndef MINIZ_NO_STDIO */ + + if ((pZip->m_pWrite == mz_zip_heap_write_func) && (pState->m_pMem)) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pState->m_pMem); + pState->m_pMem = NULL; + } + + pZip->m_pFree(pZip->m_pAlloc_opaque, pState); + pZip->m_zip_mode = MZ_ZIP_MODE_INVALID; + return status; +} + +mz_bool mz_zip_writer_init_v2(mz_zip_archive *pZip, mz_uint64 existing_size, + mz_uint flags) { + mz_bool zip64 = (flags & MZ_ZIP_FLAG_WRITE_ZIP64) != 0; + + if ((!pZip) || (pZip->m_pState) || (!pZip->m_pWrite) || + (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (flags & MZ_ZIP_FLAG_WRITE_ALLOW_READING) { + if (!pZip->m_pRead) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + } + + if (pZip->m_file_offset_alignment) { + /* Ensure user specified file offset alignment is a power of 2. */ + if (pZip->m_file_offset_alignment & (pZip->m_file_offset_alignment - 1)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + } + + if (!pZip->m_pAlloc) + pZip->m_pAlloc = miniz_def_alloc_func; + if (!pZip->m_pFree) + pZip->m_pFree = miniz_def_free_func; + if (!pZip->m_pRealloc) + pZip->m_pRealloc = miniz_def_realloc_func; + + pZip->m_archive_size = existing_size; + pZip->m_central_directory_file_ofs = 0; + pZip->m_total_files = 0; + + if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc( + pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state)))) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state)); + + MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, + sizeof(mz_uint8)); + MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, + sizeof(mz_uint32)); + MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, + sizeof(mz_uint32)); + + pZip->m_pState->m_zip64 = zip64; + pZip->m_pState->m_zip64_has_extended_info_fields = zip64; + + pZip->m_zip_type = MZ_ZIP_TYPE_USER; + pZip->m_zip_mode = MZ_ZIP_MODE_WRITING; + + return MZ_TRUE; +} + +mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size) { + return mz_zip_writer_init_v2(pZip, existing_size, 0); +} + +mz_bool mz_zip_writer_init_heap_v2(mz_zip_archive *pZip, + size_t size_to_reserve_at_beginning, + size_t initial_allocation_size, + mz_uint flags) { + pZip->m_pWrite = mz_zip_heap_write_func; + pZip->m_pNeeds_keepalive = NULL; + + if (flags & MZ_ZIP_FLAG_WRITE_ALLOW_READING) + pZip->m_pRead = mz_zip_mem_read_func; + + pZip->m_pIO_opaque = pZip; + + if (!mz_zip_writer_init_v2(pZip, size_to_reserve_at_beginning, flags)) + return MZ_FALSE; + + pZip->m_zip_type = MZ_ZIP_TYPE_HEAP; + + if (0 != (initial_allocation_size = MZ_MAX(initial_allocation_size, + size_to_reserve_at_beginning))) { + if (NULL == (pZip->m_pState->m_pMem = pZip->m_pAlloc( + pZip->m_pAlloc_opaque, 1, initial_allocation_size))) { + mz_zip_writer_end_internal(pZip, MZ_FALSE); + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + pZip->m_pState->m_mem_capacity = initial_allocation_size; + } + + return MZ_TRUE; +} + +mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, + size_t size_to_reserve_at_beginning, + size_t initial_allocation_size) { + return mz_zip_writer_init_heap_v2(pZip, size_to_reserve_at_beginning, + initial_allocation_size, 0); +} + +#ifndef MINIZ_NO_STDIO +static size_t mz_zip_file_write_func(void *pOpaque, mz_uint64 file_ofs, + const void *pBuf, size_t n) { + mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; + mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile); + + file_ofs += pZip->m_pState->m_file_archive_start_ofs; + + if (((mz_int64)file_ofs < 0) || + (((cur_ofs != (mz_int64)file_ofs)) && + (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET)))) { + mz_zip_set_error(pZip, MZ_ZIP_FILE_SEEK_FAILED); + return 0; + } + + return MZ_FWRITE(pBuf, 1, n, pZip->m_pState->m_pFile); +} + +mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, + mz_uint64 size_to_reserve_at_beginning) { + return mz_zip_writer_init_file_v2(pZip, pFilename, + size_to_reserve_at_beginning, 0); +} + +mz_bool mz_zip_writer_init_file_v2(mz_zip_archive *pZip, const char *pFilename, + mz_uint64 size_to_reserve_at_beginning, + mz_uint flags) { + MZ_FILE *pFile; + + pZip->m_pWrite = mz_zip_file_write_func; + pZip->m_pNeeds_keepalive = NULL; + + if (flags & MZ_ZIP_FLAG_WRITE_ALLOW_READING) + pZip->m_pRead = mz_zip_file_read_func; + + pZip->m_pIO_opaque = pZip; + + if (!mz_zip_writer_init_v2(pZip, size_to_reserve_at_beginning, flags)) + return MZ_FALSE; + + if (NULL == (pFile = MZ_FOPEN( + pFilename, + (flags & MZ_ZIP_FLAG_WRITE_ALLOW_READING) ? "w+b" : "wb"))) { + mz_zip_writer_end(pZip); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED); + } + + pZip->m_pState->m_pFile = pFile; + pZip->m_zip_type = MZ_ZIP_TYPE_FILE; + + if (size_to_reserve_at_beginning) { + mz_uint64 cur_ofs = 0; + char buf[4096]; + + MZ_CLEAR_OBJ(buf); + + do { + size_t n = (size_t)MZ_MIN(sizeof(buf), size_to_reserve_at_beginning); + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_ofs, buf, n) != n) { + mz_zip_writer_end(pZip); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + cur_ofs += n; + size_to_reserve_at_beginning -= n; + } while (size_to_reserve_at_beginning); + } + + return MZ_TRUE; +} + +mz_bool mz_zip_writer_init_cfile(mz_zip_archive *pZip, MZ_FILE *pFile, + mz_uint flags) { + pZip->m_pWrite = mz_zip_file_write_func; + pZip->m_pNeeds_keepalive = NULL; + + if (flags & MZ_ZIP_FLAG_WRITE_ALLOW_READING) + pZip->m_pRead = mz_zip_file_read_func; + + pZip->m_pIO_opaque = pZip; + + if (!mz_zip_writer_init_v2(pZip, 0, flags)) + return MZ_FALSE; + + pZip->m_pState->m_pFile = pFile; + pZip->m_pState->m_file_archive_start_ofs = + MZ_FTELL64(pZip->m_pState->m_pFile); + pZip->m_zip_type = MZ_ZIP_TYPE_CFILE; + + return MZ_TRUE; +} +#endif /* #ifndef MINIZ_NO_STDIO */ + +mz_bool mz_zip_writer_init_from_reader_v2(mz_zip_archive *pZip, + const char *pFilename, + mz_uint flags) { + mz_zip_internal_state *pState; + + if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (flags & MZ_ZIP_FLAG_WRITE_ZIP64) { + /* We don't support converting a non-zip64 file to zip64 - this seems like + * more trouble than it's worth. (What about the existing 32-bit data + * descriptors that could follow the compressed data?) */ + if (!pZip->m_pState->m_zip64) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + } + + /* No sense in trying to write to an archive that's already at the support max + * size */ + if (pZip->m_pState->m_zip64) { + if (pZip->m_total_files == MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + } else { + if (pZip->m_total_files == MZ_UINT16_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + + if ((pZip->m_archive_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) > MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_TOO_LARGE); + } + + pState = pZip->m_pState; + + if (pState->m_pFile) { +#ifdef MINIZ_NO_STDIO + (void)pFilename; + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); +#else + if (pZip->m_pIO_opaque != pZip) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (pZip->m_zip_type == MZ_ZIP_TYPE_FILE) { + if (!pFilename) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + /* Archive is being read from stdio and was originally opened only for + * reading. Try to reopen as writable. */ + if (NULL == + (pState->m_pFile = MZ_FREOPEN(pFilename, "r+b", pState->m_pFile))) { + /* The mz_zip_archive is now in a bogus state because pState->m_pFile is + * NULL, so just close it. */ + mz_zip_reader_end_internal(pZip, MZ_FALSE); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED); + } + } + + pZip->m_pWrite = mz_zip_file_write_func; + pZip->m_pNeeds_keepalive = NULL; +#endif /* #ifdef MINIZ_NO_STDIO */ + } else if (pState->m_pMem) { + /* Archive lives in a memory block. Assume it's from the heap that we can + * resize using the realloc callback. */ + if (pZip->m_pIO_opaque != pZip) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + pState->m_mem_capacity = pState->m_mem_size; + pZip->m_pWrite = mz_zip_heap_write_func; + pZip->m_pNeeds_keepalive = NULL; + } + /* Archive is being read via a user provided read function - make sure the + user has specified a write function too. */ + else if (!pZip->m_pWrite) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + /* Start writing new files at the archive's current central directory + * location. */ + /* TODO: We could add a flag that lets the user start writing immediately + * AFTER the existing central dir - this would be safer. */ + pZip->m_archive_size = pZip->m_central_directory_file_ofs; + pZip->m_central_directory_file_ofs = 0; + + /* Clear the sorted central dir offsets, they aren't useful or maintained now. + */ + /* Even though we're now in write mode, files can still be extracted and + * verified, but file locates will be slow. */ + /* TODO: We could easily maintain the sorted central directory offsets. */ + mz_zip_array_clear(pZip, &pZip->m_pState->m_sorted_central_dir_offsets); + + pZip->m_zip_mode = MZ_ZIP_MODE_WRITING; + + return MZ_TRUE; +} + +mz_bool mz_zip_writer_init_from_reader_v2_noreopen(mz_zip_archive *pZip, + const char *pFilename, + mz_uint flags) { + mz_zip_internal_state *pState; + + if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (flags & MZ_ZIP_FLAG_WRITE_ZIP64) { + /* We don't support converting a non-zip64 file to zip64 - this seems like + * more trouble than it's worth. (What about the existing 32-bit data + * descriptors that could follow the compressed data?) */ + if (!pZip->m_pState->m_zip64) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + } + + /* No sense in trying to write to an archive that's already at the support max + * size */ + if (pZip->m_pState->m_zip64) { + if (pZip->m_total_files == MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + } else { + if (pZip->m_total_files == MZ_UINT16_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + + if ((pZip->m_archive_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) > MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_TOO_LARGE); + } + + pState = pZip->m_pState; + + if (pState->m_pFile) { +#ifdef MINIZ_NO_STDIO + (void)pFilename; + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); +#else + if (pZip->m_pIO_opaque != pZip) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (pZip->m_zip_type == MZ_ZIP_TYPE_FILE) { + if (!pFilename) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + } + + pZip->m_pWrite = mz_zip_file_write_func; + pZip->m_pNeeds_keepalive = NULL; +#endif /* #ifdef MINIZ_NO_STDIO */ + } else if (pState->m_pMem) { + /* Archive lives in a memory block. Assume it's from the heap that we can + * resize using the realloc callback. */ + if (pZip->m_pIO_opaque != pZip) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + pState->m_mem_capacity = pState->m_mem_size; + pZip->m_pWrite = mz_zip_heap_write_func; + pZip->m_pNeeds_keepalive = NULL; + } + /* Archive is being read via a user provided read function - make sure the + user has specified a write function too. */ + else if (!pZip->m_pWrite) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + /* Start writing new files at the archive's current central directory + * location. */ + /* TODO: We could add a flag that lets the user start writing immediately + * AFTER the existing central dir - this would be safer. */ + pZip->m_archive_size = pZip->m_central_directory_file_ofs; + pZip->m_central_directory_file_ofs = 0; + + /* Clear the sorted central dir offsets, they aren't useful or maintained now. + */ + /* Even though we're now in write mode, files can still be extracted and + * verified, but file locates will be slow. */ + /* TODO: We could easily maintain the sorted central directory offsets. */ + mz_zip_array_clear(pZip, &pZip->m_pState->m_sorted_central_dir_offsets); + + pZip->m_zip_mode = MZ_ZIP_MODE_WRITING; + + return MZ_TRUE; +} + +mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, + const char *pFilename) { + return mz_zip_writer_init_from_reader_v2(pZip, pFilename, 0); +} + +/* TODO: pArchive_name is a terrible name here! */ +mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, + const void *pBuf, size_t buf_size, + mz_uint level_and_flags) { + return mz_zip_writer_add_mem_ex(pZip, pArchive_name, pBuf, buf_size, NULL, 0, + level_and_flags, 0, 0); +} + +typedef struct { + mz_zip_archive *m_pZip; + mz_uint64 m_cur_archive_file_ofs; + mz_uint64 m_comp_size; +} mz_zip_writer_add_state; + +static mz_bool mz_zip_writer_add_put_buf_callback(const void *pBuf, int len, + void *pUser) { + mz_zip_writer_add_state *pState = (mz_zip_writer_add_state *)pUser; + if ((int)pState->m_pZip->m_pWrite(pState->m_pZip->m_pIO_opaque, + pState->m_cur_archive_file_ofs, pBuf, + len) != len) + return MZ_FALSE; + + pState->m_cur_archive_file_ofs += len; + pState->m_comp_size += len; + return MZ_TRUE; +} + +#define MZ_ZIP64_MAX_LOCAL_EXTRA_FIELD_SIZE \ + (sizeof(mz_uint16) * 2 + sizeof(mz_uint64) * 2) +#define MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE \ + (sizeof(mz_uint16) * 2 + sizeof(mz_uint64) * 3) +static mz_uint32 +mz_zip_writer_create_zip64_extra_data(mz_uint8 *pBuf, mz_uint64 *pUncomp_size, + mz_uint64 *pComp_size, + mz_uint64 *pLocal_header_ofs) { + mz_uint8 *pDst = pBuf; + mz_uint32 field_size = 0; + + MZ_WRITE_LE16(pDst + 0, MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID); + MZ_WRITE_LE16(pDst + 2, 0); + pDst += sizeof(mz_uint16) * 2; + + if (pUncomp_size) { + MZ_WRITE_LE64(pDst, *pUncomp_size); + pDst += sizeof(mz_uint64); + field_size += sizeof(mz_uint64); + } + + if (pComp_size) { + MZ_WRITE_LE64(pDst, *pComp_size); + pDst += sizeof(mz_uint64); + field_size += sizeof(mz_uint64); + } + + if (pLocal_header_ofs) { + MZ_WRITE_LE64(pDst, *pLocal_header_ofs); + pDst += sizeof(mz_uint64); + field_size += sizeof(mz_uint64); + } + + MZ_WRITE_LE16(pBuf + 2, field_size); + + return (mz_uint32)(pDst - pBuf); +} + +static mz_bool mz_zip_writer_create_local_dir_header( + mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, + mz_uint16 extra_size, mz_uint64 uncomp_size, mz_uint64 comp_size, + mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, + mz_uint16 dos_time, mz_uint16 dos_date) { + (void)pZip; + memset(pDst, 0, MZ_ZIP_LOCAL_DIR_HEADER_SIZE); + MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_SIG_OFS, MZ_ZIP_LOCAL_DIR_HEADER_SIG); + MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_VERSION_NEEDED_OFS, method ? 20 : 0); + MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_BIT_FLAG_OFS, bit_flags); + MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_METHOD_OFS, method); + MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_TIME_OFS, dos_time); + MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_DATE_OFS, dos_date); + MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_CRC32_OFS, uncomp_crc32); + MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS, + MZ_MIN(comp_size, MZ_UINT32_MAX)); + MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS, + MZ_MIN(uncomp_size, MZ_UINT32_MAX)); + MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILENAME_LEN_OFS, filename_size); + MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_EXTRA_LEN_OFS, extra_size); + return MZ_TRUE; +} + +static mz_bool mz_zip_writer_create_central_dir_header( + mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, + mz_uint16 extra_size, mz_uint16 comment_size, mz_uint64 uncomp_size, + mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, + mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, + mz_uint64 local_header_ofs, mz_uint32 ext_attributes) { + (void)pZip; + memset(pDst, 0, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE); + MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_SIG_OFS, MZ_ZIP_CENTRAL_DIR_HEADER_SIG); + MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_VERSION_NEEDED_OFS, method ? 20 : 0); + MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_BIT_FLAG_OFS, bit_flags); + MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_METHOD_OFS, method); + MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_TIME_OFS, dos_time); + MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_DATE_OFS, dos_date); + MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_CRC32_OFS, uncomp_crc32); + MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS, + MZ_MIN(comp_size, MZ_UINT32_MAX)); + MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS, + MZ_MIN(uncomp_size, MZ_UINT32_MAX)); + MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILENAME_LEN_OFS, filename_size); + MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_EXTRA_LEN_OFS, extra_size); + MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_COMMENT_LEN_OFS, comment_size); + MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS, ext_attributes); + MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_LOCAL_HEADER_OFS, + MZ_MIN(local_header_ofs, MZ_UINT32_MAX)); + return MZ_TRUE; +} + +static mz_bool mz_zip_writer_add_to_central_dir( + mz_zip_archive *pZip, const char *pFilename, mz_uint16 filename_size, + const void *pExtra, mz_uint16 extra_size, const void *pComment, + mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, + mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, + mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, + mz_uint32 ext_attributes, const char *user_extra_data, + mz_uint user_extra_data_len) { + mz_zip_internal_state *pState = pZip->m_pState; + mz_uint32 central_dir_ofs = (mz_uint32)pState->m_central_dir.m_size; + size_t orig_central_dir_size = pState->m_central_dir.m_size; + mz_uint8 central_dir_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE]; + + if (!pZip->m_pState->m_zip64) { + if (local_header_ofs > 0xFFFFFFFF) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_TOO_LARGE); + } + + /* miniz doesn't support central dirs >= MZ_UINT32_MAX bytes yet */ + if (((mz_uint64)pState->m_central_dir.m_size + + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size + extra_size + + user_extra_data_len + comment_size) >= MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE); + + if (!mz_zip_writer_create_central_dir_header( + pZip, central_dir_header, filename_size, + (mz_uint16)(extra_size + user_extra_data_len), comment_size, + uncomp_size, comp_size, uncomp_crc32, method, bit_flags, dos_time, + dos_date, local_header_ofs, ext_attributes)) + return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR); + + if ((!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_dir_header, + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)) || + (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pFilename, + filename_size)) || + (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pExtra, + extra_size)) || + (!mz_zip_array_push_back(pZip, &pState->m_central_dir, user_extra_data, + user_extra_data_len)) || + (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pComment, + comment_size)) || + (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, + ¢ral_dir_ofs, 1))) { + /* Try to resize the central directory array back into its original state. + */ + mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, + MZ_FALSE); + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + return MZ_TRUE; +} + +static mz_bool mz_zip_writer_validate_archive_name(const char *pArchive_name) { + /* Basic ZIP archive filename validity checks: Valid filenames cannot start + * with a forward slash, cannot contain a drive letter, and cannot use + * DOS-style backward slashes. */ + if (*pArchive_name == '/') + return MZ_FALSE; + + /* Making sure the name does not contain drive letters or DOS style backward + * slashes is the responsibility of the program using miniz*/ + + return MZ_TRUE; +} + +static mz_uint +mz_zip_writer_compute_padding_needed_for_file_alignment(mz_zip_archive *pZip) { + mz_uint32 n; + if (!pZip->m_file_offset_alignment) + return 0; + n = (mz_uint32)(pZip->m_archive_size & (pZip->m_file_offset_alignment - 1)); + return (mz_uint)((pZip->m_file_offset_alignment - n) & + (pZip->m_file_offset_alignment - 1)); +} + +static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, + mz_uint64 cur_file_ofs, mz_uint32 n) { + char buf[4096]; + memset(buf, 0, MZ_MIN(sizeof(buf), n)); + while (n) { + mz_uint32 s = MZ_MIN(sizeof(buf), n); + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_file_ofs, buf, s) != s) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_file_ofs += s; + n -= s; + } + return MZ_TRUE; +} + +mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, + const char *pArchive_name, const void *pBuf, + size_t buf_size, const void *pComment, + mz_uint16 comment_size, + mz_uint level_and_flags, mz_uint64 uncomp_size, + mz_uint32 uncomp_crc32) { + return mz_zip_writer_add_mem_ex_v2( + pZip, pArchive_name, pBuf, buf_size, pComment, comment_size, + level_and_flags, uncomp_size, uncomp_crc32, NULL, NULL, 0, NULL, 0); +} + +mz_bool mz_zip_writer_add_mem_ex_v2( + mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, + size_t buf_size, const void *pComment, mz_uint16 comment_size, + mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32, + MZ_TIME_T *last_modified, const char *user_extra_data, + mz_uint user_extra_data_len, const char *user_extra_data_central, + mz_uint user_extra_data_central_len) { + mz_uint16 method = 0, dos_time = 0, dos_date = 0; + mz_uint level, ext_attributes = 0, num_alignment_padding_bytes; + mz_uint64 local_dir_header_ofs = 0, cur_archive_file_ofs = 0, comp_size = 0; + size_t archive_name_size; + mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE]; + tdefl_compressor *pComp = NULL; + mz_bool store_data_uncompressed; + mz_zip_internal_state *pState; + mz_uint8 *pExtra_data = NULL; + mz_uint32 extra_size = 0; + mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE]; + mz_uint16 bit_flags = 0; + + if ((int)level_and_flags < 0) + level_and_flags = MZ_DEFAULT_LEVEL; + + if (uncomp_size || + (buf_size && !(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA))) + bit_flags |= MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR; + + if (!(level_and_flags & MZ_ZIP_FLAG_ASCII_FILENAME)) + bit_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8; + + level = level_and_flags & 0xF; + store_data_uncompressed = + ((!level) || (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)); + + if ((!pZip) || (!pZip->m_pState) || + (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || ((buf_size) && (!pBuf)) || + (!pArchive_name) || ((comment_size) && (!pComment)) || + (level > MZ_UBER_COMPRESSION)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + pState = pZip->m_pState; + local_dir_header_ofs = pZip->m_archive_size; + cur_archive_file_ofs = pZip->m_archive_size; + + if (pState->m_zip64) { + if (pZip->m_total_files == MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + } else { + if (pZip->m_total_files == MZ_UINT16_MAX) { + pState->m_zip64 = MZ_TRUE; + /*return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); */ + } + if ((buf_size > 0xFFFFFFFF) || (uncomp_size > 0xFFFFFFFF)) { + pState->m_zip64 = MZ_TRUE; + /*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */ + } + } + + if ((!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (uncomp_size)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (!mz_zip_writer_validate_archive_name(pArchive_name)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_FILENAME); + +#ifndef MINIZ_NO_TIME + if (last_modified != NULL) { + mz_zip_time_t_to_dos_time(*last_modified, &dos_time, &dos_date); + } else { + MZ_TIME_T cur_time; + time(&cur_time); + mz_zip_time_t_to_dos_time(cur_time, &dos_time, &dos_date); + } +#endif /* #ifndef MINIZ_NO_TIME */ + + if (!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) { + uncomp_crc32 = + (mz_uint32)mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, buf_size); + uncomp_size = buf_size; + if (uncomp_size <= 3) { + level = 0; + store_data_uncompressed = MZ_TRUE; + } + } + + archive_name_size = strlen(pArchive_name); + if (archive_name_size > MZ_UINT16_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_FILENAME); + + num_alignment_padding_bytes = + mz_zip_writer_compute_padding_needed_for_file_alignment(pZip); + + /* miniz doesn't support central dirs >= MZ_UINT32_MAX bytes yet */ + if (((mz_uint64)pState->m_central_dir.m_size + + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + + MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE + comment_size) >= MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE); + + if (!pState->m_zip64) { + /* Bail early if the archive would obviously become too large */ + if ((pZip->m_archive_size + num_alignment_padding_bytes + + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + archive_name_size + + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size + + user_extra_data_len + pState->m_central_dir.m_size + + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE + user_extra_data_central_len + + MZ_ZIP_DATA_DESCRIPTER_SIZE32) > 0xFFFFFFFF) { + pState->m_zip64 = MZ_TRUE; + /*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */ + } + } + + if ((archive_name_size) && (pArchive_name[archive_name_size - 1] == '/')) { + /* Set DOS Subdirectory attribute bit. */ + ext_attributes |= MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG; + + /* Subdirectories cannot contain data. */ + if ((buf_size) || (uncomp_size)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + } + + /* Try to do any allocations before writing to the archive, so if an + * allocation fails the file remains unmodified. (A good idea if we're doing + * an in-place modification.) */ + if ((!mz_zip_array_ensure_room( + pZip, &pState->m_central_dir, + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size + + (pState->m_zip64 ? MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE : 0))) || + (!mz_zip_array_ensure_room(pZip, &pState->m_central_dir_offsets, 1))) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + if ((!store_data_uncompressed) && (buf_size)) { + if (NULL == (pComp = (tdefl_compressor *)pZip->m_pAlloc( + pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor)))) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + if (!mz_zip_writer_write_zeros(pZip, cur_archive_file_ofs, + num_alignment_padding_bytes)) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); + return MZ_FALSE; + } + + local_dir_header_ofs += num_alignment_padding_bytes; + if (pZip->m_file_offset_alignment) { + MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == + 0); + } + cur_archive_file_ofs += num_alignment_padding_bytes; + + MZ_CLEAR_OBJ(local_dir_header); + + if (!store_data_uncompressed || + (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) { + method = MZ_DEFLATED; + } + + if (pState->m_zip64) { + if (uncomp_size >= MZ_UINT32_MAX || local_dir_header_ofs >= MZ_UINT32_MAX) { + pExtra_data = extra_data; + extra_size = mz_zip_writer_create_zip64_extra_data( + extra_data, (uncomp_size >= MZ_UINT32_MAX) ? &uncomp_size : NULL, + (uncomp_size >= MZ_UINT32_MAX) ? &comp_size : NULL, + (local_dir_header_ofs >= MZ_UINT32_MAX) ? &local_dir_header_ofs + : NULL); + } + + if (!mz_zip_writer_create_local_dir_header( + pZip, local_dir_header, (mz_uint16)archive_name_size, + (mz_uint16)(extra_size + user_extra_data_len), 0, 0, 0, method, + bit_flags, dos_time, dos_date)) + return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR); + + if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, + local_dir_header, + sizeof(local_dir_header)) != sizeof(local_dir_header)) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_archive_file_ofs += sizeof(local_dir_header); + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, + archive_name_size) != archive_name_size) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + cur_archive_file_ofs += archive_name_size; + + if (pExtra_data != NULL) { + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, extra_data, + extra_size) != extra_size) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_archive_file_ofs += extra_size; + } + } else { + if ((comp_size > MZ_UINT32_MAX) || (cur_archive_file_ofs > MZ_UINT32_MAX)) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + if (!mz_zip_writer_create_local_dir_header( + pZip, local_dir_header, (mz_uint16)archive_name_size, + (mz_uint16)user_extra_data_len, 0, 0, 0, method, bit_flags, + dos_time, dos_date)) + return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR); + + if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, + local_dir_header, + sizeof(local_dir_header)) != sizeof(local_dir_header)) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_archive_file_ofs += sizeof(local_dir_header); + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, + archive_name_size) != archive_name_size) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + cur_archive_file_ofs += archive_name_size; + } + + if (user_extra_data_len > 0) { + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, + user_extra_data, + user_extra_data_len) != user_extra_data_len) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_archive_file_ofs += user_extra_data_len; + } + + if (store_data_uncompressed) { + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pBuf, + buf_size) != buf_size) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + + cur_archive_file_ofs += buf_size; + comp_size = buf_size; + } else if (buf_size) { + mz_zip_writer_add_state state; + + state.m_pZip = pZip; + state.m_cur_archive_file_ofs = cur_archive_file_ofs; + state.m_comp_size = 0; + + if ((tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, + tdefl_create_comp_flags_from_zip_params( + level, -15, MZ_DEFAULT_STRATEGY)) != + TDEFL_STATUS_OKAY) || + (tdefl_compress_buffer(pComp, pBuf, buf_size, TDEFL_FINISH) != + TDEFL_STATUS_DONE)) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); + return mz_zip_set_error(pZip, MZ_ZIP_COMPRESSION_FAILED); + } + + comp_size = state.m_comp_size; + cur_archive_file_ofs = state.m_cur_archive_file_ofs; + } + + pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); + pComp = NULL; + + if (uncomp_size) { + mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64]; + mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE32; + + MZ_ASSERT(bit_flags & MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR); + + MZ_WRITE_LE32(local_dir_footer + 0, MZ_ZIP_DATA_DESCRIPTOR_ID); + MZ_WRITE_LE32(local_dir_footer + 4, uncomp_crc32); + if (pExtra_data == NULL) { + if (comp_size > MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + + MZ_WRITE_LE32(local_dir_footer + 8, comp_size); + MZ_WRITE_LE32(local_dir_footer + 12, uncomp_size); + } else { + MZ_WRITE_LE64(local_dir_footer + 8, comp_size); + MZ_WRITE_LE64(local_dir_footer + 16, uncomp_size); + local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE64; + } + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, + local_dir_footer, + local_dir_footer_size) != local_dir_footer_size) + return MZ_FALSE; + + cur_archive_file_ofs += local_dir_footer_size; + } + + if (pExtra_data != NULL) { + extra_size = mz_zip_writer_create_zip64_extra_data( + extra_data, (uncomp_size >= MZ_UINT32_MAX) ? &uncomp_size : NULL, + (uncomp_size >= MZ_UINT32_MAX) ? &comp_size : NULL, + (local_dir_header_ofs >= MZ_UINT32_MAX) ? &local_dir_header_ofs : NULL); + } + + if (!mz_zip_writer_add_to_central_dir( + pZip, pArchive_name, (mz_uint16)archive_name_size, pExtra_data, + (mz_uint16)extra_size, pComment, comment_size, uncomp_size, comp_size, + uncomp_crc32, method, bit_flags, dos_time, dos_date, + local_dir_header_ofs, ext_attributes, user_extra_data_central, + user_extra_data_central_len)) + return MZ_FALSE; + + pZip->m_total_files++; + pZip->m_archive_size = cur_archive_file_ofs; + + return MZ_TRUE; +} + +mz_bool mz_zip_writer_add_read_buf_callback( + mz_zip_archive *pZip, const char *pArchive_name, + mz_file_read_func read_callback, void *callback_opaque, mz_uint64 max_size, + const MZ_TIME_T *pFile_time, const void *pComment, mz_uint16 comment_size, + mz_uint level_and_flags, mz_uint32 ext_attributes, + const char *user_extra_data, mz_uint user_extra_data_len, + const char *user_extra_data_central, mz_uint user_extra_data_central_len) { + mz_uint16 gen_flags = (level_and_flags & MZ_ZIP_FLAG_WRITE_HEADER_SET_SIZE) + ? 0 + : MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR; + mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes; + mz_uint16 method = 0, dos_time = 0, dos_date = 0; + mz_uint64 local_dir_header_ofs, cur_archive_file_ofs = 0, uncomp_size = 0, + comp_size = 0; + size_t archive_name_size; + mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE]; + mz_uint8 *pExtra_data = NULL; + mz_uint32 extra_size = 0; + mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE]; + mz_zip_internal_state *pState; + mz_uint64 file_ofs = 0, cur_archive_header_file_ofs; + + if (!(level_and_flags & MZ_ZIP_FLAG_ASCII_FILENAME)) + gen_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8; + + if ((int)level_and_flags < 0) + level_and_flags = MZ_DEFAULT_LEVEL; + level = level_and_flags & 0xF; + + /* Sanity checks */ + if ((!pZip) || (!pZip->m_pState) || + (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || + ((comment_size) && (!pComment)) || (level > MZ_UBER_COMPRESSION)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + pState = pZip->m_pState; + cur_archive_file_ofs = pZip->m_archive_size; + + if ((!pState->m_zip64) && (max_size > MZ_UINT32_MAX)) { + /* Source file is too large for non-zip64 */ + /*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */ + pState->m_zip64 = MZ_TRUE; + } + + /* We could support this, but why? */ + if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (!mz_zip_writer_validate_archive_name(pArchive_name)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_FILENAME); + + if (pState->m_zip64) { + if (pZip->m_total_files == MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + } else { + if (pZip->m_total_files == MZ_UINT16_MAX) { + pState->m_zip64 = MZ_TRUE; + /*return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); */ + } + } + + archive_name_size = strlen(pArchive_name); + if (archive_name_size > MZ_UINT16_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_FILENAME); + + num_alignment_padding_bytes = + mz_zip_writer_compute_padding_needed_for_file_alignment(pZip); + + /* miniz doesn't support central dirs >= MZ_UINT32_MAX bytes yet */ + if (((mz_uint64)pState->m_central_dir.m_size + + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + + MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE + comment_size) >= MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE); + + if (!pState->m_zip64) { + /* Bail early if the archive would obviously become too large */ + if ((pZip->m_archive_size + num_alignment_padding_bytes + + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + archive_name_size + + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size + + user_extra_data_len + pState->m_central_dir.m_size + + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE + 1024 + + MZ_ZIP_DATA_DESCRIPTER_SIZE32 + user_extra_data_central_len) > + 0xFFFFFFFF) { + pState->m_zip64 = MZ_TRUE; + /*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */ + } + } + +#ifndef MINIZ_NO_TIME + if (pFile_time) { + mz_zip_time_t_to_dos_time(*pFile_time, &dos_time, &dos_date); + } +#endif + + if (max_size <= 3) + level = 0; + + if (!mz_zip_writer_write_zeros(pZip, cur_archive_file_ofs, + num_alignment_padding_bytes)) { + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + + cur_archive_file_ofs += num_alignment_padding_bytes; + local_dir_header_ofs = cur_archive_file_ofs; + + if (pZip->m_file_offset_alignment) { + MZ_ASSERT((cur_archive_file_ofs & (pZip->m_file_offset_alignment - 1)) == + 0); + } + + if (max_size && level) { + method = MZ_DEFLATED; + } + + MZ_CLEAR_OBJ(local_dir_header); + if (pState->m_zip64) { + if (max_size >= MZ_UINT32_MAX || local_dir_header_ofs >= MZ_UINT32_MAX) { + pExtra_data = extra_data; + if (level_and_flags & MZ_ZIP_FLAG_WRITE_HEADER_SET_SIZE) + extra_size = mz_zip_writer_create_zip64_extra_data( + extra_data, (max_size >= MZ_UINT32_MAX) ? &uncomp_size : NULL, + (max_size >= MZ_UINT32_MAX) ? &comp_size : NULL, + (local_dir_header_ofs >= MZ_UINT32_MAX) ? &local_dir_header_ofs + : NULL); + else + extra_size = mz_zip_writer_create_zip64_extra_data( + extra_data, NULL, NULL, + (local_dir_header_ofs >= MZ_UINT32_MAX) ? &local_dir_header_ofs + : NULL); + } + + if (!mz_zip_writer_create_local_dir_header( + pZip, local_dir_header, (mz_uint16)archive_name_size, + (mz_uint16)(extra_size + user_extra_data_len), 0, 0, 0, method, + gen_flags, dos_time, dos_date)) + return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR); + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, + local_dir_header, + sizeof(local_dir_header)) != sizeof(local_dir_header)) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_archive_file_ofs += sizeof(local_dir_header); + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, + archive_name_size) != archive_name_size) { + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + + cur_archive_file_ofs += archive_name_size; + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, extra_data, + extra_size) != extra_size) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_archive_file_ofs += extra_size; + } else { + if ((comp_size > MZ_UINT32_MAX) || (cur_archive_file_ofs > MZ_UINT32_MAX)) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + if (!mz_zip_writer_create_local_dir_header( + pZip, local_dir_header, (mz_uint16)archive_name_size, + (mz_uint16)user_extra_data_len, 0, 0, 0, method, gen_flags, + dos_time, dos_date)) + return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR); + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, + local_dir_header, + sizeof(local_dir_header)) != sizeof(local_dir_header)) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_archive_file_ofs += sizeof(local_dir_header); + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, + archive_name_size) != archive_name_size) { + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + + cur_archive_file_ofs += archive_name_size; + } + + if (user_extra_data_len > 0) { + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, + user_extra_data, + user_extra_data_len) != user_extra_data_len) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_archive_file_ofs += user_extra_data_len; + } + + if (max_size) { + void *pRead_buf = + pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, MZ_ZIP_MAX_IO_BUF_SIZE); + if (!pRead_buf) { + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + if (!level) { + while (1) { + size_t n = read_callback(callback_opaque, file_ofs, pRead_buf, + MZ_ZIP_MAX_IO_BUF_SIZE); + if (n == 0) + break; + + if ((n > MZ_ZIP_MAX_IO_BUF_SIZE) || (file_ofs + n > max_size)) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + } + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pRead_buf, + n) != n) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + file_ofs += n; + uncomp_crc32 = + (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, n); + cur_archive_file_ofs += n; + } + uncomp_size = file_ofs; + comp_size = uncomp_size; + } else { + mz_bool result = MZ_FALSE; + mz_zip_writer_add_state state; + tdefl_compressor *pComp = (tdefl_compressor *)pZip->m_pAlloc( + pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor)); + if (!pComp) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + state.m_pZip = pZip; + state.m_cur_archive_file_ofs = cur_archive_file_ofs; + state.m_comp_size = 0; + + if (tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, + tdefl_create_comp_flags_from_zip_params( + level, -15, MZ_DEFAULT_STRATEGY)) != + TDEFL_STATUS_OKAY) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); + pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); + return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR); + } + + for (;;) { + tdefl_status status; + tdefl_flush flush = TDEFL_NO_FLUSH; + + size_t n = read_callback(callback_opaque, file_ofs, pRead_buf, + MZ_ZIP_MAX_IO_BUF_SIZE); + if ((n > MZ_ZIP_MAX_IO_BUF_SIZE) || (file_ofs + n > max_size)) { + mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + break; + } + + file_ofs += n; + uncomp_crc32 = + (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, n); + + if (pZip->m_pNeeds_keepalive != NULL && + pZip->m_pNeeds_keepalive(pZip->m_pIO_opaque)) + flush = TDEFL_FULL_FLUSH; + + if (n == 0) + flush = TDEFL_FINISH; + + status = tdefl_compress_buffer(pComp, pRead_buf, n, flush); + if (status == TDEFL_STATUS_DONE) { + result = MZ_TRUE; + break; + } else if (status != TDEFL_STATUS_OKAY) { + mz_zip_set_error(pZip, MZ_ZIP_COMPRESSION_FAILED); + break; + } + } + + pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); + + if (!result) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); + return MZ_FALSE; + } + + uncomp_size = file_ofs; + comp_size = state.m_comp_size; + cur_archive_file_ofs = state.m_cur_archive_file_ofs; + } + + pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); + } + + if (!(level_and_flags & MZ_ZIP_FLAG_WRITE_HEADER_SET_SIZE)) { + mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64]; + mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE32; + + MZ_WRITE_LE32(local_dir_footer + 0, MZ_ZIP_DATA_DESCRIPTOR_ID); + MZ_WRITE_LE32(local_dir_footer + 4, uncomp_crc32); + if (pExtra_data == NULL) { + if (comp_size > MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + + MZ_WRITE_LE32(local_dir_footer + 8, comp_size); + MZ_WRITE_LE32(local_dir_footer + 12, uncomp_size); + } else { + MZ_WRITE_LE64(local_dir_footer + 8, comp_size); + MZ_WRITE_LE64(local_dir_footer + 16, uncomp_size); + local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE64; + } + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, + local_dir_footer, + local_dir_footer_size) != local_dir_footer_size) + return MZ_FALSE; + + cur_archive_file_ofs += local_dir_footer_size; + } + + if (level_and_flags & MZ_ZIP_FLAG_WRITE_HEADER_SET_SIZE) { + if (pExtra_data != NULL) { + extra_size = mz_zip_writer_create_zip64_extra_data( + extra_data, (max_size >= MZ_UINT32_MAX) ? &uncomp_size : NULL, + (max_size >= MZ_UINT32_MAX) ? &comp_size : NULL, + (local_dir_header_ofs >= MZ_UINT32_MAX) ? &local_dir_header_ofs + : NULL); + } + + if (!mz_zip_writer_create_local_dir_header( + pZip, local_dir_header, (mz_uint16)archive_name_size, + (mz_uint16)(extra_size + user_extra_data_len), + (max_size >= MZ_UINT32_MAX) ? MZ_UINT32_MAX : uncomp_size, + (max_size >= MZ_UINT32_MAX) ? MZ_UINT32_MAX : comp_size, + uncomp_crc32, method, gen_flags, dos_time, dos_date)) + return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR); + + cur_archive_header_file_ofs = local_dir_header_ofs; + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_header_file_ofs, + local_dir_header, + sizeof(local_dir_header)) != sizeof(local_dir_header)) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + if (pExtra_data != NULL) { + cur_archive_header_file_ofs += sizeof(local_dir_header); + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_header_file_ofs, + pArchive_name, + archive_name_size) != archive_name_size) { + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + + cur_archive_header_file_ofs += archive_name_size; + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_header_file_ofs, + extra_data, extra_size) != extra_size) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_archive_header_file_ofs += extra_size; + } + } + + if (pExtra_data != NULL) { + extra_size = mz_zip_writer_create_zip64_extra_data( + extra_data, (uncomp_size >= MZ_UINT32_MAX) ? &uncomp_size : NULL, + (uncomp_size >= MZ_UINT32_MAX) ? &comp_size : NULL, + (local_dir_header_ofs >= MZ_UINT32_MAX) ? &local_dir_header_ofs : NULL); + } + + if (!mz_zip_writer_add_to_central_dir( + pZip, pArchive_name, (mz_uint16)archive_name_size, pExtra_data, + (mz_uint16)extra_size, pComment, comment_size, uncomp_size, comp_size, + uncomp_crc32, method, gen_flags, dos_time, dos_date, + local_dir_header_ofs, ext_attributes, user_extra_data_central, + user_extra_data_central_len)) + return MZ_FALSE; + + pZip->m_total_files++; + pZip->m_archive_size = cur_archive_file_ofs; + + return MZ_TRUE; +} + +#ifndef MINIZ_NO_STDIO + +static size_t mz_file_read_func_stdio(void *pOpaque, mz_uint64 file_ofs, + void *pBuf, size_t n) { + MZ_FILE *pSrc_file = (MZ_FILE *)pOpaque; + mz_int64 cur_ofs = MZ_FTELL64(pSrc_file); + + if (((mz_int64)file_ofs < 0) || + (((cur_ofs != (mz_int64)file_ofs)) && + (MZ_FSEEK64(pSrc_file, (mz_int64)file_ofs, SEEK_SET)))) + return 0; + + return MZ_FREAD(pBuf, 1, n, pSrc_file); +} + +mz_bool mz_zip_writer_add_cfile( + mz_zip_archive *pZip, const char *pArchive_name, MZ_FILE *pSrc_file, + mz_uint64 max_size, const MZ_TIME_T *pFile_time, const void *pComment, + mz_uint16 comment_size, mz_uint level_and_flags, mz_uint32 ext_attributes, + const char *user_extra_data, mz_uint user_extra_data_len, + const char *user_extra_data_central, mz_uint user_extra_data_central_len) { + return mz_zip_writer_add_read_buf_callback( + pZip, pArchive_name, mz_file_read_func_stdio, pSrc_file, max_size, + pFile_time, pComment, comment_size, level_and_flags, ext_attributes, + user_extra_data, user_extra_data_len, user_extra_data_central, + user_extra_data_central_len); +} + +mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, + const char *pSrc_filename, const void *pComment, + mz_uint16 comment_size, mz_uint level_and_flags, + mz_uint32 ext_attributes) { + MZ_FILE *pSrc_file = NULL; + mz_uint64 uncomp_size = 0; + MZ_TIME_T file_modified_time; + MZ_TIME_T *pFile_time = NULL; + mz_bool status; + + memset(&file_modified_time, 0, sizeof(file_modified_time)); + +#if !defined(MINIZ_NO_TIME) && !defined(MINIZ_NO_STDIO) + pFile_time = &file_modified_time; + if (!mz_zip_get_file_modified_time(pSrc_filename, &file_modified_time)) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_STAT_FAILED); +#endif + + pSrc_file = MZ_FOPEN(pSrc_filename, "rb"); + if (!pSrc_file) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED); + + MZ_FSEEK64(pSrc_file, 0, SEEK_END); + uncomp_size = MZ_FTELL64(pSrc_file); + MZ_FSEEK64(pSrc_file, 0, SEEK_SET); + + status = mz_zip_writer_add_cfile( + pZip, pArchive_name, pSrc_file, uncomp_size, pFile_time, pComment, + comment_size, level_and_flags, ext_attributes, NULL, 0, NULL, 0); + + MZ_FCLOSE(pSrc_file); + + return status; +} +#endif /* #ifndef MINIZ_NO_STDIO */ + +static mz_bool mz_zip_writer_update_zip64_extension_block( + mz_zip_array *pNew_ext, mz_zip_archive *pZip, const mz_uint8 *pExt, + uint32_t ext_len, mz_uint64 *pComp_size, mz_uint64 *pUncomp_size, + mz_uint64 *pLocal_header_ofs, mz_uint32 *pDisk_start) { + /* + 64 should be enough for any new zip64 data */ + if (!mz_zip_array_reserve(pZip, pNew_ext, ext_len + 64, MZ_FALSE)) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + mz_zip_array_resize(pZip, pNew_ext, 0, MZ_FALSE); + + if ((pUncomp_size) || (pComp_size) || (pLocal_header_ofs) || (pDisk_start)) { + mz_uint8 new_ext_block[64]; + mz_uint8 *pDst = new_ext_block; + mz_write_le16(pDst, MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID); + mz_write_le16(pDst + sizeof(mz_uint16), 0); + pDst += sizeof(mz_uint16) * 2; + + if (pUncomp_size) { + mz_write_le64(pDst, *pUncomp_size); + pDst += sizeof(mz_uint64); + } + + if (pComp_size) { + mz_write_le64(pDst, *pComp_size); + pDst += sizeof(mz_uint64); + } + + if (pLocal_header_ofs) { + mz_write_le64(pDst, *pLocal_header_ofs); + pDst += sizeof(mz_uint64); + } + + if (pDisk_start) { + mz_write_le32(pDst, *pDisk_start); + pDst += sizeof(mz_uint32); + } + + mz_write_le16(new_ext_block + sizeof(mz_uint16), + (mz_uint16)((pDst - new_ext_block) - sizeof(mz_uint16) * 2)); + + if (!mz_zip_array_push_back(pZip, pNew_ext, new_ext_block, + pDst - new_ext_block)) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + if ((pExt) && (ext_len)) { + mz_uint32 extra_size_remaining = ext_len; + const mz_uint8 *pExtra_data = pExt; + + do { + mz_uint32 field_id, field_data_size, field_total_size; + + if (extra_size_remaining < (sizeof(mz_uint16) * 2)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + field_id = MZ_READ_LE16(pExtra_data); + field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16)); + field_total_size = field_data_size + sizeof(mz_uint16) * 2; + + if (field_total_size > extra_size_remaining) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + if (field_id != MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) { + if (!mz_zip_array_push_back(pZip, pNew_ext, pExtra_data, + field_total_size)) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + pExtra_data += field_total_size; + extra_size_remaining -= field_total_size; + } while (extra_size_remaining); + } + + return MZ_TRUE; +} + +/* TODO: This func is now pretty freakin complex due to zip64, split it up? */ +mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, + mz_zip_archive *pSource_zip, + mz_uint src_file_index) { + mz_uint n, bit_flags, num_alignment_padding_bytes, + src_central_dir_following_data_size; + mz_uint64 src_archive_bytes_remaining, local_dir_header_ofs; + mz_uint64 cur_src_file_ofs, cur_dst_file_ofs; + mz_uint32 + local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / + sizeof(mz_uint32)]; + mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; + mz_uint8 new_central_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE]; + size_t orig_central_dir_size; + mz_zip_internal_state *pState; + void *pBuf; + const mz_uint8 *pSrc_central_header; + mz_zip_archive_file_stat src_file_stat; + mz_uint32 src_filename_len, src_comment_len, src_ext_len; + mz_uint32 local_header_filename_size, local_header_extra_len; + mz_uint64 local_header_comp_size, local_header_uncomp_size; + mz_bool found_zip64_ext_data_in_ldir = MZ_FALSE; + + /* Sanity checks */ + if ((!pZip) || (!pZip->m_pState) || + (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pSource_zip->m_pRead)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + pState = pZip->m_pState; + + /* Don't support copying files from zip64 archives to non-zip64, even though + * in some cases this is possible */ + if ((pSource_zip->m_pState->m_zip64) && (!pZip->m_pState->m_zip64)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + /* Get pointer to the source central dir header and crack it */ + if (NULL == + (pSrc_central_header = mz_zip_get_cdh(pSource_zip, src_file_index))) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_SIG_OFS) != + MZ_ZIP_CENTRAL_DIR_HEADER_SIG) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + src_filename_len = + MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_FILENAME_LEN_OFS); + src_comment_len = + MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_COMMENT_LEN_OFS); + src_ext_len = MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_EXTRA_LEN_OFS); + src_central_dir_following_data_size = + src_filename_len + src_ext_len + src_comment_len; + + /* TODO: We don't support central dir's >= MZ_UINT32_MAX bytes right now (+32 + * fudge factor in case we need to add more extra data) */ + if ((pState->m_central_dir.m_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + + src_central_dir_following_data_size + 32) >= MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE); + + num_alignment_padding_bytes = + mz_zip_writer_compute_padding_needed_for_file_alignment(pZip); + + if (!pState->m_zip64) { + if (pZip->m_total_files == MZ_UINT16_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + } else { + /* TODO: Our zip64 support still has some 32-bit limits that may not be + * worth fixing. */ + if (pZip->m_total_files == MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + } + + if (!mz_zip_file_stat_internal(pSource_zip, src_file_index, + pSrc_central_header, &src_file_stat, NULL)) + return MZ_FALSE; + + cur_src_file_ofs = src_file_stat.m_local_header_ofs; + cur_dst_file_ofs = pZip->m_archive_size; + + /* Read the source archive's local dir header */ + if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, + pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + + if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + + cur_src_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE; + + /* Compute the total size we need to copy (filename+extra data+compressed + * data) */ + local_header_filename_size = + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS); + local_header_extra_len = + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); + local_header_comp_size = + MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS); + local_header_uncomp_size = + MZ_READ_LE32(pLocal_header + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS); + src_archive_bytes_remaining = local_header_filename_size + + local_header_extra_len + + src_file_stat.m_comp_size; + + /* Try to find a zip64 extended information field */ + if ((local_header_extra_len) && + ((local_header_comp_size == MZ_UINT32_MAX) || + (local_header_uncomp_size == MZ_UINT32_MAX))) { + mz_zip_array file_data_array; + const mz_uint8 *pExtra_data; + mz_uint32 extra_size_remaining = local_header_extra_len; + + mz_zip_array_init(&file_data_array, 1); + if (!mz_zip_array_resize(pZip, &file_data_array, local_header_extra_len, + MZ_FALSE)) { + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, + src_file_stat.m_local_header_ofs + + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + + local_header_filename_size, + file_data_array.m_p, local_header_extra_len) != + local_header_extra_len) { + mz_zip_array_clear(pZip, &file_data_array); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + } + + pExtra_data = (const mz_uint8 *)file_data_array.m_p; + + do { + mz_uint32 field_id, field_data_size, field_total_size; + + if (extra_size_remaining < (sizeof(mz_uint16) * 2)) { + mz_zip_array_clear(pZip, &file_data_array); + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + } + + field_id = MZ_READ_LE16(pExtra_data); + field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16)); + field_total_size = field_data_size + sizeof(mz_uint16) * 2; + + if (field_total_size > extra_size_remaining) { + mz_zip_array_clear(pZip, &file_data_array); + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + } + + if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID) { + const mz_uint8 *pSrc_field_data = pExtra_data + sizeof(mz_uint32); + + if (field_data_size < sizeof(mz_uint64) * 2) { + mz_zip_array_clear(pZip, &file_data_array); + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED); + } + + local_header_uncomp_size = MZ_READ_LE64(pSrc_field_data); + local_header_comp_size = MZ_READ_LE64( + pSrc_field_data + + sizeof(mz_uint64)); /* may be 0 if there's a descriptor */ + + found_zip64_ext_data_in_ldir = MZ_TRUE; + break; + } + + pExtra_data += field_total_size; + extra_size_remaining -= field_total_size; + } while (extra_size_remaining); + + mz_zip_array_clear(pZip, &file_data_array); + } + + if (!pState->m_zip64) { + /* Try to detect if the new archive will most likely wind up too big and + * bail early (+(sizeof(mz_uint32) * 4) is for the optional descriptor which + * could be present, +64 is a fudge factor). */ + /* We also check when the archive is finalized so this doesn't need to be + * perfect. */ + mz_uint64 approx_new_archive_size = + cur_dst_file_ofs + num_alignment_padding_bytes + + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + src_archive_bytes_remaining + + (sizeof(mz_uint32) * 4) + pState->m_central_dir.m_size + + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + src_central_dir_following_data_size + + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE + 64; + + if (approx_new_archive_size >= MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + } + + /* Write dest archive padding */ + if (!mz_zip_writer_write_zeros(pZip, cur_dst_file_ofs, + num_alignment_padding_bytes)) + return MZ_FALSE; + + cur_dst_file_ofs += num_alignment_padding_bytes; + + local_dir_header_ofs = cur_dst_file_ofs; + if (pZip->m_file_offset_alignment) { + MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == + 0); + } + + /* The original zip's local header+ext block doesn't change, even with zip64, + * so we can just copy it over to the dest zip */ + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pLocal_header, + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + cur_dst_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE; + + /* Copy over the source archive bytes to the dest archive, also ensure we have + * enough buf space to handle optional data descriptor */ + if (NULL == (pBuf = pZip->m_pAlloc( + pZip->m_pAlloc_opaque, 1, + (size_t)MZ_MAX(32U, MZ_MIN((mz_uint64)MZ_ZIP_MAX_IO_BUF_SIZE, + src_archive_bytes_remaining))))) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + while (src_archive_bytes_remaining) { + n = (mz_uint)MZ_MIN((mz_uint64)MZ_ZIP_MAX_IO_BUF_SIZE, + src_archive_bytes_remaining); + if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, + n) != n) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + } + cur_src_file_ofs += n; + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + cur_dst_file_ofs += n; + + src_archive_bytes_remaining -= n; + } + + /* Now deal with the optional data descriptor */ + bit_flags = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_BIT_FLAG_OFS); + if (bit_flags & 8) { + /* Copy data descriptor */ + if ((pSource_zip->m_pState->m_zip64) || (found_zip64_ext_data_in_ldir)) { + /* src is zip64, dest must be zip64 */ + + /* name uint32_t's */ + /* id 1 (optional in zip64?) */ + /* crc 1 */ + /* comp_size 2 */ + /* uncomp_size 2 */ + if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, + pBuf, (sizeof(mz_uint32) * 6)) != + (sizeof(mz_uint32) * 6)) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + } + + n = sizeof(mz_uint32) * + ((MZ_READ_LE32(pBuf) == MZ_ZIP_DATA_DESCRIPTOR_ID) ? 6 : 5); + } else { + /* src is NOT zip64 */ + mz_bool has_id; + + if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, + pBuf, sizeof(mz_uint32) * 4) != + sizeof(mz_uint32) * 4) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED); + } + + has_id = (MZ_READ_LE32(pBuf) == MZ_ZIP_DATA_DESCRIPTOR_ID); + + if (pZip->m_pState->m_zip64) { + /* dest is zip64, so upgrade the data descriptor */ + const mz_uint32 *pSrc_descriptor = + (const mz_uint32 *)((const mz_uint8 *)pBuf + + (has_id ? sizeof(mz_uint32) : 0)); + const mz_uint32 src_crc32 = pSrc_descriptor[0]; + const mz_uint64 src_comp_size = pSrc_descriptor[1]; + const mz_uint64 src_uncomp_size = pSrc_descriptor[2]; + + mz_write_le32((mz_uint8 *)pBuf, MZ_ZIP_DATA_DESCRIPTOR_ID); + mz_write_le32((mz_uint8 *)pBuf + sizeof(mz_uint32) * 1, src_crc32); + mz_write_le64((mz_uint8 *)pBuf + sizeof(mz_uint32) * 2, src_comp_size); + mz_write_le64((mz_uint8 *)pBuf + sizeof(mz_uint32) * 4, + src_uncomp_size); + + n = sizeof(mz_uint32) * 6; + } else { + /* dest is NOT zip64, just copy it as-is */ + n = sizeof(mz_uint32) * (has_id ? 4 : 3); + } + } + + if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n) { + pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + } + + cur_src_file_ofs += n; + cur_dst_file_ofs += n; + } + pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); + + /* Finally, add the new central dir header */ + orig_central_dir_size = pState->m_central_dir.m_size; + + memcpy(new_central_header, pSrc_central_header, + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE); + + if (pState->m_zip64) { + /* This is the painful part: We need to write a new central dir header + ext + * block with updated zip64 fields, and ensure the old fields (if any) are + * not included. */ + const mz_uint8 *pSrc_ext = + pSrc_central_header + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + src_filename_len; + mz_zip_array new_ext_block; + + mz_zip_array_init(&new_ext_block, sizeof(mz_uint8)); + + MZ_WRITE_LE32(new_central_header + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS, + MZ_UINT32_MAX); + MZ_WRITE_LE32(new_central_header + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS, + MZ_UINT32_MAX); + MZ_WRITE_LE32(new_central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS, + MZ_UINT32_MAX); + + if (!mz_zip_writer_update_zip64_extension_block( + &new_ext_block, pZip, pSrc_ext, src_ext_len, + &src_file_stat.m_comp_size, &src_file_stat.m_uncomp_size, + &local_dir_header_ofs, NULL)) { + mz_zip_array_clear(pZip, &new_ext_block); + return MZ_FALSE; + } + + MZ_WRITE_LE16(new_central_header + MZ_ZIP_CDH_EXTRA_LEN_OFS, + new_ext_block.m_size); + + if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, + new_central_header, + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)) { + mz_zip_array_clear(pZip, &new_ext_block); + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, + pSrc_central_header + + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, + src_filename_len)) { + mz_zip_array_clear(pZip, &new_ext_block); + mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, + MZ_FALSE); + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, new_ext_block.m_p, + new_ext_block.m_size)) { + mz_zip_array_clear(pZip, &new_ext_block); + mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, + MZ_FALSE); + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, + pSrc_central_header + + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + + src_filename_len + src_ext_len, + src_comment_len)) { + mz_zip_array_clear(pZip, &new_ext_block); + mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, + MZ_FALSE); + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + mz_zip_array_clear(pZip, &new_ext_block); + } else { + /* sanity checks */ + if (cur_dst_file_ofs > MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + + if (local_dir_header_ofs >= MZ_UINT32_MAX) + return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); + + MZ_WRITE_LE32(new_central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS, + local_dir_header_ofs); + + if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, + new_central_header, + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)) + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + + if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, + pSrc_central_header + + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, + src_central_dir_following_data_size)) { + mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, + MZ_FALSE); + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + } + + /* This shouldn't trigger unless we screwed up during the initial sanity + * checks */ + if (pState->m_central_dir.m_size >= MZ_UINT32_MAX) { + /* TODO: Support central dirs >= 32-bits in size */ + mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, + MZ_FALSE); + return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE); + } + + n = (mz_uint32)orig_central_dir_size; + if (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, &n, 1)) { + mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, + MZ_FALSE); + return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); + } + + pZip->m_total_files++; + pZip->m_archive_size = cur_dst_file_ofs; + + return MZ_TRUE; +} + +mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip) { + mz_zip_internal_state *pState; + mz_uint64 central_dir_ofs, central_dir_size; + mz_uint8 hdr[256]; + + if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + pState = pZip->m_pState; + + if (pState->m_zip64) { + if ((pZip->m_total_files > MZ_UINT32_MAX) || + (pState->m_central_dir.m_size >= MZ_UINT32_MAX)) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + } else { + if ((pZip->m_total_files > MZ_UINT16_MAX) || + ((pZip->m_archive_size + pState->m_central_dir.m_size + + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) > MZ_UINT32_MAX)) + return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); + } + + central_dir_ofs = 0; + central_dir_size = 0; + if (pZip->m_total_files) { + /* Write central directory */ + central_dir_ofs = pZip->m_archive_size; + central_dir_size = pState->m_central_dir.m_size; + pZip->m_central_directory_file_ofs = central_dir_ofs; + if (pZip->m_pWrite(pZip->m_pIO_opaque, central_dir_ofs, + pState->m_central_dir.m_p, + (size_t)central_dir_size) != central_dir_size) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + pZip->m_archive_size += central_dir_size; + } + + if (pState->m_zip64) { + /* Write zip64 end of central directory header */ + mz_uint64 rel_ofs_to_zip64_ecdr = pZip->m_archive_size; + + MZ_CLEAR_OBJ(hdr); + MZ_WRITE_LE32(hdr + MZ_ZIP64_ECDH_SIG_OFS, + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG); + MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS, + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE - sizeof(mz_uint32) - + sizeof(mz_uint64)); + MZ_WRITE_LE16(hdr + MZ_ZIP64_ECDH_VERSION_MADE_BY_OFS, + 0x031E); /* TODO: always Unix */ + MZ_WRITE_LE16(hdr + MZ_ZIP64_ECDH_VERSION_NEEDED_OFS, 0x002D); + MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, + pZip->m_total_files); + MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS, + pZip->m_total_files); + MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDH_CDIR_SIZE_OFS, central_dir_size); + MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDH_CDIR_OFS_OFS, central_dir_ofs); + if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) != + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + pZip->m_archive_size += MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE; + + /* Write zip64 end of central directory locator */ + MZ_CLEAR_OBJ(hdr); + MZ_WRITE_LE32(hdr + MZ_ZIP64_ECDL_SIG_OFS, + MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG); + MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS, + rel_ofs_to_zip64_ecdr); + MZ_WRITE_LE32(hdr + MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS, 1); + if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, + MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) != + MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + + pZip->m_archive_size += MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE; + } + + /* Write end of central directory record */ + MZ_CLEAR_OBJ(hdr); + MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_SIG_OFS, + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG); + MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, + MZ_MIN(MZ_UINT16_MAX, pZip->m_total_files)); + MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS, + MZ_MIN(MZ_UINT16_MAX, pZip->m_total_files)); + MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_SIZE_OFS, + MZ_MIN(MZ_UINT32_MAX, central_dir_size)); + MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_OFS_OFS, + MZ_MIN(MZ_UINT32_MAX, central_dir_ofs)); + + if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) != + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED); + +#ifndef MINIZ_NO_STDIO + if ((pState->m_pFile) && (MZ_FFLUSH(pState->m_pFile) == EOF)) + return mz_zip_set_error(pZip, MZ_ZIP_FILE_CLOSE_FAILED); +#endif /* #ifndef MINIZ_NO_STDIO */ + + pZip->m_archive_size += MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE; + + pZip->m_zip_mode = MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED; + return MZ_TRUE; +} + +mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **ppBuf, + size_t *pSize) { + if ((!ppBuf) || (!pSize)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + *ppBuf = NULL; + *pSize = 0; + + if ((!pZip) || (!pZip->m_pState)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (pZip->m_pWrite != mz_zip_heap_write_func) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + if (!mz_zip_writer_finalize_archive(pZip)) + return MZ_FALSE; + + *ppBuf = pZip->m_pState->m_pMem; + *pSize = pZip->m_pState->m_mem_size; + pZip->m_pState->m_pMem = NULL; + pZip->m_pState->m_mem_size = pZip->m_pState->m_mem_capacity = 0; + + return MZ_TRUE; +} + +mz_bool mz_zip_writer_end(mz_zip_archive *pZip) { + return mz_zip_writer_end_internal(pZip, MZ_TRUE); +} + +#ifndef MINIZ_NO_STDIO +mz_bool mz_zip_add_mem_to_archive_file_in_place( + const char *pZip_filename, const char *pArchive_name, const void *pBuf, + size_t buf_size, const void *pComment, mz_uint16 comment_size, + mz_uint level_and_flags) { + return mz_zip_add_mem_to_archive_file_in_place_v2( + pZip_filename, pArchive_name, pBuf, buf_size, pComment, comment_size, + level_and_flags, NULL); +} + +mz_bool mz_zip_add_mem_to_archive_file_in_place_v2( + const char *pZip_filename, const char *pArchive_name, const void *pBuf, + size_t buf_size, const void *pComment, mz_uint16 comment_size, + mz_uint level_and_flags, mz_zip_error *pErr) { + mz_bool status, created_new_archive = MZ_FALSE; + mz_zip_archive zip_archive; + struct MZ_FILE_STAT_STRUCT file_stat; + mz_zip_error actual_err = MZ_ZIP_NO_ERROR; + + mz_zip_zero_struct(&zip_archive); + if ((int)level_and_flags < 0) + level_and_flags = MZ_DEFAULT_LEVEL; + + if ((!pZip_filename) || (!pArchive_name) || ((buf_size) && (!pBuf)) || + ((comment_size) && (!pComment)) || + ((level_and_flags & 0xF) > MZ_UBER_COMPRESSION)) { + if (pErr) + *pErr = MZ_ZIP_INVALID_PARAMETER; + return MZ_FALSE; + } + + if (!mz_zip_writer_validate_archive_name(pArchive_name)) { + if (pErr) + *pErr = MZ_ZIP_INVALID_FILENAME; + return MZ_FALSE; + } + + /* Important: The regular non-64 bit version of stat() can fail here if the + * file is very large, which could cause the archive to be overwritten. */ + /* So be sure to compile with _LARGEFILE64_SOURCE 1 */ + if (MZ_FILE_STAT(pZip_filename, &file_stat) != 0) { + /* Create a new archive. */ + if (!mz_zip_writer_init_file_v2(&zip_archive, pZip_filename, 0, + level_and_flags)) { + if (pErr) + *pErr = zip_archive.m_last_error; + return MZ_FALSE; + } + + created_new_archive = MZ_TRUE; + } else { + /* Append to an existing archive. */ + if (!mz_zip_reader_init_file_v2( + &zip_archive, pZip_filename, + level_and_flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY, 0, + 0)) { + if (pErr) + *pErr = zip_archive.m_last_error; + return MZ_FALSE; + } + + if (!mz_zip_writer_init_from_reader_v2(&zip_archive, pZip_filename, + level_and_flags)) { + if (pErr) + *pErr = zip_archive.m_last_error; + + mz_zip_reader_end_internal(&zip_archive, MZ_FALSE); + + return MZ_FALSE; + } + } + + status = + mz_zip_writer_add_mem_ex(&zip_archive, pArchive_name, pBuf, buf_size, + pComment, comment_size, level_and_flags, 0, 0); + actual_err = zip_archive.m_last_error; + + /* Always finalize, even if adding failed for some reason, so we have a valid + * central directory. (This may not always succeed, but we can try.) */ + if (!mz_zip_writer_finalize_archive(&zip_archive)) { + if (!actual_err) + actual_err = zip_archive.m_last_error; + + status = MZ_FALSE; + } + + if (!mz_zip_writer_end_internal(&zip_archive, status)) { + if (!actual_err) + actual_err = zip_archive.m_last_error; + + status = MZ_FALSE; + } + + if ((!status) && (created_new_archive)) { + /* It's a new archive and something went wrong, so just delete it. */ + int ignoredStatus = MZ_DELETE_FILE(pZip_filename); + (void)ignoredStatus; + } + + if (pErr) + *pErr = actual_err; + + return status; +} + +void *mz_zip_extract_archive_file_to_heap_v2(const char *pZip_filename, + const char *pArchive_name, + const char *pComment, + size_t *pSize, mz_uint flags, + mz_zip_error *pErr) { + mz_uint32 file_index; + mz_zip_archive zip_archive; + void *p = NULL; + + if (pSize) + *pSize = 0; + + if ((!pZip_filename) || (!pArchive_name)) { + if (pErr) + *pErr = MZ_ZIP_INVALID_PARAMETER; + + return NULL; + } + + mz_zip_zero_struct(&zip_archive); + if (!mz_zip_reader_init_file_v2( + &zip_archive, pZip_filename, + flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY, 0, 0)) { + if (pErr) + *pErr = zip_archive.m_last_error; + + return NULL; + } + + if (mz_zip_reader_locate_file_v2(&zip_archive, pArchive_name, pComment, flags, + &file_index)) { + p = mz_zip_reader_extract_to_heap(&zip_archive, file_index, pSize, flags); + } + + mz_zip_reader_end_internal(&zip_archive, p != NULL); + + if (pErr) + *pErr = zip_archive.m_last_error; + + return p; +} + +void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, + const char *pArchive_name, + size_t *pSize, mz_uint flags) { + return mz_zip_extract_archive_file_to_heap_v2(pZip_filename, pArchive_name, + NULL, pSize, flags, NULL); +} + +#endif /* #ifndef MINIZ_NO_STDIO */ + +#endif /* #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS */ + +/* ------------------- Misc utils */ + +mz_zip_mode mz_zip_get_mode(mz_zip_archive *pZip) { + return pZip ? pZip->m_zip_mode : MZ_ZIP_MODE_INVALID; +} + +mz_zip_type mz_zip_get_type(mz_zip_archive *pZip) { + return pZip ? pZip->m_zip_type : MZ_ZIP_TYPE_INVALID; +} + +mz_zip_error mz_zip_set_last_error(mz_zip_archive *pZip, mz_zip_error err_num) { + mz_zip_error prev_err; + + if (!pZip) + return MZ_ZIP_INVALID_PARAMETER; + + prev_err = pZip->m_last_error; + + pZip->m_last_error = err_num; + return prev_err; +} + +mz_zip_error mz_zip_peek_last_error(mz_zip_archive *pZip) { + if (!pZip) + return MZ_ZIP_INVALID_PARAMETER; + + return pZip->m_last_error; +} + +mz_zip_error mz_zip_clear_last_error(mz_zip_archive *pZip) { + return mz_zip_set_last_error(pZip, MZ_ZIP_NO_ERROR); +} + +mz_zip_error mz_zip_get_last_error(mz_zip_archive *pZip) { + mz_zip_error prev_err; + + if (!pZip) + return MZ_ZIP_INVALID_PARAMETER; + + prev_err = pZip->m_last_error; + + pZip->m_last_error = MZ_ZIP_NO_ERROR; + return prev_err; +} + +const char *mz_zip_get_error_string(mz_zip_error mz_err) { + switch (mz_err) { + case MZ_ZIP_NO_ERROR: + return "no error"; + case MZ_ZIP_UNDEFINED_ERROR: + return "undefined error"; + case MZ_ZIP_TOO_MANY_FILES: + return "too many files"; + case MZ_ZIP_FILE_TOO_LARGE: + return "file too large"; + case MZ_ZIP_UNSUPPORTED_METHOD: + return "unsupported method"; + case MZ_ZIP_UNSUPPORTED_ENCRYPTION: + return "unsupported encryption"; + case MZ_ZIP_UNSUPPORTED_FEATURE: + return "unsupported feature"; + case MZ_ZIP_FAILED_FINDING_CENTRAL_DIR: + return "failed finding central directory"; + case MZ_ZIP_NOT_AN_ARCHIVE: + return "not a ZIP archive"; + case MZ_ZIP_INVALID_HEADER_OR_CORRUPTED: + return "invalid header or archive is corrupted"; + case MZ_ZIP_UNSUPPORTED_MULTIDISK: + return "unsupported multidisk archive"; + case MZ_ZIP_DECOMPRESSION_FAILED: + return "decompression failed or archive is corrupted"; + case MZ_ZIP_COMPRESSION_FAILED: + return "compression failed"; + case MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE: + return "unexpected decompressed size"; + case MZ_ZIP_CRC_CHECK_FAILED: + return "CRC-32 check failed"; + case MZ_ZIP_UNSUPPORTED_CDIR_SIZE: + return "unsupported central directory size"; + case MZ_ZIP_ALLOC_FAILED: + return "allocation failed"; + case MZ_ZIP_FILE_OPEN_FAILED: + return "file open failed"; + case MZ_ZIP_FILE_CREATE_FAILED: + return "file create failed"; + case MZ_ZIP_FILE_WRITE_FAILED: + return "file write failed"; + case MZ_ZIP_FILE_READ_FAILED: + return "file read failed"; + case MZ_ZIP_FILE_CLOSE_FAILED: + return "file close failed"; + case MZ_ZIP_FILE_SEEK_FAILED: + return "file seek failed"; + case MZ_ZIP_FILE_STAT_FAILED: + return "file stat failed"; + case MZ_ZIP_INVALID_PARAMETER: + return "invalid parameter"; + case MZ_ZIP_INVALID_FILENAME: + return "invalid filename"; + case MZ_ZIP_BUF_TOO_SMALL: + return "buffer too small"; + case MZ_ZIP_INTERNAL_ERROR: + return "internal error"; + case MZ_ZIP_FILE_NOT_FOUND: + return "file not found"; + case MZ_ZIP_ARCHIVE_TOO_LARGE: + return "archive is too large"; + case MZ_ZIP_VALIDATION_FAILED: + return "validation failed"; + case MZ_ZIP_WRITE_CALLBACK_FAILED: + return "write callback failed"; + case MZ_ZIP_TOTAL_ERRORS: + return "total errors"; + default: + break; + } + + return "unknown error"; +} + +/* Note: Just because the archive is not zip64 doesn't necessarily mean it + * doesn't have Zip64 extended information extra field, argh. */ +mz_bool mz_zip_is_zip64(mz_zip_archive *pZip) { + if ((!pZip) || (!pZip->m_pState)) + return MZ_FALSE; + + return pZip->m_pState->m_zip64; +} + +size_t mz_zip_get_central_dir_size(mz_zip_archive *pZip) { + if ((!pZip) || (!pZip->m_pState)) + return 0; + + return pZip->m_pState->m_central_dir.m_size; +} + +mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip) { + return pZip ? pZip->m_total_files : 0; +} + +mz_uint64 mz_zip_get_archive_size(mz_zip_archive *pZip) { + if (!pZip) + return 0; + return pZip->m_archive_size; +} + +mz_uint64 mz_zip_get_archive_file_start_offset(mz_zip_archive *pZip) { + if ((!pZip) || (!pZip->m_pState)) + return 0; + return pZip->m_pState->m_file_archive_start_ofs; +} + +MZ_FILE *mz_zip_get_cfile(mz_zip_archive *pZip) { + if ((!pZip) || (!pZip->m_pState)) + return 0; + return pZip->m_pState->m_pFile; +} + +size_t mz_zip_read_archive_data(mz_zip_archive *pZip, mz_uint64 file_ofs, + void *pBuf, size_t n) { + if ((!pZip) || (!pZip->m_pState) || (!pBuf) || (!pZip->m_pRead)) + return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + + return pZip->m_pRead(pZip->m_pIO_opaque, file_ofs, pBuf, n); +} + +mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, + char *pFilename, mz_uint filename_buf_size) { + mz_uint n; + const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index); + if (!p) { + if (filename_buf_size) + pFilename[0] = '\0'; + mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); + return 0; + } + n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); + if (filename_buf_size) { + n = MZ_MIN(n, filename_buf_size - 1); + memcpy(pFilename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); + pFilename[n] = '\0'; + } + return n + 1; +} + +mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, + mz_zip_archive_file_stat *pStat) { + return mz_zip_file_stat_internal( + pZip, file_index, mz_zip_get_cdh(pZip, file_index), pStat, NULL); +} + +mz_bool mz_zip_end(mz_zip_archive *pZip) { + if (!pZip) + return MZ_FALSE; + + if (pZip->m_zip_mode == MZ_ZIP_MODE_READING) + return mz_zip_reader_end(pZip); +#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS + else if ((pZip->m_zip_mode == MZ_ZIP_MODE_WRITING) || + (pZip->m_zip_mode == MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED)) + return mz_zip_writer_end(pZip); +#endif + + return MZ_FALSE; +} + +#ifdef __cplusplus +} +#endif + +#endif /*#ifndef MINIZ_NO_ARCHIVE_APIS*/ diff --git a/IfcPlusPlus/src/external/zip-master/zip.c b/IfcPlusPlus/src/external/zip-master/zip.c new file mode 100644 index 000000000..b50e2f1d7 --- /dev/null +++ b/IfcPlusPlus/src/external/zip-master/zip.c @@ -0,0 +1,1793 @@ +/* + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ +#define __STDC_WANT_LIB_EXT1__ 1 + +#include +#include +#include + +#if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) || \ + defined(__MINGW32__) +/* Win32, DOS, MSVC, MSVS */ +#include + +#define STRCLONE(STR) ((STR) ? _strdup(STR) : NULL) +#define HAS_DEVICE(P) \ + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) && \ + (P)[1] == ':') +#define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE(P) ? 2 : 0) + +#else + +#include // needed for symlink() +#define STRCLONE(STR) ((STR) ? strdup(STR) : NULL) + +#endif + +#ifdef __MINGW32__ +#include +#include +#endif + +#include "miniz.h" +#include "zip.h" + +#ifdef _MSC_VER +#include + +#define ftruncate(fd, sz) (-(_chsize_s((fd), (sz)) != 0)) +#define fileno _fileno +#endif + +#if defined(__TINYC__) && (defined(_WIN32) || defined(_WIN64)) +#include + +#define ftruncate(fd, sz) (-(_chsize_s((fd), (sz)) != 0)) +#define fileno _fileno +#endif + +#ifndef HAS_DEVICE +#define HAS_DEVICE(P) 0 +#endif + +#ifndef FILESYSTEM_PREFIX_LEN +#define FILESYSTEM_PREFIX_LEN(P) 0 +#endif + +#ifndef ISSLASH +#define ISSLASH(C) ((C) == '/' || (C) == '\\') +#endif + +#define CLEANUP(ptr) \ + do { \ + if (ptr) { \ + free((void *)ptr); \ + ptr = NULL; \ + } \ + } while (0) + +#define UNX_IFDIR 0040000 /* Unix directory */ +#define UNX_IFREG 0100000 /* Unix regular file */ +#define UNX_IFSOCK 0140000 /* Unix socket (BSD, not SysV or Amiga) */ +#define UNX_IFLNK 0120000 /* Unix symbolic link (not SysV, Amiga) */ +#define UNX_IFBLK 0060000 /* Unix block special (not Amiga) */ +#define UNX_IFCHR 0020000 /* Unix character special (not Amiga) */ +#define UNX_IFIFO 0010000 /* Unix fifo (BCC, not MSC or Amiga) */ + +struct zip_entry_t { + ssize_t index; + char *name; + mz_uint64 uncomp_size; + mz_uint64 comp_size; + mz_uint32 uncomp_crc32; + mz_uint64 offset; + mz_uint8 header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE]; + mz_uint64 header_offset; + mz_uint16 method; + mz_zip_writer_add_state state; + tdefl_compressor comp; + mz_uint32 external_attr; + time_t m_time; +}; + +struct zip_t { + mz_zip_archive archive; + mz_uint level; + struct zip_entry_t entry; +}; + +enum zip_modify_t { + MZ_KEEP = 0, + MZ_DELETE = 1, + MZ_MOVE = 2, +}; + +struct zip_entry_mark_t { + ssize_t file_index; + enum zip_modify_t type; + mz_uint64 m_local_header_ofs; + size_t lf_length; +}; + +static const char *const zip_errlist[30] = { + NULL, + "not initialized\0", + "invalid entry name\0", + "entry not found\0", + "invalid zip mode\0", + "invalid compression level\0", + "no zip 64 support\0", + "memset error\0", + "cannot write data to entry\0", + "cannot initialize tdefl compressor\0", + "invalid index\0", + "header not found\0", + "cannot flush tdefl buffer\0", + "cannot write entry header\0", + "cannot create entry header\0", + "cannot write to central dir\0", + "cannot open file\0", + "invalid entry type\0", + "extracting data using no memory allocation\0", + "file not found\0", + "no permission\0", + "out of memory\0", + "invalid zip archive name\0", + "make dir error\0", + "symlink error\0", + "close archive error\0", + "capacity size too small\0", + "fseek error\0", + "fread error\0", + "fwrite error\0", +}; + +const char *zip_strerror(int errnum) { + errnum = -errnum; + if (errnum <= 0 || errnum >= 30) { + return NULL; + } + + return zip_errlist[errnum]; +} + +static const char *zip_basename(const char *name) { + char const *p; + char const *base = name += FILESYSTEM_PREFIX_LEN(name); + int all_slashes = 1; + + for (p = name; *p; p++) { + if (ISSLASH(*p)) + base = p + 1; + else + all_slashes = 0; + } + + /* If NAME is all slashes, arrange to return `/'. */ + if (*base == '\0' && ISSLASH(*name) && all_slashes) + --base; + + return base; +} + +static int zip_mkpath(char *path) { + char *p; + char npath[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE + 1]; + int len = 0; + int has_device = HAS_DEVICE(path); + + memset(npath, 0, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE + 1); + if (has_device) { + // only on windows + npath[0] = path[0]; + npath[1] = path[1]; + len = 2; + } + for (p = path + len; *p && len < MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE; p++) { + if (ISSLASH(*p) && ((!has_device && len > 0) || (has_device && len > 2))) { +#if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) || \ + defined(__MINGW32__) +#else + if ('\\' == *p) { + *p = '/'; + } +#endif + + if (MZ_MKDIR(npath) == -1) { + if (errno != EEXIST) { + return ZIP_EMKDIR; + } + } + } + npath[len++] = *p; + } + + return 0; +} + +static char *zip_strrpl(const char *str, size_t n, char oldchar, char newchar) { + char c; + size_t i; + char *rpl = (char *)calloc((1 + n), sizeof(char)); + char *begin = rpl; + if (!rpl) { + return NULL; + } + + for (i = 0; (i < n) && (c = *str++); ++i) { + if (c == oldchar) { + c = newchar; + } + *rpl++ = c; + } + + return begin; +} + +static char *zip_name_normalize(char *name, char *const nname, size_t len) { + size_t offn = 0; + size_t offnn = 0, ncpy = 0; + + if (name == NULL || nname == NULL || len <= 0) { + return NULL; + } + // skip trailing '/' + while (ISSLASH(*name)) + name++; + + for (; offn < len; offn++) { + if (ISSLASH(name[offn])) { + if (ncpy > 0 && strcmp(&nname[offnn], ".\0") && + strcmp(&nname[offnn], "..\0")) { + offnn += ncpy; + nname[offnn++] = name[offn]; // append '/' + } + ncpy = 0; + } else { + nname[offnn + ncpy] = name[offn]; + ncpy++; + } + } + + // at the end, extra check what we've already copied + if (ncpy == 0 || !strcmp(&nname[offnn], ".\0") || + !strcmp(&nname[offnn], "..\0")) { + nname[offnn] = 0; + } + return nname; +} + +static mz_bool zip_name_match(const char *name1, const char *name2) { + char *nname2 = NULL; + +#ifdef ZIP_RAW_ENTRYNAME + nname2 = STRCLONE(name2); +#else + nname2 = zip_strrpl(name2, strlen(name2), '\\', '/'); +#endif + + if (!nname2) { + return MZ_FALSE; + } + + mz_bool res = (strcmp(name1, nname2) == 0) ? MZ_TRUE : MZ_FALSE; + CLEANUP(nname2); + return res; +} + +static int zip_archive_truncate(mz_zip_archive *pzip) { + mz_zip_internal_state *pState = pzip->m_pState; + mz_uint64 file_size = pzip->m_archive_size; + if ((pzip->m_pWrite == mz_zip_heap_write_func) && (pState->m_pMem)) { + return 0; + } + if (pzip->m_zip_mode == MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED) { + if (pState->m_pFile) { + int fd = fileno(pState->m_pFile); + return ftruncate(fd, file_size); + } + } + return 0; +} + +static int zip_archive_extract(mz_zip_archive *zip_archive, const char *dir, + int (*on_extract)(const char *filename, + void *arg), + void *arg) { + int err = 0; + mz_uint i, n; + char path[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE + 1]; + char symlink_to[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE + 1]; + mz_zip_archive_file_stat info; + size_t dirlen = 0, filename_size = MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE; + mz_uint32 xattr = 0; + + memset(path, 0, sizeof(path)); + memset(symlink_to, 0, sizeof(symlink_to)); + + dirlen = strlen(dir); + if (dirlen + 1 > MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE) { + return ZIP_EINVENTNAME; + } + + memset((void *)&info, 0, sizeof(mz_zip_archive_file_stat)); + +#if defined(_MSC_VER) + strcpy_s(path, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE, dir); +#else + strcpy(path, dir); +#endif + + if (!ISSLASH(path[dirlen - 1])) { +#if defined(_WIN32) || defined(__WIN32__) + path[dirlen] = '\\'; +#else + path[dirlen] = '/'; +#endif + ++dirlen; + } + + if (filename_size > MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE - dirlen) { + filename_size = MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE - dirlen; + } + // Get and print information about each file in the archive. + n = mz_zip_reader_get_num_files(zip_archive); + for (i = 0; i < n; ++i) { + if (!mz_zip_reader_file_stat(zip_archive, i, &info)) { + // Cannot get information about zip archive; + err = ZIP_ENOENT; + goto out; + } + + if (!zip_name_normalize(info.m_filename, info.m_filename, + strlen(info.m_filename))) { + // Cannot normalize file name; + err = ZIP_EINVENTNAME; + goto out; + } + +#if defined(_MSC_VER) + strncpy_s(&path[dirlen], filename_size, info.m_filename, + filename_size); +#else + strncpy(&path[dirlen], info.m_filename, filename_size); +#endif + err = zip_mkpath(path); + if (err < 0) { + // Cannot make a path + goto out; + } + + if ((((info.m_version_made_by >> 8) == 3) || + ((info.m_version_made_by >> 8) == + 19)) // if zip is produced on Unix or macOS (3 and 19 from + // section 4.4.2.2 of zip standard) + && info.m_external_attr & + (0x20 << 24)) { // and has sym link attribute (0x80 is file, 0x40 + // is directory) +#if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) || \ + defined(__MINGW32__) +#else + if (info.m_uncomp_size > MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE || + !mz_zip_reader_extract_to_mem_no_alloc(zip_archive, i, symlink_to, + MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE, 0, NULL, 0)) { + err = ZIP_EMEMNOALLOC; + goto out; + } + symlink_to[info.m_uncomp_size] = '\0'; + if (symlink(symlink_to, path) != 0) { + err = ZIP_ESYMLINK; + goto out; + } +#endif + } else { + if (!mz_zip_reader_is_file_a_directory(zip_archive, i)) { + if (!mz_zip_reader_extract_to_file(zip_archive, i, path, 0)) { + // Cannot extract zip archive to file + err = ZIP_ENOFILE; + goto out; + } + } + +#if defined(_MSC_VER) || defined(PS4) + (void)xattr; // unused +#else + xattr = (info.m_external_attr >> 16) & 0xFFFF; + if (xattr > 0 && xattr <= MZ_UINT16_MAX) { + if (CHMOD(path, (mode_t)xattr) < 0) { + err = ZIP_ENOPERM; + goto out; + } + } +#endif + } + + if (on_extract) { + if (on_extract(path, arg) < 0) { + goto out; + } + } + } + +out: + // Close the archive, freeing any resources it was using + if (!mz_zip_reader_end(zip_archive)) { + // Cannot end zip reader + err = ZIP_ECLSZIP; + } + return err; +} + +static inline void zip_archive_finalize(mz_zip_archive *pzip) { + mz_zip_writer_finalize_archive(pzip); + zip_archive_truncate(pzip); +} + +static ssize_t zip_entry_mark(struct zip_t *zip, + struct zip_entry_mark_t *entry_mark, + const ssize_t n, char *const entries[], + const size_t len) { + ssize_t i = 0; + ssize_t err = 0; + if (!zip || !entry_mark || !entries) { + return ZIP_ENOINIT; + } + + mz_zip_archive_file_stat file_stat; + mz_uint64 d_pos = ~0UL; + for (i = 0; i < n; ++i) { + if ((err = zip_entry_openbyindex(zip, i))) { + return (ssize_t)err; + } + + mz_bool name_matches = MZ_FALSE; + { + size_t j; + for (j = 0; j < len; ++j) { + if (zip_name_match(zip->entry.name, entries[j])) { + name_matches = MZ_TRUE; + break; + } + } + } + if (name_matches) { + entry_mark[i].type = MZ_DELETE; + } else { + entry_mark[i].type = MZ_KEEP; + } + + if (!mz_zip_reader_file_stat(&zip->archive, i, &file_stat)) { + return ZIP_ENOENT; + } + + zip_entry_close(zip); + + entry_mark[i].m_local_header_ofs = file_stat.m_local_header_ofs; + entry_mark[i].file_index = (ssize_t)-1; + entry_mark[i].lf_length = 0; + if ((entry_mark[i].type) == MZ_DELETE && + (d_pos > entry_mark[i].m_local_header_ofs)) { + d_pos = entry_mark[i].m_local_header_ofs; + } + } + + for (i = 0; i < n; ++i) { + if ((entry_mark[i].m_local_header_ofs > d_pos) && + (entry_mark[i].type != MZ_DELETE)) { + entry_mark[i].type = MZ_MOVE; + } + } + return err; +} + +static ssize_t zip_index_next(mz_uint64 *local_header_ofs_array, + ssize_t cur_index) { + ssize_t new_index = 0, i; + for (i = cur_index - 1; i >= 0; --i) { + if (local_header_ofs_array[cur_index] > local_header_ofs_array[i]) { + new_index = i + 1; + return new_index; + } + } + return new_index; +} + +static ssize_t zip_sort(mz_uint64 *local_header_ofs_array, ssize_t cur_index) { + ssize_t nxt_index = zip_index_next(local_header_ofs_array, cur_index); + + if (nxt_index != cur_index) { + mz_uint64 temp = local_header_ofs_array[cur_index]; + ssize_t i; + for (i = cur_index; i > nxt_index; i--) { + local_header_ofs_array[i] = local_header_ofs_array[i - 1]; + } + local_header_ofs_array[nxt_index] = temp; + } + return nxt_index; +} + +static int zip_index_update(struct zip_entry_mark_t *entry_mark, + ssize_t last_index, ssize_t nxt_index) { + ssize_t j; + for (j = 0; j < last_index; j++) { + if (entry_mark[j].file_index >= nxt_index) { + entry_mark[j].file_index += 1; + } + } + entry_mark[nxt_index].file_index = last_index; + return 0; +} + +static int zip_entry_finalize(struct zip_t *zip, + struct zip_entry_mark_t *entry_mark, + const ssize_t n) { + + ssize_t i = 0; + mz_uint64 *local_header_ofs_array = (mz_uint64 *)calloc(n, sizeof(mz_uint64)); + if (!local_header_ofs_array) { + return ZIP_EOOMEM; + } + + for (i = 0; i < n; ++i) { + local_header_ofs_array[i] = entry_mark[i].m_local_header_ofs; + ssize_t index = zip_sort(local_header_ofs_array, i); + + if (index != i) { + zip_index_update(entry_mark, i, index); + } + entry_mark[i].file_index = index; + } + + size_t *length = (size_t *)calloc(n, sizeof(size_t)); + if (!length) { + CLEANUP(local_header_ofs_array); + return ZIP_EOOMEM; + } + for (i = 0; i < n - 1; i++) { + length[i] = + (size_t)(local_header_ofs_array[i + 1] - local_header_ofs_array[i]); + } + length[n - 1] = + (size_t)(zip->archive.m_archive_size - local_header_ofs_array[n - 1]); + + for (i = 0; i < n; i++) { + entry_mark[i].lf_length = length[entry_mark[i].file_index]; + } + + CLEANUP(length); + CLEANUP(local_header_ofs_array); + return 0; +} + +static ssize_t zip_entry_set(struct zip_t *zip, + struct zip_entry_mark_t *entry_mark, ssize_t n, + char *const entries[], const size_t len) { + ssize_t err = 0; + + if ((err = zip_entry_mark(zip, entry_mark, n, entries, len)) < 0) { + return err; + } + if ((err = zip_entry_finalize(zip, entry_mark, n)) < 0) { + return err; + } + return 0; +} + +static ssize_t zip_file_move(MZ_FILE *m_pFile, const mz_uint64 to, + const mz_uint64 from, const size_t length, + mz_uint8 *move_buf, const size_t capacity_size) { + if (length > capacity_size) { + return ZIP_ECAPSIZE; + } + if (MZ_FSEEK64(m_pFile, from, SEEK_SET)) { + return ZIP_EFSEEK; + } + if (fread(move_buf, 1, length, m_pFile) != length) { + return ZIP_EFREAD; + } + if (MZ_FSEEK64(m_pFile, to, SEEK_SET)) { + return ZIP_EFSEEK; + } + if (fwrite(move_buf, 1, length, m_pFile) != length) { + return ZIP_EFWRITE; + } + return (ssize_t)length; +} + +static ssize_t zip_files_move(MZ_FILE *m_pFile, mz_uint64 writen_num, + mz_uint64 read_num, size_t length) { + ssize_t n = 0; + const size_t page_size = 1 << 12; // 4K + mz_uint8 *move_buf = (mz_uint8 *)calloc(1, page_size); + if (!move_buf) { + return ZIP_EOOMEM; + } + + ssize_t moved_length = 0; + ssize_t move_count = 0; + while ((mz_int64)length > 0) { + move_count = (length >= page_size) ? page_size : length; + n = zip_file_move(m_pFile, writen_num, read_num, move_count, move_buf, + page_size); + if (n < 0) { + moved_length = n; + goto cleanup; + } + + if (n != move_count) { + goto cleanup; + } + + writen_num += move_count; + read_num += move_count; + length -= move_count; + moved_length += move_count; + } + +cleanup: + CLEANUP(move_buf); + return moved_length; +} + +static int zip_central_dir_move(mz_zip_internal_state *pState, int begin, + int end, int entry_num) { + if (begin == entry_num) { + return 0; + } + + size_t l_size = 0; + size_t r_size = 0; + mz_uint32 d_size = 0; + mz_uint8 *next = NULL; + mz_uint8 *deleted = &MZ_ZIP_ARRAY_ELEMENT( + &pState->m_central_dir, mz_uint8, + MZ_ZIP_ARRAY_ELEMENT(&pState->m_central_dir_offsets, mz_uint32, begin)); + l_size = (size_t)(deleted - (mz_uint8 *)(pState->m_central_dir.m_p)); + if (end == entry_num) { + r_size = 0; + } else { + next = &MZ_ZIP_ARRAY_ELEMENT( + &pState->m_central_dir, mz_uint8, + MZ_ZIP_ARRAY_ELEMENT(&pState->m_central_dir_offsets, mz_uint32, end)); + r_size = pState->m_central_dir.m_size - + (mz_uint32)(next - (mz_uint8 *)(pState->m_central_dir.m_p)); + d_size = (mz_uint32)(next - deleted); + } + + if (next && l_size == 0) { + memmove(pState->m_central_dir.m_p, next, r_size); + pState->m_central_dir.m_p = MZ_REALLOC(pState->m_central_dir.m_p, r_size); + { + int i; + for (i = end; i < entry_num; i++) { + MZ_ZIP_ARRAY_ELEMENT(&pState->m_central_dir_offsets, mz_uint32, i) -= + d_size; + } + } + } + + if (next && l_size * r_size != 0) { + memmove(deleted, next, r_size); + { + int i; + for (i = end; i < entry_num; i++) { + MZ_ZIP_ARRAY_ELEMENT(&pState->m_central_dir_offsets, mz_uint32, i) -= + d_size; + } + } + } + + pState->m_central_dir.m_size = l_size + r_size; + return 0; +} + +static int zip_central_dir_delete(mz_zip_internal_state *pState, + int *deleted_entry_index_array, + int entry_num) { + int i = 0; + int begin = 0; + int end = 0; + int d_num = 0; + while (i < entry_num) { + while ((i < entry_num) && (!deleted_entry_index_array[i])) { + i++; + } + begin = i; + + while ((i < entry_num) && (deleted_entry_index_array[i])) { + i++; + } + end = i; + zip_central_dir_move(pState, begin, end, entry_num); + } + + i = 0; + while (i < entry_num) { + while ((i < entry_num) && (!deleted_entry_index_array[i])) { + i++; + } + begin = i; + if (begin == entry_num) { + break; + } + while ((i < entry_num) && (deleted_entry_index_array[i])) { + i++; + } + end = i; + int k = 0, j; + for (j = end; j < entry_num; j++) { + MZ_ZIP_ARRAY_ELEMENT(&pState->m_central_dir_offsets, mz_uint32, + begin + k) = + (mz_uint32)MZ_ZIP_ARRAY_ELEMENT(&pState->m_central_dir_offsets, + mz_uint32, j); + k++; + } + d_num += end - begin; + } + + pState->m_central_dir_offsets.m_size = + sizeof(mz_uint32) * (entry_num - d_num); + return 0; +} + +static ssize_t zip_entries_delete_mark(struct zip_t *zip, + struct zip_entry_mark_t *entry_mark, + int entry_num) { + mz_uint64 writen_num = 0; + mz_uint64 read_num = 0; + size_t deleted_length = 0; + size_t move_length = 0; + int i = 0; + size_t deleted_entry_num = 0; + ssize_t n = 0; + + mz_bool *deleted_entry_flag_array = + (mz_bool *)calloc(entry_num, sizeof(mz_bool)); + if (deleted_entry_flag_array == NULL) { + return ZIP_EOOMEM; + } + + mz_zip_internal_state *pState = zip->archive.m_pState; + zip->archive.m_zip_mode = MZ_ZIP_MODE_WRITING; + + if ((!pState->m_pFile) || MZ_FSEEK64(pState->m_pFile, 0, SEEK_SET)) { + CLEANUP(deleted_entry_flag_array); + return ZIP_ENOENT; + } + + while (i < entry_num) { + while ((i < entry_num) && (entry_mark[i].type == MZ_KEEP)) { + writen_num += entry_mark[i].lf_length; + read_num = writen_num; + i++; + } + + while ((i < entry_num) && (entry_mark[i].type == MZ_DELETE)) { + deleted_entry_flag_array[i] = MZ_TRUE; + read_num += entry_mark[i].lf_length; + deleted_length += entry_mark[i].lf_length; + i++; + deleted_entry_num++; + } + + while ((i < entry_num) && (entry_mark[i].type == MZ_MOVE)) { + move_length += entry_mark[i].lf_length; + mz_uint8 *p = &MZ_ZIP_ARRAY_ELEMENT( + &pState->m_central_dir, mz_uint8, + MZ_ZIP_ARRAY_ELEMENT(&pState->m_central_dir_offsets, mz_uint32, i)); + if (!p) { + CLEANUP(deleted_entry_flag_array); + return ZIP_ENOENT; + } + mz_uint32 offset = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS); + offset -= (mz_uint32)deleted_length; + MZ_WRITE_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS, offset); + i++; + } + + n = zip_files_move(pState->m_pFile, writen_num, read_num, move_length); + if (n != (ssize_t)move_length) { + CLEANUP(deleted_entry_flag_array); + return n; + } + writen_num += move_length; + read_num += move_length; + } + + zip->archive.m_archive_size -= (mz_uint64)deleted_length; + zip->archive.m_total_files = + (mz_uint32)entry_num - (mz_uint32)deleted_entry_num; + + zip_central_dir_delete(pState, deleted_entry_flag_array, entry_num); + CLEANUP(deleted_entry_flag_array); + + return (ssize_t)deleted_entry_num; +} + +struct zip_t *zip_open(const char *zipname, int level, char mode) { + struct zip_t *zip = NULL; + + if (!zipname || strlen(zipname) < 1) { + // zip_t archive name is empty or NULL + goto cleanup; + } + + if (level < 0) + level = MZ_DEFAULT_LEVEL; + if ((level & 0xF) > MZ_UBER_COMPRESSION) { + // Wrong compression level + goto cleanup; + } + + zip = (struct zip_t *)calloc((size_t)1, sizeof(struct zip_t)); + if (!zip) + goto cleanup; + + zip->level = (mz_uint)level; + switch (mode) { + case 'w': + // Create a new archive. + if (!mz_zip_writer_init_file_v2(&(zip->archive), zipname, 0, + MZ_ZIP_FLAG_WRITE_ZIP64)) { + // Cannot initialize zip_archive writer + goto cleanup; + } + break; + + case 'r': + if (!mz_zip_reader_init_file_v2( + &(zip->archive), zipname, + zip->level | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY, 0, 0)) { + // An archive file does not exist or cannot initialize + // zip_archive reader + goto cleanup; + } + break; + + case 'a': + case 'd': + if (!mz_zip_reader_init_file_v2_rpb( + &(zip->archive), zipname, + zip->level | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY, 0, 0)) { + // An archive file does not exist or cannot initialize + // zip_archive reader + goto cleanup; + } + if ((mode == 'a' || mode == 'd')) { + if (!mz_zip_writer_init_from_reader_v2_noreopen(&(zip->archive), zipname, + 0)) { + mz_zip_reader_end(&(zip->archive)); + goto cleanup; + } + } + break; + + default: + goto cleanup; + } + + return zip; + +cleanup: + CLEANUP(zip); + return NULL; +} + +void zip_close(struct zip_t *zip) { + if (zip) { + // Always finalize, even if adding failed for some reason, so we have a + // valid central directory. + mz_zip_writer_finalize_archive(&(zip->archive)); + zip_archive_truncate(&(zip->archive)); + mz_zip_writer_end(&(zip->archive)); + mz_zip_reader_end(&(zip->archive)); + + CLEANUP(zip); + } +} + +int zip_is64(struct zip_t *zip) { + if (!zip || !zip->archive.m_pState) { + // zip_t handler or zip state is not initialized + return ZIP_ENOINIT; + } + + return (int)zip->archive.m_pState->m_zip64; +} + +static int _zip_entry_open(struct zip_t *zip, const char *entryname, + int case_sensitive) { + size_t entrylen = 0; + mz_zip_archive *pzip = NULL; + mz_uint num_alignment_padding_bytes, level; + mz_zip_archive_file_stat stats; + int err = 0; + mz_uint16 dos_time, dos_date; + mz_uint32 extra_size = 0; + mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE]; + mz_uint64 local_dir_header_ofs = 0; + + if (!zip) { + return ZIP_ENOINIT; + } + + local_dir_header_ofs = zip->archive.m_archive_size; + + if (!entryname) { + return ZIP_EINVENTNAME; + } + + entrylen = strlen(entryname); + if (entrylen == 0) { + return ZIP_EINVENTNAME; + } + + /* + .ZIP File Format Specification Version: 6.3.3 + + 4.4.17.1 The name of the file, with optional relative path. + The path stored MUST not contain a drive or + device letter, or a leading slash. All slashes + MUST be forward slashes '/' as opposed to + backwards slashes '\' for compatibility with Amiga + and UNIX file systems etc. If input came from standard + input, there is no file name field. + */ + if (zip->entry.name) { + CLEANUP(zip->entry.name); + } +#ifdef ZIP_RAW_ENTRYNAME + zip->entry.name = STRCLONE(entryname); +#else + zip->entry.name = zip_strrpl(entryname, entrylen, '\\', '/'); +#endif + + if (!zip->entry.name) { + // Cannot parse zip entry name + return ZIP_EINVENTNAME; + } + + pzip = &(zip->archive); + if (pzip->m_zip_mode == MZ_ZIP_MODE_READING) { + zip->entry.index = (ssize_t)mz_zip_reader_locate_file( + pzip, zip->entry.name, NULL, + case_sensitive ? MZ_ZIP_FLAG_CASE_SENSITIVE : 0); + if (zip->entry.index < (ssize_t)0) { + err = ZIP_ENOENT; + goto cleanup; + } + + if (!mz_zip_reader_file_stat(pzip, (mz_uint)zip->entry.index, &stats)) { + err = ZIP_ENOENT; + goto cleanup; + } + + zip->entry.comp_size = stats.m_comp_size; + zip->entry.uncomp_size = stats.m_uncomp_size; + zip->entry.uncomp_crc32 = stats.m_crc32; + zip->entry.offset = stats.m_central_dir_ofs; + zip->entry.header_offset = stats.m_local_header_ofs; + zip->entry.method = stats.m_method; + zip->entry.external_attr = stats.m_external_attr; +#ifndef MINIZ_NO_TIME + zip->entry.m_time = stats.m_time; +#endif + + return 0; + } + + level = zip->level & 0xF; + + zip->entry.index = (ssize_t)zip->archive.m_total_files; + zip->entry.comp_size = 0; + zip->entry.uncomp_size = 0; + zip->entry.uncomp_crc32 = MZ_CRC32_INIT; + zip->entry.offset = zip->archive.m_archive_size; + zip->entry.header_offset = zip->archive.m_archive_size; + memset(zip->entry.header, 0, MZ_ZIP_LOCAL_DIR_HEADER_SIZE * sizeof(mz_uint8)); + zip->entry.method = level ? MZ_DEFLATED : 0; + + // UNIX or APPLE +#if MZ_PLATFORM == 3 || MZ_PLATFORM == 19 + // regular file with rw-r--r-- permissions + zip->entry.external_attr = (mz_uint32)(0100644) << 16; +#else + zip->entry.external_attr = 0; +#endif + + num_alignment_padding_bytes = + mz_zip_writer_compute_padding_needed_for_file_alignment(pzip); + + if (!pzip->m_pState || (pzip->m_zip_mode != MZ_ZIP_MODE_WRITING)) { + // Invalid zip mode + err = ZIP_EINVMODE; + goto cleanup; + } + if (zip->level & MZ_ZIP_FLAG_COMPRESSED_DATA) { + // Invalid zip compression level + err = ZIP_EINVLVL; + goto cleanup; + } + + if (!mz_zip_writer_write_zeros(pzip, zip->entry.offset, + num_alignment_padding_bytes)) { + // Cannot memset zip entry header + err = ZIP_EMEMSET; + goto cleanup; + } + local_dir_header_ofs += num_alignment_padding_bytes; + + zip->entry.m_time = time(NULL); +#ifndef MINIZ_NO_TIME + mz_zip_time_t_to_dos_time(zip->entry.m_time, &dos_time, &dos_date); +#endif + + // ZIP64 header with NULL sizes (sizes will be in the data descriptor, just + // after file data) + extra_size = mz_zip_writer_create_zip64_extra_data( + extra_data, NULL, NULL, + (local_dir_header_ofs >= MZ_UINT32_MAX) ? &local_dir_header_ofs : NULL); + + if (!mz_zip_writer_create_local_dir_header( + pzip, zip->entry.header, entrylen, (mz_uint16)extra_size, 0, 0, 0, + zip->entry.method, + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 | + MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR, + dos_time, dos_date)) { + // Cannot create zip entry header + err = ZIP_EMEMSET; + goto cleanup; + } + + zip->entry.header_offset = zip->entry.offset + num_alignment_padding_bytes; + + if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.header_offset, + zip->entry.header, + sizeof(zip->entry.header)) != sizeof(zip->entry.header)) { + // Cannot write zip entry header + err = ZIP_EMEMSET; + goto cleanup; + } + + if (pzip->m_file_offset_alignment) { + MZ_ASSERT( + (zip->entry.header_offset & (pzip->m_file_offset_alignment - 1)) == 0); + } + zip->entry.offset += num_alignment_padding_bytes + sizeof(zip->entry.header); + + if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.offset, zip->entry.name, + entrylen) != entrylen) { + // Cannot write data to zip entry + err = ZIP_EWRTENT; + goto cleanup; + } + + zip->entry.offset += entrylen; + + if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.offset, extra_data, + extra_size) != extra_size) { + // Cannot write ZIP64 data to zip entry + err = ZIP_EWRTENT; + goto cleanup; + } + zip->entry.offset += extra_size; + + if (level) { + zip->entry.state.m_pZip = pzip; + zip->entry.state.m_cur_archive_file_ofs = zip->entry.offset; + zip->entry.state.m_comp_size = 0; + + if (tdefl_init(&(zip->entry.comp), mz_zip_writer_add_put_buf_callback, + &(zip->entry.state), + (int)tdefl_create_comp_flags_from_zip_params( + (int)level, -15, MZ_DEFAULT_STRATEGY)) != + TDEFL_STATUS_OKAY) { + // Cannot initialize the zip compressor + err = ZIP_ETDEFLINIT; + goto cleanup; + } + } + + return 0; + +cleanup: + CLEANUP(zip->entry.name); + return err; +} + +int zip_entry_open(struct zip_t *zip, const char *entryname) { + return _zip_entry_open(zip, entryname, 0); +} + +int zip_entry_opencasesensitive(struct zip_t *zip, const char *entryname) { + return _zip_entry_open(zip, entryname, 1); +} + +int zip_entry_openbyindex(struct zip_t *zip, size_t index) { + mz_zip_archive *pZip = NULL; + mz_zip_archive_file_stat stats; + mz_uint namelen; + const mz_uint8 *pHeader; + const char *pFilename; + + if (!zip) { + // zip_t handler is not initialized + return ZIP_ENOINIT; + } + + pZip = &(zip->archive); + if (pZip->m_zip_mode != MZ_ZIP_MODE_READING) { + // open by index requires readonly mode + return ZIP_EINVMODE; + } + + if (index >= (size_t)pZip->m_total_files) { + // index out of range + return ZIP_EINVIDX; + } + + if (!(pHeader = &MZ_ZIP_ARRAY_ELEMENT( + &pZip->m_pState->m_central_dir, mz_uint8, + MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, + mz_uint32, index)))) { + // cannot find header in central directory + return ZIP_ENOHDR; + } + + namelen = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_FILENAME_LEN_OFS); + pFilename = (const char *)pHeader + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; + + /* + .ZIP File Format Specification Version: 6.3.3 + + 4.4.17.1 The name of the file, with optional relative path. + The path stored MUST not contain a drive or + device letter, or a leading slash. All slashes + MUST be forward slashes '/' as opposed to + backwards slashes '\' for compatibility with Amiga + and UNIX file systems etc. If input came from standard + input, there is no file name field. + */ + if (zip->entry.name) { + CLEANUP(zip->entry.name); + } +#ifdef ZIP_RAW_ENTRYNAME + zip->entry.name = STRCLONE(pFilename); +#else + zip->entry.name = zip_strrpl(pFilename, namelen, '\\', '/'); +#endif + + if (!zip->entry.name) { + // local entry name is NULL + return ZIP_EINVENTNAME; + } + + if (!mz_zip_reader_file_stat(pZip, (mz_uint)index, &stats)) { + return ZIP_ENOENT; + } + + zip->entry.index = (ssize_t)index; + zip->entry.comp_size = stats.m_comp_size; + zip->entry.uncomp_size = stats.m_uncomp_size; + zip->entry.uncomp_crc32 = stats.m_crc32; + zip->entry.offset = stats.m_central_dir_ofs; + zip->entry.header_offset = stats.m_local_header_ofs; + zip->entry.method = stats.m_method; + zip->entry.external_attr = stats.m_external_attr; +#ifndef MINIZ_NO_TIME + zip->entry.m_time = stats.m_time; +#endif + + return 0; +} + +int zip_entry_close(struct zip_t *zip) { + mz_zip_archive *pzip = NULL; + mz_uint level; + tdefl_status done; + mz_uint16 entrylen; + mz_uint16 dos_time = 0, dos_date = 0; + int err = 0; + mz_uint8 *pExtra_data = NULL; + mz_uint32 extra_size = 0; + mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE]; + mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64]; + mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE64; + + if (!zip) { + // zip_t handler is not initialized + err = ZIP_ENOINIT; + goto cleanup; + } + + pzip = &(zip->archive); + if (pzip->m_zip_mode == MZ_ZIP_MODE_READING) { + goto cleanup; + } + + level = zip->level & 0xF; + if (level) { + done = tdefl_compress_buffer(&(zip->entry.comp), "", 0, TDEFL_FINISH); + if (done != TDEFL_STATUS_DONE && done != TDEFL_STATUS_OKAY) { + // Cannot flush compressed buffer + err = ZIP_ETDEFLBUF; + goto cleanup; + } + zip->entry.comp_size = zip->entry.state.m_comp_size; + zip->entry.offset = zip->entry.state.m_cur_archive_file_ofs; + zip->entry.method = MZ_DEFLATED; + } + + entrylen = (mz_uint16)strlen(zip->entry.name); +#ifndef MINIZ_NO_TIME + mz_zip_time_t_to_dos_time(zip->entry.m_time, &dos_time, &dos_date); +#endif + + MZ_WRITE_LE32(local_dir_footer + 0, MZ_ZIP_DATA_DESCRIPTOR_ID); + MZ_WRITE_LE32(local_dir_footer + 4, zip->entry.uncomp_crc32); + MZ_WRITE_LE64(local_dir_footer + 8, zip->entry.comp_size); + MZ_WRITE_LE64(local_dir_footer + 16, zip->entry.uncomp_size); + + if (pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.offset, local_dir_footer, + local_dir_footer_size) != local_dir_footer_size) { + // Cannot write zip entry header + err = ZIP_EWRTHDR; + goto cleanup; + } + zip->entry.offset += local_dir_footer_size; + + pExtra_data = extra_data; + extra_size = mz_zip_writer_create_zip64_extra_data( + extra_data, + (zip->entry.uncomp_size >= MZ_UINT32_MAX) ? &zip->entry.uncomp_size + : NULL, + (zip->entry.comp_size >= MZ_UINT32_MAX) ? &zip->entry.comp_size : NULL, + (zip->entry.header_offset >= MZ_UINT32_MAX) ? &zip->entry.header_offset + : NULL); + + if ((entrylen) && (zip->entry.name[entrylen - 1] == '/') && + !zip->entry.uncomp_size) { + /* Set DOS Subdirectory attribute bit. */ + zip->entry.external_attr |= MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG; + } + + if (!mz_zip_writer_add_to_central_dir( + pzip, zip->entry.name, entrylen, pExtra_data, (mz_uint16)extra_size, + "", 0, zip->entry.uncomp_size, zip->entry.comp_size, + zip->entry.uncomp_crc32, zip->entry.method, + MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 | + MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR, + dos_time, dos_date, zip->entry.header_offset, + zip->entry.external_attr, NULL, 0)) { + // Cannot write to zip central dir + err = ZIP_EWRTDIR; + goto cleanup; + } + + pzip->m_total_files++; + pzip->m_archive_size = zip->entry.offset; + +cleanup: + if (zip) { + zip->entry.m_time = 0; + CLEANUP(zip->entry.name); + } + return err; +} + +const char *zip_entry_name(struct zip_t *zip) { + if (!zip) { + // zip_t handler is not initialized + return NULL; + } + + return zip->entry.name; +} + +ssize_t zip_entry_index(struct zip_t *zip) { + if (!zip) { + // zip_t handler is not initialized + return (ssize_t)ZIP_ENOINIT; + } + + return zip->entry.index; +} + +int zip_entry_isdir(struct zip_t *zip) { + if (!zip) { + // zip_t handler is not initialized + return ZIP_ENOINIT; + } + + if (zip->entry.index < (ssize_t)0) { + // zip entry is not opened + return ZIP_EINVIDX; + } + + return (int)mz_zip_reader_is_file_a_directory(&zip->archive, + (mz_uint)zip->entry.index); +} + +unsigned long long zip_entry_size(struct zip_t *zip) { + return zip_entry_uncomp_size(zip); +} + +unsigned long long zip_entry_uncomp_size(struct zip_t *zip) { + return zip ? zip->entry.uncomp_size : 0; +} + +unsigned long long zip_entry_comp_size(struct zip_t *zip) { + return zip ? zip->entry.comp_size : 0; +} + +unsigned int zip_entry_crc32(struct zip_t *zip) { + return zip ? zip->entry.uncomp_crc32 : 0; +} + +int zip_entry_write(struct zip_t *zip, const void *buf, size_t bufsize) { + mz_uint level; + mz_zip_archive *pzip = NULL; + tdefl_status status; + + if (!zip) { + // zip_t handler is not initialized + return ZIP_ENOINIT; + } + + pzip = &(zip->archive); + if (buf && bufsize > 0) { + zip->entry.uncomp_size += bufsize; + zip->entry.uncomp_crc32 = (mz_uint32)mz_crc32( + zip->entry.uncomp_crc32, (const mz_uint8 *)buf, bufsize); + + level = zip->level & 0xF; + if (!level) { + if ((pzip->m_pWrite(pzip->m_pIO_opaque, zip->entry.offset, buf, + bufsize) != bufsize)) { + // Cannot write buffer + return ZIP_EWRTENT; + } + zip->entry.offset += bufsize; + zip->entry.comp_size += bufsize; + } else { + status = tdefl_compress_buffer(&(zip->entry.comp), buf, bufsize, + TDEFL_NO_FLUSH); + if (status != TDEFL_STATUS_DONE && status != TDEFL_STATUS_OKAY) { + // Cannot compress buffer + return ZIP_ETDEFLBUF; + } + } + } + + return 0; +} + +int zip_entry_fwrite(struct zip_t *zip, const char *filename) { + int err = 0; + size_t n = 0; + MZ_FILE *stream = NULL; + mz_uint8 buf[MZ_ZIP_MAX_IO_BUF_SIZE]; + struct MZ_FILE_STAT_STRUCT file_stat; + mz_uint16 modes; + + if (!zip) { + // zip_t handler is not initialized + return ZIP_ENOINIT; + } + + memset(buf, 0, MZ_ZIP_MAX_IO_BUF_SIZE); + memset((void *)&file_stat, 0, sizeof(struct MZ_FILE_STAT_STRUCT)); + if (MZ_FILE_STAT(filename, &file_stat) != 0) { + // problem getting information - check errno + return ZIP_ENOENT; + } + +#if defined(_WIN32) || defined(__WIN32__) || defined(DJGPP) + (void)modes; // unused +#else + /* Initialize with permission bits--which are not implementation-optional */ + modes = file_stat.st_mode & + (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); + if (S_ISDIR(file_stat.st_mode)) + modes |= UNX_IFDIR; + if (S_ISREG(file_stat.st_mode)) + modes |= UNX_IFREG; + if (S_ISLNK(file_stat.st_mode)) + modes |= UNX_IFLNK; + if (S_ISBLK(file_stat.st_mode)) + modes |= UNX_IFBLK; + if (S_ISCHR(file_stat.st_mode)) + modes |= UNX_IFCHR; + if (S_ISFIFO(file_stat.st_mode)) + modes |= UNX_IFIFO; + if (S_ISSOCK(file_stat.st_mode)) + modes |= UNX_IFSOCK; + zip->entry.external_attr = (modes << 16) | !(file_stat.st_mode & S_IWUSR); + if ((file_stat.st_mode & S_IFMT) == S_IFDIR) { + zip->entry.external_attr |= MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG; + } +#endif + + zip->entry.m_time = file_stat.st_mtime; + + if (!(stream = MZ_FOPEN(filename, "rb"))) { + // Cannot open filename + return ZIP_EOPNFILE; + } + + while ((n = fread(buf, sizeof(mz_uint8), MZ_ZIP_MAX_IO_BUF_SIZE, stream)) > + 0) { + if (zip_entry_write(zip, buf, n) < 0) { + err = ZIP_EWRTENT; + break; + } + } + fclose(stream); + + return err; +} + +ssize_t zip_entry_read(struct zip_t *zip, void **buf, size_t *bufsize) { + mz_zip_archive *pzip = NULL; + mz_uint idx; + size_t size = 0; + + if (!zip) { + // zip_t handler is not initialized + return (ssize_t)ZIP_ENOINIT; + } + + pzip = &(zip->archive); + if (pzip->m_zip_mode != MZ_ZIP_MODE_READING || + zip->entry.index < (ssize_t)0) { + // the entry is not found or we do not have read access + return (ssize_t)ZIP_ENOENT; + } + + idx = (mz_uint)zip->entry.index; + if (mz_zip_reader_is_file_a_directory(pzip, idx)) { + // the entry is a directory + return (ssize_t)ZIP_EINVENTTYPE; + } + + *buf = mz_zip_reader_extract_to_heap(pzip, idx, &size, 0); + if (*buf && bufsize) { + *bufsize = size; + } + return (ssize_t)size; +} + +ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, size_t bufsize) { + mz_zip_archive *pzip = NULL; + + if (!zip) { + // zip_t handler is not initialized + return (ssize_t)ZIP_ENOINIT; + } + + pzip = &(zip->archive); + if (pzip->m_zip_mode != MZ_ZIP_MODE_READING || + zip->entry.index < (ssize_t)0) { + // the entry is not found or we do not have read access + return (ssize_t)ZIP_ENOENT; + } + + if (!mz_zip_reader_extract_to_mem_no_alloc(pzip, (mz_uint)zip->entry.index, + buf, bufsize, 0, NULL, 0)) { + return (ssize_t)ZIP_EMEMNOALLOC; + } + + return (ssize_t)zip->entry.uncomp_size; +} + +int zip_entry_fread(struct zip_t *zip, const char *filename) { + mz_zip_archive *pzip = NULL; + mz_uint idx; + mz_uint32 xattr = 0; + mz_zip_archive_file_stat info; + + if (!zip) { + // zip_t handler is not initialized + return ZIP_ENOINIT; + } + + memset((void *)&info, 0, sizeof(mz_zip_archive_file_stat)); + pzip = &(zip->archive); + if (pzip->m_zip_mode != MZ_ZIP_MODE_READING || + zip->entry.index < (ssize_t)0) { + // the entry is not found or we do not have read access + return ZIP_ENOENT; + } + + idx = (mz_uint)zip->entry.index; + if (mz_zip_reader_is_file_a_directory(pzip, idx)) { + // the entry is a directory + return ZIP_EINVENTTYPE; + } + + if (!mz_zip_reader_extract_to_file(pzip, idx, filename, 0)) { + return ZIP_ENOFILE; + } + +#if defined(_MSC_VER) || defined(PS4) + (void)xattr; // unused +#else + if (!mz_zip_reader_file_stat(pzip, idx, &info)) { + // Cannot get information about zip archive; + return ZIP_ENOFILE; + } + + xattr = (info.m_external_attr >> 16) & 0xFFFF; + if (xattr > 0 && xattr <= MZ_UINT16_MAX) { + if (CHMOD(filename, (mode_t)xattr) < 0) { + return ZIP_ENOPERM; + } + } +#endif + + return 0; +} + +int zip_entry_extract(struct zip_t *zip, + size_t (*on_extract)(void *arg, uint64_t offset, + const void *buf, size_t bufsize), + void *arg) { + mz_zip_archive *pzip = NULL; + mz_uint idx; + + if (!zip) { + // zip_t handler is not initialized + return ZIP_ENOINIT; + } + + pzip = &(zip->archive); + if (pzip->m_zip_mode != MZ_ZIP_MODE_READING || + zip->entry.index < (ssize_t)0) { + // the entry is not found or we do not have read access + return ZIP_ENOENT; + } + + idx = (mz_uint)zip->entry.index; + return (mz_zip_reader_extract_to_callback(pzip, idx, on_extract, arg, 0)) + ? 0 + : ZIP_EINVIDX; +} + +ssize_t zip_entries_total(struct zip_t *zip) { + if (!zip) { + // zip_t handler is not initialized + return ZIP_ENOINIT; + } + + return (ssize_t)zip->archive.m_total_files; +} + +ssize_t zip_entries_delete(struct zip_t *zip, char *const entries[], + size_t len) { + ssize_t n = 0; + ssize_t err = 0; + struct zip_entry_mark_t *entry_mark = NULL; + + if (zip == NULL || (entries == NULL && len != 0)) { + return ZIP_ENOINIT; + } + + if (entries == NULL && len == 0) { + return 0; + } + + n = zip_entries_total(zip); + + entry_mark = (struct zip_entry_mark_t *)calloc( + (size_t)n, sizeof(struct zip_entry_mark_t)); + if (!entry_mark) { + return ZIP_EOOMEM; + } + + zip->archive.m_zip_mode = MZ_ZIP_MODE_READING; + + err = zip_entry_set(zip, entry_mark, n, entries, len); + if (err < 0) { + CLEANUP(entry_mark); + return err; + } + + err = zip_entries_delete_mark(zip, entry_mark, (int)n); + CLEANUP(entry_mark); + return err; +} + +int zip_stream_extract(const char *stream, size_t size, const char *dir, + int (*on_extract)(const char *filename, void *arg), + void *arg) { + mz_zip_archive zip_archive; + if (!stream || !dir) { + // Cannot parse zip archive stream + return ZIP_ENOINIT; + } + if (!memset(&zip_archive, 0, sizeof(mz_zip_archive))) { + // Cannot memset zip archive + return ZIP_EMEMSET; + } + if (!mz_zip_reader_init_mem(&zip_archive, stream, size, 0)) { + // Cannot initialize zip_archive reader + return ZIP_ENOINIT; + } + + return zip_archive_extract(&zip_archive, dir, on_extract, arg); +} + +struct zip_t *zip_stream_open(const char *stream, size_t size, int level, + char mode) { + struct zip_t *zip = (struct zip_t *)calloc((size_t)1, sizeof(struct zip_t)); + if (!zip) { + return NULL; + } + + if (level < 0) { + level = MZ_DEFAULT_LEVEL; + } + if ((level & 0xF) > MZ_UBER_COMPRESSION) { + // Wrong compression level + goto cleanup; + } + zip->level = (mz_uint)level; + + if ((stream != NULL) && (size > 0) && (mode == 'r')) { + if (!mz_zip_reader_init_mem(&(zip->archive), stream, size, 0)) { + goto cleanup; + } + } else if ((stream == NULL) && (size == 0) && (mode == 'w')) { + // Create a new archive. + if (!mz_zip_writer_init_heap(&(zip->archive), 0, 1024)) { + // Cannot initialize zip_archive writer + goto cleanup; + } + } else { + goto cleanup; + } + return zip; + +cleanup: + CLEANUP(zip); + return NULL; +} + +ssize_t zip_stream_copy(struct zip_t *zip, void **buf, size_t *bufsize) { + size_t n; + + if (!zip) { + return (ssize_t)ZIP_ENOINIT; + } + zip_archive_finalize(&(zip->archive)); + + n = (size_t)zip->archive.m_archive_size; + if (bufsize != NULL) { + *bufsize = n; + } + + *buf = calloc(sizeof(unsigned char), n); + memcpy(*buf, zip->archive.m_pState->m_pMem, n); + + return (ssize_t)n; +} + +void zip_stream_close(struct zip_t *zip) { + if (zip) { + mz_zip_writer_end(&(zip->archive)); + mz_zip_reader_end(&(zip->archive)); + CLEANUP(zip); + } +} + +int zip_create(const char *zipname, const char *filenames[], size_t len) { + int err = 0; + size_t i; + mz_zip_archive zip_archive; + struct MZ_FILE_STAT_STRUCT file_stat; + mz_uint32 ext_attributes = 0; + mz_uint16 modes; + + if (!zipname || strlen(zipname) < 1) { + // zip_t archive name is empty or NULL + return ZIP_EINVZIPNAME; + } + + // Create a new archive. + if (!memset(&(zip_archive), 0, sizeof(zip_archive))) { + // Cannot memset zip archive + return ZIP_EMEMSET; + } + + if (!mz_zip_writer_init_file(&zip_archive, zipname, 0)) { + // Cannot initialize zip_archive writer + return ZIP_ENOINIT; + } + + if (!memset((void *)&file_stat, 0, sizeof(struct MZ_FILE_STAT_STRUCT))) { + return ZIP_EMEMSET; + } + + for (i = 0; i < len; ++i) { + const char *name = filenames[i]; + if (!name) { + err = ZIP_EINVENTNAME; + break; + } + + if (MZ_FILE_STAT(name, &file_stat) != 0) { + // problem getting information - check errno + err = ZIP_ENOFILE; + break; + } + +#if defined(_WIN32) || defined(__WIN32__) || defined(DJGPP) + (void)modes; // unused +#else + + /* Initialize with permission bits--which are not implementation-optional */ + modes = file_stat.st_mode & + (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); + if (S_ISDIR(file_stat.st_mode)) + modes |= UNX_IFDIR; + if (S_ISREG(file_stat.st_mode)) + modes |= UNX_IFREG; + if (S_ISLNK(file_stat.st_mode)) + modes |= UNX_IFLNK; + if (S_ISBLK(file_stat.st_mode)) + modes |= UNX_IFBLK; + if (S_ISCHR(file_stat.st_mode)) + modes |= UNX_IFCHR; + if (S_ISFIFO(file_stat.st_mode)) + modes |= UNX_IFIFO; + if (S_ISSOCK(file_stat.st_mode)) + modes |= UNX_IFSOCK; + ext_attributes = (modes << 16) | !(file_stat.st_mode & S_IWUSR); + if ((file_stat.st_mode & S_IFMT) == S_IFDIR) { + ext_attributes |= MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG; + } +#endif + + if (!mz_zip_writer_add_file(&zip_archive, zip_basename(name), name, "", 0, + ZIP_DEFAULT_COMPRESSION_LEVEL, + ext_attributes)) { + // Cannot add file to zip_archive + err = ZIP_ENOFILE; + break; + } + } + + mz_zip_writer_finalize_archive(&zip_archive); + mz_zip_writer_end(&zip_archive); + return err; +} + +int zip_extract(const char *zipname, const char *dir, + int (*on_extract)(const char *filename, void *arg), void *arg) { + mz_zip_archive zip_archive; + + if (!zipname || !dir) { + // Cannot parse zip archive name + return ZIP_EINVZIPNAME; + } + + if (!memset(&zip_archive, 0, sizeof(mz_zip_archive))) { + // Cannot memset zip archive + return ZIP_EMEMSET; + } + + // Now try to open the archive. + if (!mz_zip_reader_init_file(&zip_archive, zipname, 0)) { + // Cannot initialize zip_archive reader + return ZIP_ENOINIT; + } + + return zip_archive_extract(&zip_archive, dir, on_extract, arg); +} diff --git a/IfcPlusPlus/src/external/zip-master/zip.h b/IfcPlusPlus/src/external/zip-master/zip.h new file mode 100644 index 000000000..bc9a301bc --- /dev/null +++ b/IfcPlusPlus/src/external/zip-master/zip.h @@ -0,0 +1,464 @@ +/* + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#pragma once +#ifndef ZIP_H +#define ZIP_H + +#include +#include +#include + +#ifndef ZIP_SHARED +#define ZIP_EXPORT +#else +#ifdef _WIN32 +#ifdef ZIP_BUILD_SHARED +#define ZIP_EXPORT __declspec(dllexport) +#else +#define ZIP_EXPORT __declspec(dllimport) +#endif +#else +#define ZIP_EXPORT __attribute__((visibility("default"))) +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(_POSIX_C_SOURCE) && defined(_MSC_VER) +// 64-bit Windows is the only mainstream platform +// where sizeof(long) != sizeof(void*) +#ifdef _WIN64 +typedef long long ssize_t; /* byte count or error */ +#else +typedef long ssize_t; /* byte count or error */ +#endif +#endif + +/** + * @mainpage + * + * Documenation for @ref zip. + */ + +/** + * @addtogroup zip + * @{ + */ + +/** + * Default zip compression level. + */ +#define ZIP_DEFAULT_COMPRESSION_LEVEL 6 + +/** + * Error codes + */ +#define ZIP_ENOINIT -1 // not initialized +#define ZIP_EINVENTNAME -2 // invalid entry name +#define ZIP_ENOENT -3 // entry not found +#define ZIP_EINVMODE -4 // invalid zip mode +#define ZIP_EINVLVL -5 // invalid compression level +#define ZIP_ENOSUP64 -6 // no zip 64 support +#define ZIP_EMEMSET -7 // memset error +#define ZIP_EWRTENT -8 // cannot write data to entry +#define ZIP_ETDEFLINIT -9 // cannot initialize tdefl compressor +#define ZIP_EINVIDX -10 // invalid index +#define ZIP_ENOHDR -11 // header not found +#define ZIP_ETDEFLBUF -12 // cannot flush tdefl buffer +#define ZIP_ECRTHDR -13 // cannot create entry header +#define ZIP_EWRTHDR -14 // cannot write entry header +#define ZIP_EWRTDIR -15 // cannot write to central dir +#define ZIP_EOPNFILE -16 // cannot open file +#define ZIP_EINVENTTYPE -17 // invalid entry type +#define ZIP_EMEMNOALLOC -18 // extracting data using no memory allocation +#define ZIP_ENOFILE -19 // file not found +#define ZIP_ENOPERM -20 // no permission +#define ZIP_EOOMEM -21 // out of memory +#define ZIP_EINVZIPNAME -22 // invalid zip archive name +#define ZIP_EMKDIR -23 // make dir error +#define ZIP_ESYMLINK -24 // symlink error +#define ZIP_ECLSZIP -25 // close archive error +#define ZIP_ECAPSIZE -26 // capacity size too small +#define ZIP_EFSEEK -27 // fseek error +#define ZIP_EFREAD -28 // fread error +#define ZIP_EFWRITE -29 // fwrite error + +/** + * Looks up the error message string coresponding to an error number. + * @param errnum error number + * @return error message string coresponding to errnum or NULL if error is not + * found. + */ +extern ZIP_EXPORT const char *zip_strerror(int errnum); + +/** + * @struct zip_t + * + * This data structure is used throughout the library to represent zip archive - + * forward declaration. + */ +struct zip_t; + +/** + * Opens zip archive with compression level using the given mode. + * + * @param zipname zip archive file name. + * @param level compression level (0-9 are the standard zlib-style levels). + * @param mode file access mode. + * - 'r': opens a file for reading/extracting (the file must exists). + * - 'w': creates an empty file for writing. + * - 'a': appends to an existing archive. + * + * @return the zip archive handler or NULL on error + */ +extern ZIP_EXPORT struct zip_t *zip_open(const char *zipname, int level, + char mode); + +/** + * Closes the zip archive, releases resources - always finalize. + * + * @param zip zip archive handler. + */ +extern ZIP_EXPORT void zip_close(struct zip_t *zip); + +/** + * Determines if the archive has a zip64 end of central directory headers. + * + * @param zip zip archive handler. + * + * @return the return code - 1 (true), 0 (false), negative number (< 0) on + * error. + */ +extern ZIP_EXPORT int zip_is64(struct zip_t *zip); + +/** + * Opens an entry by name in the zip archive. + * + * For zip archive opened in 'w' or 'a' mode the function will append + * a new entry. In readonly mode the function tries to locate the entry + * in global dictionary. + * + * @param zip zip archive handler. + * @param entryname an entry name in local dictionary. + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int zip_entry_open(struct zip_t *zip, const char *entryname); + +/** + * Opens an entry by name in the zip archive. + * + * For zip archive opened in 'w' or 'a' mode the function will append + * a new entry. In readonly mode the function tries to locate the entry + * in global dictionary (case sensitive). + * + * @param zip zip archive handler. + * @param entryname an entry name in local dictionary (case sensitive). + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int zip_entry_opencasesensitive(struct zip_t *zip, + const char *entryname); + +/** + * Opens a new entry by index in the zip archive. + * + * This function is only valid if zip archive was opened in 'r' (readonly) mode. + * + * @param zip zip archive handler. + * @param index index in local dictionary. + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int zip_entry_openbyindex(struct zip_t *zip, size_t index); + +/** + * Closes a zip entry, flushes buffer and releases resources. + * + * @param zip zip archive handler. + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int zip_entry_close(struct zip_t *zip); + +/** + * Returns a local name of the current zip entry. + * + * The main difference between user's entry name and local entry name + * is optional relative path. + * Following .ZIP File Format Specification - the path stored MUST not contain + * a drive or device letter, or a leading slash. + * All slashes MUST be forward slashes '/' as opposed to backwards slashes '\' + * for compatibility with Amiga and UNIX file systems etc. + * + * @param zip: zip archive handler. + * + * @return the pointer to the current zip entry name, or NULL on error. + */ +extern ZIP_EXPORT const char *zip_entry_name(struct zip_t *zip); + +/** + * Returns an index of the current zip entry. + * + * @param zip zip archive handler. + * + * @return the index on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT ssize_t zip_entry_index(struct zip_t *zip); + +/** + * Determines if the current zip entry is a directory entry. + * + * @param zip zip archive handler. + * + * @return the return code - 1 (true), 0 (false), negative number (< 0) on + * error. + */ +extern ZIP_EXPORT int zip_entry_isdir(struct zip_t *zip); + +/** + * Returns the uncompressed size of the current zip entry. + * Alias for zip_entry_uncomp_size (for backward compatibility). + * + * @param zip zip archive handler. + * + * @return the uncompressed size in bytes. + */ +extern ZIP_EXPORT unsigned long long zip_entry_size(struct zip_t *zip); + +/** + * Returns the uncompressed size of the current zip entry. + * + * @param zip zip archive handler. + * + * @return the uncompressed size in bytes. + */ +extern ZIP_EXPORT unsigned long long zip_entry_uncomp_size(struct zip_t *zip); + +/** + * Returns the compressed size of the current zip entry. + * + * @param zip zip archive handler. + * + * @return the compressed size in bytes. + */ +extern ZIP_EXPORT unsigned long long zip_entry_comp_size(struct zip_t *zip); + +/** + * Returns CRC-32 checksum of the current zip entry. + * + * @param zip zip archive handler. + * + * @return the CRC-32 checksum. + */ +extern ZIP_EXPORT unsigned int zip_entry_crc32(struct zip_t *zip); + +/** + * Compresses an input buffer for the current zip entry. + * + * @param zip zip archive handler. + * @param buf input buffer. + * @param bufsize input buffer size (in bytes). + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int zip_entry_write(struct zip_t *zip, const void *buf, + size_t bufsize); + +/** + * Compresses a file for the current zip entry. + * + * @param zip zip archive handler. + * @param filename input file. + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int zip_entry_fwrite(struct zip_t *zip, const char *filename); + +/** + * Extracts the current zip entry into output buffer. + * + * The function allocates sufficient memory for a output buffer. + * + * @param zip zip archive handler. + * @param buf output buffer. + * @param bufsize output buffer size (in bytes). + * + * @note remember to release memory allocated for a output buffer. + * for large entries, please take a look at zip_entry_extract function. + * + * @return the return code - the number of bytes actually read on success. + * Otherwise a negative number (< 0) on error. + */ +extern ZIP_EXPORT ssize_t zip_entry_read(struct zip_t *zip, void **buf, + size_t *bufsize); + +/** + * Extracts the current zip entry into a memory buffer using no memory + * allocation. + * + * @param zip zip archive handler. + * @param buf preallocated output buffer. + * @param bufsize output buffer size (in bytes). + * + * @note ensure supplied output buffer is large enough. + * zip_entry_size function (returns uncompressed size for the current + * entry) can be handy to estimate how big buffer is needed. + * For large entries, please take a look at zip_entry_extract function. + * + * @return the return code - the number of bytes actually read on success. + * Otherwise a negative number (< 0) on error (e.g. bufsize is not large + * enough). + */ +extern ZIP_EXPORT ssize_t zip_entry_noallocread(struct zip_t *zip, void *buf, + size_t bufsize); + +/** + * Extracts the current zip entry into output file. + * + * @param zip zip archive handler. + * @param filename output file. + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int zip_entry_fread(struct zip_t *zip, const char *filename); + +/** + * Extracts the current zip entry using a callback function (on_extract). + * + * @param zip zip archive handler. + * @param on_extract callback function. + * @param arg opaque pointer (optional argument, which you can pass to the + * on_extract callback) + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int +zip_entry_extract(struct zip_t *zip, + size_t (*on_extract)(void *arg, uint64_t offset, + const void *data, size_t size), + void *arg); + +/** + * Returns the number of all entries (files and directories) in the zip archive. + * + * @param zip zip archive handler. + * + * @return the return code - the number of entries on success, negative number + * (< 0) on error. + */ +extern ZIP_EXPORT ssize_t zip_entries_total(struct zip_t *zip); + +/** + * Deletes zip archive entries. + * + * @param zip zip archive handler. + * @param entries array of zip archive entries to be deleted. + * @param len the number of entries to be deleted. + * @return the number of deleted entries, or negative number (< 0) on error. + */ +extern ZIP_EXPORT ssize_t zip_entries_delete(struct zip_t *zip, + char *const entries[], size_t len); + +/** + * Extracts a zip archive stream into directory. + * + * If on_extract is not NULL, the callback will be called after + * successfully extracted each zip entry. + * Returning a negative value from the callback will cause abort and return an + * error. The last argument (void *arg) is optional, which you can use to pass + * data to the on_extract callback. + * + * @param stream zip archive stream. + * @param size stream size. + * @param dir output directory. + * @param on_extract on extract callback. + * @param arg opaque pointer. + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int +zip_stream_extract(const char *stream, size_t size, const char *dir, + int (*on_extract)(const char *filename, void *arg), + void *arg); + +/** + * Opens zip archive stream into memory. + * + * @param stream zip archive stream. + * @param size stream size. + * + * @return the zip archive handler or NULL on error + */ +extern ZIP_EXPORT struct zip_t *zip_stream_open(const char *stream, size_t size, + int level, char mode); + +/** + * Copy zip archive stream output buffer. + * + * @param zip zip archive handler. + * @param buf output buffer. User should free buf. + * @param bufsize output buffer size (in bytes). + * + * @return copy size + */ +extern ZIP_EXPORT ssize_t zip_stream_copy(struct zip_t *zip, void **buf, + size_t *bufsize); + +/** + * Close zip archive releases resources. + * + * @param zip zip archive handler. + * + * @return + */ +extern ZIP_EXPORT void zip_stream_close(struct zip_t *zip); + +/** + * Creates a new archive and puts files into a single zip archive. + * + * @param zipname zip archive file. + * @param filenames input files. + * @param len: number of input files. + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int zip_create(const char *zipname, const char *filenames[], + size_t len); + +/** + * Extracts a zip archive file into directory. + * + * If on_extract_entry is not NULL, the callback will be called after + * successfully extracted each zip entry. + * Returning a negative value from the callback will cause abort and return an + * error. The last argument (void *arg) is optional, which you can use to pass + * data to the on_extract_entry callback. + * + * @param zipname zip archive file. + * @param dir output directory. + * @param on_extract_entry on extract callback. + * @param arg opaque pointer. + * + * @return the return code - 0 on success, negative number (< 0) on error. + */ +extern ZIP_EXPORT int zip_extract(const char *zipname, const char *dir, + int (*on_extract_entry)(const char *filename, + void *arg), + void *arg); +/** @} */ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/EntityFactory.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/EntityFactory.cpp index dea956667..5eac433a4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/EntityFactory.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/EntityFactory.cpp @@ -1807,7 +1807,6 @@ const char* IFC4X3::EntityFactory::getStringForClassID(uint32_t ifcClassID) case 3573632694: return "IfcBSplineCurveForm"; case 37940459: return "IfcBSplineSurfaceForm"; case 358033588: return "IfcBeamTypeEnum"; - case 3397575177: return "IfcBearingTypeDisplacementEnum"; case 3124462625: return "IfcBearingTypeEnum"; case 207745069: return "IfcBenchmarkEnum"; case 2739565819: return "IfcBendingParameterSelect"; @@ -1970,6 +1969,7 @@ const char* IFC4X3::EntityFactory::getStringForClassID(uint32_t ifcClassID) case 3686016028: return "IfcIonConcentrationMeasure"; case 3192672207: return "IfcIsothermalMoistureCapacityMeasure"; case 1844818999: return "IfcJunctionBoxTypeEnum"; + case 2615076639: return "IfcKerbTypeEnum"; case 2054016361: return "IfcKinematicViscosityMeasure"; case 2053683727: return "IfcKnotType"; case 3258342251: return "IfcLabel"; @@ -2030,7 +2030,6 @@ const char* IFC4X3::EntityFactory::getStringForClassID(uint32_t ifcClassID) case 2095195183: return "IfcNormalisedRatioMeasure"; case 2395907400: return "IfcNumericMeasure"; case 1430971844: return "IfcObjectReferenceSelect"; - case 1545711075: return "IfcObjectTypeEnum"; case 1962769620: return "IfcObjectiveEnum"; case 3349296550: return "IfcOccupantTypeEnum"; case 2874063949: return "IfcOpeningElementTypeEnum"; @@ -2137,6 +2136,7 @@ const char* IFC4X3::EntityFactory::getStringForClassID(uint32_t ifcClassID) case 3038022802: return "IfcStairFlightTypeEnum"; case 2319738306: return "IfcStairTypeEnum"; case 4223916898: return "IfcStateEnum"; + case 1805707277: return "IfcStrippedOptional"; case 2688182192: return "IfcStructuralActivityAssignmentSelect"; case 3876018962: return "IfcStructuralCurveActivityTypeEnum"; case 2680421541: return "IfcStructuralCurveMemberTypeEnum"; diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/TypeFactory.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/TypeFactory.cpp index 448bd236c..742f14bf9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/TypeFactory.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/TypeFactory.cpp @@ -35,7 +35,6 @@ #include "lib/IfcBSplineCurveForm.cpp" #include "lib/IfcBSplineSurfaceForm.cpp" #include "lib/IfcBeamTypeEnum.cpp" -#include "lib/IfcBearingTypeDisplacementEnum.cpp" #include "lib/IfcBearingTypeEnum.cpp" #include "lib/IfcBenchmarkEnum.cpp" #include "lib/IfcBendingParameterSelect.cpp" @@ -198,6 +197,7 @@ #include "lib/IfcIonConcentrationMeasure.cpp" #include "lib/IfcIsothermalMoistureCapacityMeasure.cpp" #include "lib/IfcJunctionBoxTypeEnum.cpp" +#include "lib/IfcKerbTypeEnum.cpp" #include "lib/IfcKinematicViscosityMeasure.cpp" #include "lib/IfcKnotType.cpp" #include "lib/IfcLabel.cpp" @@ -258,7 +258,6 @@ #include "lib/IfcNormalisedRatioMeasure.cpp" #include "lib/IfcNumericMeasure.cpp" #include "lib/IfcObjectReferenceSelect.cpp" -#include "lib/IfcObjectTypeEnum.cpp" #include "lib/IfcObjectiveEnum.cpp" #include "lib/IfcOccupantTypeEnum.cpp" #include "lib/IfcOpeningElementTypeEnum.cpp" @@ -365,6 +364,7 @@ #include "lib/IfcStairFlightTypeEnum.cpp" #include "lib/IfcStairTypeEnum.cpp" #include "lib/IfcStateEnum.cpp" +#include "lib/IfcStrippedOptional.cpp" #include "lib/IfcStructuralActivityAssignmentSelect.cpp" #include "lib/IfcStructuralCurveActivityTypeEnum.cpp" #include "lib/IfcStructuralCurveMemberTypeEnum.cpp" @@ -477,7 +477,6 @@ static std::map( const std { "IFCBSPLINECURVEFORM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcBSplineCurveForm::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCBSPLINESURFACEFORM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcBSplineSurfaceForm::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCBEAMTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcBeamTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, -{ "IFCBEARINGTYPEDISPLACEMENTENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcBearingTypeDisplacementEnum::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCBEARINGTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcBearingTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCBENCHMARKENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcBenchmarkEnum::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCBENDINGPARAMETERSELECT", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcBendingParameterSelect::createObjectFromSTEP( arg, map, errorStream ); } }, @@ -640,6 +639,7 @@ static std::map( const std { "IFCIONCONCENTRATIONMEASURE", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcIonConcentrationMeasure::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCISOTHERMALMOISTURECAPACITYMEASURE", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcIsothermalMoistureCapacityMeasure::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCJUNCTIONBOXTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcJunctionBoxTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, +{ "IFCKERBTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcKerbTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCKINEMATICVISCOSITYMEASURE", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcKinematicViscosityMeasure::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCKNOTTYPE", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcKnotType::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCLABEL", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcLabel::createObjectFromSTEP( arg, map, errorStream ); } }, @@ -700,7 +700,6 @@ static std::map( const std { "IFCNORMALISEDRATIOMEASURE", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcNormalisedRatioMeasure::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCNUMERICMEASURE", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcNumericMeasure::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCOBJECTREFERENCESELECT", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcObjectReferenceSelect::createObjectFromSTEP( arg, map, errorStream ); } }, -{ "IFCOBJECTTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcObjectTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCOBJECTIVEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcObjectiveEnum::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCOCCUPANTTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcOccupantTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCOPENINGELEMENTTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcOpeningElementTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, @@ -807,6 +806,7 @@ static std::map( const std { "IFCSTAIRFLIGHTTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcStairFlightTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCSTAIRTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcStairTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCSTATEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcStateEnum::createObjectFromSTEP( arg, map, errorStream ); } }, +{ "IFCSTRIPPEDOPTIONAL", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcStrippedOptional::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCSTRUCTURALACTIVITYASSIGNMENTSELECT", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcStructuralActivityAssignmentSelect::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCSTRUCTURALCURVEACTIVITYTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcStructuralCurveActivityTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, { "IFCSTRUCTURALCURVEMEMBERTYPEENUM", []( const std::string& arg, const std::map >& map, std::stringstream& errorStream )->shared_ptr { return IFC4X3::IfcStructuralCurveMemberTypeEnum::createObjectFromSTEP( arg, map, errorStream ); } }, diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/TypeFactory.h b/IfcPlusPlus/src/ifcpp/IFC4X3/TypeFactory.h index fdabce349..97e3c7762 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/TypeFactory.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/TypeFactory.h @@ -38,7 +38,6 @@ namespace IFC4X3 static const uint32_t IFCBSPLINECURVEFORM = 3573632694; static const uint32_t IFCBSPLINESURFACEFORM = 37940459; static const uint32_t IFCBEAMTYPEENUM = 358033588; - static const uint32_t IFCBEARINGTYPEDISPLACEMENTENUM = 3397575177; static const uint32_t IFCBEARINGTYPEENUM = 3124462625; static const uint32_t IFCBENCHMARKENUM = 207745069; static const uint32_t IFCBENDINGPARAMETERSELECT = 2739565819; @@ -201,6 +200,7 @@ namespace IFC4X3 static const uint32_t IFCIONCONCENTRATIONMEASURE = 3686016028; static const uint32_t IFCISOTHERMALMOISTURECAPACITYMEASURE = 3192672207; static const uint32_t IFCJUNCTIONBOXTYPEENUM = 1844818999; + static const uint32_t IFCKERBTYPEENUM = 2615076639; static const uint32_t IFCKINEMATICVISCOSITYMEASURE = 2054016361; static const uint32_t IFCKNOTTYPE = 2053683727; static const uint32_t IFCLABEL = 3258342251; @@ -261,7 +261,6 @@ namespace IFC4X3 static const uint32_t IFCNORMALISEDRATIOMEASURE = 2095195183; static const uint32_t IFCNUMERICMEASURE = 2395907400; static const uint32_t IFCOBJECTREFERENCESELECT = 1430971844; - static const uint32_t IFCOBJECTTYPEENUM = 1545711075; static const uint32_t IFCOBJECTIVEENUM = 1962769620; static const uint32_t IFCOCCUPANTTYPEENUM = 3349296550; static const uint32_t IFCOPENINGELEMENTTYPEENUM = 2874063949; @@ -368,6 +367,7 @@ namespace IFC4X3 static const uint32_t IFCSTAIRFLIGHTTYPEENUM = 3038022802; static const uint32_t IFCSTAIRTYPEENUM = 2319738306; static const uint32_t IFCSTATEENUM = 4223916898; + static const uint32_t IFCSTRIPPEDOPTIONAL = 1805707277; static const uint32_t IFCSTRUCTURALACTIVITYASSIGNMENTSELECT = 2688182192; static const uint32_t IFCSTRUCTURALCURVEACTIVITYTYPEENUM = 3876018962; static const uint32_t IFCSTRUCTURALCURVEMEMBERTYPEENUM = 2680421541; diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActionRequest.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActionRequest.h index 16b3302a2..7cd7333e2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActionRequest.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActionRequest.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActor.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActor.h index 5cb925583..40ec7fb24 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActor.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActor.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActorRole.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActorRole.h index f1ffb5a6c..55d117e40 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActorRole.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActorRole.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActuator.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActuator.h index 9e8175c6f..ffe313442 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActuator.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActuator.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActuatorType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActuatorType.h index 752b35b23..fcda90880 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActuatorType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcActuatorType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAddress.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAddress.h index 8c176e45d..e3360e99f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAddress.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAddress.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedBrep.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedBrep.h index 658765b93..164df5e06 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedBrep.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedBrep.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedBrepWithVoids.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedBrepWithVoids.h index ffb813c76..ae19109e1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedBrepWithVoids.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedBrepWithVoids.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedFace.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedFace.h index ae4dede3a..7fdb92bf2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedFace.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAdvancedFace.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminal.h index 674a1fe97..697ab8f92 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalBox.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalBox.h index 5c8f4d457..214ddea30 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalBox.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalBox.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalBoxType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalBoxType.h index 905df9255..177325e02 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalBoxType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalBoxType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalType.h index 65ac88c2f..116489109 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirTerminalType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirToAirHeatRecovery.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirToAirHeatRecovery.h index 0c1eb659c..470ef0d45 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirToAirHeatRecovery.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirToAirHeatRecovery.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirToAirHeatRecoveryType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirToAirHeatRecoveryType.h index b6124e91b..0e57a568f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirToAirHeatRecoveryType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAirToAirHeatRecoveryType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlarm.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlarm.h index 7cd5eafd1..a5f603b40 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlarm.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlarm.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlarmType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlarmType.h index 78614175c..59bcfd44c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlarmType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlarmType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignment.h index 3e452681b..6e842feaa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentCant.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentCant.h index 21895358b..e077b36eb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentCant.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentCant.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentCantSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentCantSegment.h index 1631d9d4a..c5a170be2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentCantSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentCantSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentHorizontal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentHorizontal.h index fdad4fe02..9ea9e6895 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentHorizontal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentHorizontal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentHorizontalSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentHorizontalSegment.h index 44a6cbe5b..fb7a14418 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentHorizontalSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentHorizontalSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentParameterSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentParameterSegment.h index 236f4c2ad..350bfc4c6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentParameterSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentParameterSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentSegment.h index a336ee7e5..4c8fae72d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentVertical.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentVertical.h index f57ab2b68..7dce3fdf8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentVertical.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentVertical.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentVerticalSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentVerticalSegment.h index 209282a73..6d5ea0338 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentVerticalSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAlignmentVerticalSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAnnotation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAnnotation.h index 96b0489ba..80fe4c81c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAnnotation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAnnotation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAnnotationFillArea.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAnnotationFillArea.h index 36dc655d3..436a33367 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAnnotationFillArea.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAnnotationFillArea.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApplication.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApplication.h index eb80eee5c..f6945bb20 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApplication.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApplication.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAppliedValue.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAppliedValue.h index 3dea93df5..a909d9429 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAppliedValue.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAppliedValue.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApproval.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApproval.h index 3e04df67b..68c508ab4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApproval.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApproval.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApprovalRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApprovalRelationship.h index 90210ae71..771d16a23 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApprovalRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcApprovalRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryClosedProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryClosedProfileDef.h index 706acaf14..c26f70916 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryClosedProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryClosedProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryOpenProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryOpenProfileDef.h index 6e88ee5fa..2297fabd2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryOpenProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryOpenProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryProfileDefWithVoids.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryProfileDefWithVoids.h index 586f37549..2b88f08c2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryProfileDefWithVoids.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcArbitraryProfileDefWithVoids.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAsset.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAsset.h index 93c6a92f6..997da336e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAsset.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAsset.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAsymmetricIShapeProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAsymmetricIShapeProfileDef.h index df3d7820a..837a1532a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAsymmetricIShapeProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAsymmetricIShapeProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAudioVisualAppliance.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAudioVisualAppliance.h index d9b388bc7..f03c35ecf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAudioVisualAppliance.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAudioVisualAppliance.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAudioVisualApplianceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAudioVisualApplianceType.h index fc658e83a..3017b4d7c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAudioVisualApplianceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAudioVisualApplianceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis1Placement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis1Placement.h index f9caf9afa..e8c1a3c79 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis1Placement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis1Placement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2Placement2D.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2Placement2D.h index bf36c6f59..b39affd11 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2Placement2D.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2Placement2D.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2Placement3D.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2Placement3D.h index 74dbe112f..2372dcff1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2Placement3D.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2Placement3D.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2PlacementLinear.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2PlacementLinear.h index a6251f54f..236cee48c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2PlacementLinear.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcAxis2PlacementLinear.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineCurve.h index e528895d2..7f9b56b00 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineCurveWithKnots.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineCurveWithKnots.h index 9aba55f23..4d81794b7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineCurveWithKnots.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineCurveWithKnots.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineSurface.h index d6ffcff29..4a8b91df5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineSurfaceWithKnots.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineSurfaceWithKnots.h index 184c82fa8..d7064ed9f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineSurfaceWithKnots.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBSplineSurfaceWithKnots.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBeam.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBeam.h index 806ff02c4..a4e204f97 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBeam.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBeam.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBeamType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBeamType.h index dec404293..0a6651044 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBeamType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBeamType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearing.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearing.h index a2cd963d1..610548e69 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearing.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearing.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearingType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearingType.h index 98cae8460..1e04a53fa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearingType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearingType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearingTypeDisplacementEnum.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearingTypeDisplacementEnum.h deleted file mode 100644 index fed636d4c..000000000 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBearingTypeDisplacementEnum.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ - -#pragma once -#include -#include -#include -#include -#include "ifcpp/model/GlobalDefines.h" -#include "ifcpp/model/BasicTypes.h" -#include "ifcpp/model/BuildingObject.h" - -namespace IFC4X3 -{ - // TYPE IfcBearingTypeDisplacementEnum = ENUMERATION OF (FIXED_MOVEMENT ,FREE_MOVEMENT ,GUIDED_LONGITUDINAL ,GUIDED_TRANSVERSAL ,NOTDEFINED); - class IFCQUERY_EXPORT IfcBearingTypeDisplacementEnum : virtual public BuildingObject - { - public: - enum IfcBearingTypeDisplacementEnumEnum - { - ENUM_FIXED_MOVEMENT, - ENUM_FREE_MOVEMENT, - ENUM_GUIDED_LONGITUDINAL, - ENUM_GUIDED_TRANSVERSAL, - ENUM_NOTDEFINED - }; - - IfcBearingTypeDisplacementEnum() = default; - IfcBearingTypeDisplacementEnum( IfcBearingTypeDisplacementEnumEnum e ) { m_enum = e; } - virtual uint32_t classID() const { return 3397575177; } - virtual void getStepParameter( std::stringstream& stream, bool is_select_type = false ) const; - static shared_ptr createObjectFromSTEP( const std::string& arg, const std::map >& map, std::stringstream& errorStream ); - IfcBearingTypeDisplacementEnumEnum m_enum; - }; -} diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBlobTexture.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBlobTexture.h index 112755255..4168479e3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBlobTexture.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBlobTexture.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBlock.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBlock.h index 83b62aefe..04208e8ae 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBlock.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBlock.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoiler.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoiler.h index c12f0716d..27ffb8504 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoiler.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoiler.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoilerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoilerType.h index 6f6d14633..fd907deea 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoilerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoilerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBooleanClippingResult.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBooleanClippingResult.h index 52257acd5..fa688cc60 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBooleanClippingResult.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBooleanClippingResult.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBooleanResult.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBooleanResult.h index 10bfc101b..9fec44dfd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBooleanResult.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBooleanResult.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBorehole.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBorehole.h index 37ce5ab61..8e943f7b0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBorehole.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBorehole.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryCondition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryCondition.h index 16de0742c..be998137f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryCondition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryCondition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryCurve.h index ac3a569ac..266cf87cf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryEdgeCondition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryEdgeCondition.h index 4bbf01787..3f1f905b6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryEdgeCondition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryEdgeCondition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryFaceCondition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryFaceCondition.h index a48561d76..85c72f89b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryFaceCondition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryFaceCondition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryNodeCondition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryNodeCondition.h index 608a92f6e..ccc8671f8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryNodeCondition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryNodeCondition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryNodeConditionWarping.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryNodeConditionWarping.h index 14df747dd..a4e779569 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryNodeConditionWarping.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundaryNodeConditionWarping.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundedCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundedCurve.h index d11e415f5..36eb902ab 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundedCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundedCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundedSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundedSurface.h index 6c21ca4cc..6c8805fe0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundedSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundedSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundingBox.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundingBox.h index bd7cbde58..b995b4501 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundingBox.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoundingBox.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoxedHalfSpace.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoxedHalfSpace.h index 590f804fb..8adf5bf9c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoxedHalfSpace.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBoxedHalfSpace.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBridge.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBridge.h index 0a837fbfa..b5935c8df 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBridge.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBridge.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBridgePart.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBridgePart.h index f6db042bd..e4c6d59e3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBridgePart.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBridgePart.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuilding.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuilding.h index 53c0bc8f9..d3673880d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuilding.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuilding.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementPart.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementPart.h index 959dd39a4..1136e55d5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementPart.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementPart.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementPartType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementPartType.h index 658aced17..ccfce1ad8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementPartType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementPartType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxy.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxy.h index 8c2155fc3..b85c00596 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxy.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxy.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxyType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxyType.h index 5fe61f226..b8993d818 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxyType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxyType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxyTypeEnum.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxyTypeEnum.h index 06e5f2c87..8254031be 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxyTypeEnum.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingElementProxyTypeEnum.h @@ -11,7 +11,7 @@ namespace IFC4X3 { - // TYPE IfcBuildingElementProxyTypeEnum = ENUMERATION OF (COMPLEX ,ELEMENT ,PARTIAL ,USERDEFINED ,NOTDEFINED); + // TYPE IfcBuildingElementProxyTypeEnum = ENUMERATION OF (COMPLEX ,ELEMENT ,PARTIAL ,PROVISIONFORSPACE ,PROVISIONFORVOID ,USERDEFINED ,NOTDEFINED); class IFCQUERY_EXPORT IfcBuildingElementProxyTypeEnum : virtual public BuildingObject { public: @@ -20,6 +20,8 @@ namespace IFC4X3 ENUM_COMPLEX, ENUM_ELEMENT, ENUM_PARTIAL, + ENUM_PROVISIONFORSPACE, + ENUM_PROVISIONFORVOID, ENUM_USERDEFINED, ENUM_NOTDEFINED }; diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingStorey.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingStorey.h index 290efe7e9..117fb2045 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingStorey.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingStorey.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingSystem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingSystem.h index 21642967b..aa3aba6d6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingSystem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingSystem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingSystemTypeEnum.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingSystemTypeEnum.h index 9fe479aef..456a22334 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingSystemTypeEnum.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuildingSystemTypeEnum.h @@ -11,19 +11,16 @@ namespace IFC4X3 { - // TYPE IfcBuildingSystemTypeEnum = ENUMERATION OF (EROSIONPREVENTION ,FENESTRATION ,FOUNDATION ,LOADBEARING ,OUTERSHELL ,PRESTRESSING ,REINFORCING ,SHADING ,TRANSPORT ,USERDEFINED ,NOTDEFINED); + // TYPE IfcBuildingSystemTypeEnum = ENUMERATION OF (FENESTRATION ,FOUNDATION ,LOADBEARING ,OUTERSHELL ,SHADING ,TRANSPORT ,USERDEFINED ,NOTDEFINED); class IFCQUERY_EXPORT IfcBuildingSystemTypeEnum : virtual public BuildingObject { public: enum IfcBuildingSystemTypeEnumEnum { - ENUM_EROSIONPREVENTION, ENUM_FENESTRATION, ENUM_FOUNDATION, ENUM_LOADBEARING, ENUM_OUTERSHELL, - ENUM_PRESTRESSING, - ENUM_REINFORCING, ENUM_SHADING, ENUM_TRANSPORT, ENUM_USERDEFINED, diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltElement.h index 7e6a4d8d2..a10d87089 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltElementType.h index 44f151ae0..dd1935c65 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltSystem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltSystem.h index fa719ba7b..e0d393a3f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltSystem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBuiltSystem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBurner.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBurner.h index df3cecbc3..cb6bddfbc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBurner.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBurner.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBurnerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBurnerType.h index 1140443fc..5ba9f1660 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBurnerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcBurnerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCShapeProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCShapeProfileDef.h index fa49e8033..4f1662cd7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCShapeProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCShapeProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFitting.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFitting.h index ed6b87e14..4e1a328f0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFitting.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFitting.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFittingType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFittingType.h index d968af84f..b13a869a3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFittingType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFittingType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFittingTypeEnum.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFittingTypeEnum.h index 5ea720b64..aaaafee35 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFittingTypeEnum.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierFittingTypeEnum.h @@ -11,7 +11,7 @@ namespace IFC4X3 { - // TYPE IfcCableCarrierFittingTypeEnum = ENUMERATION OF (BEND ,CONNECTOR ,CROSS ,JUNCTION ,TEE ,TRANSITION ,USERDEFINED ,NOTDEFINED); + // TYPE IfcCableCarrierFittingTypeEnum = ENUMERATION OF (BEND ,CONNECTOR ,CROSS ,JUNCTION ,REDUCER ,TEE ,TRANSITION ,USERDEFINED ,NOTDEFINED); class IFCQUERY_EXPORT IfcCableCarrierFittingTypeEnum : virtual public BuildingObject { public: @@ -21,6 +21,7 @@ namespace IFC4X3 ENUM_CONNECTOR, ENUM_CROSS, ENUM_JUNCTION, + ENUM_REDUCER, ENUM_TEE, ENUM_TRANSITION, ENUM_USERDEFINED, diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierSegment.h index ac4fee541..0feff9c78 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierSegmentType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierSegmentType.h index bf5f7b653..0a9871cc8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierSegmentType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableCarrierSegmentType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableFitting.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableFitting.h index 38fae178c..caf678c21 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableFitting.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableFitting.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableFittingType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableFittingType.h index f35984fef..91983741c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableFittingType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableFittingType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableSegment.h index bb45fecab..8c06c5014 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableSegmentType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableSegmentType.h index 41d9ffca7..d6d637461 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableSegmentType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCableSegmentType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCaissonFoundation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCaissonFoundation.h index 102b967fd..2ebd09a32 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCaissonFoundation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCaissonFoundation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCaissonFoundationType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCaissonFoundationType.h index a5662fc2a..6ec89096e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCaissonFoundationType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCaissonFoundationType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPoint.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPoint.h index 8253f1839..973a129c0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPoint.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPoint.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList.h index 9f85da4e6..8f955a5e5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList2D.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList2D.h index 6e546a1e8..0c567cac4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList2D.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList2D.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList3D.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList3D.h index 3aa8698ff..0f147308e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList3D.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianPointList3D.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator.h index e3aa0372c..e06a5b4d2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator2D.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator2D.h index 69b3cdee2..666940cae 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator2D.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator2D.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator2DnonUniform.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator2DnonUniform.h index 6a690f472..73f7e2687 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator2DnonUniform.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator2DnonUniform.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator3D.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator3D.h index 093628821..adbc821ee 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator3D.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator3D.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator3DnonUniform.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator3DnonUniform.h index 011db32e5..ed25c489e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator3DnonUniform.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCartesianTransformationOperator3DnonUniform.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCenterLineProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCenterLineProfileDef.h index d984c10b8..051bb955a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCenterLineProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCenterLineProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChiller.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChiller.h index 2afb151c9..2600721ec 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChiller.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChiller.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChillerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChillerType.h index e4dd27acd..c2df70011 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChillerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChillerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChimney.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChimney.h index 7466a0538..42ac077d0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChimney.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChimney.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChimneyType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChimneyType.h index 6c4ee9172..d9bcff1b5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChimneyType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcChimneyType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircle.h index bc6471dbb..692224482 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircleHollowProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircleHollowProfileDef.h index 7500264e7..fc9845c79 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircleHollowProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircleHollowProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircleProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircleProfileDef.h index 73e7f901a..242bcde09 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircleProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCircleProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCivilElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCivilElement.h index 72b8eb1c6..e52542326 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCivilElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCivilElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCivilElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCivilElementType.h index 2cca5feb6..45dee7c5d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCivilElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCivilElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClassification.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClassification.h index 0974e98e8..49e0afd54 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClassification.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClassification.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClassificationReference.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClassificationReference.h index 59a5fce19..8590e772b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClassificationReference.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClassificationReference.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClosedShell.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClosedShell.h index 2da148ace..fe5c4f959 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClosedShell.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClosedShell.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClothoid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClothoid.h index 651f5673e..b900b2199 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClothoid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcClothoid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoil.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoil.h index 29fda817c..331d7f430 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoil.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoil.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoilType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoilType.h index b345ea9c9..b3481b2be 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoilType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoilType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourRgb.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourRgb.h index df440ef29..e046671f6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourRgb.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourRgb.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourRgbList.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourRgbList.h index aec254898..4a24e17b2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourRgbList.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourRgbList.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourSpecification.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourSpecification.h index b5f68e974..da522da3d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourSpecification.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColourSpecification.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColumn.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColumn.h index 9d3f2834c..165cf50b5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColumn.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColumn.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColumnType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColumnType.h index db4ec3934..95f33f8cd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColumnType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcColumnType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCommunicationsAppliance.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCommunicationsAppliance.h index cd4119dd2..eff649678 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCommunicationsAppliance.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCommunicationsAppliance.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCommunicationsApplianceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCommunicationsApplianceType.h index b555f7d8c..d75979747 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCommunicationsApplianceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCommunicationsApplianceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcComplexProperty.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcComplexProperty.h index 3b3072d59..48d9ddd21 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcComplexProperty.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcComplexProperty.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcComplexPropertyTemplate.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcComplexPropertyTemplate.h index 068e90fb4..1a687ba43 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcComplexPropertyTemplate.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcComplexPropertyTemplate.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurve.h index c9be7b4f0..030c8472f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurveOnSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurveOnSurface.h index fc8b6793a..5e59bc71d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurveOnSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurveOnSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurveSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurveSegment.h index dbc8c05af..90d0d5284 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurveSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeCurveSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeProfileDef.h index 572060328..c533081de 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompositeProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompressor.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompressor.h index 38117c610..bb97fd018 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompressor.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompressor.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompressorType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompressorType.h index 0dd148fa1..b22a69a60 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompressorType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCompressorType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCondenser.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCondenser.h index bf502faf2..bb3a7aeaf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCondenser.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCondenser.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCondenserType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCondenserType.h index 060ce8ebe..f4abe6c89 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCondenserType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCondenserType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConic.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConic.h index 0430aecca..424f9b66a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConic.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConic.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectedFaceSet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectedFaceSet.h index 869fae082..fcbdd7eb6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectedFaceSet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectedFaceSet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionCurveGeometry.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionCurveGeometry.h index 6f1a0fc49..830984fda 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionCurveGeometry.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionCurveGeometry.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionGeometry.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionGeometry.h index e3b89fd89..67c674c2d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionGeometry.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionGeometry.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionPointEccentricity.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionPointEccentricity.h index 7d9de3eca..18b9bb434 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionPointEccentricity.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionPointEccentricity.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionPointGeometry.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionPointGeometry.h index ee45e2dc3..97f9c2cb8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionPointGeometry.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionPointGeometry.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionSurfaceGeometry.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionSurfaceGeometry.h index c7923320b..9a76d728e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionSurfaceGeometry.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionSurfaceGeometry.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionVolumeGeometry.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionVolumeGeometry.h index e39d1a63b..0a1fdb0fe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionVolumeGeometry.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConnectionVolumeGeometry.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstraint.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstraint.h index 374e73aa5..29163b10f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstraint.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstraint.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionEquipmentResource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionEquipmentResource.h index 0f0b52128..d724a9cc9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionEquipmentResource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionEquipmentResource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionEquipmentResourceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionEquipmentResourceType.h index 431e3f03b..6ee04cbce 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionEquipmentResourceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionEquipmentResourceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionMaterialResource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionMaterialResource.h index d916c7563..8f213dd9e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionMaterialResource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionMaterialResource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionMaterialResourceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionMaterialResourceType.h index 7189773c8..1e42f5741 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionMaterialResourceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionMaterialResourceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionProductResource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionProductResource.h index 576ec9ea2..215dcccf0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionProductResource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionProductResource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionProductResourceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionProductResourceType.h index ba1b57772..7f28a57d6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionProductResourceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionProductResourceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionResource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionResource.h index 7214daa56..758cf2eb6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionResource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionResource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionResourceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionResourceType.h index cc7874c92..7d5937cd0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionResourceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConstructionResourceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcContext.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcContext.h index 46c635911..0673c137b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcContext.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcContext.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcContextDependentUnit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcContextDependentUnit.h index fc5b1619b..6d0a4cd97 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcContextDependentUnit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcContextDependentUnit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcControl.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcControl.h index 9e35652e7..14fb571bd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcControl.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcControl.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcController.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcController.h index c65e84631..cbb2432ca 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcController.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcController.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcControllerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcControllerType.h index 6913fb2b0..3714160e8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcControllerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcControllerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConversionBasedUnit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConversionBasedUnit.h index c42f10387..ca41378cc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConversionBasedUnit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConversionBasedUnit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConversionBasedUnitWithOffset.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConversionBasedUnitWithOffset.h index 7c7defd9c..d990e948c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConversionBasedUnitWithOffset.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConversionBasedUnitWithOffset.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConveyorSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConveyorSegment.h index 97d6c2889..7a505a28d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConveyorSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConveyorSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConveyorSegmentType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConveyorSegmentType.h index 3dbe14f83..b8cdab107 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConveyorSegmentType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcConveyorSegmentType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCooledBeam.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCooledBeam.h index 131b2d28b..0dcd51d22 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCooledBeam.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCooledBeam.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCooledBeamType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCooledBeamType.h index a359a9d15..78cf36fa2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCooledBeamType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCooledBeamType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoolingTower.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoolingTower.h index 168e6ab8c..da639d39f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoolingTower.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoolingTower.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoolingTowerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoolingTowerType.h index a83978c57..7ab0f128b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoolingTowerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoolingTowerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoordinateOperation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoordinateOperation.h index 1697c8a4a..2441e41b3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoordinateOperation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoordinateOperation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoordinateReferenceSystem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoordinateReferenceSystem.h index 9959b5aeb..f3c37d206 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoordinateReferenceSystem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoordinateReferenceSystem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCosineSpiral.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCosineSpiral.h index 6908f4d41..fd7302f1d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCosineSpiral.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCosineSpiral.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostItem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostItem.h index b7b01b5df..c181085a6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostItem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostItem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostSchedule.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostSchedule.h index d730ac948..036c49a33 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostSchedule.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostSchedule.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostValue.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostValue.h index 83ffc6352..31a3d45d1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostValue.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCostValue.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCourse.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCourse.h index ec025bd5b..619476de0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCourse.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCourse.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCourseType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCourseType.h index 19b05b7a1..7c386856e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCourseType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCourseType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCovering.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCovering.h index 74f0d1c1c..aaa8d040e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCovering.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCovering.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoveringType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoveringType.h index 824f399ee..38b0d94fe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoveringType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCoveringType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCrewResource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCrewResource.h index 644b1c628..e160cc561 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCrewResource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCrewResource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCrewResourceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCrewResourceType.h index a0ac9926c..f0b331b69 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCrewResourceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCrewResourceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCsgPrimitive3D.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCsgPrimitive3D.h index 31f1dedbe..36db63d44 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCsgPrimitive3D.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCsgPrimitive3D.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCsgSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCsgSolid.h index f00969173..fe24d470f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCsgSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCsgSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurrencyRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurrencyRelationship.h index 6ae2c23de..fc1e99923 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurrencyRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurrencyRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurtainWall.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurtainWall.h index d63d2bcad..82d9130fb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurtainWall.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurtainWall.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurtainWallType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurtainWallType.h index 3dd55fc7a..2f018bf35 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurtainWallType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurtainWallType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurve.h index ffd7080f9..3f9282b32 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveBoundedPlane.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveBoundedPlane.h index 775942bed..e28dc3d78 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveBoundedPlane.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveBoundedPlane.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveBoundedSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveBoundedSurface.h index e1078aea1..6f09c9adb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveBoundedSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveBoundedSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveSegment.h index cdf54cb19..2d51311cf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyle.h index 56bc5d386..78e73e8a0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFont.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFont.h index f31dcd650..5b5df98e9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFont.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFont.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFontAndScaling.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFontAndScaling.h index 0b4eeb0c6..fc6fb07fb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFontAndScaling.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFontAndScaling.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFontPattern.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFontPattern.h index a7a49dc7e..df9656bf9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFontPattern.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCurveStyleFontPattern.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCylindricalSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCylindricalSurface.h index e851bab4a..699d2c300 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCylindricalSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcCylindricalSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDamper.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDamper.h index d08aafadf..81b499f0f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDamper.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDamper.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDamperType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDamperType.h index df4b24a8b..23d2b595e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDamperType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDamperType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDeepFoundation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDeepFoundation.h index d572f69fc..045554ce5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDeepFoundation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDeepFoundation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDeepFoundationType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDeepFoundationType.h index 8f8416dc2..f1a3714f6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDeepFoundationType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDeepFoundationType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedProfileDef.h index d40ae876d..a5ca8f390 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedUnit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedUnit.h index 76c1f127a..e450b6ab1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedUnit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedUnit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedUnitElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedUnitElement.h index f4572ba42..384d64520 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedUnitElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDerivedUnitElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDimensionalExponents.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDimensionalExponents.h index 591f81005..5e0b0664f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDimensionalExponents.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDimensionalExponents.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirection.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirection.h index a1791fb92..8a139f181 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirection.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirection.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirectrixCurveSweptAreaSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirectrixCurveSweptAreaSolid.h index cbc4856d0..d23445101 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirectrixCurveSweptAreaSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirectrixCurveSweptAreaSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirectrixDerivedReferenceSweptAreaSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirectrixDerivedReferenceSweptAreaSolid.h index b87fe8d45..9485d7444 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirectrixDerivedReferenceSweptAreaSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDirectrixDerivedReferenceSweptAreaSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDiscreteAccessory.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDiscreteAccessory.h index 742ec05dd..bca83616b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDiscreteAccessory.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDiscreteAccessory.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDiscreteAccessoryType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDiscreteAccessoryType.h index 77b89b883..78c3c1ff2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDiscreteAccessoryType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDiscreteAccessoryType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionBoard.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionBoard.h index 663a4cb7e..5201e3d36 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionBoard.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionBoard.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionBoardType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionBoardType.h index a878b2ac9..c763c2215 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionBoardType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionBoardType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionChamberElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionChamberElement.h index f8b9aecb8..3edf9b1e0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionChamberElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionChamberElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionChamberElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionChamberElementType.h index 6d7764a30..a69ff1895 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionChamberElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionChamberElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionCircuit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionCircuit.h index 761e59d24..285388262 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionCircuit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionCircuit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionControlElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionControlElement.h index 3d1782181..186f878e5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionControlElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionControlElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionControlElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionControlElementType.h index 223e7cefd..9fac83dc2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionControlElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionControlElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionElement.h index b31b8cc33..acbb3414b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionElementType.h index 9364505ea..b99035691 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionFlowElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionFlowElement.h index 7b7b7acea..ad601c9cc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionFlowElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionFlowElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionFlowElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionFlowElementType.h index 5a8ce6149..861933001 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionFlowElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionFlowElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionPort.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionPort.h index 02d406e83..ff95e8116 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionPort.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionPort.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionSystem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionSystem.h index 4eb8fd4cf..be51b4d6b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionSystem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDistributionSystem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentInformation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentInformation.h index cb98f3274..b1c9d10fb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentInformation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentInformation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentInformationRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentInformationRelationship.h index a5b9b142a..ecc1ea8ce 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentInformationRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentInformationRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentReference.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentReference.h index 15b49e0bd..b37143463 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentReference.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDocumentReference.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoor.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoor.h index 7eb6e46d0..8ae5f0101 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoor.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoor.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorLiningProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorLiningProperties.h index 60a5210b1..4816dba4f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorLiningProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorLiningProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorPanelProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorPanelProperties.h index cd21258ad..a743c22f2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorPanelProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorPanelProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorStyle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorStyle.h index 9f6b32d1c..83240b10a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorStyle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorStyle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorType.h index f8f3da2eb..4c2c519d6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorTypeOperationEnum.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorTypeOperationEnum.h index d2cd2ab40..bec0ea67d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorTypeOperationEnum.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDoorTypeOperationEnum.h @@ -11,19 +11,19 @@ namespace IFC4X3 { - // TYPE IfcDoorTypeOperationEnum = ENUMERATION OF (DOUBLE_PANEL_DOUBLE_SWING ,DOUBLE_PANEL_FOLDING ,DOUBLE_PANEL_LIFTING_VERTICAL ,DOUBLE_PANEL_SINGLE_SWING ,DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT ,DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT ,DOUBLE_PANEL_SLIDING ,DOUBLE_SWING_LEFT ,DOUBLE_SWING_RIGHT ,FOLDING_TO_LEFT ,FOLDING_TO_RIGHT ,LIFTING_HORIZONTAL ,LIFTING_VERTICAL_LEFT ,LIFTING_VERTICAL_RIGHT ,REVOLVING_HORIZONTAL ,REVOLVING_VERTICAL ,ROLLINGUP ,SINGLE_SWING_LEFT ,SINGLE_SWING_RIGHT ,SLIDING_TO_LEFT ,SLIDING_TO_RIGHT ,SWING_FIXED_LEFT ,SWING_FIXED_RIGHT ,USERDEFINED ,NOTDEFINED); + // TYPE IfcDoorTypeOperationEnum = ENUMERATION OF (DOUBLE_DOOR_DOUBLE_SWING ,DOUBLE_DOOR_FOLDING ,DOUBLE_DOOR_LIFTING_VERTICAL ,DOUBLE_DOOR_SINGLE_SWING ,DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT ,DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT ,DOUBLE_DOOR_SLIDING ,DOUBLE_SWING_LEFT ,DOUBLE_SWING_RIGHT ,FOLDING_TO_LEFT ,FOLDING_TO_RIGHT ,LIFTING_HORIZONTAL ,LIFTING_VERTICAL_LEFT ,LIFTING_VERTICAL_RIGHT ,REVOLVING ,REVOLVING_VERTICAL ,ROLLINGUP ,SINGLE_SWING_LEFT ,SINGLE_SWING_RIGHT ,SLIDING_TO_LEFT ,SLIDING_TO_RIGHT ,SWING_FIXED_LEFT ,SWING_FIXED_RIGHT ,USERDEFINED ,NOTDEFINED); class IFCQUERY_EXPORT IfcDoorTypeOperationEnum : virtual public BuildingObject { public: enum IfcDoorTypeOperationEnumEnum { - ENUM_DOUBLE_PANEL_DOUBLE_SWING, - ENUM_DOUBLE_PANEL_FOLDING, - ENUM_DOUBLE_PANEL_LIFTING_VERTICAL, - ENUM_DOUBLE_PANEL_SINGLE_SWING, - ENUM_DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT, - ENUM_DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT, - ENUM_DOUBLE_PANEL_SLIDING, + ENUM_DOUBLE_DOOR_DOUBLE_SWING, + ENUM_DOUBLE_DOOR_FOLDING, + ENUM_DOUBLE_DOOR_LIFTING_VERTICAL, + ENUM_DOUBLE_DOOR_SINGLE_SWING, + ENUM_DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT, + ENUM_DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT, + ENUM_DOUBLE_DOOR_SLIDING, ENUM_DOUBLE_SWING_LEFT, ENUM_DOUBLE_SWING_RIGHT, ENUM_FOLDING_TO_LEFT, @@ -31,7 +31,7 @@ namespace IFC4X3 ENUM_LIFTING_HORIZONTAL, ENUM_LIFTING_VERTICAL_LEFT, ENUM_LIFTING_VERTICAL_RIGHT, - ENUM_REVOLVING_HORIZONTAL, + ENUM_REVOLVING, ENUM_REVOLVING_VERTICAL, ENUM_ROLLINGUP, ENUM_SINGLE_SWING_LEFT, diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDraughtingPreDefinedColour.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDraughtingPreDefinedColour.h index 8117bafe1..0bb384872 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDraughtingPreDefinedColour.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDraughtingPreDefinedColour.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDraughtingPreDefinedCurveFont.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDraughtingPreDefinedCurveFont.h index 89dc268e4..763af6fe6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDraughtingPreDefinedCurveFont.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDraughtingPreDefinedCurveFont.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctFitting.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctFitting.h index 8ae4f84be..e75e53bb9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctFitting.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctFitting.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctFittingType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctFittingType.h index b7c5d9155..c304cebd8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctFittingType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctFittingType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSegment.h index 518111471..cd05297e0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSegmentType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSegmentType.h index c9ce08219..811da660a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSegmentType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSegmentType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSilencer.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSilencer.h index e6903d7e9..6639e72d4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSilencer.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSilencer.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSilencerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSilencerType.h index 3eed9da16..116f60998 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSilencerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcDuctSilencerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksCut.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksCut.h index 65331fb5b..954d55c04 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksCut.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksCut.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksElement.h index 85220fdcc..3ecda7e17 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksFill.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksFill.h index 6d6a764aa..96a5e93b4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksFill.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEarthworksFill.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdge.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdge.h index fb1c72e73..4a83d3294 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdge.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdge.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdgeCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdgeCurve.h index 830b0c64d..627328db8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdgeCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdgeCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdgeLoop.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdgeLoop.h index 2f1eb99f9..0c7ff764d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdgeLoop.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEdgeLoop.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricAppliance.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricAppliance.h index a00369f4f..27c1a2c00 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricAppliance.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricAppliance.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricApplianceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricApplianceType.h index 00dfb4ce5..e7a875678 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricApplianceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricApplianceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricDistributionBoard.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricDistributionBoard.h index 7fb986fe9..f6ee621aa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricDistributionBoard.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricDistributionBoard.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricDistributionBoardType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricDistributionBoardType.h index d278567ca..23e56db5b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricDistributionBoardType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricDistributionBoardType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowStorageDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowStorageDevice.h index 8c554b058..65febdf75 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowStorageDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowStorageDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowStorageDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowStorageDeviceType.h index 4555a8332..3da09d905 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowStorageDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowStorageDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowTreatmentDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowTreatmentDevice.h index 3a31df863..8f27aadc8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowTreatmentDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowTreatmentDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowTreatmentDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowTreatmentDeviceType.h index 264a5f6ae..703e35221 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowTreatmentDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricFlowTreatmentDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricGenerator.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricGenerator.h index f1c4d753e..6053a89c4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricGenerator.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricGenerator.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricGeneratorType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricGeneratorType.h index 727e78434..c404aa371 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricGeneratorType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricGeneratorType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricMotor.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricMotor.h index 392a47c43..7ed32e9e3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricMotor.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricMotor.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricMotorType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricMotorType.h index 52f4df729..143fe9d8d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricMotorType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricMotorType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricTimeControl.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricTimeControl.h index 582756427..8b468438e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricTimeControl.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricTimeControl.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricTimeControlType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricTimeControlType.h index 79df197e6..aea021523 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricTimeControlType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElectricTimeControlType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElement.h index 711d295e1..dd9925397 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementAssembly.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementAssembly.h index 2d3ea4f9b..d68b14136 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementAssembly.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementAssembly.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementAssemblyType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementAssemblyType.h index 3219b1731..a15f8b300 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementAssemblyType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementAssemblyType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementComponent.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementComponent.h index fff704c30..85bc0501c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementComponent.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementComponent.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementComponentType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementComponentType.h index 70a59cdda..d47d392c7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementComponentType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementComponentType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementQuantity.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementQuantity.h index 57978e870..a8368973a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementQuantity.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementQuantity.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementType.h index 132337029..eafd14260 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementarySurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementarySurface.h index d62407f21..33fdc0b02 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementarySurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcElementarySurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEllipse.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEllipse.h index bb5e85388..9fe5e9831 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEllipse.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEllipse.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEllipseProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEllipseProfileDef.h index 265a8937c..d8e224c58 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEllipseProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEllipseProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEnergyConversionDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEnergyConversionDevice.h index 429fa12b1..142a6c7e0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEnergyConversionDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEnergyConversionDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEnergyConversionDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEnergyConversionDeviceType.h index d7226c267..b6b459864 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEnergyConversionDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEnergyConversionDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEngine.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEngine.h index 89b918536..b1da76731 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEngine.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEngine.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEngineType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEngineType.h index 425b0d41a..7f34a2356 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEngineType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEngineType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporativeCooler.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporativeCooler.h index 54231fd9a..a0b307f56 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporativeCooler.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporativeCooler.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporativeCoolerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporativeCoolerType.h index c080ed095..0d0d0d5e5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporativeCoolerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporativeCoolerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporator.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporator.h index 5a7b594eb..3f2d6a550 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporator.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporator.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporatorType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporatorType.h index e3026d8ad..901773f2c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporatorType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvaporatorType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvent.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvent.h index 0315d89f8..41a6e923f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvent.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEvent.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEventTime.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEventTime.h index bf5c96402..b835920ce 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEventTime.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEventTime.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEventType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEventType.h index e6c976943..90e397a89 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEventType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcEventType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtendedProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtendedProperties.h index 91bdba03f..caf3d6b91 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtendedProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtendedProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalInformation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalInformation.h index 9b8fb81ba..20c11318a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalInformation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalInformation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalReference.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalReference.h index adc61ff02..5024a67d4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalReference.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalReference.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalReferenceRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalReferenceRelationship.h index cbf1b7d5e..ce08e7870 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalReferenceRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalReferenceRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalSpatialElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalSpatialElement.h index c47a4839d..6c552682c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalSpatialElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalSpatialElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalSpatialStructureElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalSpatialStructureElement.h index 789cec52c..685fdf5b5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalSpatialStructureElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternalSpatialStructureElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedHatchStyle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedHatchStyle.h index acc8f004c..7181f383b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedHatchStyle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedHatchStyle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedSurfaceStyle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedSurfaceStyle.h index d77806449..6a0be2bdf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedSurfaceStyle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedSurfaceStyle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedTextFont.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedTextFont.h index b1167db76..8f36dee9f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedTextFont.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExternallyDefinedTextFont.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtrudedAreaSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtrudedAreaSolid.h index fe38ee040..4f04c2feb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtrudedAreaSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtrudedAreaSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtrudedAreaSolidTapered.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtrudedAreaSolidTapered.h index b93723505..afbbbc5f2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtrudedAreaSolidTapered.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcExtrudedAreaSolidTapered.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFace.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFace.h index bdddc1851..558c3c9c2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFace.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFace.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceBasedSurfaceModel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceBasedSurfaceModel.h index 857a2aaa2..045552732 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceBasedSurfaceModel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceBasedSurfaceModel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceBound.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceBound.h index 0a92fb6ea..c2075c594 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceBound.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceBound.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceOuterBound.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceOuterBound.h index 0d8f3efbc..37feb04e0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceOuterBound.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceOuterBound.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceSurface.h index 3e23cf2b9..f1e13d5fa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFaceSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacetedBrep.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacetedBrep.h index f16e33ce8..76df1e4ba 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacetedBrep.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacetedBrep.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacetedBrepWithVoids.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacetedBrepWithVoids.h index db4175e17..6ea94110d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacetedBrepWithVoids.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacetedBrepWithVoids.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacility.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacility.h index 2d711c90b..eb1940876 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacility.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacility.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacilityPart.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacilityPart.h index 85e55157b..b26a18aec 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacilityPart.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacilityPart.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacilityPartCommon.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacilityPartCommon.h index 6fb21c33d..2c013e3ed 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacilityPartCommon.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFacilityPartCommon.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFailureConnectionCondition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFailureConnectionCondition.h index 86b9a3f8a..57f8d7585 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFailureConnectionCondition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFailureConnectionCondition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFan.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFan.h index ccd2c9761..8d9927c90 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFan.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFan.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFanType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFanType.h index e035150b0..61de0ee40 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFanType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFanType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFastener.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFastener.h index c93b5bfd2..4abd48c77 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFastener.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFastener.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFastenerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFastenerType.h index 74ff46b6e..31444c2eb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFastenerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFastenerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElement.h index f7e6833f2..abae610dd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElementAddition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElementAddition.h index 608ddbf89..0272755e6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElementAddition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElementAddition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElementSubtraction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElementSubtraction.h index 71f3eb4c5..0c24752fc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElementSubtraction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFeatureElementSubtraction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyle.h index 02c037875..2cc355964 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyleHatching.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyleHatching.h index b6e535db5..ab72706e4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyleHatching.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyleHatching.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyleTiles.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyleTiles.h index 94edae431..dd72b0b51 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyleTiles.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFillAreaStyleTiles.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFilter.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFilter.h index d5b020e8b..a4aaed6bf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFilter.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFilter.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFilterType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFilterType.h index 807a494e3..4db85ead0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFilterType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFilterType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFireSuppressionTerminal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFireSuppressionTerminal.h index ba93efa59..88e0b3b56 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFireSuppressionTerminal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFireSuppressionTerminal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFireSuppressionTerminalType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFireSuppressionTerminalType.h index 1f7f1ebf4..3fa4bab70 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFireSuppressionTerminalType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFireSuppressionTerminalType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFixedReferenceSweptAreaSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFixedReferenceSweptAreaSolid.h index d3f4f56a7..892c62efe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFixedReferenceSweptAreaSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFixedReferenceSweptAreaSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowController.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowController.h index 810d88a77..10e9de272 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowController.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowController.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowControllerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowControllerType.h index 3f8292aa9..434a78fe9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowControllerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowControllerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowFitting.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowFitting.h index 967da8b02..49ce83695 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowFitting.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowFitting.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowFittingType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowFittingType.h index 09db6f724..3fe5a2d02 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowFittingType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowFittingType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowInstrument.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowInstrument.h index 986cdb21f..e6d564ec1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowInstrument.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowInstrument.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowInstrumentType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowInstrumentType.h index 67321fdb7..559ed231f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowInstrumentType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowInstrumentType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMeter.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMeter.h index 0df709afa..d0ba33098 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMeter.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMeter.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMeterType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMeterType.h index d1ba88f1e..3f34f1141 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMeterType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMeterType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMovingDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMovingDevice.h index ce53b8b4a..d467a48f0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMovingDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMovingDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMovingDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMovingDeviceType.h index 5887e1c4f..b280a4d26 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMovingDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowMovingDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowSegment.h index c2cee265b..a7d028e31 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowSegmentType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowSegmentType.h index 85a909653..702eafc78 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowSegmentType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowSegmentType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowStorageDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowStorageDevice.h index 0b5eac594..b7a12ea84 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowStorageDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowStorageDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowStorageDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowStorageDeviceType.h index 0ceaab4df..217e10197 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowStorageDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowStorageDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTerminal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTerminal.h index 1af23ef55..4d132ae91 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTerminal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTerminal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTerminalType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTerminalType.h index f394d84d9..c62b356d5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTerminalType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTerminalType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTreatmentDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTreatmentDevice.h index 9f35004c9..72d7814f1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTreatmentDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTreatmentDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTreatmentDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTreatmentDeviceType.h index 9fd8b8ef4..a19c6a8cc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTreatmentDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFlowTreatmentDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFooting.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFooting.h index b5fca649f..0760d6fef 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFooting.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFooting.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFootingType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFootingType.h index e1e8ecdc5..162dff167 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFootingType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFootingType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnishingElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnishingElement.h index f31930129..a98bf2211 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnishingElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnishingElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnishingElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnishingElementType.h index 287dd35db..715a7e052 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnishingElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnishingElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurniture.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurniture.h index b20b2da48..53a04137a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurniture.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurniture.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnitureType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnitureType.h index daa0d7be3..7c0d415fb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnitureType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcFurnitureType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeographicElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeographicElement.h index 13d736a8c..26f7218a2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeographicElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeographicElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeographicElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeographicElementType.h index 1fe4c4f3f..f43c5d00f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeographicElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeographicElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricCurveSet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricCurveSet.h index 565b66b85..6c6fea348 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricCurveSet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricCurveSet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationContext.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationContext.h index a87917f49..afd39f5d9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationContext.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationContext.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationItem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationItem.h index 721dd210e..00286a1b1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationItem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationItem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationSubContext.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationSubContext.h index 24b12b7a1..20bd36964 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationSubContext.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricRepresentationSubContext.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricSet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricSet.h index 10090d749..02582e2a1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricSet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeometricSet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeomodel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeomodel.h index 6a9fe5efe..01f65f7d6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeomodel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeomodel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeoslice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeoslice.h index e30ae3cfb..7cfc12a5c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeoslice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeoslice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalAssembly.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalAssembly.h index 73d76d846..064d0ab49 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalAssembly.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalAssembly.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalElement.h index 00ad5c615..44fa64e86 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalStratum.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalStratum.h index 8da9647b6..787c3f6dc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalStratum.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGeotechnicalStratum.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGradientCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGradientCurve.h index 6c0f57771..b5c085f7d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGradientCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGradientCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGrid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGrid.h index 9bdf25a37..246b671e8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGrid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGrid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGridAxis.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGridAxis.h index 0c4570df6..68fde4d52 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGridAxis.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGridAxis.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGridPlacement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGridPlacement.h index b041cb011..60a92dcd8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGridPlacement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGridPlacement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGroup.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGroup.h index 9e7709e65..afb454981 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGroup.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcGroup.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHalfSpaceSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHalfSpaceSolid.h index 681cc8c06..9ed6c72e6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHalfSpaceSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHalfSpaceSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHeatExchanger.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHeatExchanger.h index 9ddfbd019..3fee9a987 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHeatExchanger.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHeatExchanger.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHeatExchangerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHeatExchangerType.h index e6a709ba2..71dff9149 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHeatExchangerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHeatExchangerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHumidifier.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHumidifier.h index d961732bd..7da2c2426 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHumidifier.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHumidifier.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHumidifierType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHumidifierType.h index c8e16e25c..8ba662804 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHumidifierType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcHumidifierType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIShapeProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIShapeProfileDef.h index a3bf297fb..6e17ef0a2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIShapeProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIShapeProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImageTexture.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImageTexture.h index ec1502026..c4fca8f5f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImageTexture.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImageTexture.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImpactProtectionDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImpactProtectionDevice.h index 99ab00f74..65ac0ba73 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImpactProtectionDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImpactProtectionDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImpactProtectionDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImpactProtectionDeviceType.h index 299802554..ad2735b3c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImpactProtectionDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcImpactProtectionDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedColourMap.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedColourMap.h index acf544840..01cc8fbc8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedColourMap.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedColourMap.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolyCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolyCurve.h index f6497c3b1..388035158 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolyCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolyCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -12,7 +8,7 @@ namespace IFC4X3 { class IFCQUERY_EXPORT IfcCartesianPointList; class IFCQUERY_EXPORT IfcSegmentIndexSelect; - class IFCQUERY_EXPORT IfcLogical; + class IFCQUERY_EXPORT IfcBoolean; //ENTITY class IFCQUERY_EXPORT IfcIndexedPolyCurve : public IfcBoundedCurve { @@ -44,6 +40,6 @@ namespace IFC4X3 // attributes: shared_ptr m_Points; std::vector > m_Segments; //optional - shared_ptr m_SelfIntersect; + shared_ptr m_SelfIntersect; //optional }; } diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalFace.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalFace.h index 1e489b528..907e9dd18 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalFace.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalFace.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalFaceWithVoids.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalFaceWithVoids.h index 5cc4bcaef..588906ac9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalFaceWithVoids.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalFaceWithVoids.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalTextureMap.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalTextureMap.h index 48d77ecda..bc8ca32c8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalTextureMap.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedPolygonalTextureMap.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedTextureMap.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedTextureMap.h index 0a454ff81..c8a72f022 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedTextureMap.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedTextureMap.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedTriangleTextureMap.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedTriangleTextureMap.h index 6a3125e1d..3ab0eac53 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedTriangleTextureMap.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIndexedTriangleTextureMap.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInterceptor.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInterceptor.h index 49b1a88af..bed31f075 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInterceptor.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInterceptor.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInterceptorType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInterceptorType.h index bce91c82c..9afbbe29c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInterceptorType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInterceptorType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIntersectionCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIntersectionCurve.h index 6ee2bde26..b6a89a048 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIntersectionCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIntersectionCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInventory.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInventory.h index 1448eff1c..2c95d106f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInventory.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcInventory.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIrregularTimeSeries.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIrregularTimeSeries.h index 2c60e13ec..e614ba44d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIrregularTimeSeries.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIrregularTimeSeries.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIrregularTimeSeriesValue.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIrregularTimeSeriesValue.h index c02d59c79..c4524407f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIrregularTimeSeriesValue.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcIrregularTimeSeriesValue.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcJunctionBox.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcJunctionBox.h index 56b940b39..669b08ce8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcJunctionBox.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcJunctionBox.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcJunctionBoxType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcJunctionBoxType.h index 353a59d84..6ae8b68de 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcJunctionBoxType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcJunctionBoxType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerb.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerb.h index 557e426f6..06c96b346 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerb.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerb.h @@ -1,16 +1,12 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" #include "IfcBuiltElement.h" namespace IFC4X3 { - class IFCQUERY_EXPORT IfcBoolean; + class IFCQUERY_EXPORT IfcKerbTypeEnum; //ENTITY class IFCQUERY_EXPORT IfcKerb : public IfcBuiltElement { @@ -83,6 +79,6 @@ namespace IFC4X3 // IfcKerb ----------------------------------------------------------- // attributes: - shared_ptr m_Mountable; + shared_ptr m_PredefinedType; //optional }; } diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerbType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerbType.h index f0e352a2b..8b0be2b30 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerbType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerbType.h @@ -1,16 +1,12 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" #include "IfcBuiltElementType.h" namespace IFC4X3 { - class IFCQUERY_EXPORT IfcBoolean; + class IFCQUERY_EXPORT IfcKerbTypeEnum; //ENTITY class IFCQUERY_EXPORT IfcKerbType : public IfcBuiltElementType { @@ -66,6 +62,6 @@ namespace IFC4X3 // IfcKerbType ----------------------------------------------------------- // attributes: - shared_ptr m_Mountable; + shared_ptr m_PredefinedType; }; } diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerbTypeEnum.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerbTypeEnum.h new file mode 100644 index 000000000..0d076be99 --- /dev/null +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcKerbTypeEnum.h @@ -0,0 +1,31 @@ +/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ + +#pragma once +#include +#include +#include +#include +#include "ifcpp/model/GlobalDefines.h" +#include "ifcpp/model/BasicTypes.h" +#include "ifcpp/model/BuildingObject.h" + +namespace IFC4X3 +{ + // TYPE IfcKerbTypeEnum = ENUMERATION OF (USERDEFINED ,NOTDEFINED); + class IFCQUERY_EXPORT IfcKerbTypeEnum : virtual public BuildingObject + { + public: + enum IfcKerbTypeEnumEnum + { + ENUM_USERDEFINED, + ENUM_NOTDEFINED + }; + + IfcKerbTypeEnum() = default; + IfcKerbTypeEnum( IfcKerbTypeEnumEnum e ) { m_enum = e; } + virtual uint32_t classID() const { return 2615076639; } + virtual void getStepParameter( std::stringstream& stream, bool is_select_type = false ) const; + static shared_ptr createObjectFromSTEP( const std::string& arg, const std::map >& map, std::stringstream& errorStream ); + IfcKerbTypeEnumEnum m_enum; + }; +} diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLShapeProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLShapeProfileDef.h index 6611dfd2a..912db6b2d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLShapeProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLShapeProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLaborResource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLaborResource.h index c536c533d..321854619 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLaborResource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLaborResource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLaborResourceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLaborResourceType.h index 45bef8c76..fe9694637 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLaborResourceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLaborResourceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLagTime.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLagTime.h index 05b33259c..53bb99bcb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLagTime.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLagTime.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLamp.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLamp.h index 3b4cccea5..b39bac726 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLamp.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLamp.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLampType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLampType.h index 3dff88735..d21506208 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLampType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLampType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLibraryInformation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLibraryInformation.h index 19515d6ec..0481406c7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLibraryInformation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLibraryInformation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLibraryReference.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLibraryReference.h index 38c3c3cfa..cac4d43ef 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLibraryReference.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLibraryReference.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightDistributionData.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightDistributionData.h index 271c41ad2..4d9b17265 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightDistributionData.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightDistributionData.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightFixture.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightFixture.h index 3ae58c8d3..7120b3364 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightFixture.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightFixture.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightFixtureType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightFixtureType.h index ebe453cf3..029570c96 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightFixtureType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightFixtureType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightIntensityDistribution.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightIntensityDistribution.h index ee4eb175b..a22206d5f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightIntensityDistribution.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightIntensityDistribution.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSource.h index 40c6653e6..9f0469bd9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceAmbient.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceAmbient.h index 75f6eafbe..b3b0f9738 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceAmbient.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceAmbient.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceDirectional.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceDirectional.h index b16f7db9d..d9fa8c575 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceDirectional.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceDirectional.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceGoniometric.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceGoniometric.h index 691baeedb..21af67db3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceGoniometric.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceGoniometric.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourcePositional.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourcePositional.h index fcb67d531..e6231d766 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourcePositional.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourcePositional.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceSpot.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceSpot.h index 3fa4f24e8..134c5d2ca 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceSpot.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLightSourceSpot.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLine.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLine.h index d531dc0bd..950dc39e9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLine.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLine.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearElement.h index e39c75273..64d3cbe25 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearPlacement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearPlacement.h index fba4e675f..fe3777ef6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearPlacement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearPlacement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearPositioningElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearPositioningElement.h index 048a513bb..51f9b455a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearPositioningElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLinearPositioningElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLiquidTerminal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLiquidTerminal.h index f268f3fe1..93f18ee33 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLiquidTerminal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLiquidTerminal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLiquidTerminalType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLiquidTerminalType.h index a4e575057..1c854817d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLiquidTerminalType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLiquidTerminalType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLocalPlacement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLocalPlacement.h index b93a655a4..61c574cdc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLocalPlacement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLocalPlacement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLoop.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLoop.h index 9c404a924..540d4faf4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLoop.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcLoop.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcManifoldSolidBrep.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcManifoldSolidBrep.h index b059c0191..4420e30dd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcManifoldSolidBrep.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcManifoldSolidBrep.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMapConversion.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMapConversion.h index 389116345..f15e0d38c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMapConversion.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMapConversion.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMappedItem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMappedItem.h index fedeef6e0..245e422e8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMappedItem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMappedItem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMarineFacility.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMarineFacility.h index d113ff55a..3e7f8c961 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMarineFacility.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMarineFacility.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMarinePart.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMarinePart.h index ebafb0c4d..6ccad9d78 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMarinePart.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMarinePart.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterial.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterial.h index 762899ed7..5a4b43714 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterial.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterial.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialClassificationRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialClassificationRelationship.h index 6dc917e5d..17a7ed927 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialClassificationRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialClassificationRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialConstituent.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialConstituent.h index 680e4d18f..1c71a9641 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialConstituent.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialConstituent.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialConstituentSet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialConstituentSet.h index 1d69ba530..b4d8c5fde 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialConstituentSet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialConstituentSet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialDefinition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialDefinition.h index fc76e6063..bc64bad6c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialDefinition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialDefinition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialDefinitionRepresentation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialDefinitionRepresentation.h index 8373e85e6..4fdd6c848 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialDefinitionRepresentation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialDefinitionRepresentation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayer.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayer.h index 1cf21b37b..178aafb40 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayer.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayer.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerSet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerSet.h index 91bde467f..584557d4a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerSet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerSet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerSetUsage.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerSetUsage.h index 809a5ae44..9bb25f46b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerSetUsage.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerSetUsage.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerWithOffsets.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerWithOffsets.h index 76444f4fb..c009cddee 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerWithOffsets.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialLayerWithOffsets.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialList.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialList.h index 9a8963588..4e945306b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialList.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialList.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfile.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfile.h index 620f396be..27721fcb0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfile.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfile.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSet.h index de6e6391e..b281c110b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSetUsage.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSetUsage.h index 43627a211..cb889d1ad 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSetUsage.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSetUsage.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSetUsageTapering.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSetUsageTapering.h index 20288e43b..23c09acb3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSetUsageTapering.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileSetUsageTapering.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileWithOffsets.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileWithOffsets.h index 7409cdc54..58d1fee59 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileWithOffsets.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProfileWithOffsets.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProperties.h index dce6e0b84..7b75e593d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialRelationship.h index 319a771d4..432457f50 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialUsageDefinition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialUsageDefinition.h index 8d1b2eb74..fab67ac0f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialUsageDefinition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMaterialUsageDefinition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMeasureWithUnit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMeasureWithUnit.h index 2cbeae3dc..8eabd0beb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMeasureWithUnit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMeasureWithUnit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMechanicalFastener.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMechanicalFastener.h index 4a8daa457..9ce91fdcf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMechanicalFastener.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMechanicalFastener.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMechanicalFastenerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMechanicalFastenerType.h index 97e3afd3e..8f6332351 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMechanicalFastenerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMechanicalFastenerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMedicalDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMedicalDevice.h index e4b7bd6ef..3b0c38b03 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMedicalDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMedicalDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMedicalDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMedicalDeviceType.h index a319acdc8..9dfbb44de 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMedicalDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMedicalDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMember.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMember.h index 79b8d7815..97c778f8d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMember.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMember.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMemberType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMemberType.h index 44ec9df6f..b5739bbcb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMemberType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMemberType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMetric.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMetric.h index d900518f1..0e588abaf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMetric.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMetric.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMirroredProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMirroredProfileDef.h index 7efdc5148..0d983bda6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMirroredProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMirroredProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMobileTelecommunicationsAppliance.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMobileTelecommunicationsAppliance.h index a5be331d7..bc750c332 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMobileTelecommunicationsAppliance.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMobileTelecommunicationsAppliance.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMobileTelecommunicationsApplianceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMobileTelecommunicationsApplianceType.h index 06029eba3..b2c13fd0e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMobileTelecommunicationsApplianceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMobileTelecommunicationsApplianceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMonetaryUnit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMonetaryUnit.h index 14cbe144f..6b2800189 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMonetaryUnit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMonetaryUnit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMooringDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMooringDevice.h index 8fd95c320..d1f4bbcaf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMooringDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMooringDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMooringDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMooringDeviceType.h index a77dc1ec7..b2b856b5b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMooringDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMooringDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMotorConnection.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMotorConnection.h index 4537eeaa5..eecf63b95 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMotorConnection.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMotorConnection.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMotorConnectionType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMotorConnectionType.h index db09419d0..5b07f45fc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMotorConnectionType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcMotorConnectionType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNamedUnit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNamedUnit.h index 1ed83fd88..ea03b5098 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNamedUnit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNamedUnit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNavigationElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNavigationElement.h index ffa09b69d..e3670c6ca 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNavigationElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNavigationElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNavigationElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNavigationElementType.h index 89a1315ac..1bfe348f9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNavigationElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcNavigationElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObject.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObject.h index a3a28166b..27c179ebe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObject.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObject.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectDefinition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectDefinition.h index d3ee275f4..9b80368bc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectDefinition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectDefinition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectPlacement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectPlacement.h index 272df93f0..ab14722ec 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectPlacement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectPlacement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectTypeEnum.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectTypeEnum.h deleted file mode 100644 index aaf5adb64..000000000 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjectTypeEnum.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ - -#pragma once -#include -#include -#include -#include -#include "ifcpp/model/GlobalDefines.h" -#include "ifcpp/model/BasicTypes.h" -#include "ifcpp/model/BuildingObject.h" - -namespace IFC4X3 -{ - // TYPE IfcObjectTypeEnum = ENUMERATION OF (ACTOR ,CONTROL ,GROUP ,PROCESS ,PRODUCT ,PROJECT ,RESOURCE ,NOTDEFINED); - class IFCQUERY_EXPORT IfcObjectTypeEnum : virtual public BuildingObject - { - public: - enum IfcObjectTypeEnumEnum - { - ENUM_ACTOR, - ENUM_CONTROL, - ENUM_GROUP, - ENUM_PROCESS, - ENUM_PRODUCT, - ENUM_PROJECT, - ENUM_RESOURCE, - ENUM_NOTDEFINED - }; - - IfcObjectTypeEnum() = default; - IfcObjectTypeEnum( IfcObjectTypeEnumEnum e ) { m_enum = e; } - virtual uint32_t classID() const { return 1545711075; } - virtual void getStepParameter( std::stringstream& stream, bool is_select_type = false ) const; - static shared_ptr createObjectFromSTEP( const std::string& arg, const std::map >& map, std::stringstream& errorStream ); - IfcObjectTypeEnumEnum m_enum; - }; -} diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjective.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjective.h index b89f56dfe..c21e5d4ce 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjective.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcObjective.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOccupant.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOccupant.h index f679cd7ea..6995edba0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOccupant.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOccupant.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve.h index afff44aa2..5d4babf7b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve2D.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve2D.h index b1c591627..4bc802032 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve2D.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve2D.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve3D.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve3D.h index 91289ded7..4076a8054 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve3D.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurve3D.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurveByDistances.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurveByDistances.h index 0f461fa8e..cc46fe16f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurveByDistances.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOffsetCurveByDistances.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpenCrossProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpenCrossProfileDef.h index 8c5fe11ec..6a77da63b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpenCrossProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpenCrossProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpenShell.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpenShell.h index c7cd679e6..197ec4173 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpenShell.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpenShell.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpeningElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpeningElement.h index 6b9e4ea51..55e201d86 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpeningElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOpeningElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrganization.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrganization.h index 661e6a163..5906075ee 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrganization.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrganization.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrganizationRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrganizationRelationship.h index f47ee62bc..6a31f007f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrganizationRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrganizationRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrientedEdge.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrientedEdge.h index ec4f26118..a698ec0f6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrientedEdge.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOrientedEdge.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOuterBoundaryCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOuterBoundaryCurve.h index d23e5d879..c2f7daaf3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOuterBoundaryCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOuterBoundaryCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOutlet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOutlet.h index 3c4dcf1fb..d83dc1d98 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOutlet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOutlet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOutletType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOutletType.h index 4711b0800..9c5a66ab3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOutletType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOutletType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOwnerHistory.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOwnerHistory.h index 82e6707ca..0600bfbb2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOwnerHistory.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcOwnerHistory.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcParameterizedProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcParameterizedProfileDef.h index ddb13de9c..efbad8aed 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcParameterizedProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcParameterizedProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPath.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPath.h index b887822d6..d63d0dc8b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPath.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPath.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPavement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPavement.h index c564fcdc7..f442cc0dc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPavement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPavement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPavementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPavementType.h index f3bd8d35f..05e279efc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPavementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPavementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPcurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPcurve.h index 3334c41d4..fc23d19f4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPcurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPcurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPerformanceHistory.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPerformanceHistory.h index f6aefec7c..03dd1d29e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPerformanceHistory.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPerformanceHistory.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPermeableCoveringProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPermeableCoveringProperties.h index 4424da277..6d20806a5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPermeableCoveringProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPermeableCoveringProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPermit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPermit.h index 3034213d8..f44b1f1de 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPermit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPermit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPerson.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPerson.h index 8ec1fc168..63ccdff0f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPerson.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPerson.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPersonAndOrganization.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPersonAndOrganization.h index 4163aa760..7338d7970 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPersonAndOrganization.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPersonAndOrganization.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalComplexQuantity.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalComplexQuantity.h index d48511ec6..7133a5214 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalComplexQuantity.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalComplexQuantity.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalQuantity.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalQuantity.h index 5e2216d4f..81ec60d70 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalQuantity.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalQuantity.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalSimpleQuantity.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalSimpleQuantity.h index 86d491eb1..51b601e04 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalSimpleQuantity.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPhysicalSimpleQuantity.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPile.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPile.h index c43296bcf..8257f2039 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPile.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPile.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPileType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPileType.h index c830d2bc6..5475e84a1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPileType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPileType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeFitting.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeFitting.h index ff272d31a..5b46561f6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeFitting.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeFitting.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeFittingType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeFittingType.h index e1d25d50d..bdc344c1a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeFittingType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeFittingType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeSegment.h index 6401b3809..b360cbb11 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeSegmentType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeSegmentType.h index 183f4eb59..de8dc67ce 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeSegmentType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPipeSegmentType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPixelTexture.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPixelTexture.h index 9df59ea92..dfd4b39ff 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPixelTexture.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPixelTexture.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlacement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlacement.h index 11e1f8995..9427b41a9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlacement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlacement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlanarBox.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlanarBox.h index b9da64df3..0930fc301 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlanarBox.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlanarBox.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlanarExtent.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlanarExtent.h index 67fa609db..992a9ddcf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlanarExtent.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlanarExtent.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlane.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlane.h index b56ba9d32..713861de0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlane.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlane.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlate.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlate.h index 7ebc21c16..c9e1f83fd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlate.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlate.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlateType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlateType.h index ecd8849ee..22756c61e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlateType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPlateType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPoint.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPoint.h index 1f6e1b0d4..841afc5b2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPoint.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPoint.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointByDistanceExpression.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointByDistanceExpression.h index c1f676b72..c77dda674 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointByDistanceExpression.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointByDistanceExpression.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointOnCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointOnCurve.h index 6a71305fa..68aa73d06 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointOnCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointOnCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointOnSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointOnSurface.h index d274898bd..6173cc55f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointOnSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPointOnSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolyLoop.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolyLoop.h index 8f57ff6ff..a07038196 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolyLoop.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolyLoop.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolygonalBoundedHalfSpace.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolygonalBoundedHalfSpace.h index cc080530b..e6882d177 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolygonalBoundedHalfSpace.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolygonalBoundedHalfSpace.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolygonalFaceSet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolygonalFaceSet.h index 7bece203e..66d0dbc6a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolygonalFaceSet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolygonalFaceSet.h @@ -1,15 +1,12 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" #include "IfcTessellatedFaceSet.h" namespace IFC4X3 { + class IFCQUERY_EXPORT IfcBoolean; class IFCQUERY_EXPORT IfcIndexedPolygonalFace; class IFCQUERY_EXPORT IfcPositiveInteger; //ENTITY @@ -40,13 +37,13 @@ namespace IFC4X3 // IfcTessellatedFaceSet ----------------------------------------------------------- // attributes: // shared_ptr m_Coordinates; - // shared_ptr m_Closed; //optional // inverse attributes: // std::vector > m_HasColours_inverse; // std::vector > m_HasTextures_inverse; // IfcPolygonalFaceSet ----------------------------------------------------------- // attributes: + shared_ptr m_Closed; //optional std::vector > m_Faces; std::vector > m_PnIndex; //optional }; diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolyline.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolyline.h index 12d5020be..dd2d8341f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolyline.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolyline.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolynomialCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolynomialCurve.h index 15bb32435..381aef2d8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolynomialCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPolynomialCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPort.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPort.h index 25bd62adc..669cef3f2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPort.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPort.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPositioningElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPositioningElement.h index 94342dd39..9125bfe2f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPositioningElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPositioningElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPostalAddress.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPostalAddress.h index 0bec031e7..7eb01d79c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPostalAddress.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPostalAddress.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedColour.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedColour.h index 2adc50667..2512a93df 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedColour.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedColour.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedCurveFont.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedCurveFont.h index 1f7701c69..c8f670c19 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedCurveFont.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedCurveFont.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedItem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedItem.h index 6c74f7720..95802fb0e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedItem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedItem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedProperties.h index 8bf565246..2f8e24aac 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedPropertySet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedPropertySet.h index 6325e4918..46eb9c544 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedPropertySet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedPropertySet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedTextFont.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedTextFont.h index ea5714be1..06e023185 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedTextFont.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPreDefinedTextFont.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationItem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationItem.h index 92e087377..7259c08ab 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationItem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationItem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationLayerAssignment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationLayerAssignment.h index 38ae1257e..cf37a882e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationLayerAssignment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationLayerAssignment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationLayerWithStyle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationLayerWithStyle.h index a01e52a6e..2d6dfbc5e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationLayerWithStyle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationLayerWithStyle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationStyle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationStyle.h index b41e0daaf..32309ce83 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationStyle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationStyle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationStyleAssignment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationStyleAssignment.h index a7890bf68..3476ec6ca 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationStyleAssignment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPresentationStyleAssignment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcedure.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcedure.h index b706a489d..904a5d636 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcedure.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcedure.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcedureType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcedureType.h index 9df9ffb8c..c120a7850 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcedureType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcedureType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcess.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcess.h index d426f449d..ee33d0247 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcess.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProcess.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProduct.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProduct.h index bde3df089..fe7c1791b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProduct.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProduct.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProductDefinitionShape.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProductDefinitionShape.h index 935ab1934..1d2b6dd8b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProductDefinitionShape.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProductDefinitionShape.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProductRepresentation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProductRepresentation.h index 4713bea35..faca7f705 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProductRepresentation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProductRepresentation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProfileDef.h index 3e03661d0..c706f605c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProfileProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProfileProperties.h index d34ab69f3..7afd4e405 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProfileProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProfileProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProject.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProject.h index 4ae011a6f..9642345d1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProject.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProject.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectLibrary.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectLibrary.h index b6666a6d9..3ee5d8887 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectLibrary.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectLibrary.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectOrder.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectOrder.h index f5e9c86a1..db47adbc4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectOrder.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectOrder.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectedCRS.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectedCRS.h index d8c60d149..e46bc473f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectedCRS.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectedCRS.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectionElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectionElement.h index a71379cdc..65cb8527d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectionElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProjectionElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProperty.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProperty.h index fc51b7c11..b00c5872f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProperty.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProperty.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyAbstraction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyAbstraction.h index ca24ae136..56508a68a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyAbstraction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyAbstraction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyBoundedValue.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyBoundedValue.h index 1b1834b09..88b27a6f4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyBoundedValue.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyBoundedValue.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyDefinition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyDefinition.h index 524fade3e..99d00f9d5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyDefinition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyDefinition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyDependencyRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyDependencyRelationship.h index 2a116b138..1a69ffcfb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyDependencyRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyDependencyRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyEnumeratedValue.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyEnumeratedValue.h index 6d1246c6c..23b79798b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyEnumeratedValue.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyEnumeratedValue.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyEnumeration.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyEnumeration.h index f3ee848cb..70d2c2fe3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyEnumeration.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyEnumeration.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyListValue.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyListValue.h index 022f0c476..8ea0ebc4c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyListValue.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyListValue.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyReferenceValue.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyReferenceValue.h index 0feca280c..b2e600cc7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyReferenceValue.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyReferenceValue.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySet.h index 01b67b0df..61053f229 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySetDefinition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySetDefinition.h index b890a9b2e..15e6000c9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySetDefinition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySetDefinition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySetTemplate.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySetTemplate.h index e3237c15b..8fbc7d5e9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySetTemplate.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySetTemplate.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySingleValue.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySingleValue.h index a952dd88d..1e828e3ee 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySingleValue.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertySingleValue.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTableValue.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTableValue.h index f46c2ea64..493cc199b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTableValue.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTableValue.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTemplate.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTemplate.h index fadb85e52..31437ea31 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTemplate.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTemplate.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTemplateDefinition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTemplateDefinition.h index 5e3897de3..52a6d4653 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTemplateDefinition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPropertyTemplateDefinition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDevice.h index 374b81685..e510895b4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceTrippingUnit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceTrippingUnit.h index 7f862dcff..9f6a8717b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceTrippingUnit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceTrippingUnit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceTrippingUnitType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceTrippingUnitType.h index 6e6ab9db9..f2a7846ad 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceTrippingUnitType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceTrippingUnitType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceType.h index af0b60db5..72fe6ec1b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcProtectiveDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPump.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPump.h index b96bf0046..e2769e349 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPump.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPump.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPumpType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPumpType.h index ca82bfffc..0717ec32b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPumpType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcPumpType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityArea.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityArea.h index 53165346f..fec5ed0d3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityArea.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityArea.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityCount.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityCount.h index 5f0767369..2e02c8add 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityCount.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityCount.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityLength.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityLength.h index cad1bfc8b..49626faba 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityLength.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityLength.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityNumber.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityNumber.h index 94d272979..1dc70b55e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityNumber.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityNumber.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantitySet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantitySet.h index c7bfc916b..f08896983 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantitySet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantitySet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityTime.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityTime.h index e1fcb3373..0f0fb0120 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityTime.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityTime.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityVolume.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityVolume.h index b7e2dbe3c..c0c34100b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityVolume.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityVolume.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityWeight.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityWeight.h index 7d19f5ef7..737932bee 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityWeight.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcQuantityWeight.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRail.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRail.h index 0a1e824ab..40aeb402e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRail.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRail.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailType.h index 33279b70b..e41fd0860 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailing.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailing.h index be3646622..fda3d0a53 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailing.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailing.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailingType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailingType.h index f69d4026b..d3149d190 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailingType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailingType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailway.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailway.h index 3b4d08aed..dea59abfb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailway.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailway.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailwayPart.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailwayPart.h index 07b19653f..2a7c44cca 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailwayPart.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRailwayPart.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRamp.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRamp.h index 2d5db13b7..7c594b2fa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRamp.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRamp.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampFlight.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampFlight.h index bd4d8ee11..615b7b870 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampFlight.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampFlight.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampFlightType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampFlightType.h index 1b9991d85..dfea4a1de 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampFlightType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampFlightType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampType.h index 1853e5cd6..3e8705fc0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRampType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRationalBSplineCurveWithKnots.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRationalBSplineCurveWithKnots.h index 36f49fb72..cb91925d4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRationalBSplineCurveWithKnots.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRationalBSplineCurveWithKnots.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRationalBSplineSurfaceWithKnots.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRationalBSplineSurfaceWithKnots.h index 02d9e8fdf..16d0263e6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRationalBSplineSurfaceWithKnots.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRationalBSplineSurfaceWithKnots.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangleHollowProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangleHollowProfileDef.h index 2b2f96465..28de5ab7c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangleHollowProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangleHollowProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangleProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangleProfileDef.h index c5e5f07b1..b0ec3dec0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangleProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangleProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangularPyramid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangularPyramid.h index 116e0f6dd..6dca628bd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangularPyramid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangularPyramid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangularTrimmedSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangularTrimmedSurface.h index fb403a9f1..d19fd0ac5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangularTrimmedSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRectangularTrimmedSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRecurrencePattern.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRecurrencePattern.h index 79c1a4bbb..0bd672766 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRecurrencePattern.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRecurrencePattern.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReference.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReference.h index 68ea4fc52..f54adbbcd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReference.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReference.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReferent.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReferent.h index a4c1d8a13..55d9facc3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReferent.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReferent.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRegularTimeSeries.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRegularTimeSeries.h index 8505980cb..0906693cf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRegularTimeSeries.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRegularTimeSeries.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcedSoil.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcedSoil.h index e4c10b2c9..f6f8f5e8d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcedSoil.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcedSoil.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcementBarProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcementBarProperties.h index ae6156fd3..5b0521c45 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcementBarProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcementBarProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcementDefinitionProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcementDefinitionProperties.h index 9637d3fbb..7257e63cc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcementDefinitionProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcementDefinitionProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingBar.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingBar.h index ae42447d0..cdbcbe097 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingBar.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingBar.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingBarType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingBarType.h index 05343c42f..8c2ee5054 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingBarType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingBarType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingElement.h index 0427b7511..0887df128 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingElementType.h index 0100eb860..9c490f373 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingMesh.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingMesh.h index ab024a4bf..55bf40ab8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingMesh.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingMesh.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingMeshType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingMeshType.h index d18cc0b85..41efc1575 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingMeshType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcingMeshType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAdheresToElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAdheresToElement.h index 4744a43aa..3eee04e01 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAdheresToElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAdheresToElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAggregates.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAggregates.h index acb24f316..48f7ff545 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAggregates.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAggregates.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssigns.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssigns.h index ef8242bf6..7d19f3b29 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssigns.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssigns.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -11,7 +7,7 @@ namespace IFC4X3 { class IFCQUERY_EXPORT IfcObjectDefinition; - class IFCQUERY_EXPORT IfcObjectTypeEnum; + class IFCQUERY_EXPORT IfcStrippedOptional; //ENTITY class IFCQUERY_EXPORT IfcRelAssigns : public IfcRelationship { @@ -40,6 +36,6 @@ namespace IFC4X3 // IfcRelAssigns ----------------------------------------------------------- // attributes: std::vector > m_RelatedObjects; - shared_ptr m_RelatedObjectsType; //optional + shared_ptr m_RelatedObjectsType; //optional }; } diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToActor.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToActor.h index d3c2af2b9..86b400f1f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToActor.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToActor.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -40,7 +36,7 @@ namespace IFC4X3 // IfcRelAssigns ----------------------------------------------------------- // attributes: // std::vector > m_RelatedObjects; - // shared_ptr m_RelatedObjectsType; //optional + // shared_ptr m_RelatedObjectsType; //optional // IfcRelAssignsToActor ----------------------------------------------------------- // attributes: diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToControl.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToControl.h index 411caf244..a6d835844 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToControl.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToControl.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -39,7 +35,7 @@ namespace IFC4X3 // IfcRelAssigns ----------------------------------------------------------- // attributes: // std::vector > m_RelatedObjects; - // shared_ptr m_RelatedObjectsType; //optional + // shared_ptr m_RelatedObjectsType; //optional // IfcRelAssignsToControl ----------------------------------------------------------- // attributes: diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToGroup.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToGroup.h index 7c8736c22..6a2c1044c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToGroup.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToGroup.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -39,7 +35,7 @@ namespace IFC4X3 // IfcRelAssigns ----------------------------------------------------------- // attributes: // std::vector > m_RelatedObjects; - // shared_ptr m_RelatedObjectsType; //optional + // shared_ptr m_RelatedObjectsType; //optional // IfcRelAssignsToGroup ----------------------------------------------------------- // attributes: diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToGroupByFactor.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToGroupByFactor.h index e98c05e45..09865e6b8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToGroupByFactor.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToGroupByFactor.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -39,7 +35,7 @@ namespace IFC4X3 // IfcRelAssigns ----------------------------------------------------------- // attributes: // std::vector > m_RelatedObjects; - // shared_ptr m_RelatedObjectsType; //optional + // shared_ptr m_RelatedObjectsType; //optional // IfcRelAssignsToGroup ----------------------------------------------------------- // attributes: diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToProcess.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToProcess.h index 3528ac9e9..ceae7f650 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToProcess.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToProcess.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -40,7 +36,7 @@ namespace IFC4X3 // IfcRelAssigns ----------------------------------------------------------- // attributes: // std::vector > m_RelatedObjects; - // shared_ptr m_RelatedObjectsType; //optional + // shared_ptr m_RelatedObjectsType; //optional // IfcRelAssignsToProcess ----------------------------------------------------------- // attributes: diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToProduct.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToProduct.h index 8e8ec75d4..915c1d60c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToProduct.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToProduct.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -39,7 +35,7 @@ namespace IFC4X3 // IfcRelAssigns ----------------------------------------------------------- // attributes: // std::vector > m_RelatedObjects; - // shared_ptr m_RelatedObjectsType; //optional + // shared_ptr m_RelatedObjectsType; //optional // IfcRelAssignsToProduct ----------------------------------------------------------- // attributes: diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToResource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToResource.h index b988353d7..d9318ee09 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToResource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssignsToResource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -39,7 +35,7 @@ namespace IFC4X3 // IfcRelAssigns ----------------------------------------------------------- // attributes: // std::vector > m_RelatedObjects; - // shared_ptr m_RelatedObjectsType; //optional + // shared_ptr m_RelatedObjectsType; //optional // IfcRelAssignsToResource ----------------------------------------------------------- // attributes: diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociates.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociates.h index 541f626a5..ac23aca43 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociates.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociates.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesApproval.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesApproval.h index 1b3ada9e2..0ef8791be 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesApproval.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesApproval.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesClassification.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesClassification.h index 80f0e9046..7df449217 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesClassification.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesClassification.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesConstraint.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesConstraint.h index 6c859f823..bdc535f16 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesConstraint.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesConstraint.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesDocument.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesDocument.h index ab41fb6a4..63f2a42bb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesDocument.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesDocument.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesLibrary.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesLibrary.h index 070abbc66..102551734 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesLibrary.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesLibrary.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesMaterial.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesMaterial.h index b686c7d35..8dea550a4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesMaterial.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesMaterial.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesProfileDef.h index f17ebc56c..d85d9ac92 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelAssociatesProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnects.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnects.h index 6a99866cb..299617b1b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnects.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnects.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsElements.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsElements.h index 793c64867..3185005d0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsElements.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsElements.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPathElements.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPathElements.h index c48f1813f..9ff1cec00 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPathElements.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPathElements.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPortToElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPortToElement.h index 203d108d5..5aedbf730 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPortToElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPortToElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPorts.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPorts.h index f0b5d4fe8..ce6956958 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPorts.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsPorts.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsStructuralActivity.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsStructuralActivity.h index 1ec08c15b..ae3d8232d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsStructuralActivity.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsStructuralActivity.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsStructuralMember.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsStructuralMember.h index 54c00bd8f..074cf6282 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsStructuralMember.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsStructuralMember.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsWithEccentricity.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsWithEccentricity.h index 56f24db81..9cd9a0b2a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsWithEccentricity.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsWithEccentricity.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsWithRealizingElements.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsWithRealizingElements.h index a0dcc25be..68b1c33df 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsWithRealizingElements.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelConnectsWithRealizingElements.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelContainedInSpatialStructure.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelContainedInSpatialStructure.h index b4547ae77..6f0a23a3d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelContainedInSpatialStructure.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelContainedInSpatialStructure.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelCoversBldgElements.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelCoversBldgElements.h index 5203fb239..389b1783c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelCoversBldgElements.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelCoversBldgElements.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelCoversSpaces.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelCoversSpaces.h index 6f07a09aa..8bcec4cd6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelCoversSpaces.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelCoversSpaces.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDeclares.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDeclares.h index d0ee65ea1..3fb280ac7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDeclares.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDeclares.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDecomposes.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDecomposes.h index a3393a045..8d8c64dd1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDecomposes.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDecomposes.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefines.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefines.h index 298707009..acb6cf881 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefines.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefines.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByObject.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByObject.h index 953a590d0..46515036a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByObject.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByObject.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByProperties.h index f8ac4e502..f1d383312 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByTemplate.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByTemplate.h index 7a4f32a6e..e7b9a4ba5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByTemplate.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByTemplate.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByType.h index 4f77becb9..cb46cb0a4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelDefinesByType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelFillsElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelFillsElement.h index 14169c309..993097f5b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelFillsElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelFillsElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelFlowControlElements.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelFlowControlElements.h index f6d4c1f83..5beeebbe9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelFlowControlElements.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelFlowControlElements.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelInterferesElements.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelInterferesElements.h index 5a85f437c..93184db11 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelInterferesElements.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelInterferesElements.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -12,9 +8,9 @@ namespace IFC4X3 { class IFCQUERY_EXPORT IfcInterferenceSelect; class IFCQUERY_EXPORT IfcConnectionGeometry; - class IFCQUERY_EXPORT IfcSpatialZone; class IFCQUERY_EXPORT IfcIdentifier; class IFCQUERY_EXPORT IfcLogical; + class IFCQUERY_EXPORT IfcSpatialZone; //ENTITY class IFCQUERY_EXPORT IfcRelInterferesElements : public IfcRelConnects { @@ -47,8 +43,8 @@ namespace IFC4X3 shared_ptr m_RelatingElement; shared_ptr m_RelatedElement; shared_ptr m_InterferenceGeometry; //optional - shared_ptr m_InterferenceSpace; //optional shared_ptr m_InterferenceType; //optional shared_ptr m_ImpliedOrder; + shared_ptr m_InterferenceSpace; //optional }; } diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelNests.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelNests.h index ef601ee9e..32e90127e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelNests.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelNests.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelPositions.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelPositions.h index 4729c8def..cfdb7ab5b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelPositions.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelPositions.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelProjectsElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelProjectsElement.h index a8d0e4ff4..a3df379cb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelProjectsElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelProjectsElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelReferencedInSpatialStructure.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelReferencedInSpatialStructure.h index 77f75f92f..78fd251d9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelReferencedInSpatialStructure.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelReferencedInSpatialStructure.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSequence.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSequence.h index 131e1c5f9..913a98888 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSequence.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSequence.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelServicesBuildings.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelServicesBuildings.h index 99e3a3605..8275fd111 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelServicesBuildings.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelServicesBuildings.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary.h index 7fcc6ce69..659d36006 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary1stLevel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary1stLevel.h index 5f578f40b..8520f49e7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary1stLevel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary1stLevel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary2ndLevel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary2ndLevel.h index 45f09c2ec..6bf9ba361 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary2ndLevel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelSpaceBoundary2ndLevel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelVoidsElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelVoidsElement.h index 11d9b3589..73952d7b6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelVoidsElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelVoidsElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelationship.h index c93afd26d..8762d7acf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReparametrisedCompositeCurveSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReparametrisedCompositeCurveSegment.h index 9955b9146..5066beef8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReparametrisedCompositeCurveSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReparametrisedCompositeCurveSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentation.h index b720a55e0..4873d10f5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationContext.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationContext.h index 0b97907c4..d12b2ef27 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationContext.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationContext.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationItem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationItem.h index 33047b4a9..567712463 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationItem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationItem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationMap.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationMap.h index fb5d69d1a..2b825565e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationMap.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRepresentationMap.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResource.h index 8ded91669..75438173d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceApprovalRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceApprovalRelationship.h index d7cb01cf8..9f3d77129 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceApprovalRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceApprovalRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceConstraintRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceConstraintRelationship.h index 4149deb4d..120d7955f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceConstraintRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceConstraintRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceLevelRelationship.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceLevelRelationship.h index 73cd19691..8c38a8257 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceLevelRelationship.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceLevelRelationship.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceTime.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceTime.h index d589c7280..cc517d8da 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceTime.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcResourceTime.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRevolvedAreaSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRevolvedAreaSolid.h index 8006e1638..9bfa14243 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRevolvedAreaSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRevolvedAreaSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRevolvedAreaSolidTapered.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRevolvedAreaSolidTapered.h index 5d81364ef..7214e67f4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRevolvedAreaSolidTapered.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRevolvedAreaSolidTapered.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRightCircularCone.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRightCircularCone.h index 981473041..25d2c912f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRightCircularCone.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRightCircularCone.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRightCircularCylinder.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRightCircularCylinder.h index 6228cd2a2..dc445c9e0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRightCircularCylinder.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRightCircularCylinder.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoad.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoad.h index 7eee02c04..1a7519109 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoad.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoad.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoadPart.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoadPart.h index 621849df6..aa316b913 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoadPart.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoadPart.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoof.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoof.h index 97786fd85..64fb1f1cd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoof.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoof.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoofType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoofType.h index 56c05a590..7e7607a4a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoofType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoofType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoot.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoot.h index acb681790..246d3328c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoot.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoot.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoundedRectangleProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoundedRectangleProfileDef.h index e0acb8adb..1ae4087e7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoundedRectangleProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcRoundedRectangleProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSIUnit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSIUnit.h index 5fcdee27a..55e275d70 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSIUnit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSIUnit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSanitaryTerminal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSanitaryTerminal.h index 2c9d80b6f..a0463d047 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSanitaryTerminal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSanitaryTerminal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSanitaryTerminalType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSanitaryTerminalType.h index c002b2c53..385dd1006 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSanitaryTerminalType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSanitaryTerminalType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSchedulingTime.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSchedulingTime.h index 6063870ae..d439323ba 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSchedulingTime.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSchedulingTime.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSeamCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSeamCurve.h index 1b193834e..f70ff5724 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSeamCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSeamCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSecondOrderPolynomialSpiral.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSecondOrderPolynomialSpiral.h index 950aba256..753af7b46 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSecondOrderPolynomialSpiral.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSecondOrderPolynomialSpiral.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionProperties.h index 2446c14c2..2e881057b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionReinforcementProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionReinforcementProperties.h index f477f341c..f3f3b95e4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionReinforcementProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionReinforcementProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSolid.h index 8df3704bb..0b5d784c6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSolidHorizontal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSolidHorizontal.h index 4eefd9a29..d843cf0d9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSolidHorizontal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSolidHorizontal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSpine.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSpine.h index b3c922975..eb2657ba5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSpine.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSpine.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSurface.h index 624901074..5ffd7ad94 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSectionedSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSegment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSegment.h index 3a460120a..d219152a8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSegment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSegment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSegmentedReferenceCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSegmentedReferenceCurve.h index f568e6898..ec2215d02 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSegmentedReferenceCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSegmentedReferenceCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSensor.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSensor.h index 85f4ff043..e380bc1ab 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSensor.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSensor.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSensorType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSensorType.h index e6682e1bf..51d9b3673 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSensorType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSensorType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSeventhOrderPolynomialSpiral.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSeventhOrderPolynomialSpiral.h index 09b74f832..b8f95bd67 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSeventhOrderPolynomialSpiral.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSeventhOrderPolynomialSpiral.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShadingDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShadingDevice.h index a1a0aec97..fc209ea50 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShadingDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShadingDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShadingDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShadingDeviceType.h index 2b7c7e104..bac4c34e0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShadingDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShadingDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeAspect.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeAspect.h index 2fa9271d8..038527477 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeAspect.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeAspect.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeModel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeModel.h index 2307555c9..a1410de7e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeModel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeModel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeRepresentation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeRepresentation.h index 78894a53d..3b12cd2fc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeRepresentation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShapeRepresentation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShellBasedSurfaceModel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShellBasedSurfaceModel.h index fd3e01e37..ee17cdbff 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShellBasedSurfaceModel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcShellBasedSurfaceModel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSign.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSign.h index ef32e2562..cda91343b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSign.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSign.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignType.h index 411d3ab63..562673bd0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignal.h index bd19b098b..4320abcd6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignalType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignalType.h index 5b858cd94..da65f5b8e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignalType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSignalType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSimpleProperty.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSimpleProperty.h index 567124ec9..caa7a5c28 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSimpleProperty.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSimpleProperty.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSimplePropertyTemplate.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSimplePropertyTemplate.h index 975e0ec22..18e305ebd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSimplePropertyTemplate.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSimplePropertyTemplate.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSineSpiral.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSineSpiral.h index f9378fcbb..bc6d225b1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSineSpiral.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSineSpiral.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSite.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSite.h index e87ee8c1d..3cabcf0d2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSite.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSite.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlab.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlab.h index d10f162f1..5c01e8992 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlab.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlab.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlabType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlabType.h index 5618357fe..38819b9a1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlabType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlabType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlippageConnectionCondition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlippageConnectionCondition.h index 24fff80cf..f19aa56db 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlippageConnectionCondition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSlippageConnectionCondition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolarDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolarDevice.h index 830f7f33c..407d5ecda 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolarDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolarDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolarDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolarDeviceType.h index 0030f9b1e..5c04a6079 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolarDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolarDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolidModel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolidModel.h index 4aa198aae..63cef3e06 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolidModel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSolidModel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpace.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpace.h index 2cbe01a64..8eedf59af 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpace.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpace.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceHeater.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceHeater.h index a0684683c..a912d7425 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceHeater.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceHeater.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceHeaterType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceHeaterType.h index 5425515fd..291939a03 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceHeaterType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceHeaterType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceType.h index bb8c3be8e..a5f1a0120 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpaceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialElement.h index c954b3e2d..7342cd155 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialElementType.h index 1a59fbd74..cf2670b66 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialStructureElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialStructureElement.h index f7401f21f..05ee2b026 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialStructureElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialStructureElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialStructureElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialStructureElementType.h index ce09f95bf..e3184bc60 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialStructureElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialStructureElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialZone.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialZone.h index 039f3c66b..af05d07c8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialZone.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialZone.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialZoneType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialZoneType.h index f3a252ebf..a7877d28a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialZoneType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpatialZoneType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSphere.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSphere.h index 8d775dd6b..25153b176 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSphere.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSphere.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSphericalSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSphericalSurface.h index 592225f08..ad8079d04 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSphericalSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSphericalSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpiral.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpiral.h index e2c706f1b..07118a43d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpiral.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSpiral.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStackTerminal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStackTerminal.h index 2031d10b5..5b19ddbd5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStackTerminal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStackTerminal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStackTerminalType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStackTerminalType.h index 610ba36e2..52ab70b5c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStackTerminalType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStackTerminalType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStair.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStair.h index e4c694624..d52574399 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStair.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStair.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairFlight.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairFlight.h index 4d166b689..a67b1f34b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairFlight.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairFlight.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairFlightType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairFlightType.h index 9693bd350..89cccde13 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairFlightType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairFlightType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairType.h index c4103ab18..a3277e2f7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStairType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStrippedOptional.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStrippedOptional.h new file mode 100644 index 000000000..47d83bc51 --- /dev/null +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStrippedOptional.h @@ -0,0 +1,25 @@ +/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ + +#pragma once +#include +#include +#include +#include +#include "ifcpp/model/GlobalDefines.h" +#include "ifcpp/model/BasicTypes.h" +#include "ifcpp/model/BuildingObject.h" + +namespace IFC4X3 +{ + // TYPE IfcStrippedOptional = BOOLEAN; + class IFCQUERY_EXPORT IfcStrippedOptional : public BuildingObject + { + public: + IfcStrippedOptional() = default; + IfcStrippedOptional( bool value ); + virtual uint32_t classID() const { return 1805707277; } + virtual void getStepParameter( std::stringstream& stream, bool is_select_type = false ) const; + static shared_ptr createObjectFromSTEP( const std::string& arg, const std::map >& map, std::stringstream& errorStream ); + bool m_value; + }; +} diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralAction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralAction.h index 6966873aa..ef128b7b9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralAction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralAction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralActivity.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralActivity.h index 22cc3e974..89072173c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralActivity.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralActivity.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralAnalysisModel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralAnalysisModel.h index 624d32513..9eb086e12 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralAnalysisModel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralAnalysisModel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralConnection.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralConnection.h index af6a92b3b..a6b2f4769 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralConnection.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralConnection.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralConnectionCondition.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralConnectionCondition.h index 7b31ead07..c5a6efb94 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralConnectionCondition.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralConnectionCondition.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveAction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveAction.h index b6456a7f8..2c8602666 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveAction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveAction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveConnection.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveConnection.h index 1449ef310..2b5310825 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveConnection.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveConnection.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveMember.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveMember.h index 3bef56f4b..c857124c9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveMember.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveMember.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveMemberVarying.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveMemberVarying.h index ce6b368d1..8bb9d0951 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveMemberVarying.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveMemberVarying.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveReaction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveReaction.h index 6517e815d..db66da705 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveReaction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralCurveReaction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralItem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralItem.h index 4138b9596..9982f52d8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralItem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralItem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLinearAction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLinearAction.h index 615f827f6..fa1f83902 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLinearAction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLinearAction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoad.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoad.h index 981d85c45..dfbf55593 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoad.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoad.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadCase.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadCase.h index 8bd8159e3..c1485c9a8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadCase.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadCase.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadConfiguration.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadConfiguration.h index 40519a16a..b90a4d176 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadConfiguration.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadConfiguration.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadGroup.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadGroup.h index c7aae141f..9fa18f4ee 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadGroup.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadGroup.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadLinearForce.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadLinearForce.h index dd5f46d28..0550f4143 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadLinearForce.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadLinearForce.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadOrResult.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadOrResult.h index 3478cca1a..8556bcd19 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadOrResult.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadOrResult.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadPlanarForce.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadPlanarForce.h index 42332c31b..4b2b0bebc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadPlanarForce.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadPlanarForce.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleDisplacement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleDisplacement.h index 69d2ffebc..d8028cd00 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleDisplacement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleDisplacement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleDisplacementDistortion.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleDisplacementDistortion.h index d166d0043..01be89817 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleDisplacementDistortion.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleDisplacementDistortion.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleForce.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleForce.h index bb6a91bb1..5175ceda6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleForce.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleForce.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleForceWarping.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleForceWarping.h index ea29f503d..b6e6679fb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleForceWarping.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadSingleForceWarping.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadStatic.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadStatic.h index a7407f37d..610c37c5a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadStatic.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadStatic.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadTemperature.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadTemperature.h index 3acee69e5..57e08502f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadTemperature.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralLoadTemperature.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralMember.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralMember.h index 1cd7f5e33..d9af73a2d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralMember.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralMember.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPlanarAction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPlanarAction.h index 1d5b178b4..dcceb4c49 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPlanarAction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPlanarAction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointAction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointAction.h index ee0aad3ca..36cf7d75b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointAction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointAction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointConnection.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointConnection.h index b544ed65a..d3282dd80 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointConnection.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointConnection.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointReaction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointReaction.h index 13bf0baa0..7f208e41e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointReaction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralPointReaction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralReaction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralReaction.h index 83bc34de0..b5f6d596e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralReaction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralReaction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralResultGroup.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralResultGroup.h index edd92a0d1..5e81479ea 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralResultGroup.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralResultGroup.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceAction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceAction.h index eb06057f5..60d48b59a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceAction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceAction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceConnection.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceConnection.h index 362b91d56..b3d96e2e0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceConnection.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceConnection.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceMember.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceMember.h index 7ebc6804e..6f7eaf5a7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceMember.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceMember.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceMemberVarying.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceMemberVarying.h index c91c0af76..cbc26b86f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceMemberVarying.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceMemberVarying.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceReaction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceReaction.h index 82e44f272..0c3a08e09 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceReaction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStructuralSurfaceReaction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyleModel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyleModel.h index 4529cd3b0..c966e3ce2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyleModel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyleModel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyledItem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyledItem.h index 485f7425a..dfc8fca92 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyledItem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyledItem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyledRepresentation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyledRepresentation.h index 693a6ef98..40c39d371 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyledRepresentation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcStyledRepresentation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubContractResource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubContractResource.h index e8804dfd9..1d2f0bb51 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubContractResource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubContractResource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubContractResourceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubContractResourceType.h index 556b8271d..fb3d28ce5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubContractResourceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubContractResourceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubedge.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubedge.h index faf87452b..264ae50bd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubedge.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSubedge.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurface.h index 8e9c78854..8d3f9caf1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceCurve.h index 09ad582ab..a4634e022 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceCurveSweptAreaSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceCurveSweptAreaSolid.h index 6280b7d32..6cbe55847 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceCurveSweptAreaSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceCurveSweptAreaSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceFeature.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceFeature.h index 8dab22031..8913947ed 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceFeature.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceFeature.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceOfLinearExtrusion.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceOfLinearExtrusion.h index c5159426f..97bed1413 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceOfLinearExtrusion.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceOfLinearExtrusion.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceOfRevolution.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceOfRevolution.h index 75d535554..03636664f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceOfRevolution.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceOfRevolution.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceReinforcementArea.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceReinforcementArea.h index a7efd026b..c842914d3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceReinforcementArea.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceReinforcementArea.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyle.h index d19d0c007..eb57428f3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleLighting.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleLighting.h index 0d88890d1..dade663ce 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleLighting.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleLighting.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleRefraction.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleRefraction.h index 4538ef45d..aa03f41a5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleRefraction.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleRefraction.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleRendering.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleRendering.h index fc9517445..c91cbc6da 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleRendering.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleRendering.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleShading.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleShading.h index 17960c740..1afdd978f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleShading.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleShading.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleWithTextures.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleWithTextures.h index 8b16c1b9f..cb9550042 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleWithTextures.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceStyleWithTextures.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceTexture.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceTexture.h index 3b35ea718..16ab180cd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceTexture.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSurfaceTexture.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptAreaSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptAreaSolid.h index 0db49b81a..e53b81ec2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptAreaSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptAreaSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptDiskSolid.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptDiskSolid.h index 38f12fcdb..b24b04f00 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptDiskSolid.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptDiskSolid.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptDiskSolidPolygonal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptDiskSolidPolygonal.h index 84571a5fb..5e1a55178 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptDiskSolidPolygonal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptDiskSolidPolygonal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptSurface.h index e8b06be09..653ceb794 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSweptSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSwitchingDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSwitchingDevice.h index 4dbd44c58..3b0ef592b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSwitchingDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSwitchingDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSwitchingDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSwitchingDeviceType.h index 36bda0537..e731df920 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSwitchingDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSwitchingDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystem.h index 12ba08aec..38ecf6bc2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystemFurnitureElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystemFurnitureElement.h index 0592f10e5..5550ac592 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystemFurnitureElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystemFurnitureElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystemFurnitureElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystemFurnitureElementType.h index 7364001ed..49fe021e9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystemFurnitureElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcSystemFurnitureElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTShapeProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTShapeProfileDef.h index a3116a2a8..b807cd588 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTShapeProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTShapeProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTable.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTable.h index db607fbb7..b3c116fee 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTable.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTable.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTableColumn.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTableColumn.h index 087673774..67fe02ccb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTableColumn.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTableColumn.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTableRow.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTableRow.h index 9360fd6f0..cb709ceb8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTableRow.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTableRow.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTank.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTank.h index c8db93825..a87217536 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTank.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTank.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTankType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTankType.h index 9ff0a13b6..73edb60df 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTankType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTankType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTask.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTask.h index 506dd15c3..bb68ae378 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTask.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTask.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskTime.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskTime.h index c70be1efd..4e91d5d63 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskTime.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskTime.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskTimeRecurring.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskTimeRecurring.h index a2c98bfcd..f477bad95 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskTimeRecurring.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskTimeRecurring.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskType.h index 519193d9d..fa818eb1a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTaskType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTelecomAddress.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTelecomAddress.h index 35ac24c41..210d4754c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTelecomAddress.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTelecomAddress.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendon.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendon.h index 967cc760a..e2df94bc5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendon.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendon.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonAnchor.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonAnchor.h index 396541bc9..3787c256d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonAnchor.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonAnchor.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonAnchorType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonAnchorType.h index 883e9a1f1..057d2722a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonAnchorType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonAnchorType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonConduit.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonConduit.h index cc2861054..0c2adaa6e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonConduit.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonConduit.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonConduitType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonConduitType.h index 649ce41ef..67270ee15 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonConduitType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonConduitType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonType.h index 5b4319c6e..8e42e27c1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTendonType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTessellatedFaceSet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTessellatedFaceSet.h index 17322d92e..319d5e411 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTessellatedFaceSet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTessellatedFaceSet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -12,7 +8,6 @@ namespace IFC4X3 { class IFCQUERY_EXPORT IfcCartesianPointList3D; - class IFCQUERY_EXPORT IfcBoolean; class IFCQUERY_EXPORT IfcIndexedColourMap; class IFCQUERY_EXPORT IfcIndexedTextureMap; //ENTITY @@ -25,7 +20,7 @@ namespace IFC4X3 virtual void getStepParameter( std::stringstream& stream, bool is_select_type = false ) const; virtual void readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ); virtual void setInverseCounterparts( shared_ptr ptr_self ); - virtual uint8_t getNumAttributes() const { return 2; } + virtual uint8_t getNumAttributes() const { return 1; } virtual void getAttributes( std::vector > >& vec_attributes ) const; virtual void getAttributesInverse( std::vector > >& vec_attributes ) const; virtual void unlinkFromInverseCounterparts(); @@ -43,7 +38,6 @@ namespace IFC4X3 // IfcTessellatedFaceSet ----------------------------------------------------------- // attributes: shared_ptr m_Coordinates; - shared_ptr m_Closed; //optional // inverse attributes: std::vector > m_HasColours_inverse; std::vector > m_HasTextures_inverse; diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTessellatedItem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTessellatedItem.h index 76f2512a1..8de0f1999 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTessellatedItem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTessellatedItem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextLiteral.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextLiteral.h index 3176ae892..5ccdbf611 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextLiteral.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextLiteral.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextLiteralWithExtent.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextLiteralWithExtent.h index 84a84548b..4f54e8796 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextLiteralWithExtent.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextLiteralWithExtent.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyle.h index f068fe7a8..28eb7b514 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleFontModel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleFontModel.h index bdf890bfb..963725508 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleFontModel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleFontModel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleForDefinedFont.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleForDefinedFont.h index f809d1a1c..705d66aba 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleForDefinedFont.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleForDefinedFont.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleTextModel.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleTextModel.h index 5016c1b66..92067c829 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleTextModel.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextStyleTextModel.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinate.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinate.h index 0477c4ac6..225f325db 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinate.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinate.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateGenerator.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateGenerator.h index 70353e40e..5412faab3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateGenerator.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateGenerator.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateIndices.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateIndices.h index 43d1cbe41..6a59dd9e5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateIndices.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateIndices.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateIndicesWithVoids.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateIndicesWithVoids.h index 45ff0ec90..db826c9ba 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateIndicesWithVoids.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureCoordinateIndicesWithVoids.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureMap.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureMap.h index 3b7c20df0..741fe2d79 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureMap.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureMap.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureVertex.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureVertex.h index 38db493ac..ec20fd0b4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureVertex.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureVertex.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureVertexList.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureVertexList.h index 774835fcf..c1e36f791 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureVertexList.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTextureVertexList.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcThirdOrderPolynomialSpiral.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcThirdOrderPolynomialSpiral.h index b15d3c1df..a0126a0c3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcThirdOrderPolynomialSpiral.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcThirdOrderPolynomialSpiral.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimePeriod.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimePeriod.h index 6f618b739..f7a04957e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimePeriod.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimePeriod.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimeSeries.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimeSeries.h index 313d5b54f..9f3b624d7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimeSeries.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimeSeries.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimeSeriesValue.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimeSeriesValue.h index dbadaacc9..7a4d6b361 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimeSeriesValue.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTimeSeriesValue.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTopologicalRepresentationItem.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTopologicalRepresentationItem.h index 724e832ef..dff6437a5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTopologicalRepresentationItem.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTopologicalRepresentationItem.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTopologyRepresentation.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTopologyRepresentation.h index 54daeb818..3ec743912 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTopologyRepresentation.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTopologyRepresentation.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcToroidalSurface.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcToroidalSurface.h index d6d867311..ec114e7c2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcToroidalSurface.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcToroidalSurface.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrackElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrackElement.h index 6b4d2923a..2bad4655c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrackElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrackElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrackElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrackElementType.h index 8ebd5c683..0c4a1e6a3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrackElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrackElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransformer.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransformer.h index 751257956..6063dab99 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransformer.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransformer.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransformerType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransformerType.h index 331cd5901..b80982536 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransformerType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransformerType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportElement.h index b1613bc87..3d5db92ed 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportElementType.h index 31cb799d3..6dcd270ff 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportationDevice.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportationDevice.h index cc0585dbf..8d0447aa9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportationDevice.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportationDevice.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportationDeviceType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportationDeviceType.h index 8a0bd758b..f9fbb39c2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportationDeviceType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTransportationDeviceType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrapeziumProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrapeziumProfileDef.h index fbf37ef5b..8d7884785 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrapeziumProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrapeziumProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTriangulatedFaceSet.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTriangulatedFaceSet.h index 729db7d5d..33451aea7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTriangulatedFaceSet.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTriangulatedFaceSet.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -11,6 +7,7 @@ namespace IFC4X3 { class IFCQUERY_EXPORT IfcParameterValue; + class IFCQUERY_EXPORT IfcBoolean; class IFCQUERY_EXPORT IfcPositiveInteger; //ENTITY class IFCQUERY_EXPORT IfcTriangulatedFaceSet : public IfcTessellatedFaceSet @@ -40,7 +37,6 @@ namespace IFC4X3 // IfcTessellatedFaceSet ----------------------------------------------------------- // attributes: // shared_ptr m_Coordinates; - // shared_ptr m_Closed; //optional // inverse attributes: // std::vector > m_HasColours_inverse; // std::vector > m_HasTextures_inverse; @@ -48,6 +44,7 @@ namespace IFC4X3 // IfcTriangulatedFaceSet ----------------------------------------------------------- // attributes: std::vector > > m_Normals; //optional + shared_ptr m_Closed; //optional std::vector > > m_CoordIndex; std::vector > m_PnIndex; //optional }; diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTriangulatedIrregularNetwork.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTriangulatedIrregularNetwork.h index f4bea7155..529a7c0c9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTriangulatedIrregularNetwork.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTriangulatedIrregularNetwork.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" @@ -39,7 +35,6 @@ namespace IFC4X3 // IfcTessellatedFaceSet ----------------------------------------------------------- // attributes: // shared_ptr m_Coordinates; - // shared_ptr m_Closed; //optional // inverse attributes: // std::vector > m_HasColours_inverse; // std::vector > m_HasTextures_inverse; @@ -47,6 +42,7 @@ namespace IFC4X3 // IfcTriangulatedFaceSet ----------------------------------------------------------- // attributes: // std::vector > > m_Normals; //optional + // shared_ptr m_Closed; //optional // std::vector > > m_CoordIndex; // std::vector > m_PnIndex; //optional diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrimmedCurve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrimmedCurve.h index 5a46d5dc2..8247a0191 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrimmedCurve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTrimmedCurve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTubeBundle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTubeBundle.h index 7db80c2c1..04f56f5bb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTubeBundle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTubeBundle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTubeBundleType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTubeBundleType.h index ed1d008e8..d5f1b7542 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTubeBundleType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTubeBundleType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeObject.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeObject.h index 2ade7a6cd..f74fb144d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeObject.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeObject.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeProcess.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeProcess.h index 3ebcc987b..2655af34e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeProcess.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeProcess.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeProduct.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeProduct.h index 6a8afb7c1..007634001 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeProduct.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeProduct.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeResource.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeResource.h index 5c211dc05..e53eadfde 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeResource.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcTypeResource.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUShapeProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUShapeProfileDef.h index 72a670397..68421217f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUShapeProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUShapeProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitAssignment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitAssignment.h index 4b5c18956..600a320cd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitAssignment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitAssignment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryControlElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryControlElement.h index 032ca0a09..485f33bc0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryControlElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryControlElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryControlElementType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryControlElementType.h index 437732d05..12cec9d6b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryControlElementType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryControlElementType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryEquipment.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryEquipment.h index 0c6d56acb..f0b95bf2a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryEquipment.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryEquipment.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryEquipmentType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryEquipmentType.h index 540155c05..c4a66b2fb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryEquipmentType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcUnitaryEquipmentType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcValve.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcValve.h index bd8fbc376..93595b6a4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcValve.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcValve.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcValveType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcValveType.h index 39d7d73f4..3d233de40 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcValveType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcValveType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVector.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVector.h index 13d870131..ebad2b8a2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVector.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVector.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVehicle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVehicle.h index 0ade54681..7b05d5724 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVehicle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVehicle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVehicleType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVehicleType.h index 965cafb7c..2a52630e6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVehicleType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVehicleType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertex.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertex.h index e2163bad8..94f303977 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertex.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertex.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertexLoop.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertexLoop.h index f9952344b..37ecf33d6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertexLoop.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertexLoop.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertexPoint.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertexPoint.h index 700abb5e2..e47ebd134 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertexPoint.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVertexPoint.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationDamper.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationDamper.h index 6c8f28d50..f11560172 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationDamper.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationDamper.h @@ -1,16 +1,12 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" #include "IfcElementComponent.h" namespace IFC4X3 { - class IFCQUERY_EXPORT IfcDamperTypeEnum; + class IFCQUERY_EXPORT IfcVibrationDamperTypeEnum; //ENTITY class IFCQUERY_EXPORT IfcVibrationDamper : public IfcElementComponent { @@ -83,6 +79,6 @@ namespace IFC4X3 // IfcVibrationDamper ----------------------------------------------------------- // attributes: - shared_ptr m_PredefinedType; //optional + shared_ptr m_PredefinedType; //optional }; } diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationDamperType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationDamperType.h index 052678f55..8557815be 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationDamperType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationDamperType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationIsolator.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationIsolator.h index 53f29758a..bcae64e1e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationIsolator.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationIsolator.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationIsolatorType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationIsolatorType.h index 9c16a2753..d36037cce 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationIsolatorType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVibrationIsolatorType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVirtualElement.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVirtualElement.h index 98c2fb94b..a45c57bf1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVirtualElement.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVirtualElement.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVirtualGridIntersection.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVirtualGridIntersection.h index 922c1ba0e..d61712fd3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVirtualGridIntersection.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVirtualGridIntersection.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVoidingFeature.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVoidingFeature.h index 105e8e91a..e4609e13d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVoidingFeature.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcVoidingFeature.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWall.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWall.h index 4ddaf18e5..5d0385747 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWall.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWall.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWallStandardCase.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWallStandardCase.h index 9032900b7..aabe7b8a1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWallStandardCase.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWallStandardCase.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWallType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWallType.h index dcbbf25ad..098c01bb0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWallType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWallType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWasteTerminal.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWasteTerminal.h index 7a209420d..b996ada90 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWasteTerminal.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWasteTerminal.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWasteTerminalType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWasteTerminalType.h index 7e4f2f3c7..4f12b8dc2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWasteTerminalType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWasteTerminalType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindow.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindow.h index 22124ebdb..99975f490 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindow.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindow.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowLiningProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowLiningProperties.h index 43d112a23..6b3f272fe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowLiningProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowLiningProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowPanelProperties.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowPanelProperties.h index 9c359846b..ccf244dba 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowPanelProperties.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowPanelProperties.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowStyle.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowStyle.h index 3426001a6..b3b0c1225 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowStyle.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowStyle.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowType.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowType.h index e14bd322f..e235ec51d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowType.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWindowType.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkCalendar.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkCalendar.h index 616f8fba0..8471bc811 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkCalendar.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkCalendar.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkControl.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkControl.h index 5e2438cff..0cc5181d8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkControl.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkControl.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkPlan.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkPlan.h index 126521ab1..30a5f20a6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkPlan.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkPlan.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkSchedule.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkSchedule.h index ec9421498..378700579 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkSchedule.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkSchedule.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkTime.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkTime.h index 07267faea..823958ed6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkTime.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcWorkTime.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcZShapeProfileDef.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcZShapeProfileDef.h index 2dd708621..084bd0256 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcZShapeProfileDef.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcZShapeProfileDef.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcZone.h b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcZone.h index 85d927ac8..46bfb11c5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcZone.h +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcZone.h @@ -1,9 +1,5 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #pragma once -#include -#include -#include -#include #include "ifcpp/model/GlobalDefines.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingObject.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActionRequest.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActionRequest.cpp index 5128ba1f2..041dd2db3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActionRequest.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActionRequest.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -52,16 +49,16 @@ void IFC4X3::IfcActionRequest::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcActionRequest::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcActionRequest, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_PredefinedType = IfcActionRequestTypeEnum::createObjectFromSTEP( args[6], map, errorStream ); - m_Status = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_PredefinedType = IfcActionRequestTypeEnum::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Status = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_LongDescription = IfcText::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcActionRequest, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcActionRequest::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActor.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActor.cpp index b2bc55561..51eaf6aeb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActor.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActor.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -45,13 +42,13 @@ void IFC4X3::IfcActor::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcActor::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcActor, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_TheActor = IfcActorSelect::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_TheActor = IfcActorSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcActor, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcActor::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActorRole.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActorRole.cpp index fffa5cd0a..26bc0a4c0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActorRole.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActorRole.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcActorRole::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcActorRole::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcActorRole, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Role = IfcRoleEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_UserDefinedRole = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Role = IfcRoleEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_UserDefinedRole = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcActorRole, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcActorRole::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActuator.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActuator.cpp index 3658e5c60..9ed9cb453 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActuator.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActuator.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcActuator::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcActuator::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcActuator, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcActuatorTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcActuatorTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcActuator, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcActuator::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActuatorType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActuatorType.cpp index 108614f07..17609ffee 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActuatorType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcActuatorType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcActuatorType::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcActuatorType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcActuatorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcActuatorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcActuatorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcActuatorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcActuatorType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAddress.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAddress.cpp index 42f8ad757..e8575029a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAddress.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAddress.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcAddress::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcAddress::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAddress, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Purpose = IfcAddressTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedPurpose = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Purpose = IfcAddressTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedPurpose = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcAddress, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAddress::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedBrep.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedBrep.cpp index 4537ce92c..f1e6a3288 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedBrep.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedBrep.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcAdvancedBrep::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcAdvancedBrep::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAdvancedBrep, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Outer, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Outer, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcAdvancedBrep, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAdvancedBrep::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedBrepWithVoids.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedBrepWithVoids.cpp index 9826a230f..425bb32dd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedBrepWithVoids.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedBrepWithVoids.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -26,9 +23,9 @@ void IFC4X3::IfcAdvancedBrepWithVoids::getStepParameter( std::stringstream& stre void IFC4X3::IfcAdvancedBrepWithVoids::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAdvancedBrepWithVoids, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Outer, map, errorStream ); - readEntityReferenceList( args[1], m_Voids, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Outer, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_Voids, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcAdvancedBrepWithVoids, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAdvancedBrepWithVoids::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedFace.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedFace.cpp index 084085da9..6864c2491 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedFace.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAdvancedFace.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,10 +28,10 @@ void IFC4X3::IfcAdvancedFace::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcAdvancedFace::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAdvancedFace, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Bounds, map, errorStream ); - readEntityReference( args[1], m_FaceSurface, map, errorStream ); - m_SameSense = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Bounds, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_FaceSurface, map, errorStream );} + if( num_args > 2 ){m_SameSense = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcAdvancedFace, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAdvancedFace::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminal.cpp index 901c8fb95..18e223d65 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcAirTerminal::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcAirTerminal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAirTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcAirTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcAirTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcAirTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAirTerminal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalBox.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalBox.cpp index 141d597ee..17fd3ad7b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalBox.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalBox.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcAirTerminalBox::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcAirTerminalBox::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAirTerminalBox, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcAirTerminalBoxTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcAirTerminalBoxTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcAirTerminalBox, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAirTerminalBox::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalBoxType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalBoxType.cpp index 0739e43d4..359de3670 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalBoxType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalBoxType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcAirTerminalBoxType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcAirTerminalBoxType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAirTerminalBoxType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcAirTerminalBoxTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcAirTerminalBoxTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcAirTerminalBoxType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAirTerminalBoxType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalType.cpp index 2fe30f062..2b2299d9d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirTerminalType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcAirTerminalType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcAirTerminalType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAirTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcAirTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcAirTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcAirTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAirTerminalType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirToAirHeatRecovery.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirToAirHeatRecovery.cpp index 246859451..8194cc186 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirToAirHeatRecovery.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirToAirHeatRecovery.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcAirToAirHeatRecovery::getStepParameter( std::stringstream& strea void IFC4X3::IfcAirToAirHeatRecovery::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAirToAirHeatRecovery, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcAirToAirHeatRecoveryTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcAirToAirHeatRecoveryTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcAirToAirHeatRecovery, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAirToAirHeatRecovery::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirToAirHeatRecoveryType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirToAirHeatRecoveryType.cpp index b1ae8edbd..012855014 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirToAirHeatRecoveryType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAirToAirHeatRecoveryType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcAirToAirHeatRecoveryType::getStepParameter( std::stringstream& s void IFC4X3::IfcAirToAirHeatRecoveryType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAirToAirHeatRecoveryType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcAirToAirHeatRecoveryTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcAirToAirHeatRecoveryTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcAirToAirHeatRecoveryType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAirToAirHeatRecoveryType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlarm.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlarm.cpp index e74854901..c89493fad 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlarm.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlarm.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcAlarm::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcAlarm::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlarm, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcAlarmTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcAlarmTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcAlarm, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlarm::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlarmType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlarmType.cpp index fd538fb4a..cdb228ab9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlarmType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlarmType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcAlarmType::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcAlarmType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlarmType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcAlarmTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcAlarmTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcAlarmType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlarmType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignment.cpp index 60cecfbc9..5efb33cbb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,15 +51,15 @@ void IFC4X3::IfcAlignment::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcAlignment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlignment, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_PredefinedType = IfcAlignmentTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_PredefinedType = IfcAlignmentTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcAlignment, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlignment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentCant.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentCant.cpp index 857848210..970aeac69 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentCant.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentCant.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -53,15 +50,15 @@ void IFC4X3::IfcAlignmentCant::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcAlignmentCant::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlignmentCant, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_RailHeadDistance = IfcPositiveLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_RailHeadDistance = IfcPositiveLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcAlignmentCant, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlignmentCant::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentCantSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentCantSegment.cpp index b460565eb..ffc9113e7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentCantSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentCantSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -41,16 +38,16 @@ void IFC4X3::IfcAlignmentCantSegment::getStepParameter( std::stringstream& strea void IFC4X3::IfcAlignmentCantSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlignmentCantSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_StartTag = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_EndTag = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_StartDistAlong = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_HorizontalLength = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_StartCantLeft = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_EndCantLeft = IfcLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_StartCantRight = IfcLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_EndCantRight = IfcLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcAlignmentCantSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_StartTag = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_EndTag = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_StartDistAlong = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_HorizontalLength = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_StartCantLeft = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_EndCantLeft = IfcLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_StartCantRight = IfcLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_EndCantRight = IfcLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcAlignmentCantSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcAlignmentCantSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlignmentCantSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentHorizontal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentHorizontal.cpp index bc979ba9a..e6ba05e62 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentHorizontal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentHorizontal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -50,14 +47,14 @@ void IFC4X3::IfcAlignmentHorizontal::getStepParameter( std::stringstream& stream void IFC4X3::IfcAlignmentHorizontal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlignmentHorizontal, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcAlignmentHorizontal, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlignmentHorizontal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentHorizontalSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentHorizontalSegment.cpp index 9c35d1c21..d6db6184d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentHorizontalSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentHorizontalSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -44,16 +41,16 @@ void IFC4X3::IfcAlignmentHorizontalSegment::getStepParameter( std::stringstream& void IFC4X3::IfcAlignmentHorizontalSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlignmentHorizontalSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_StartTag = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_EndTag = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_StartPoint, map, errorStream ); - m_StartDirection = IfcPlaneAngleMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_StartRadiusOfCurvature = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_EndRadiusOfCurvature = IfcLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_SegmentLength = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_GravityCenterLineHeight = IfcPositiveLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcAlignmentHorizontalSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_StartTag = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_EndTag = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_StartPoint, map, errorStream );} + if( num_args > 3 ){m_StartDirection = IfcPlaneAngleMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_StartRadiusOfCurvature = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_EndRadiusOfCurvature = IfcLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_SegmentLength = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_GravityCenterLineHeight = IfcPositiveLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcAlignmentHorizontalSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcAlignmentHorizontalSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlignmentHorizontalSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentParameterSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentParameterSegment.cpp index 88a10b151..a7924703b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentParameterSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentParameterSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,9 +21,9 @@ void IFC4X3::IfcAlignmentParameterSegment::getStepParameter( std::stringstream& void IFC4X3::IfcAlignmentParameterSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlignmentParameterSegment, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_StartTag = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_EndTag = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_StartTag = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_EndTag = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcAlignmentParameterSegment, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlignmentParameterSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentSegment.cpp index 8cfae5731..98b7c15eb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -53,15 +50,15 @@ void IFC4X3::IfcAlignmentSegment::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcAlignmentSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlignmentSegment, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_DesignParameters, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_DesignParameters, map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcAlignmentSegment, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlignmentSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentVertical.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentVertical.cpp index 00c0b4009..8c67c26ff 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentVertical.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentVertical.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -50,14 +47,14 @@ void IFC4X3::IfcAlignmentVertical::getStepParameter( std::stringstream& stream, void IFC4X3::IfcAlignmentVertical::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlignmentVertical, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcAlignmentVertical, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlignmentVertical::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentVerticalSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentVerticalSegment.cpp index fec5efab6..7c16aa85b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentVerticalSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAlignmentVerticalSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -42,16 +39,16 @@ void IFC4X3::IfcAlignmentVerticalSegment::getStepParameter( std::stringstream& s void IFC4X3::IfcAlignmentVerticalSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAlignmentVerticalSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_StartTag = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_EndTag = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_StartDistAlong = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_HorizontalLength = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_StartHeight = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_StartGradient = IfcRatioMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_EndGradient = IfcRatioMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_RadiusOfCurvature = IfcLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcAlignmentVerticalSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_StartTag = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_EndTag = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_StartDistAlong = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_HorizontalLength = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_StartHeight = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_StartGradient = IfcRatioMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_EndGradient = IfcRatioMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_RadiusOfCurvature = IfcLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcAlignmentVerticalSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcAlignmentVerticalSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAlignmentVerticalSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAnnotation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAnnotation.cpp index f6894dcef..0627e060f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAnnotation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAnnotation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,15 +51,15 @@ void IFC4X3::IfcAnnotation::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcAnnotation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAnnotation, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_PredefinedType = IfcAnnotationTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_PredefinedType = IfcAnnotationTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcAnnotation, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAnnotation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAnnotationFillArea.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAnnotationFillArea.cpp index 36975bf96..4cc31a0f7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAnnotationFillArea.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAnnotationFillArea.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -26,9 +23,9 @@ void IFC4X3::IfcAnnotationFillArea::getStepParameter( std::stringstream& stream, void IFC4X3::IfcAnnotationFillArea::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAnnotationFillArea, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_OuterBoundary, map, errorStream ); - readEntityReferenceList( args[1], m_InnerBoundaries, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_OuterBoundary, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_InnerBoundaries, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcAnnotationFillArea, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAnnotationFillArea::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApplication.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApplication.cpp index 7b43d89b3..f680329b4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApplication.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApplication.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,11 +27,11 @@ void IFC4X3::IfcApplication::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcApplication::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcApplication, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ApplicationDeveloper, map, errorStream ); - m_Version = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_ApplicationFullName = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_ApplicationIdentifier = IfcIdentifier::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ApplicationDeveloper, map, errorStream );} + if( num_args > 1 ){m_Version = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_ApplicationFullName = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ApplicationIdentifier = IfcIdentifier::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcApplication, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcApplication::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAppliedValue.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAppliedValue.cpp index 73f99627b..35939f373 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAppliedValue.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAppliedValue.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -46,17 +43,17 @@ void IFC4X3::IfcAppliedValue::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcAppliedValue::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAppliedValue, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_AppliedValue = IfcAppliedValueSelect::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_UnitBasis, map, errorStream ); - m_ApplicableDate = IfcDate::createObjectFromSTEP( args[4], map, errorStream ); - m_FixedUntilDate = IfcDate::createObjectFromSTEP( args[5], map, errorStream ); - m_Category = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - m_Condition = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ArithmeticOperator = IfcArithmeticOperatorEnum::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReferenceList( args[9], m_Components, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_AppliedValue = IfcAppliedValueSelect::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_UnitBasis, map, errorStream );} + if( num_args > 4 ){m_ApplicableDate = IfcDate::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_FixedUntilDate = IfcDate::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Category = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Condition = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ArithmeticOperator = IfcArithmeticOperatorEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_Components, map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcAppliedValue, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAppliedValue::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApproval.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApproval.cpp index 5075fa3ce..c370f11bd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApproval.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApproval.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -46,16 +43,16 @@ void IFC4X3::IfcApproval::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcApproval::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcApproval, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Identifier = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream ); - m_TimeOfApproval = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream ); - m_Status = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Level = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - m_Qualifier = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - m_RequestingApproval = IfcActorSelect::createObjectFromSTEP( args[7], map, errorStream ); - m_GivingApproval = IfcActorSelect::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_Identifier = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Name = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_TimeOfApproval = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Status = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Level = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Qualifier = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_RequestingApproval = IfcActorSelect::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_GivingApproval = IfcActorSelect::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcApproval, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcApproval::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApprovalRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApprovalRelationship.cpp index 8cd83084a..19aeae0df 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApprovalRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcApprovalRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,11 +27,11 @@ void IFC4X3::IfcApprovalRelationship::getStepParameter( std::stringstream& strea void IFC4X3::IfcApprovalRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcApprovalRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_RelatingApproval, map, errorStream ); - readEntityReferenceList( args[3], m_RelatedApprovals, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_RelatingApproval, map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_RelatedApprovals, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcApprovalRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcApprovalRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryClosedProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryClosedProfileDef.cpp index 51f118d91..b17fbad55 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryClosedProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryClosedProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcArbitraryClosedProfileDef::getStepParameter( std::stringstream& void IFC4X3::IfcArbitraryClosedProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcArbitraryClosedProfileDef, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_OuterCurve, map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_OuterCurve, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcArbitraryClosedProfileDef, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcArbitraryClosedProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryOpenProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryOpenProfileDef.cpp index fe1dc1817..7b0dfda93 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryOpenProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryOpenProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcArbitraryOpenProfileDef::getStepParameter( std::stringstream& st void IFC4X3::IfcArbitraryOpenProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcArbitraryOpenProfileDef, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Curve, map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Curve, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcArbitraryOpenProfileDef, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcArbitraryOpenProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryProfileDefWithVoids.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryProfileDefWithVoids.cpp index 386b529e6..3e798e95f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryProfileDefWithVoids.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcArbitraryProfileDefWithVoids.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcArbitraryProfileDefWithVoids::getStepParameter( std::stringstrea void IFC4X3::IfcArbitraryProfileDefWithVoids::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcArbitraryProfileDefWithVoids, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_OuterCurve, map, errorStream ); - readEntityReferenceList( args[3], m_InnerCurves, map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_OuterCurve, map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_InnerCurves, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcArbitraryProfileDefWithVoids, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcArbitraryProfileDefWithVoids::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAsset.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAsset.cpp index 67791c5a0..597ae15d1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAsset.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAsset.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,21 +63,21 @@ void IFC4X3::IfcAsset::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcAsset::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 14 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAsset, expecting 14, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_OriginalValue, map, errorStream ); - readEntityReference( args[7], m_CurrentValue, map, errorStream ); - readEntityReference( args[8], m_TotalReplacementCost, map, errorStream ); - m_Owner = IfcActorSelect::createObjectFromSTEP( args[9], map, errorStream ); - m_User = IfcActorSelect::createObjectFromSTEP( args[10], map, errorStream ); - readEntityReference( args[11], m_ResponsiblePerson, map, errorStream ); - m_IncorporationDate = IfcDate::createObjectFromSTEP( args[12], map, errorStream ); - readEntityReference( args[13], m_DepreciatedValue, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_OriginalValue, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_CurrentValue, map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_TotalReplacementCost, map, errorStream );} + if( num_args > 9 ){m_Owner = IfcActorSelect::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_User = IfcActorSelect::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){readEntityReference( args[11], m_ResponsiblePerson, map, errorStream );} + if( num_args > 12 ){m_IncorporationDate = IfcDate::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){readEntityReference( args[13], m_DepreciatedValue, map, errorStream );} + if( num_args != 14 ){ errorStream << "Wrong parameter count for entity IfcAsset, expecting 14, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAsset::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAsymmetricIShapeProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAsymmetricIShapeProfileDef.cpp index e440d505d..7094c31ad 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAsymmetricIShapeProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAsymmetricIShapeProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -57,22 +54,22 @@ void IFC4X3::IfcAsymmetricIShapeProfileDef::getStepParameter( std::stringstream& void IFC4X3::IfcAsymmetricIShapeProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 15 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAsymmetricIShapeProfileDef, expecting 15, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_BottomFlangeWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_OverallDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_WebThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_BottomFlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_BottomFlangeFilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_TopFlangeWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_TopFlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_TopFlangeFilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_BottomFlangeEdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_BottomFlangeSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[12], map, errorStream ); - m_TopFlangeEdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[13], map, errorStream ); - m_TopFlangeSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[14], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_BottomFlangeWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_OverallDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_WebThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_BottomFlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_BottomFlangeFilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_TopFlangeWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_TopFlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_TopFlangeFilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_BottomFlangeEdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_BottomFlangeSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_TopFlangeEdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){m_TopFlangeSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[14], map, errorStream );} + if( num_args != 15 ){ errorStream << "Wrong parameter count for entity IfcAsymmetricIShapeProfileDef, expecting 15, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAsymmetricIShapeProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAudioVisualAppliance.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAudioVisualAppliance.cpp index 1760327b5..16ff99c47 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAudioVisualAppliance.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAudioVisualAppliance.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcAudioVisualAppliance::getStepParameter( std::stringstream& strea void IFC4X3::IfcAudioVisualAppliance::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAudioVisualAppliance, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcAudioVisualApplianceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcAudioVisualApplianceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcAudioVisualAppliance, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAudioVisualAppliance::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAudioVisualApplianceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAudioVisualApplianceType.cpp index a484c76ec..d3eca195a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAudioVisualApplianceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAudioVisualApplianceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcAudioVisualApplianceType::getStepParameter( std::stringstream& s void IFC4X3::IfcAudioVisualApplianceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAudioVisualApplianceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcAudioVisualApplianceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcAudioVisualApplianceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcAudioVisualApplianceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAudioVisualApplianceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis1Placement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis1Placement.cpp index 41907456e..15af2be30 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis1Placement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis1Placement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcAxis1Placement::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcAxis1Placement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAxis1Placement, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Location, map, errorStream ); - readEntityReference( args[1], m_Axis, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Location, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Axis, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcAxis1Placement, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAxis1Placement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2Placement2D.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2Placement2D.cpp index 787612b64..c4cd9ce5c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2Placement2D.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2Placement2D.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcAxis2Placement2D::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcAxis2Placement2D::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAxis2Placement2D, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Location, map, errorStream ); - readEntityReference( args[1], m_RefDirection, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Location, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_RefDirection, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcAxis2Placement2D, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAxis2Placement2D::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2Placement3D.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2Placement3D.cpp index eca5dd5b9..719ca190b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2Placement3D.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2Placement3D.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcAxis2Placement3D::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcAxis2Placement3D::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAxis2Placement3D, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Location, map, errorStream ); - readEntityReference( args[1], m_Axis, map, errorStream ); - readEntityReference( args[2], m_RefDirection, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Location, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Axis, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_RefDirection, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcAxis2Placement3D, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAxis2Placement3D::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2PlacementLinear.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2PlacementLinear.cpp index 6d54adc1c..0258b805a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2PlacementLinear.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcAxis2PlacementLinear.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcAxis2PlacementLinear::getStepParameter( std::stringstream& strea void IFC4X3::IfcAxis2PlacementLinear::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcAxis2PlacementLinear, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Location, map, errorStream ); - readEntityReference( args[1], m_Axis, map, errorStream ); - readEntityReference( args[2], m_RefDirection, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Location, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Axis, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_RefDirection, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcAxis2PlacementLinear, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcAxis2PlacementLinear::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineCurve.cpp index 9d9733898..b58e0e0ed 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcBSplineCurve::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcBSplineCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBSplineCurve, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Degree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReferenceList( args[1], m_ControlPointsList, map, errorStream ); - m_CurveForm = IfcBSplineCurveForm::createObjectFromSTEP( args[2], map, errorStream ); - m_ClosedCurve = IfcLogical::createObjectFromSTEP( args[3], map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Degree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_ControlPointsList, map, errorStream );} + if( num_args > 2 ){m_CurveForm = IfcBSplineCurveForm::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ClosedCurve = IfcLogical::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcBSplineCurve, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBSplineCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineCurveWithKnots.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineCurveWithKnots.cpp index 9ea9a5bd6..b4351d746 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineCurveWithKnots.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineCurveWithKnots.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -43,15 +40,15 @@ void IFC4X3::IfcBSplineCurveWithKnots::getStepParameter( std::stringstream& stre void IFC4X3::IfcBSplineCurveWithKnots::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBSplineCurveWithKnots, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Degree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReferenceList( args[1], m_ControlPointsList, map, errorStream ); - m_CurveForm = IfcBSplineCurveForm::createObjectFromSTEP( args[2], map, errorStream ); - m_ClosedCurve = IfcLogical::createObjectFromSTEP( args[3], map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[4], map, errorStream ); - readTypeOfIntegerList( args[5], m_KnotMultiplicities ); - readTypeOfRealList( args[6], m_Knots ); - m_KnotSpec = IfcKnotType::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_Degree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_ControlPointsList, map, errorStream );} + if( num_args > 2 ){m_CurveForm = IfcBSplineCurveForm::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ClosedCurve = IfcLogical::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readTypeOfIntegerList( args[5], m_KnotMultiplicities );} + if( num_args > 6 ){readTypeOfRealList( args[6], m_Knots );} + if( num_args > 7 ){m_KnotSpec = IfcKnotType::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcBSplineCurveWithKnots, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBSplineCurveWithKnots::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineSurface.cpp index 98188b785..92871e85e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,14 +36,14 @@ void IFC4X3::IfcBSplineSurface::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcBSplineSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBSplineSurface, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_UDegree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream ); - m_VDegree = IfcInteger::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList2D( args[2], m_ControlPointsList, map, errorStream ); - m_SurfaceForm = IfcBSplineSurfaceForm::createObjectFromSTEP( args[3], map, errorStream ); - m_UClosed = IfcLogical::createObjectFromSTEP( args[4], map, errorStream ); - m_VClosed = IfcLogical::createObjectFromSTEP( args[5], map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_UDegree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_VDegree = IfcInteger::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList2D( args[2], m_ControlPointsList, map, errorStream );} + if( num_args > 3 ){m_SurfaceForm = IfcBSplineSurfaceForm::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_UClosed = IfcLogical::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_VClosed = IfcLogical::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcBSplineSurface, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBSplineSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineSurfaceWithKnots.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineSurfaceWithKnots.cpp index be28d91e7..1f4e309dd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineSurfaceWithKnots.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBSplineSurfaceWithKnots.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,19 +48,19 @@ void IFC4X3::IfcBSplineSurfaceWithKnots::getStepParameter( std::stringstream& st void IFC4X3::IfcBSplineSurfaceWithKnots::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBSplineSurfaceWithKnots, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_UDegree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream ); - m_VDegree = IfcInteger::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList2D( args[2], m_ControlPointsList, map, errorStream ); - m_SurfaceForm = IfcBSplineSurfaceForm::createObjectFromSTEP( args[3], map, errorStream ); - m_UClosed = IfcLogical::createObjectFromSTEP( args[4], map, errorStream ); - m_VClosed = IfcLogical::createObjectFromSTEP( args[5], map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[6], map, errorStream ); - readTypeOfIntegerList( args[7], m_UMultiplicities ); - readTypeOfIntegerList( args[8], m_VMultiplicities ); - readTypeOfRealList( args[9], m_UKnots ); - readTypeOfRealList( args[10], m_VKnots ); - m_KnotSpec = IfcKnotType::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_UDegree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_VDegree = IfcInteger::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList2D( args[2], m_ControlPointsList, map, errorStream );} + if( num_args > 3 ){m_SurfaceForm = IfcBSplineSurfaceForm::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_UClosed = IfcLogical::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_VClosed = IfcLogical::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readTypeOfIntegerList( args[7], m_UMultiplicities );} + if( num_args > 8 ){readTypeOfIntegerList( args[8], m_VMultiplicities );} + if( num_args > 9 ){readTypeOfRealList( args[9], m_UKnots );} + if( num_args > 10 ){readTypeOfRealList( args[10], m_VKnots );} + if( num_args > 11 ){m_KnotSpec = IfcKnotType::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcBSplineSurfaceWithKnots, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBSplineSurfaceWithKnots::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBeam.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBeam.cpp index 0f5b363ae..4887131d4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBeam.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBeam.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcBeam::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcBeam::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBeam, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcBeamTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcBeamTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcBeam, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBeam::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBeamType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBeamType.cpp index 3295eb6ff..7fbda07ad 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBeamType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBeamType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcBeamType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcBeamType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBeamType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcBeamTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcBeamTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcBeamType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBeamType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearing.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearing.cpp index 5e8de15af..61b95a99d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearing.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearing.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcBearing::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcBearing::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBearing, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcBearingTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcBearingTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcBearing, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBearing::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearingType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearingType.cpp index eacea7587..bdbc2c306 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearingType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearingType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcBearingType::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcBearingType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBearingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcBearingTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcBearingTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcBearingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBearingType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearingTypeDisplacementEnum.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearingTypeDisplacementEnum.cpp deleted file mode 100644 index c2cd733d9..000000000 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBearingTypeDisplacementEnum.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ - -#include -#include -#include -#include "ifcpp/reader/ReaderUtil.h" -#include "ifcpp/writer/WriterUtil.h" -#include "ifcpp/model/BasicTypes.h" -#include "ifcpp/model/BuildingException.h" -#include "ifcpp/IFC4X3/include/IfcBearingTypeDisplacementEnum.h" - -// TYPE IfcBearingTypeDisplacementEnum = ENUMERATION OF (FIXED_MOVEMENT ,FREE_MOVEMENT ,GUIDED_LONGITUDINAL ,GUIDED_TRANSVERSAL ,NOTDEFINED); -void IFC4X3::IfcBearingTypeDisplacementEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const -{ - if( is_select_type ) { stream << "IFCBEARINGTYPEDISPLACEMENTENUM("; } - switch( m_enum ) - { - case ENUM_FIXED_MOVEMENT: stream << ".FIXED_MOVEMENT."; break; - case ENUM_FREE_MOVEMENT: stream << ".FREE_MOVEMENT."; break; - case ENUM_GUIDED_LONGITUDINAL: stream << ".GUIDED_LONGITUDINAL."; break; - case ENUM_GUIDED_TRANSVERSAL: stream << ".GUIDED_TRANSVERSAL."; break; - case ENUM_NOTDEFINED: stream << ".NOTDEFINED."; break; - } - if( is_select_type ) { stream << ")"; } -} -shared_ptr IFC4X3::IfcBearingTypeDisplacementEnum::createObjectFromSTEP( const std::string& arg, const std::map >& map, std::stringstream& errorStream ) -{ - if( arg.compare( "$" ) == 0 ) { return shared_ptr(); } - if( arg.compare( "*" ) == 0 ) { return shared_ptr(); } - shared_ptr type_object( new IfcBearingTypeDisplacementEnum() ); - if( std_iequal( arg, ".FIXED_MOVEMENT." ) ) - { - type_object->m_enum = IfcBearingTypeDisplacementEnum::ENUM_FIXED_MOVEMENT; - } - else if( std_iequal( arg, ".FREE_MOVEMENT." ) ) - { - type_object->m_enum = IfcBearingTypeDisplacementEnum::ENUM_FREE_MOVEMENT; - } - else if( std_iequal( arg, ".GUIDED_LONGITUDINAL." ) ) - { - type_object->m_enum = IfcBearingTypeDisplacementEnum::ENUM_GUIDED_LONGITUDINAL; - } - else if( std_iequal( arg, ".GUIDED_TRANSVERSAL." ) ) - { - type_object->m_enum = IfcBearingTypeDisplacementEnum::ENUM_GUIDED_TRANSVERSAL; - } - else if( std_iequal( arg, ".NOTDEFINED." ) ) - { - type_object->m_enum = IfcBearingTypeDisplacementEnum::ENUM_NOTDEFINED; - } - return type_object; -} diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBlobTexture.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBlobTexture.cpp index 5086ca341..6cb883746 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBlobTexture.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBlobTexture.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -60,14 +57,14 @@ void IFC4X3::IfcBlobTexture::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcBlobTexture::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBlobTexture, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_RepeatS = IfcBoolean::createObjectFromSTEP( args[0], map, errorStream ); - m_RepeatT = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - m_Mode = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_TextureTransform, map, errorStream ); - readTypeOfStringList( args[4], m_Parameter ); - m_RasterFormat = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_RasterCode = IfcBinary::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_RepeatS = IfcBoolean::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_RepeatT = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Mode = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_TextureTransform, map, errorStream );} + if( num_args > 4 ){readTypeOfStringList( args[4], m_Parameter );} + if( num_args > 5 ){m_RasterFormat = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_RasterCode = IfcBinary::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcBlobTexture, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBlobTexture::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBlock.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBlock.cpp index 9c28f40ee..0115dfd19 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBlock.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBlock.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcBlock::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcBlock::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBlock, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); - m_XLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_YLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_ZLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args > 1 ){m_XLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_YLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ZLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcBlock, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBlock::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoiler.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoiler.cpp index 9a961beab..3975028d4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoiler.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoiler.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcBoiler::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcBoiler::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBoiler, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcBoilerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcBoilerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcBoiler, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBoiler::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoilerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoilerType.cpp index 6c944a290..35862fe49 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoilerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoilerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcBoilerType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcBoilerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBoilerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcBoilerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcBoilerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcBoilerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBoilerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBooleanClippingResult.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBooleanClippingResult.cpp index 90c7c80f3..99ee8a02d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBooleanClippingResult.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBooleanClippingResult.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcBooleanClippingResult::getStepParameter( std::stringstream& stre void IFC4X3::IfcBooleanClippingResult::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBooleanClippingResult, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Operator = IfcBooleanOperator::createObjectFromSTEP( args[0], map, errorStream ); - m_FirstOperand = IfcBooleanOperand::createObjectFromSTEP( args[1], map, errorStream ); - m_SecondOperand = IfcBooleanOperand::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Operator = IfcBooleanOperator::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_FirstOperand = IfcBooleanOperand::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_SecondOperand = IfcBooleanOperand::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcBooleanClippingResult, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBooleanClippingResult::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBooleanResult.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBooleanResult.cpp index 9fa2532bd..8cfa4d2c0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBooleanResult.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBooleanResult.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcBooleanResult::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcBooleanResult::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBooleanResult, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Operator = IfcBooleanOperator::createObjectFromSTEP( args[0], map, errorStream ); - m_FirstOperand = IfcBooleanOperand::createObjectFromSTEP( args[1], map, errorStream ); - m_SecondOperand = IfcBooleanOperand::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Operator = IfcBooleanOperator::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_FirstOperand = IfcBooleanOperand::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_SecondOperand = IfcBooleanOperand::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcBooleanResult, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBooleanResult::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBorehole.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBorehole.cpp index 714cef2a0..0b8ef3cbe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBorehole.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBorehole.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcBorehole::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcBorehole::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBorehole, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcBorehole, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBorehole::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryCondition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryCondition.cpp index 70242b3a9..95ac39406 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryCondition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryCondition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcBoundaryCondition::getStepParameter( std::stringstream& stream, void IFC4X3::IfcBoundaryCondition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBoundaryCondition, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcBoundaryCondition, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBoundaryCondition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryCurve.cpp index cc1133e13..f76693fe0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcBoundaryCurve::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcBoundaryCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBoundaryCurve, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Segments, map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Segments, map, errorStream );} + if( num_args > 1 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcBoundaryCurve, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBoundaryCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryEdgeCondition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryEdgeCondition.cpp index 157f2c1da..080f78bd8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryEdgeCondition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryEdgeCondition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,14 +33,14 @@ void IFC4X3::IfcBoundaryEdgeCondition::getStepParameter( std::stringstream& stre void IFC4X3::IfcBoundaryEdgeCondition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBoundaryEdgeCondition, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_TranslationalStiffnessByLengthX = IfcModulusOfTranslationalSubgradeReactionSelect::createObjectFromSTEP( args[1], map, errorStream ); - m_TranslationalStiffnessByLengthY = IfcModulusOfTranslationalSubgradeReactionSelect::createObjectFromSTEP( args[2], map, errorStream ); - m_TranslationalStiffnessByLengthZ = IfcModulusOfTranslationalSubgradeReactionSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_RotationalStiffnessByLengthX = IfcModulusOfRotationalSubgradeReactionSelect::createObjectFromSTEP( args[4], map, errorStream ); - m_RotationalStiffnessByLengthY = IfcModulusOfRotationalSubgradeReactionSelect::createObjectFromSTEP( args[5], map, errorStream ); - m_RotationalStiffnessByLengthZ = IfcModulusOfRotationalSubgradeReactionSelect::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_TranslationalStiffnessByLengthX = IfcModulusOfTranslationalSubgradeReactionSelect::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_TranslationalStiffnessByLengthY = IfcModulusOfTranslationalSubgradeReactionSelect::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_TranslationalStiffnessByLengthZ = IfcModulusOfTranslationalSubgradeReactionSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_RotationalStiffnessByLengthX = IfcModulusOfRotationalSubgradeReactionSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_RotationalStiffnessByLengthY = IfcModulusOfRotationalSubgradeReactionSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_RotationalStiffnessByLengthZ = IfcModulusOfRotationalSubgradeReactionSelect::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcBoundaryEdgeCondition, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBoundaryEdgeCondition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryFaceCondition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryFaceCondition.cpp index 70866ac60..fa2a579ec 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryFaceCondition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryFaceCondition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,11 +26,11 @@ void IFC4X3::IfcBoundaryFaceCondition::getStepParameter( std::stringstream& stre void IFC4X3::IfcBoundaryFaceCondition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBoundaryFaceCondition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_TranslationalStiffnessByAreaX = IfcModulusOfSubgradeReactionSelect::createObjectFromSTEP( args[1], map, errorStream ); - m_TranslationalStiffnessByAreaY = IfcModulusOfSubgradeReactionSelect::createObjectFromSTEP( args[2], map, errorStream ); - m_TranslationalStiffnessByAreaZ = IfcModulusOfSubgradeReactionSelect::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_TranslationalStiffnessByAreaX = IfcModulusOfSubgradeReactionSelect::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_TranslationalStiffnessByAreaY = IfcModulusOfSubgradeReactionSelect::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_TranslationalStiffnessByAreaZ = IfcModulusOfSubgradeReactionSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcBoundaryFaceCondition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBoundaryFaceCondition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryNodeCondition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryNodeCondition.cpp index 0b3ed4e7d..69f036ec2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryNodeCondition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryNodeCondition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,14 +33,14 @@ void IFC4X3::IfcBoundaryNodeCondition::getStepParameter( std::stringstream& stre void IFC4X3::IfcBoundaryNodeCondition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBoundaryNodeCondition, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_TranslationalStiffnessX = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[1], map, errorStream ); - m_TranslationalStiffnessY = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[2], map, errorStream ); - m_TranslationalStiffnessZ = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_RotationalStiffnessX = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[4], map, errorStream ); - m_RotationalStiffnessY = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[5], map, errorStream ); - m_RotationalStiffnessZ = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_TranslationalStiffnessX = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_TranslationalStiffnessY = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_TranslationalStiffnessZ = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_RotationalStiffnessX = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_RotationalStiffnessY = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_RotationalStiffnessZ = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcBoundaryNodeCondition, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBoundaryNodeCondition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryNodeConditionWarping.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryNodeConditionWarping.cpp index 1f12935c2..8c5c7fe48 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryNodeConditionWarping.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundaryNodeConditionWarping.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,15 +36,15 @@ void IFC4X3::IfcBoundaryNodeConditionWarping::getStepParameter( std::stringstrea void IFC4X3::IfcBoundaryNodeConditionWarping::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBoundaryNodeConditionWarping, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_TranslationalStiffnessX = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[1], map, errorStream ); - m_TranslationalStiffnessY = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[2], map, errorStream ); - m_TranslationalStiffnessZ = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_RotationalStiffnessX = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[4], map, errorStream ); - m_RotationalStiffnessY = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[5], map, errorStream ); - m_RotationalStiffnessZ = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[6], map, errorStream ); - m_WarpingStiffness = IfcWarpingStiffnessSelect::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_TranslationalStiffnessX = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_TranslationalStiffnessY = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_TranslationalStiffnessZ = IfcTranslationalStiffnessSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_RotationalStiffnessX = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_RotationalStiffnessY = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_RotationalStiffnessZ = IfcRotationalStiffnessSelect::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_WarpingStiffness = IfcWarpingStiffnessSelect::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcBoundaryNodeConditionWarping, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBoundaryNodeConditionWarping::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundedCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundedCurve.cpp index c3f7b6921..3e98606c7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundedCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundedCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundedSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundedSurface.cpp index 219d33066..8e88eb4e4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundedSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundedSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundingBox.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundingBox.cpp index a30c755b7..90682bd6b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundingBox.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoundingBox.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcBoundingBox::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcBoundingBox::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBoundingBox, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Corner, map, errorStream ); - m_XDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_YDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_ZDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Corner, map, errorStream );} + if( num_args > 1 ){m_XDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_YDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ZDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcBoundingBox, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBoundingBox::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoxedHalfSpace.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoxedHalfSpace.cpp index b83ba1611..9c0727bfe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoxedHalfSpace.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBoxedHalfSpace.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcBoxedHalfSpace::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcBoxedHalfSpace::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBoxedHalfSpace, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BaseSurface, map, errorStream ); - m_AgreementFlag = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Enclosure, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BaseSurface, map, errorStream );} + if( num_args > 1 ){m_AgreementFlag = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Enclosure, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcBoxedHalfSpace, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBoxedHalfSpace::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBridge.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBridge.cpp index 1d92b2d29..a7fa55055 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBridge.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBridge.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,17 +58,17 @@ void IFC4X3::IfcBridge::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcBridge::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBridge, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcBridgeTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcBridgeTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcBridge, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBridge::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBridgePart.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBridgePart.cpp index 449584f7c..914527ae7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBridgePart.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBridgePart.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -64,18 +61,18 @@ void IFC4X3::IfcBridgePart::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcBridgePart::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBridgePart, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_PredefinedType = IfcBridgePartTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcBridgePartTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcBridgePart, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBridgePart::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuilding.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuilding.cpp index 58a7da5e5..c7da36aeb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuilding.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuilding.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,19 +63,19 @@ void IFC4X3::IfcBuilding::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcBuilding::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBuilding, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_ElevationOfRefHeight = IfcLengthMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_ElevationOfTerrain = IfcLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); - readEntityReference( args[11], m_BuildingAddress, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_ElevationOfRefHeight = IfcLengthMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_ElevationOfTerrain = IfcLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){readEntityReference( args[11], m_BuildingAddress, map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcBuilding, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBuilding::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementPart.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementPart.cpp index 3aa96cb34..0b3d8b72b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementPart.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementPart.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcBuildingElementPart::getStepParameter( std::stringstream& stream void IFC4X3::IfcBuildingElementPart::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBuildingElementPart, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcBuildingElementPartTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcBuildingElementPartTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcBuildingElementPart, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBuildingElementPart::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementPartType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementPartType.cpp index 34e35a716..c1898c602 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementPartType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementPartType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcBuildingElementPartType::getStepParameter( std::stringstream& st void IFC4X3::IfcBuildingElementPartType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBuildingElementPartType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcBuildingElementPartTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcBuildingElementPartTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcBuildingElementPartType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBuildingElementPartType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxy.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxy.cpp index a6ca8417a..e2160ff80 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxy.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxy.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcBuildingElementProxy::getStepParameter( std::stringstream& strea void IFC4X3::IfcBuildingElementProxy::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBuildingElementProxy, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcBuildingElementProxyTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcBuildingElementProxyTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcBuildingElementProxy, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBuildingElementProxy::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxyType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxyType.cpp index e7ea4d2a9..454c28154 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxyType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxyType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcBuildingElementProxyType::getStepParameter( std::stringstream& s void IFC4X3::IfcBuildingElementProxyType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBuildingElementProxyType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcBuildingElementProxyTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcBuildingElementProxyTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcBuildingElementProxyType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBuildingElementProxyType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxyTypeEnum.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxyTypeEnum.cpp index 8f7b7021d..d214d3761 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxyTypeEnum.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingElementProxyTypeEnum.cpp @@ -9,7 +9,7 @@ #include "ifcpp/model/BuildingException.h" #include "ifcpp/IFC4X3/include/IfcBuildingElementProxyTypeEnum.h" -// TYPE IfcBuildingElementProxyTypeEnum = ENUMERATION OF (COMPLEX ,ELEMENT ,PARTIAL ,USERDEFINED ,NOTDEFINED); +// TYPE IfcBuildingElementProxyTypeEnum = ENUMERATION OF (COMPLEX ,ELEMENT ,PARTIAL ,PROVISIONFORSPACE ,PROVISIONFORVOID ,USERDEFINED ,NOTDEFINED); void IFC4X3::IfcBuildingElementProxyTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const { if( is_select_type ) { stream << "IFCBUILDINGELEMENTPROXYTYPEENUM("; } @@ -18,6 +18,8 @@ void IFC4X3::IfcBuildingElementProxyTypeEnum::getStepParameter( std::stringstrea case ENUM_COMPLEX: stream << ".COMPLEX."; break; case ENUM_ELEMENT: stream << ".ELEMENT."; break; case ENUM_PARTIAL: stream << ".PARTIAL."; break; + case ENUM_PROVISIONFORSPACE: stream << ".PROVISIONFORSPACE."; break; + case ENUM_PROVISIONFORVOID: stream << ".PROVISIONFORVOID."; break; case ENUM_USERDEFINED: stream << ".USERDEFINED."; break; case ENUM_NOTDEFINED: stream << ".NOTDEFINED."; break; } @@ -40,6 +42,14 @@ shared_ptr IFC4X3::IfcBuildingElementPr { type_object->m_enum = IfcBuildingElementProxyTypeEnum::ENUM_PARTIAL; } + else if( std_iequal( arg, ".PROVISIONFORSPACE." ) ) + { + type_object->m_enum = IfcBuildingElementProxyTypeEnum::ENUM_PROVISIONFORSPACE; + } + else if( std_iequal( arg, ".PROVISIONFORVOID." ) ) + { + type_object->m_enum = IfcBuildingElementProxyTypeEnum::ENUM_PROVISIONFORVOID; + } else if( std_iequal( arg, ".USERDEFINED." ) ) { type_object->m_enum = IfcBuildingElementProxyTypeEnum::ENUM_USERDEFINED; diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingStorey.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingStorey.cpp index 39eb3c5de..2f2e85da3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingStorey.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingStorey.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,17 +58,17 @@ void IFC4X3::IfcBuildingStorey::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcBuildingStorey::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBuildingStorey, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_Elevation = IfcLengthMeasure::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_Elevation = IfcLengthMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcBuildingStorey, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBuildingStorey::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingSystem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingSystem.cpp index 0351878f4..c88b3cc7f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingSystem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingSystem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,14 +46,14 @@ void IFC4X3::IfcBuildingSystem::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcBuildingSystem::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBuildingSystem, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_PredefinedType = IfcBuildingSystemTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_PredefinedType = IfcBuildingSystemTypeEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongName = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcBuildingSystem, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBuildingSystem::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingSystemTypeEnum.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingSystemTypeEnum.cpp index daa810747..88d3802d6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingSystemTypeEnum.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuildingSystemTypeEnum.cpp @@ -9,19 +9,16 @@ #include "ifcpp/model/BuildingException.h" #include "ifcpp/IFC4X3/include/IfcBuildingSystemTypeEnum.h" -// TYPE IfcBuildingSystemTypeEnum = ENUMERATION OF (EROSIONPREVENTION ,FENESTRATION ,FOUNDATION ,LOADBEARING ,OUTERSHELL ,PRESTRESSING ,REINFORCING ,SHADING ,TRANSPORT ,USERDEFINED ,NOTDEFINED); +// TYPE IfcBuildingSystemTypeEnum = ENUMERATION OF (FENESTRATION ,FOUNDATION ,LOADBEARING ,OUTERSHELL ,SHADING ,TRANSPORT ,USERDEFINED ,NOTDEFINED); void IFC4X3::IfcBuildingSystemTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const { if( is_select_type ) { stream << "IFCBUILDINGSYSTEMTYPEENUM("; } switch( m_enum ) { - case ENUM_EROSIONPREVENTION: stream << ".EROSIONPREVENTION."; break; case ENUM_FENESTRATION: stream << ".FENESTRATION."; break; case ENUM_FOUNDATION: stream << ".FOUNDATION."; break; case ENUM_LOADBEARING: stream << ".LOADBEARING."; break; case ENUM_OUTERSHELL: stream << ".OUTERSHELL."; break; - case ENUM_PRESTRESSING: stream << ".PRESTRESSING."; break; - case ENUM_REINFORCING: stream << ".REINFORCING."; break; case ENUM_SHADING: stream << ".SHADING."; break; case ENUM_TRANSPORT: stream << ".TRANSPORT."; break; case ENUM_USERDEFINED: stream << ".USERDEFINED."; break; @@ -34,11 +31,7 @@ shared_ptr IFC4X3::IfcBuildingSystemTypeEnum: if( arg.compare( "$" ) == 0 ) { return shared_ptr(); } if( arg.compare( "*" ) == 0 ) { return shared_ptr(); } shared_ptr type_object( new IfcBuildingSystemTypeEnum() ); - if( std_iequal( arg, ".EROSIONPREVENTION." ) ) - { - type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_EROSIONPREVENTION; - } - else if( std_iequal( arg, ".FENESTRATION." ) ) + if( std_iequal( arg, ".FENESTRATION." ) ) { type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_FENESTRATION; } @@ -54,14 +47,6 @@ shared_ptr IFC4X3::IfcBuildingSystemTypeEnum: { type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_OUTERSHELL; } - else if( std_iequal( arg, ".PRESTRESSING." ) ) - { - type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_PRESTRESSING; - } - else if( std_iequal( arg, ".REINFORCING." ) ) - { - type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_REINFORCING; - } else if( std_iequal( arg, ".SHADING." ) ) { type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_SHADING; diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltElement.cpp index 343455566..e869edbb3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcBuiltElement::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcBuiltElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBuiltElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcBuiltElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBuiltElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltElementType.cpp index be669d8a3..60e457275 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcBuiltElementType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcBuiltElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBuiltElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcBuiltElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBuiltElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltSystem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltSystem.cpp index abead5ea7..13a5b43bb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltSystem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBuiltSystem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,14 +46,14 @@ void IFC4X3::IfcBuiltSystem::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcBuiltSystem::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBuiltSystem, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_PredefinedType = IfcBuiltSystemTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_PredefinedType = IfcBuiltSystemTypeEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongName = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcBuiltSystem, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBuiltSystem::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBurner.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBurner.cpp index 9e30034f0..55ff74472 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBurner.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBurner.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcBurner::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcBurner::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBurner, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcBurnerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcBurnerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcBurner, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBurner::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBurnerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBurnerType.cpp index 9b9b2701a..59f9867c7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBurnerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcBurnerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcBurnerType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcBurnerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcBurnerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcBurnerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcBurnerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcBurnerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcBurnerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCShapeProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCShapeProfileDef.cpp index a07b37c7b..0d78a824c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCShapeProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCShapeProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -42,15 +39,15 @@ void IFC4X3::IfcCShapeProfileDef::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcCShapeProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCShapeProfileDef, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_Width = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_WallThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_Girth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_InternalFilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Width = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_WallThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Girth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_InternalFilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcCShapeProfileDef, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCShapeProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFitting.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFitting.cpp index 223387e69..e453c6753 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFitting.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFitting.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcCableCarrierFitting::getStepParameter( std::stringstream& stream void IFC4X3::IfcCableCarrierFitting::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCableCarrierFitting, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCableCarrierFittingTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCableCarrierFittingTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCableCarrierFitting, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCableCarrierFitting::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFittingType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFittingType.cpp index 84ae7f6b3..01de9cef9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFittingType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFittingType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCableCarrierFittingType::getStepParameter( std::stringstream& st void IFC4X3::IfcCableCarrierFittingType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCableCarrierFittingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCableCarrierFittingTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCableCarrierFittingTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCableCarrierFittingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCableCarrierFittingType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFittingTypeEnum.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFittingTypeEnum.cpp index b793ea855..20f5d7fce 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFittingTypeEnum.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierFittingTypeEnum.cpp @@ -9,7 +9,7 @@ #include "ifcpp/model/BuildingException.h" #include "ifcpp/IFC4X3/include/IfcCableCarrierFittingTypeEnum.h" -// TYPE IfcCableCarrierFittingTypeEnum = ENUMERATION OF (BEND ,CONNECTOR ,CROSS ,JUNCTION ,TEE ,TRANSITION ,USERDEFINED ,NOTDEFINED); +// TYPE IfcCableCarrierFittingTypeEnum = ENUMERATION OF (BEND ,CONNECTOR ,CROSS ,JUNCTION ,REDUCER ,TEE ,TRANSITION ,USERDEFINED ,NOTDEFINED); void IFC4X3::IfcCableCarrierFittingTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const { if( is_select_type ) { stream << "IFCCABLECARRIERFITTINGTYPEENUM("; } @@ -19,6 +19,7 @@ void IFC4X3::IfcCableCarrierFittingTypeEnum::getStepParameter( std::stringstream case ENUM_CONNECTOR: stream << ".CONNECTOR."; break; case ENUM_CROSS: stream << ".CROSS."; break; case ENUM_JUNCTION: stream << ".JUNCTION."; break; + case ENUM_REDUCER: stream << ".REDUCER."; break; case ENUM_TEE: stream << ".TEE."; break; case ENUM_TRANSITION: stream << ".TRANSITION."; break; case ENUM_USERDEFINED: stream << ".USERDEFINED."; break; @@ -47,6 +48,10 @@ shared_ptr IFC4X3::IfcCableCarrierFittin { type_object->m_enum = IfcCableCarrierFittingTypeEnum::ENUM_JUNCTION; } + else if( std_iequal( arg, ".REDUCER." ) ) + { + type_object->m_enum = IfcCableCarrierFittingTypeEnum::ENUM_REDUCER; + } else if( std_iequal( arg, ".TEE." ) ) { type_object->m_enum = IfcCableCarrierFittingTypeEnum::ENUM_TEE; diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierSegment.cpp index 123d08344..19335e70a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcCableCarrierSegment::getStepParameter( std::stringstream& stream void IFC4X3::IfcCableCarrierSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCableCarrierSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCableCarrierSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCableCarrierSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCableCarrierSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCableCarrierSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierSegmentType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierSegmentType.cpp index 46e424b58..2514968e4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierSegmentType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableCarrierSegmentType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCableCarrierSegmentType::getStepParameter( std::stringstream& st void IFC4X3::IfcCableCarrierSegmentType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCableCarrierSegmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCableCarrierSegmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCableCarrierSegmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCableCarrierSegmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCableCarrierSegmentType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableFitting.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableFitting.cpp index 790005b55..ea794f2e7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableFitting.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableFitting.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcCableFitting::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcCableFitting::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCableFitting, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCableFittingTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCableFittingTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCableFitting, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCableFitting::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableFittingType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableFittingType.cpp index b0eeecf26..09ecf0a3f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableFittingType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableFittingType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCableFittingType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcCableFittingType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCableFittingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCableFittingTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCableFittingTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCableFittingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCableFittingType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableSegment.cpp index b1d44cd6a..21d16abec 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcCableSegment::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcCableSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCableSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCableSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCableSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCableSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCableSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableSegmentType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableSegmentType.cpp index b09726439..39946481a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableSegmentType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCableSegmentType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCableSegmentType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcCableSegmentType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCableSegmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCableSegmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCableSegmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCableSegmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCableSegmentType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCaissonFoundation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCaissonFoundation.cpp index 801535a5b..aa01bfa43 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCaissonFoundation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCaissonFoundation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcCaissonFoundation::getStepParameter( std::stringstream& stream, void IFC4X3::IfcCaissonFoundation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCaissonFoundation, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCaissonFoundationTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCaissonFoundationTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCaissonFoundation, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCaissonFoundation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCaissonFoundationType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCaissonFoundationType.cpp index 72d6c6001..94533454d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCaissonFoundationType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCaissonFoundationType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCaissonFoundationType::getStepParameter( std::stringstream& stre void IFC4X3::IfcCaissonFoundationType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCaissonFoundationType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCaissonFoundationTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCaissonFoundationTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCaissonFoundationType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCaissonFoundationType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPoint.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPoint.cpp index 87dc79ce2..8906ddf2c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPoint.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPoint.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,8 +27,8 @@ void IFC4X3::IfcCartesianPoint::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcCartesianPoint::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCartesianPoint, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readRealArray( args[0], m_Coordinates, m_size ); + if( num_args > 0 ){readRealArray( args[0], m_Coordinates, m_size );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcCartesianPoint, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCartesianPoint::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList.cpp index 7e218c939..2da8f2f9e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList2D.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList2D.cpp index 10dff5cd8..d912596d4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList2D.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList2D.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -48,9 +45,9 @@ void IFC4X3::IfcCartesianPointList2D::getStepParameter( std::stringstream& strea void IFC4X3::IfcCartesianPointList2D::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCartesianPointList2D, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readTypeOfRealList2D( args[0], m_CoordList ); - readTypeOfStringList( args[1], m_TagList ); + if( num_args > 0 ){readTypeOfRealList2D( args[0], m_CoordList );} + if( num_args > 1 ){readTypeOfStringList( args[1], m_TagList );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcCartesianPointList2D, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCartesianPointList2D::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList3D.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList3D.cpp index ca98d07bd..90e5d584b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList3D.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianPointList3D.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -48,9 +45,9 @@ void IFC4X3::IfcCartesianPointList3D::getStepParameter( std::stringstream& strea void IFC4X3::IfcCartesianPointList3D::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCartesianPointList3D, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readTypeOfRealList2D( args[0], m_CoordList ); - readTypeOfStringList( args[1], m_TagList ); + if( num_args > 0 ){readTypeOfRealList2D( args[0], m_CoordList );} + if( num_args > 1 ){readTypeOfStringList( args[1], m_TagList );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcCartesianPointList3D, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCartesianPointList3D::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator.cpp index 0c2f855b7..2c496c833 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcCartesianTransformationOperator::getStepParameter( std::stringst void IFC4X3::IfcCartesianTransformationOperator::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCartesianTransformationOperator, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Axis1, map, errorStream ); - readEntityReference( args[1], m_Axis2, map, errorStream ); - readEntityReference( args[2], m_LocalOrigin, map, errorStream ); - m_Scale = IfcReal::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Axis1, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Axis2, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_LocalOrigin, map, errorStream );} + if( num_args > 3 ){m_Scale = IfcReal::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcCartesianTransformationOperator, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCartesianTransformationOperator::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator2D.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator2D.cpp index f59c28b54..93b67caef 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator2D.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator2D.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcCartesianTransformationOperator2D::getStepParameter( std::string void IFC4X3::IfcCartesianTransformationOperator2D::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCartesianTransformationOperator2D, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Axis1, map, errorStream ); - readEntityReference( args[1], m_Axis2, map, errorStream ); - readEntityReference( args[2], m_LocalOrigin, map, errorStream ); - m_Scale = IfcReal::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Axis1, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Axis2, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_LocalOrigin, map, errorStream );} + if( num_args > 3 ){m_Scale = IfcReal::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcCartesianTransformationOperator2D, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCartesianTransformationOperator2D::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator2DnonUniform.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator2DnonUniform.cpp index b28a0d93b..07792e867 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator2DnonUniform.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator2DnonUniform.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,12 +31,12 @@ void IFC4X3::IfcCartesianTransformationOperator2DnonUniform::getStepParameter( s void IFC4X3::IfcCartesianTransformationOperator2DnonUniform::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCartesianTransformationOperator2DnonUniform, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Axis1, map, errorStream ); - readEntityReference( args[1], m_Axis2, map, errorStream ); - readEntityReference( args[2], m_LocalOrigin, map, errorStream ); - m_Scale = IfcReal::createObjectFromSTEP( args[3], map, errorStream ); - m_Scale2 = IfcReal::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Axis1, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Axis2, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_LocalOrigin, map, errorStream );} + if( num_args > 3 ){m_Scale = IfcReal::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Scale2 = IfcReal::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcCartesianTransformationOperator2DnonUniform, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCartesianTransformationOperator2DnonUniform::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator3D.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator3D.cpp index 12ebd9d35..dd58b17ef 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator3D.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator3D.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,12 +31,12 @@ void IFC4X3::IfcCartesianTransformationOperator3D::getStepParameter( std::string void IFC4X3::IfcCartesianTransformationOperator3D::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCartesianTransformationOperator3D, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Axis1, map, errorStream ); - readEntityReference( args[1], m_Axis2, map, errorStream ); - readEntityReference( args[2], m_LocalOrigin, map, errorStream ); - m_Scale = IfcReal::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_Axis3, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Axis1, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Axis2, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_LocalOrigin, map, errorStream );} + if( num_args > 3 ){m_Scale = IfcReal::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_Axis3, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcCartesianTransformationOperator3D, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCartesianTransformationOperator3D::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator3DnonUniform.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator3DnonUniform.cpp index f04dfcf3e..93efc552a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator3DnonUniform.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCartesianTransformationOperator3DnonUniform.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -38,14 +35,14 @@ void IFC4X3::IfcCartesianTransformationOperator3DnonUniform::getStepParameter( s void IFC4X3::IfcCartesianTransformationOperator3DnonUniform::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCartesianTransformationOperator3DnonUniform, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Axis1, map, errorStream ); - readEntityReference( args[1], m_Axis2, map, errorStream ); - readEntityReference( args[2], m_LocalOrigin, map, errorStream ); - m_Scale = IfcReal::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_Axis3, map, errorStream ); - m_Scale2 = IfcReal::createObjectFromSTEP( args[5], map, errorStream ); - m_Scale3 = IfcReal::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Axis1, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Axis2, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_LocalOrigin, map, errorStream );} + if( num_args > 3 ){m_Scale = IfcReal::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_Axis3, map, errorStream );} + if( num_args > 5 ){m_Scale2 = IfcReal::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Scale3 = IfcReal::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcCartesianTransformationOperator3DnonUniform, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCartesianTransformationOperator3DnonUniform::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCenterLineProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCenterLineProfileDef.cpp index fc564d063..02bae9f93 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCenterLineProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCenterLineProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcCenterLineProfileDef::getStepParameter( std::stringstream& strea void IFC4X3::IfcCenterLineProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCenterLineProfileDef, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Curve, map, errorStream ); - m_Thickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Curve, map, errorStream );} + if( num_args > 3 ){m_Thickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcCenterLineProfileDef, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCenterLineProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChiller.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChiller.cpp index 60ffec433..9d501ffa9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChiller.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChiller.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcChiller::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcChiller::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcChiller, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcChillerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcChillerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcChiller, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcChiller::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChillerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChillerType.cpp index 183f2ebee..de4738cdd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChillerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChillerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcChillerType::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcChillerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcChillerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcChillerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcChillerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcChillerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcChillerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChimney.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChimney.cpp index e502ac20f..3602f8bfe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChimney.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChimney.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcChimney::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcChimney::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcChimney, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcChimneyTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcChimneyTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcChimney, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcChimney::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChimneyType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChimneyType.cpp index 412123ba9..af5f0692a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChimneyType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcChimneyType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcChimneyType::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcChimneyType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcChimneyType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcChimneyTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcChimneyTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcChimneyType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcChimneyType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircle.cpp index 4dae48a54..81775b980 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcCircle::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcCircle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCircle, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcCircle, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCircle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircleHollowProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircleHollowProfileDef.cpp index 70644a5c2..51f0f345a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircleHollowProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircleHollowProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcCircleHollowProfileDef::getStepParameter( std::stringstream& str void IFC4X3::IfcCircleHollowProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCircleHollowProfileDef, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_WallThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_WallThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcCircleHollowProfileDef, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCircleHollowProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircleProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircleProfileDef.cpp index 70d699807..f5ef4018e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircleProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCircleProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcCircleProfileDef::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcCircleProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCircleProfileDef, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcCircleProfileDef, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCircleProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCivilElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCivilElement.cpp index a2722c81e..ce676290c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCivilElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCivilElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcCivilElement::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcCivilElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCivilElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcCivilElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCivilElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCivilElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCivilElementType.cpp index 45350e140..487e9e559 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCivilElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCivilElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcCivilElementType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcCivilElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCivilElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCivilElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCivilElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClassification.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClassification.cpp index 83b4c0217..9b63c7633 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClassification.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClassification.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,14 +58,14 @@ void IFC4X3::IfcClassification::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcClassification::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcClassification, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Source = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Edition = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_EditionDate = IfcDate::createObjectFromSTEP( args[2], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[3], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[4], map, errorStream ); - m_Specification = IfcURIReference::createObjectFromSTEP( args[5], map, errorStream ); - readTypeOfStringList( args[6], m_ReferenceTokens ); + if( num_args > 0 ){m_Source = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Edition = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_EditionDate = IfcDate::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Name = IfcLabel::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Description = IfcText::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Specification = IfcURIReference::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readTypeOfStringList( args[6], m_ReferenceTokens );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcClassification, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcClassification::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClassificationReference.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClassificationReference.cpp index 22c1fb07b..3251d6dd4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClassificationReference.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClassificationReference.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,13 +36,13 @@ void IFC4X3::IfcClassificationReference::getStepParameter( std::stringstream& st void IFC4X3::IfcClassificationReference::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcClassificationReference, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_ReferencedSource = IfcClassificationReferenceSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[4], map, errorStream ); - m_Sort = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ReferencedSource = IfcClassificationReferenceSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Description = IfcText::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Sort = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcClassificationReference, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcClassificationReference::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClosedShell.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClosedShell.cpp index 38ea1edb2..3b09e407e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClosedShell.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClosedShell.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcClosedShell::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcClosedShell::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcClosedShell, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_CfsFaces, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_CfsFaces, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcClosedShell, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcClosedShell::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClothoid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClothoid.cpp index a30fc9d11..21878dad4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClothoid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcClothoid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcClothoid::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcClothoid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcClothoid, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); - m_ClothoidConstant = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ClothoidConstant = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcClothoid, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcClothoid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoil.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoil.cpp index 0f4bda9bb..e01d4c0a0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoil.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoil.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcCoil::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcCoil::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCoil, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCoilTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCoilTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCoil, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCoil::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoilType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoilType.cpp index 226e960d5..e98c943f1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoilType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoilType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCoilType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcCoilType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCoilType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCoilTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCoilTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCoilType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCoilType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourRgb.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourRgb.cpp index 39a89d2f9..5a12fe392 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourRgb.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourRgb.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,11 +26,11 @@ void IFC4X3::IfcColourRgb::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcColourRgb::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcColourRgb, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Red = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_Green = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_Blue = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Red = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Green = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Blue = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcColourRgb, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcColourRgb::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourRgbList.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourRgbList.cpp index dafa6e350..f425f31e1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourRgbList.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourRgbList.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcColourRgbList::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcColourRgbList::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcColourRgbList, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readTypeOfRealList2D( args[0], m_ColourList ); + if( num_args > 0 ){readTypeOfRealList2D( args[0], m_ColourList );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcColourRgbList, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcColourRgbList::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourSpecification.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourSpecification.cpp index 47641921b..fd61b9573 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourSpecification.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColourSpecification.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcColourSpecification::getStepParameter( std::stringstream& stream void IFC4X3::IfcColourSpecification::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcColourSpecification, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcColourSpecification, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcColourSpecification::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColumn.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColumn.cpp index 6e771bce6..0e9255d10 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColumn.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColumn.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcColumn::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcColumn::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcColumn, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcColumnTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcColumnTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcColumn, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcColumn::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColumnType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColumnType.cpp index 695bc9908..488b8c21b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColumnType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcColumnType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcColumnType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcColumnType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcColumnType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcColumnTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcColumnTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcColumnType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcColumnType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCommunicationsAppliance.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCommunicationsAppliance.cpp index 0f6bc8c71..56b8f2349 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCommunicationsAppliance.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCommunicationsAppliance.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcCommunicationsAppliance::getStepParameter( std::stringstream& st void IFC4X3::IfcCommunicationsAppliance::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCommunicationsAppliance, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCommunicationsApplianceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCommunicationsApplianceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCommunicationsAppliance, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCommunicationsAppliance::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCommunicationsApplianceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCommunicationsApplianceType.cpp index ef70691b9..3945a9285 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCommunicationsApplianceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCommunicationsApplianceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCommunicationsApplianceType::getStepParameter( std::stringstream void IFC4X3::IfcCommunicationsApplianceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCommunicationsApplianceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCommunicationsApplianceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCommunicationsApplianceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCommunicationsApplianceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCommunicationsApplianceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcComplexProperty.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcComplexProperty.cpp index 70ef1fa7b..6bff9f71c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcComplexProperty.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcComplexProperty.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,11 +32,11 @@ void IFC4X3::IfcComplexProperty::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcComplexProperty::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcComplexProperty, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_UsageName = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReferenceList( args[3], m_HasProperties, map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UsageName = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_HasProperties, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcComplexProperty, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcComplexProperty::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcComplexPropertyTemplate.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcComplexPropertyTemplate.cpp index f1049aaaa..2d5585d89 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcComplexPropertyTemplate.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcComplexPropertyTemplate.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -42,14 +39,14 @@ void IFC4X3::IfcComplexPropertyTemplate::getStepParameter( std::stringstream& st void IFC4X3::IfcComplexPropertyTemplate::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcComplexPropertyTemplate, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_UsageName = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_TemplateType = IfcComplexPropertyTemplateTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReferenceList( args[6], m_HasPropertyTemplates, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_UsageName = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_TemplateType = IfcComplexPropertyTemplateTypeEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_HasPropertyTemplates, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcComplexPropertyTemplate, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcComplexPropertyTemplate::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurve.cpp index 98087c4ac..d542985fa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcCompositeCurve::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcCompositeCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCompositeCurve, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Segments, map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Segments, map, errorStream );} + if( num_args > 1 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcCompositeCurve, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCompositeCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurveOnSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurveOnSurface.cpp index 18f7a25b6..53a0ed522 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurveOnSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurveOnSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcCompositeCurveOnSurface::getStepParameter( std::stringstream& st void IFC4X3::IfcCompositeCurveOnSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCompositeCurveOnSurface, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Segments, map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Segments, map, errorStream );} + if( num_args > 1 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcCompositeCurveOnSurface, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCompositeCurveOnSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurveSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurveSegment.cpp index 6af4be6a7..c11e999dd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurveSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeCurveSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,10 +28,10 @@ void IFC4X3::IfcCompositeCurveSegment::getStepParameter( std::stringstream& stre void IFC4X3::IfcCompositeCurveSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCompositeCurveSegment, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Transition = IfcTransitionCode::createObjectFromSTEP( args[0], map, errorStream ); - m_SameSense = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_ParentCurve, map, errorStream ); + if( num_args > 0 ){m_Transition = IfcTransitionCode::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_SameSense = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_ParentCurve, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcCompositeCurveSegment, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCompositeCurveSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeProfileDef.cpp index 121493234..fd09294d7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompositeProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcCompositeProfileDef::getStepParameter( std::stringstream& stream void IFC4X3::IfcCompositeProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCompositeProfileDef, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_Profiles, map, errorStream ); - m_Label = IfcLabel::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_Profiles, map, errorStream );} + if( num_args > 3 ){m_Label = IfcLabel::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcCompositeProfileDef, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCompositeProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompressor.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompressor.cpp index 5909e5ec0..17e36ec85 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompressor.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompressor.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcCompressor::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcCompressor::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCompressor, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCompressorTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCompressorTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCompressor, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCompressor::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompressorType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompressorType.cpp index 70f1fcfa5..61533f1a2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompressorType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCompressorType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCompressorType::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcCompressorType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCompressorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCompressorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCompressorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCompressorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCompressorType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCondenser.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCondenser.cpp index b4d8f3c90..4e53f8268 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCondenser.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCondenser.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcCondenser::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcCondenser::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCondenser, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCondenserTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCondenserTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCondenser, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCondenser::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCondenserType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCondenserType.cpp index a69779440..a4c11f443 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCondenserType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCondenserType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCondenserType::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcCondenserType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCondenserType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCondenserTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCondenserTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCondenserType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCondenserType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConic.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConic.cpp index 9ed278fea..c417e4603 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConic.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConic.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcConic::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcConic::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConic, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcConic, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConic::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectedFaceSet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectedFaceSet.cpp index a54420053..225d670f7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectedFaceSet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectedFaceSet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcConnectedFaceSet::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcConnectedFaceSet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConnectedFaceSet, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_CfsFaces, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_CfsFaces, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcConnectedFaceSet, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConnectedFaceSet::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionCurveGeometry.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionCurveGeometry.cpp index d9df95193..7c2ca49f6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionCurveGeometry.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionCurveGeometry.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,9 +21,9 @@ void IFC4X3::IfcConnectionCurveGeometry::getStepParameter( std::stringstream& st void IFC4X3::IfcConnectionCurveGeometry::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConnectionCurveGeometry, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_CurveOnRelatingElement = IfcCurveOrEdgeCurve::createObjectFromSTEP( args[0], map, errorStream ); - m_CurveOnRelatedElement = IfcCurveOrEdgeCurve::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_CurveOnRelatingElement = IfcCurveOrEdgeCurve::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_CurveOnRelatedElement = IfcCurveOrEdgeCurve::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcConnectionCurveGeometry, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConnectionCurveGeometry::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionGeometry.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionGeometry.cpp index 0e16b0816..d80a875d5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionGeometry.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionGeometry.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionPointEccentricity.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionPointEccentricity.cpp index 3c03b1418..5fd4619a0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionPointEccentricity.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionPointEccentricity.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,12 +28,12 @@ void IFC4X3::IfcConnectionPointEccentricity::getStepParameter( std::stringstream void IFC4X3::IfcConnectionPointEccentricity::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConnectionPointEccentricity, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_PointOnRelatingElement = IfcPointOrVertexPoint::createObjectFromSTEP( args[0], map, errorStream ); - m_PointOnRelatedElement = IfcPointOrVertexPoint::createObjectFromSTEP( args[1], map, errorStream ); - m_EccentricityInX = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_EccentricityInY = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_EccentricityInZ = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_PointOnRelatingElement = IfcPointOrVertexPoint::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_PointOnRelatedElement = IfcPointOrVertexPoint::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_EccentricityInX = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_EccentricityInY = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_EccentricityInZ = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcConnectionPointEccentricity, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConnectionPointEccentricity::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionPointGeometry.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionPointGeometry.cpp index 04e63b435..1bd395585 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionPointGeometry.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionPointGeometry.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,9 +21,9 @@ void IFC4X3::IfcConnectionPointGeometry::getStepParameter( std::stringstream& st void IFC4X3::IfcConnectionPointGeometry::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConnectionPointGeometry, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_PointOnRelatingElement = IfcPointOrVertexPoint::createObjectFromSTEP( args[0], map, errorStream ); - m_PointOnRelatedElement = IfcPointOrVertexPoint::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_PointOnRelatingElement = IfcPointOrVertexPoint::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_PointOnRelatedElement = IfcPointOrVertexPoint::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcConnectionPointGeometry, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConnectionPointGeometry::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionSurfaceGeometry.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionSurfaceGeometry.cpp index 6defbd7a3..50bf60109 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionSurfaceGeometry.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionSurfaceGeometry.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,9 +21,9 @@ void IFC4X3::IfcConnectionSurfaceGeometry::getStepParameter( std::stringstream& void IFC4X3::IfcConnectionSurfaceGeometry::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConnectionSurfaceGeometry, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_SurfaceOnRelatingElement = IfcSurfaceOrFaceSurface::createObjectFromSTEP( args[0], map, errorStream ); - m_SurfaceOnRelatedElement = IfcSurfaceOrFaceSurface::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_SurfaceOnRelatingElement = IfcSurfaceOrFaceSurface::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_SurfaceOnRelatedElement = IfcSurfaceOrFaceSurface::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcConnectionSurfaceGeometry, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConnectionSurfaceGeometry::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionVolumeGeometry.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionVolumeGeometry.cpp index 4679199bc..8c2c5b47b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionVolumeGeometry.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConnectionVolumeGeometry.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,9 +21,9 @@ void IFC4X3::IfcConnectionVolumeGeometry::getStepParameter( std::stringstream& s void IFC4X3::IfcConnectionVolumeGeometry::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConnectionVolumeGeometry, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_VolumeOnRelatingElement = IfcSolidOrShell::createObjectFromSTEP( args[0], map, errorStream ); - m_VolumeOnRelatedElement = IfcSolidOrShell::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_VolumeOnRelatingElement = IfcSolidOrShell::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_VolumeOnRelatedElement = IfcSolidOrShell::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcConnectionVolumeGeometry, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConnectionVolumeGeometry::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstraint.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstraint.cpp index 285ea2cdd..765ba38e6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstraint.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstraint.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -40,14 +37,14 @@ void IFC4X3::IfcConstraint::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcConstraint::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConstraint, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_ConstraintGrade = IfcConstraintEnum::createObjectFromSTEP( args[2], map, errorStream ); - m_ConstraintSource = IfcLabel::createObjectFromSTEP( args[3], map, errorStream ); - m_CreatingActor = IfcActorSelect::createObjectFromSTEP( args[4], map, errorStream ); - m_CreationTime = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream ); - m_UserDefinedGrade = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_ConstraintGrade = IfcConstraintEnum::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ConstraintSource = IfcLabel::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_CreatingActor = IfcActorSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_CreationTime = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_UserDefinedGrade = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcConstraint, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConstraint::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionEquipmentResource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionEquipmentResource.cpp index 87faacd4f..094e819fc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionEquipmentResource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionEquipmentResource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,18 +56,18 @@ void IFC4X3::IfcConstructionEquipmentResource::getStepParameter( std::stringstre void IFC4X3::IfcConstructionEquipmentResource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConstructionEquipmentResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReference( args[7], m_Usage, map, errorStream ); - readEntityReferenceList( args[8], m_BaseCosts, map, errorStream ); - readEntityReference( args[9], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcConstructionEquipmentResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_Usage, map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_BaseCosts, map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_BaseQuantity, map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcConstructionEquipmentResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcConstructionEquipmentResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConstructionEquipmentResource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionEquipmentResourceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionEquipmentResourceType.cpp index 0fb5805a9..2bd803a07 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionEquipmentResourceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionEquipmentResourceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,19 +56,19 @@ void IFC4X3::IfcConstructionEquipmentResourceType::getStepParameter( std::string void IFC4X3::IfcConstructionEquipmentResourceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConstructionEquipmentResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReferenceList( args[9], m_BaseCosts, map, errorStream ); - readEntityReference( args[10], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcConstructionEquipmentResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_BaseCosts, map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_BaseQuantity, map, errorStream );} + if( num_args > 11 ){m_PredefinedType = IfcConstructionEquipmentResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcConstructionEquipmentResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConstructionEquipmentResourceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionMaterialResource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionMaterialResource.cpp index e3b22960b..a1906add9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionMaterialResource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionMaterialResource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,18 +56,18 @@ void IFC4X3::IfcConstructionMaterialResource::getStepParameter( std::stringstrea void IFC4X3::IfcConstructionMaterialResource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConstructionMaterialResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReference( args[7], m_Usage, map, errorStream ); - readEntityReferenceList( args[8], m_BaseCosts, map, errorStream ); - readEntityReference( args[9], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcConstructionMaterialResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_Usage, map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_BaseCosts, map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_BaseQuantity, map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcConstructionMaterialResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcConstructionMaterialResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConstructionMaterialResource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionMaterialResourceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionMaterialResourceType.cpp index 24360640b..beeb119cf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionMaterialResourceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionMaterialResourceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,19 +56,19 @@ void IFC4X3::IfcConstructionMaterialResourceType::getStepParameter( std::strings void IFC4X3::IfcConstructionMaterialResourceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConstructionMaterialResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReferenceList( args[9], m_BaseCosts, map, errorStream ); - readEntityReference( args[10], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcConstructionMaterialResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_BaseCosts, map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_BaseQuantity, map, errorStream );} + if( num_args > 11 ){m_PredefinedType = IfcConstructionMaterialResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcConstructionMaterialResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConstructionMaterialResourceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionProductResource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionProductResource.cpp index 53301c882..50c53d344 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionProductResource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionProductResource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,18 +56,18 @@ void IFC4X3::IfcConstructionProductResource::getStepParameter( std::stringstream void IFC4X3::IfcConstructionProductResource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConstructionProductResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReference( args[7], m_Usage, map, errorStream ); - readEntityReferenceList( args[8], m_BaseCosts, map, errorStream ); - readEntityReference( args[9], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcConstructionProductResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_Usage, map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_BaseCosts, map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_BaseQuantity, map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcConstructionProductResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcConstructionProductResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConstructionProductResource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionProductResourceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionProductResourceType.cpp index 8fc307e61..d5fc2b783 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionProductResourceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionProductResourceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,19 +56,19 @@ void IFC4X3::IfcConstructionProductResourceType::getStepParameter( std::stringst void IFC4X3::IfcConstructionProductResourceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConstructionProductResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReferenceList( args[9], m_BaseCosts, map, errorStream ); - readEntityReference( args[10], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcConstructionProductResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_BaseCosts, map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_BaseQuantity, map, errorStream );} + if( num_args > 11 ){m_PredefinedType = IfcConstructionProductResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcConstructionProductResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConstructionProductResourceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionResource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionResource.cpp index 6ae71628b..823f3aaf9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionResource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionResource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,17 +53,17 @@ void IFC4X3::IfcConstructionResource::getStepParameter( std::stringstream& strea void IFC4X3::IfcConstructionResource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConstructionResource, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReference( args[7], m_Usage, map, errorStream ); - readEntityReferenceList( args[8], m_BaseCosts, map, errorStream ); - readEntityReference( args[9], m_BaseQuantity, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_Usage, map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_BaseCosts, map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_BaseQuantity, map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcConstructionResource, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConstructionResource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionResourceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionResourceType.cpp index 8334f0d80..4ff12f8a9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionResourceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConstructionResourceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,18 +53,18 @@ void IFC4X3::IfcConstructionResourceType::getStepParameter( std::stringstream& s void IFC4X3::IfcConstructionResourceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConstructionResourceType, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReferenceList( args[9], m_BaseCosts, map, errorStream ); - readEntityReference( args[10], m_BaseQuantity, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_BaseCosts, map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_BaseQuantity, map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcConstructionResourceType, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConstructionResourceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcContext.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcContext.cpp index feae6ccd4..11407d85c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcContext.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcContext.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,16 +46,16 @@ void IFC4X3::IfcContext::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcContext::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcContext, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - m_Phase = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_RepresentationContexts, map, errorStream ); - readEntityReference( args[8], m_UnitsInContext, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Phase = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_RepresentationContexts, map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_UnitsInContext, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcContext, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcContext::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcContextDependentUnit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcContextDependentUnit.cpp index 47127a461..b4a607c25 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcContextDependentUnit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcContextDependentUnit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcContextDependentUnit::getStepParameter( std::stringstream& strea void IFC4X3::IfcContextDependentUnit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcContextDependentUnit, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Dimensions, map, errorStream ); - m_UnitType = IfcUnitEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Dimensions, map, errorStream );} + if( num_args > 1 ){m_UnitType = IfcUnitEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcContextDependentUnit, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcContextDependentUnit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcControl.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcControl.cpp index 9c13d5273..dea544346 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcControl.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcControl.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -45,13 +42,13 @@ void IFC4X3::IfcControl::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcControl::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcControl, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcControl, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcControl::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcController.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcController.cpp index ca8e24746..750fba847 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcController.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcController.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcController::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcController::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcController, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcControllerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcControllerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcController, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcController::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcControllerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcControllerType.cpp index 39935eb3a..69f39771d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcControllerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcControllerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcControllerType::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcControllerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcControllerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcControllerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcControllerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcControllerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcControllerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConversionBasedUnit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConversionBasedUnit.cpp index 577bff16d..c09d26f54 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConversionBasedUnit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConversionBasedUnit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcConversionBasedUnit::getStepParameter( std::stringstream& stream void IFC4X3::IfcConversionBasedUnit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConversionBasedUnit, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Dimensions, map, errorStream ); - m_UnitType = IfcUnitEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_ConversionFactor, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Dimensions, map, errorStream );} + if( num_args > 1 ){m_UnitType = IfcUnitEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_ConversionFactor, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcConversionBasedUnit, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConversionBasedUnit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConversionBasedUnitWithOffset.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConversionBasedUnitWithOffset.cpp index 5509b67d9..230c510f9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConversionBasedUnitWithOffset.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConversionBasedUnitWithOffset.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcConversionBasedUnitWithOffset::getStepParameter( std::stringstre void IFC4X3::IfcConversionBasedUnitWithOffset::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConversionBasedUnitWithOffset, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Dimensions, map, errorStream ); - m_UnitType = IfcUnitEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_ConversionFactor, map, errorStream ); - m_ConversionOffset = IfcReal::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Dimensions, map, errorStream );} + if( num_args > 1 ){m_UnitType = IfcUnitEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_ConversionFactor, map, errorStream );} + if( num_args > 4 ){m_ConversionOffset = IfcReal::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcConversionBasedUnitWithOffset, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConversionBasedUnitWithOffset::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConveyorSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConveyorSegment.cpp index 9c67a8757..d0a3e3f51 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConveyorSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConveyorSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcConveyorSegment::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcConveyorSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConveyorSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcConveyorSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcConveyorSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcConveyorSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConveyorSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConveyorSegmentType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConveyorSegmentType.cpp index 5b5b20816..b994dcc9b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConveyorSegmentType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcConveyorSegmentType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcConveyorSegmentType::getStepParameter( std::stringstream& stream void IFC4X3::IfcConveyorSegmentType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcConveyorSegmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcConveyorSegmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcConveyorSegmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcConveyorSegmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcConveyorSegmentType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCooledBeam.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCooledBeam.cpp index 13d99a672..b16cfff28 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCooledBeam.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCooledBeam.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcCooledBeam::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcCooledBeam::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCooledBeam, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCooledBeamTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCooledBeamTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCooledBeam, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCooledBeam::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCooledBeamType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCooledBeamType.cpp index 9abad2485..db72061ed 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCooledBeamType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCooledBeamType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCooledBeamType::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcCooledBeamType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCooledBeamType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCooledBeamTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCooledBeamTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCooledBeamType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCooledBeamType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoolingTower.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoolingTower.cpp index f2ae50d3d..7d33003a6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoolingTower.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoolingTower.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcCoolingTower::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcCoolingTower::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCoolingTower, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCoolingTowerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCoolingTowerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCoolingTower, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCoolingTower::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoolingTowerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoolingTowerType.cpp index 028954725..a9383a3a2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoolingTowerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoolingTowerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCoolingTowerType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcCoolingTowerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCoolingTowerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCoolingTowerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCoolingTowerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCoolingTowerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCoolingTowerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoordinateOperation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoordinateOperation.cpp index 48e627557..3ee7add31 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoordinateOperation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoordinateOperation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -26,9 +23,9 @@ void IFC4X3::IfcCoordinateOperation::getStepParameter( std::stringstream& stream void IFC4X3::IfcCoordinateOperation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCoordinateOperation, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_SourceCRS = IfcCoordinateReferenceSystemSelect::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_TargetCRS, map, errorStream ); + if( num_args > 0 ){m_SourceCRS = IfcCoordinateReferenceSystemSelect::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_TargetCRS, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcCoordinateOperation, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCoordinateOperation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoordinateReferenceSystem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoordinateReferenceSystem.cpp index e415216f6..e30a1baeb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoordinateReferenceSystem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoordinateReferenceSystem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcCoordinateReferenceSystem::getStepParameter( std::stringstream& void IFC4X3::IfcCoordinateReferenceSystem::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCoordinateReferenceSystem, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_GeodeticDatum = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream ); - m_VerticalDatum = IfcIdentifier::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_GeodeticDatum = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_VerticalDatum = IfcIdentifier::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcCoordinateReferenceSystem, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCoordinateReferenceSystem::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCosineSpiral.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCosineSpiral.cpp index 3c4ded149..4d3e45740 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCosineSpiral.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCosineSpiral.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcCosineSpiral::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcCosineSpiral::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCosineSpiral, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); - m_CosineTerm = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_ConstantTerm = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_CosineTerm = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_ConstantTerm = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcCosineSpiral, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCosineSpiral::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostItem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostItem.cpp index 56f550160..cb34d2f80 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostItem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostItem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,16 +51,16 @@ void IFC4X3::IfcCostItem::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcCostItem::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCostItem, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_PredefinedType = IfcCostItemTypeEnum::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_CostValues, map, errorStream ); - readEntityReferenceList( args[8], m_CostQuantities, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_PredefinedType = IfcCostItemTypeEnum::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_CostValues, map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_CostQuantities, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCostItem, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCostItem::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostSchedule.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostSchedule.cpp index 2d39464aa..1465135f8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostSchedule.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostSchedule.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -55,17 +52,17 @@ void IFC4X3::IfcCostSchedule::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcCostSchedule::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCostSchedule, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_PredefinedType = IfcCostScheduleTypeEnum::createObjectFromSTEP( args[6], map, errorStream ); - m_Status = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_SubmittedOn = IfcDateTime::createObjectFromSTEP( args[8], map, errorStream ); - m_UpdateDate = IfcDateTime::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_PredefinedType = IfcCostScheduleTypeEnum::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Status = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_SubmittedOn = IfcDateTime::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_UpdateDate = IfcDateTime::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCostSchedule, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCostSchedule::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostValue.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostValue.cpp index 620302768..207ccf91a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostValue.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCostValue.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -47,17 +44,17 @@ void IFC4X3::IfcCostValue::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcCostValue::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCostValue, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_AppliedValue = IfcAppliedValueSelect::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_UnitBasis, map, errorStream ); - m_ApplicableDate = IfcDate::createObjectFromSTEP( args[4], map, errorStream ); - m_FixedUntilDate = IfcDate::createObjectFromSTEP( args[5], map, errorStream ); - m_Category = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - m_Condition = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ArithmeticOperator = IfcArithmeticOperatorEnum::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReferenceList( args[9], m_Components, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_AppliedValue = IfcAppliedValueSelect::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_UnitBasis, map, errorStream );} + if( num_args > 4 ){m_ApplicableDate = IfcDate::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_FixedUntilDate = IfcDate::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Category = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Condition = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ArithmeticOperator = IfcArithmeticOperatorEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_Components, map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCostValue, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCostValue::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCourse.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCourse.cpp index 5f46ea6b8..d10f48b5b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCourse.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCourse.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcCourse::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcCourse::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCourse, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCourseTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCourseTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCourse, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCourse::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCourseType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCourseType.cpp index 8f42e75f1..c05a46d90 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCourseType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCourseType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCourseType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcCourseType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCourseType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCourseTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCourseTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCourseType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCourseType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCovering.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCovering.cpp index ca7c29fc6..b9426acdc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCovering.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCovering.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -67,16 +64,16 @@ void IFC4X3::IfcCovering::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcCovering::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCovering, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCoveringTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCoveringTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCovering, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCovering::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoveringType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoveringType.cpp index 531aefa13..42c064362 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoveringType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCoveringType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCoveringType::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcCoveringType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCoveringType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCoveringTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCoveringTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCoveringType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCoveringType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCrewResource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCrewResource.cpp index bdcd30fde..a200855a4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCrewResource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCrewResource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,18 +56,18 @@ void IFC4X3::IfcCrewResource::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcCrewResource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCrewResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReference( args[7], m_Usage, map, errorStream ); - readEntityReferenceList( args[8], m_BaseCosts, map, errorStream ); - readEntityReference( args[9], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcCrewResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_Usage, map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_BaseCosts, map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_BaseQuantity, map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcCrewResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcCrewResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCrewResource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCrewResourceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCrewResourceType.cpp index b5318d920..cb3742204 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCrewResourceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCrewResourceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,19 +56,19 @@ void IFC4X3::IfcCrewResourceType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcCrewResourceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCrewResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReferenceList( args[9], m_BaseCosts, map, errorStream ); - readEntityReference( args[10], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcCrewResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_BaseCosts, map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_BaseQuantity, map, errorStream );} + if( num_args > 11 ){m_PredefinedType = IfcCrewResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcCrewResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCrewResourceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCsgPrimitive3D.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCsgPrimitive3D.cpp index d09758978..ff2e5f949 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCsgPrimitive3D.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCsgPrimitive3D.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcCsgPrimitive3D::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcCsgPrimitive3D::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCsgPrimitive3D, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcCsgPrimitive3D, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCsgPrimitive3D::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCsgSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCsgSolid.cpp index 3ee72291f..9a3f92a39 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCsgSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCsgSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcCsgSolid::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcCsgSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCsgSolid, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_TreeRootExpression = IfcCsgSelect::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_TreeRootExpression = IfcCsgSelect::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcCsgSolid, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCsgSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurrencyRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurrencyRelationship.cpp index e58a5b902..f554b07fc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurrencyRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurrencyRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,14 +36,14 @@ void IFC4X3::IfcCurrencyRelationship::getStepParameter( std::stringstream& strea void IFC4X3::IfcCurrencyRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCurrencyRelationship, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_RelatingMonetaryUnit, map, errorStream ); - readEntityReference( args[3], m_RelatedMonetaryUnit, map, errorStream ); - m_ExchangeRate = IfcPositiveRatioMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_RateDateTime = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_RateSource, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_RelatingMonetaryUnit, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_RelatedMonetaryUnit, map, errorStream );} + if( num_args > 4 ){m_ExchangeRate = IfcPositiveRatioMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_RateDateTime = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_RateSource, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcCurrencyRelationship, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCurrencyRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurtainWall.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurtainWall.cpp index 89a17205a..fbaed5ecf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurtainWall.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurtainWall.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcCurtainWall::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcCurtainWall::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCurtainWall, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcCurtainWallTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcCurtainWallTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcCurtainWall, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCurtainWall::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurtainWallType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurtainWallType.cpp index 63b44dd8e..e71ca365a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurtainWallType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurtainWallType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcCurtainWallType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcCurtainWallType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCurtainWallType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcCurtainWallTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcCurtainWallTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcCurtainWallType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCurtainWallType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurve.cpp index a7c0efa9e..661e726b9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveBoundedPlane.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveBoundedPlane.cpp index 13898ac15..8287dd9cf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveBoundedPlane.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveBoundedPlane.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcCurveBoundedPlane::getStepParameter( std::stringstream& stream, void IFC4X3::IfcCurveBoundedPlane::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCurveBoundedPlane, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisSurface, map, errorStream ); - readEntityReference( args[1], m_OuterBoundary, map, errorStream ); - readEntityReferenceList( args[2], m_InnerBoundaries, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisSurface, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OuterBoundary, map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_InnerBoundaries, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcCurveBoundedPlane, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCurveBoundedPlane::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveBoundedSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveBoundedSurface.cpp index 295b57e91..0311b16d8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveBoundedSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveBoundedSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcCurveBoundedSurface::getStepParameter( std::stringstream& stream void IFC4X3::IfcCurveBoundedSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCurveBoundedSurface, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisSurface, map, errorStream ); - readEntityReferenceList( args[1], m_Boundaries, map, errorStream ); - m_ImplicitOuter = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisSurface, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_Boundaries, map, errorStream );} + if( num_args > 2 ){m_ImplicitOuter = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcCurveBoundedSurface, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCurveBoundedSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveSegment.cpp index 93267a060..ead65c9e6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,12 +33,12 @@ void IFC4X3::IfcCurveSegment::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcCurveSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCurveSegment, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Transition = IfcTransitionCode::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_Placement, map, errorStream ); - m_SegmentStart = IfcCurveMeasureSelect::createObjectFromSTEP( args[2], map, errorStream ); - m_SegmentLength = IfcCurveMeasureSelect::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_ParentCurve, map, errorStream ); + if( num_args > 0 ){m_Transition = IfcTransitionCode::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Placement, map, errorStream );} + if( num_args > 2 ){m_SegmentStart = IfcCurveMeasureSelect::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_SegmentLength = IfcCurveMeasureSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_ParentCurve, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcCurveSegment, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCurveSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyle.cpp index c86477669..f22986dce 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,12 +31,12 @@ void IFC4X3::IfcCurveStyle::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcCurveStyle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCurveStyle, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_CurveFont = IfcCurveFontOrScaledCurveFontSelect::createObjectFromSTEP( args[1], map, errorStream ); - m_CurveWidth = IfcSizeSelect::createObjectFromSTEP( args[2], map, errorStream ); - m_CurveColour = IfcColour::createObjectFromSTEP( args[3], map, errorStream ); - m_ModelOrDraughting = IfcBoolean::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_CurveFont = IfcCurveFontOrScaledCurveFontSelect::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_CurveWidth = IfcSizeSelect::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_CurveColour = IfcColour::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ModelOrDraughting = IfcBoolean::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcCurveStyle, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCurveStyle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFont.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFont.cpp index 6e5991110..9db403025 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFont.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFont.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,9 +22,9 @@ void IFC4X3::IfcCurveStyleFont::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcCurveStyleFont::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCurveStyleFont, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReferenceList( args[1], m_PatternList, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_PatternList, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcCurveStyleFont, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCurveStyleFont::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFontAndScaling.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFontAndScaling.cpp index 965f96d87..9c7d6bf27 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFontAndScaling.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFontAndScaling.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -28,10 +25,10 @@ void IFC4X3::IfcCurveStyleFontAndScaling::getStepParameter( std::stringstream& s void IFC4X3::IfcCurveStyleFontAndScaling::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCurveStyleFontAndScaling, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_CurveStyleFont = IfcCurveStyleFontSelect::createObjectFromSTEP( args[1], map, errorStream ); - m_CurveFontScaling = IfcPositiveRatioMeasure::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_CurveStyleFont = IfcCurveStyleFontSelect::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_CurveFontScaling = IfcPositiveRatioMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcCurveStyleFontAndScaling, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCurveStyleFontAndScaling::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFontPattern.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFontPattern.cpp index 1b7a697c6..5e8ec8006 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFontPattern.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCurveStyleFontPattern.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,9 +22,9 @@ void IFC4X3::IfcCurveStyleFontPattern::getStepParameter( std::stringstream& stre void IFC4X3::IfcCurveStyleFontPattern::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCurveStyleFontPattern, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_VisibleSegmentLength = IfcLengthMeasure::createObjectFromSTEP( args[0], map, errorStream ); - m_InvisibleSegmentLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_VisibleSegmentLength = IfcLengthMeasure::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_InvisibleSegmentLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcCurveStyleFontPattern, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCurveStyleFontPattern::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCylindricalSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCylindricalSurface.cpp index 412db8493..6e2b09b86 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCylindricalSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcCylindricalSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcCylindricalSurface::getStepParameter( std::stringstream& stream, void IFC4X3::IfcCylindricalSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcCylindricalSurface, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args > 1 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcCylindricalSurface, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcCylindricalSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDamper.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDamper.cpp index b61a8bcbe..1c7fd4093 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDamper.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDamper.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcDamper::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcDamper::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDamper, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcDamperTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcDamperTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDamper, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDamper::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDamperType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDamperType.cpp index 91b236fb2..fb1de0e81 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDamperType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDamperType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcDamperType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcDamperType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDamperType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcDamperTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcDamperTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcDamperType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDamperType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDeepFoundation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDeepFoundation.cpp index 69236bb8e..480837b36 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDeepFoundation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDeepFoundation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcDeepFoundation::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcDeepFoundation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDeepFoundation, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcDeepFoundation, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDeepFoundation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDeepFoundationType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDeepFoundationType.cpp index 7eca5b253..dd33801e1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDeepFoundationType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDeepFoundationType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcDeepFoundationType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcDeepFoundationType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDeepFoundationType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDeepFoundationType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDeepFoundationType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedProfileDef.cpp index 951481afe..7adee5389 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcDerivedProfileDef::getStepParameter( std::stringstream& stream, void IFC4X3::IfcDerivedProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDerivedProfileDef, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_ParentProfile, map, errorStream ); - readEntityReference( args[3], m_Operator, map, errorStream ); - m_Label = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_ParentProfile, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_Operator, map, errorStream );} + if( num_args > 4 ){m_Label = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcDerivedProfileDef, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDerivedProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedUnit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedUnit.cpp index 05c1b8877..877a0e87d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedUnit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedUnit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,11 +27,11 @@ void IFC4X3::IfcDerivedUnit::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcDerivedUnit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDerivedUnit, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Elements, map, errorStream ); - m_UnitType = IfcDerivedUnitEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Elements, map, errorStream );} + if( num_args > 1 ){m_UnitType = IfcDerivedUnitEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Name = IfcLabel::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcDerivedUnit, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDerivedUnit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedUnitElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedUnitElement.cpp index 025fe29c8..028d52413 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedUnitElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDerivedUnitElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,9 +21,9 @@ void IFC4X3::IfcDerivedUnitElement::getStepParameter( std::stringstream& stream, void IFC4X3::IfcDerivedUnitElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDerivedUnitElement, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Unit, map, errorStream ); - readIntegerValue( args[1], m_Exponent ); + if( num_args > 0 ){readEntityReference( args[0], m_Unit, map, errorStream );} + if( num_args > 1 ){readIntegerValue( args[1], m_Exponent );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcDerivedUnitElement, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDerivedUnitElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDimensionalExponents.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDimensionalExponents.cpp index 29ce6e625..e893083af 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDimensionalExponents.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDimensionalExponents.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,14 +30,14 @@ void IFC4X3::IfcDimensionalExponents::getStepParameter( std::stringstream& strea void IFC4X3::IfcDimensionalExponents::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDimensionalExponents, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readIntegerValue( args[0], m_LengthExponent ); - readIntegerValue( args[1], m_MassExponent ); - readIntegerValue( args[2], m_TimeExponent ); - readIntegerValue( args[3], m_ElectricCurrentExponent ); - readIntegerValue( args[4], m_ThermodynamicTemperatureExponent ); - readIntegerValue( args[5], m_AmountOfSubstanceExponent ); - readIntegerValue( args[6], m_LuminousIntensityExponent ); + if( num_args > 0 ){readIntegerValue( args[0], m_LengthExponent );} + if( num_args > 1 ){readIntegerValue( args[1], m_MassExponent );} + if( num_args > 2 ){readIntegerValue( args[2], m_TimeExponent );} + if( num_args > 3 ){readIntegerValue( args[3], m_ElectricCurrentExponent );} + if( num_args > 4 ){readIntegerValue( args[4], m_ThermodynamicTemperatureExponent );} + if( num_args > 5 ){readIntegerValue( args[5], m_AmountOfSubstanceExponent );} + if( num_args > 6 ){readIntegerValue( args[6], m_LuminousIntensityExponent );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcDimensionalExponents, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDimensionalExponents::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirection.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirection.cpp index 5485760f3..172672530 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirection.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirection.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcDirection::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcDirection::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDirection, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readTypeOfRealList( args[0], m_DirectionRatios ); + if( num_args > 0 ){readTypeOfRealList( args[0], m_DirectionRatios );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcDirection, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDirection::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirectrixCurveSweptAreaSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirectrixCurveSweptAreaSolid.cpp index faf0bcb76..3a6260ab3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirectrixCurveSweptAreaSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirectrixCurveSweptAreaSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcDirectrixCurveSweptAreaSolid::getStepParameter( std::stringstrea void IFC4X3::IfcDirectrixCurveSweptAreaSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDirectrixCurveSweptAreaSolid, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptArea, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); - readEntityReference( args[2], m_Directrix, map, errorStream ); - m_StartParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_EndParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptArea, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Directrix, map, errorStream );} + if( num_args > 3 ){m_StartParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_EndParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcDirectrixCurveSweptAreaSolid, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDirectrixCurveSweptAreaSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirectrixDerivedReferenceSweptAreaSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirectrixDerivedReferenceSweptAreaSolid.cpp index 067b7b988..117238f0f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirectrixDerivedReferenceSweptAreaSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDirectrixDerivedReferenceSweptAreaSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -38,13 +35,13 @@ void IFC4X3::IfcDirectrixDerivedReferenceSweptAreaSolid::getStepParameter( std:: void IFC4X3::IfcDirectrixDerivedReferenceSweptAreaSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDirectrixDerivedReferenceSweptAreaSolid, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptArea, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); - readEntityReference( args[2], m_Directrix, map, errorStream ); - m_StartParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_EndParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_FixedReference, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptArea, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Directrix, map, errorStream );} + if( num_args > 3 ){m_StartParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_EndParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_FixedReference, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcDirectrixDerivedReferenceSweptAreaSolid, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDirectrixDerivedReferenceSweptAreaSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDiscreteAccessory.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDiscreteAccessory.cpp index 57e27a104..763b19b61 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDiscreteAccessory.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDiscreteAccessory.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcDiscreteAccessory::getStepParameter( std::stringstream& stream, void IFC4X3::IfcDiscreteAccessory::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDiscreteAccessory, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcDiscreteAccessoryTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcDiscreteAccessoryTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDiscreteAccessory, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDiscreteAccessory::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDiscreteAccessoryType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDiscreteAccessoryType.cpp index 4bbdb8e33..0b0c3931d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDiscreteAccessoryType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDiscreteAccessoryType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcDiscreteAccessoryType::getStepParameter( std::stringstream& stre void IFC4X3::IfcDiscreteAccessoryType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDiscreteAccessoryType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcDiscreteAccessoryTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcDiscreteAccessoryTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcDiscreteAccessoryType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDiscreteAccessoryType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionBoard.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionBoard.cpp index f52dfb0c9..8bfad2613 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionBoard.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionBoard.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcDistributionBoard::getStepParameter( std::stringstream& stream, void IFC4X3::IfcDistributionBoard::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionBoard, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcDistributionBoardTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcDistributionBoardTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDistributionBoard, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionBoard::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionBoardType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionBoardType.cpp index e3f57818e..bd665e5c2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionBoardType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionBoardType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcDistributionBoardType::getStepParameter( std::stringstream& stre void IFC4X3::IfcDistributionBoardType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionBoardType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcDistributionBoardTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcDistributionBoardTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcDistributionBoardType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionBoardType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionChamberElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionChamberElement.cpp index f47a2f244..91ae81e7e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionChamberElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionChamberElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcDistributionChamberElement::getStepParameter( std::stringstream& void IFC4X3::IfcDistributionChamberElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionChamberElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcDistributionChamberElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcDistributionChamberElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDistributionChamberElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionChamberElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionChamberElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionChamberElementType.cpp index e147f32aa..30e54b405 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionChamberElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionChamberElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcDistributionChamberElementType::getStepParameter( std::stringstr void IFC4X3::IfcDistributionChamberElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionChamberElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcDistributionChamberElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcDistributionChamberElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcDistributionChamberElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionChamberElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionCircuit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionCircuit.cpp index 0166934c7..f64ef33d3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionCircuit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionCircuit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,14 +46,14 @@ void IFC4X3::IfcDistributionCircuit::getStepParameter( std::stringstream& stream void IFC4X3::IfcDistributionCircuit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionCircuit, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - m_PredefinedType = IfcDistributionSystemEnum::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_PredefinedType = IfcDistributionSystemEnum::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcDistributionCircuit, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionCircuit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionControlElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionControlElement.cpp index ab71df6fe..fdaa53e5d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionControlElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionControlElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,15 +62,15 @@ void IFC4X3::IfcDistributionControlElement::getStepParameter( std::stringstream& void IFC4X3::IfcDistributionControlElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionControlElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcDistributionControlElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionControlElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionControlElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionControlElementType.cpp index 6926e1c44..b02776349 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionControlElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionControlElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcDistributionControlElementType::getStepParameter( std::stringstr void IFC4X3::IfcDistributionControlElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionControlElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDistributionControlElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionControlElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionElement.cpp index c9d99a941..1bfb49a42 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -64,15 +61,15 @@ void IFC4X3::IfcDistributionElement::getStepParameter( std::stringstream& stream void IFC4X3::IfcDistributionElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcDistributionElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionElementType.cpp index a89cec630..c6d8e8c85 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcDistributionElementType::getStepParameter( std::stringstream& st void IFC4X3::IfcDistributionElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDistributionElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionFlowElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionFlowElement.cpp index bd2cd8730..53ffca3bf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionFlowElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionFlowElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,15 +62,15 @@ void IFC4X3::IfcDistributionFlowElement::getStepParameter( std::stringstream& st void IFC4X3::IfcDistributionFlowElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionFlowElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcDistributionFlowElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionFlowElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionFlowElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionFlowElementType.cpp index a40882dae..2d3bcfa66 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionFlowElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionFlowElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcDistributionFlowElementType::getStepParameter( std::stringstream void IFC4X3::IfcDistributionFlowElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionFlowElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDistributionFlowElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionFlowElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionPort.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionPort.cpp index 97a4d5b0e..1cf06e125 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionPort.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionPort.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,17 +58,17 @@ void IFC4X3::IfcDistributionPort::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcDistributionPort::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionPort, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_FlowDirection = IfcFlowDirectionEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcDistributionPortTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_SystemType = IfcDistributionSystemEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_FlowDirection = IfcFlowDirectionEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcDistributionPortTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_SystemType = IfcDistributionSystemEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcDistributionPort, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionPort::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionSystem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionSystem.cpp index 9a26cf32c..885afe1d4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionSystem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDistributionSystem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,14 +46,14 @@ void IFC4X3::IfcDistributionSystem::getStepParameter( std::stringstream& stream, void IFC4X3::IfcDistributionSystem::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDistributionSystem, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - m_PredefinedType = IfcDistributionSystemEnum::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_PredefinedType = IfcDistributionSystemEnum::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcDistributionSystem, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDistributionSystem::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentInformation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentInformation.cpp index ce33e73dd..acdc94672 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentInformation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentInformation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -86,24 +83,24 @@ void IFC4X3::IfcDocumentInformation::getStepParameter( std::stringstream& stream void IFC4X3::IfcDocumentInformation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 17 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDocumentInformation, expecting 17, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Identification = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream ); - m_Location = IfcURIReference::createObjectFromSTEP( args[3], map, errorStream ); - m_Purpose = IfcText::createObjectFromSTEP( args[4], map, errorStream ); - m_IntendedUse = IfcText::createObjectFromSTEP( args[5], map, errorStream ); - m_Scope = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - m_Revision = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_DocumentOwner = IfcActorSelect::createObjectFromSTEP( args[8], map, errorStream ); - readSelectList( args[9], m_Editors, map, errorStream ); - m_CreationTime = IfcDateTime::createObjectFromSTEP( args[10], map, errorStream ); - m_LastRevisionTime = IfcDateTime::createObjectFromSTEP( args[11], map, errorStream ); - m_ElectronicFormat = IfcIdentifier::createObjectFromSTEP( args[12], map, errorStream ); - m_ValidFrom = IfcDate::createObjectFromSTEP( args[13], map, errorStream ); - m_ValidUntil = IfcDate::createObjectFromSTEP( args[14], map, errorStream ); - m_Confidentiality = IfcDocumentConfidentialityEnum::createObjectFromSTEP( args[15], map, errorStream ); - m_Status = IfcDocumentStatusEnum::createObjectFromSTEP( args[16], map, errorStream ); + if( num_args > 0 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Name = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Location = IfcURIReference::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Purpose = IfcText::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_IntendedUse = IfcText::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Scope = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Revision = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_DocumentOwner = IfcActorSelect::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readSelectList( args[9], m_Editors, map, errorStream );} + if( num_args > 10 ){m_CreationTime = IfcDateTime::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_LastRevisionTime = IfcDateTime::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_ElectronicFormat = IfcIdentifier::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_ValidFrom = IfcDate::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){m_ValidUntil = IfcDate::createObjectFromSTEP( args[14], map, errorStream );} + if( num_args > 15 ){m_Confidentiality = IfcDocumentConfidentialityEnum::createObjectFromSTEP( args[15], map, errorStream );} + if( num_args > 16 ){m_Status = IfcDocumentStatusEnum::createObjectFromSTEP( args[16], map, errorStream );} + if( num_args != 17 ){ errorStream << "Wrong parameter count for entity IfcDocumentInformation, expecting 17, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDocumentInformation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentInformationRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentInformationRelationship.cpp index ec0ed9097..f133e1b55 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentInformationRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentInformationRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,12 +29,12 @@ void IFC4X3::IfcDocumentInformationRelationship::getStepParameter( std::stringst void IFC4X3::IfcDocumentInformationRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDocumentInformationRelationship, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_RelatingDocument, map, errorStream ); - readEntityReferenceList( args[3], m_RelatedDocuments, map, errorStream ); - m_RelationshipType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_RelatingDocument, map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_RelatedDocuments, map, errorStream );} + if( num_args > 4 ){m_RelationshipType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcDocumentInformationRelationship, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDocumentInformationRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentReference.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentReference.cpp index 369826e42..aa2b7aa75 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentReference.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDocumentReference.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,12 +33,12 @@ void IFC4X3::IfcDocumentReference::getStepParameter( std::stringstream& stream, void IFC4X3::IfcDocumentReference::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDocumentReference, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_ReferencedDocument, map, errorStream ); + if( num_args > 0 ){m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_ReferencedDocument, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcDocumentReference, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDocumentReference::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoor.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoor.cpp index 7d1063180..e08fe418a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoor.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoor.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -76,20 +73,20 @@ void IFC4X3::IfcDoor::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcDoor::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 13 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDoor, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_OverallHeight = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_OverallWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_PredefinedType = IfcDoorTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); - m_OperationType = IfcDoorTypeOperationEnum::createObjectFromSTEP( args[11], map, errorStream ); - m_UserDefinedOperationType = IfcLabel::createObjectFromSTEP( args[12], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_OverallHeight = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_OverallWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcDoorTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_OperationType = IfcDoorTypeOperationEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_UserDefinedOperationType = IfcLabel::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args != 13 ){ errorStream << "Wrong parameter count for entity IfcDoor, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDoor::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorLiningProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorLiningProperties.cpp index 9e0b8dc00..7d0fb933e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorLiningProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorLiningProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,24 +63,24 @@ void IFC4X3::IfcDoorLiningProperties::getStepParameter( std::stringstream& strea void IFC4X3::IfcDoorLiningProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 17 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDoorLiningProperties, expecting 17, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_LiningDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_LiningThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_ThresholdDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_ThresholdThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_TransomThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_TransomOffset = IfcLengthMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_LiningOffset = IfcLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_ThresholdOffset = IfcLengthMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_CasingThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[12], map, errorStream ); - m_CasingDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[13], map, errorStream ); - readEntityReference( args[14], m_ShapeAspectStyle, map, errorStream ); - m_LiningToPanelOffsetX = IfcLengthMeasure::createObjectFromSTEP( args[15], map, errorStream ); - m_LiningToPanelOffsetY = IfcLengthMeasure::createObjectFromSTEP( args[16], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_LiningDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LiningThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_ThresholdDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_ThresholdThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_TransomThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_TransomOffset = IfcLengthMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_LiningOffset = IfcLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_ThresholdOffset = IfcLengthMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_CasingThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_CasingDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){readEntityReference( args[14], m_ShapeAspectStyle, map, errorStream );} + if( num_args > 15 ){m_LiningToPanelOffsetX = IfcLengthMeasure::createObjectFromSTEP( args[15], map, errorStream );} + if( num_args > 16 ){m_LiningToPanelOffsetY = IfcLengthMeasure::createObjectFromSTEP( args[16], map, errorStream );} + if( num_args != 17 ){ errorStream << "Wrong parameter count for entity IfcDoorLiningProperties, expecting 17, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDoorLiningProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorPanelProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorPanelProperties.cpp index d5c5550e6..fd90b7296 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorPanelProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorPanelProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcDoorPanelProperties::getStepParameter( std::stringstream& stream void IFC4X3::IfcDoorPanelProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDoorPanelProperties, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_PanelDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_PanelOperation = IfcDoorPanelOperationEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_PanelWidth = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_PanelPosition = IfcDoorPanelPositionEnum::createObjectFromSTEP( args[7], map, errorStream ); - readEntityReference( args[8], m_ShapeAspectStyle, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_PanelDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_PanelOperation = IfcDoorPanelOperationEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_PanelWidth = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_PanelPosition = IfcDoorPanelPositionEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_ShapeAspectStyle, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDoorPanelProperties, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDoorPanelProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorStyle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorStyle.cpp index 4147edcf9..4f2a80600 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorStyle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorStyle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -60,19 +57,19 @@ void IFC4X3::IfcDoorStyle::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcDoorStyle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDoorStyle, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_OperationType = IfcDoorStyleOperationEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_ConstructionType = IfcDoorStyleConstructionEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_ParameterTakesPrecedence = IfcBoolean::createObjectFromSTEP( args[10], map, errorStream ); - m_Sizeable = IfcBoolean::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_OperationType = IfcDoorStyleOperationEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_ConstructionType = IfcDoorStyleConstructionEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_ParameterTakesPrecedence = IfcBoolean::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_Sizeable = IfcBoolean::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcDoorStyle, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDoorStyle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorType.cpp index ef1fd9bc0..2ef0b1712 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -62,20 +59,20 @@ void IFC4X3::IfcDoorType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcDoorType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 13 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDoorType, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcDoorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_OperationType = IfcDoorTypeOperationEnum::createObjectFromSTEP( args[10], map, errorStream ); - m_ParameterTakesPrecedence = IfcBoolean::createObjectFromSTEP( args[11], map, errorStream ); - m_UserDefinedOperationType = IfcLabel::createObjectFromSTEP( args[12], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcDoorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_OperationType = IfcDoorTypeOperationEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_ParameterTakesPrecedence = IfcBoolean::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_UserDefinedOperationType = IfcLabel::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args != 13 ){ errorStream << "Wrong parameter count for entity IfcDoorType, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDoorType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorTypeOperationEnum.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorTypeOperationEnum.cpp index 91edfd841..2bed9395b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorTypeOperationEnum.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDoorTypeOperationEnum.cpp @@ -9,19 +9,19 @@ #include "ifcpp/model/BuildingException.h" #include "ifcpp/IFC4X3/include/IfcDoorTypeOperationEnum.h" -// TYPE IfcDoorTypeOperationEnum = ENUMERATION OF (DOUBLE_PANEL_DOUBLE_SWING ,DOUBLE_PANEL_FOLDING ,DOUBLE_PANEL_LIFTING_VERTICAL ,DOUBLE_PANEL_SINGLE_SWING ,DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT ,DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT ,DOUBLE_PANEL_SLIDING ,DOUBLE_SWING_LEFT ,DOUBLE_SWING_RIGHT ,FOLDING_TO_LEFT ,FOLDING_TO_RIGHT ,LIFTING_HORIZONTAL ,LIFTING_VERTICAL_LEFT ,LIFTING_VERTICAL_RIGHT ,REVOLVING_HORIZONTAL ,REVOLVING_VERTICAL ,ROLLINGUP ,SINGLE_SWING_LEFT ,SINGLE_SWING_RIGHT ,SLIDING_TO_LEFT ,SLIDING_TO_RIGHT ,SWING_FIXED_LEFT ,SWING_FIXED_RIGHT ,USERDEFINED ,NOTDEFINED); +// TYPE IfcDoorTypeOperationEnum = ENUMERATION OF (DOUBLE_DOOR_DOUBLE_SWING ,DOUBLE_DOOR_FOLDING ,DOUBLE_DOOR_LIFTING_VERTICAL ,DOUBLE_DOOR_SINGLE_SWING ,DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT ,DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT ,DOUBLE_DOOR_SLIDING ,DOUBLE_SWING_LEFT ,DOUBLE_SWING_RIGHT ,FOLDING_TO_LEFT ,FOLDING_TO_RIGHT ,LIFTING_HORIZONTAL ,LIFTING_VERTICAL_LEFT ,LIFTING_VERTICAL_RIGHT ,REVOLVING ,REVOLVING_VERTICAL ,ROLLINGUP ,SINGLE_SWING_LEFT ,SINGLE_SWING_RIGHT ,SLIDING_TO_LEFT ,SLIDING_TO_RIGHT ,SWING_FIXED_LEFT ,SWING_FIXED_RIGHT ,USERDEFINED ,NOTDEFINED); void IFC4X3::IfcDoorTypeOperationEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const { if( is_select_type ) { stream << "IFCDOORTYPEOPERATIONENUM("; } switch( m_enum ) { - case ENUM_DOUBLE_PANEL_DOUBLE_SWING: stream << ".DOUBLE_PANEL_DOUBLE_SWING."; break; - case ENUM_DOUBLE_PANEL_FOLDING: stream << ".DOUBLE_PANEL_FOLDING."; break; - case ENUM_DOUBLE_PANEL_LIFTING_VERTICAL: stream << ".DOUBLE_PANEL_LIFTING_VERTICAL."; break; - case ENUM_DOUBLE_PANEL_SINGLE_SWING: stream << ".DOUBLE_PANEL_SINGLE_SWING."; break; - case ENUM_DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT: stream << ".DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT."; break; - case ENUM_DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT: stream << ".DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT."; break; - case ENUM_DOUBLE_PANEL_SLIDING: stream << ".DOUBLE_PANEL_SLIDING."; break; + case ENUM_DOUBLE_DOOR_DOUBLE_SWING: stream << ".DOUBLE_DOOR_DOUBLE_SWING."; break; + case ENUM_DOUBLE_DOOR_FOLDING: stream << ".DOUBLE_DOOR_FOLDING."; break; + case ENUM_DOUBLE_DOOR_LIFTING_VERTICAL: stream << ".DOUBLE_DOOR_LIFTING_VERTICAL."; break; + case ENUM_DOUBLE_DOOR_SINGLE_SWING: stream << ".DOUBLE_DOOR_SINGLE_SWING."; break; + case ENUM_DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT: stream << ".DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT."; break; + case ENUM_DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT: stream << ".DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT."; break; + case ENUM_DOUBLE_DOOR_SLIDING: stream << ".DOUBLE_DOOR_SLIDING."; break; case ENUM_DOUBLE_SWING_LEFT: stream << ".DOUBLE_SWING_LEFT."; break; case ENUM_DOUBLE_SWING_RIGHT: stream << ".DOUBLE_SWING_RIGHT."; break; case ENUM_FOLDING_TO_LEFT: stream << ".FOLDING_TO_LEFT."; break; @@ -29,7 +29,7 @@ void IFC4X3::IfcDoorTypeOperationEnum::getStepParameter( std::stringstream& stre case ENUM_LIFTING_HORIZONTAL: stream << ".LIFTING_HORIZONTAL."; break; case ENUM_LIFTING_VERTICAL_LEFT: stream << ".LIFTING_VERTICAL_LEFT."; break; case ENUM_LIFTING_VERTICAL_RIGHT: stream << ".LIFTING_VERTICAL_RIGHT."; break; - case ENUM_REVOLVING_HORIZONTAL: stream << ".REVOLVING_HORIZONTAL."; break; + case ENUM_REVOLVING: stream << ".REVOLVING."; break; case ENUM_REVOLVING_VERTICAL: stream << ".REVOLVING_VERTICAL."; break; case ENUM_ROLLINGUP: stream << ".ROLLINGUP."; break; case ENUM_SINGLE_SWING_LEFT: stream << ".SINGLE_SWING_LEFT."; break; @@ -48,33 +48,33 @@ shared_ptr IFC4X3::IfcDoorTypeOperationEnum::c if( arg.compare( "$" ) == 0 ) { return shared_ptr(); } if( arg.compare( "*" ) == 0 ) { return shared_ptr(); } shared_ptr type_object( new IfcDoorTypeOperationEnum() ); - if( std_iequal( arg, ".DOUBLE_PANEL_DOUBLE_SWING." ) ) + if( std_iequal( arg, ".DOUBLE_DOOR_DOUBLE_SWING." ) ) { - type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_PANEL_DOUBLE_SWING; + type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_DOOR_DOUBLE_SWING; } - else if( std_iequal( arg, ".DOUBLE_PANEL_FOLDING." ) ) + else if( std_iequal( arg, ".DOUBLE_DOOR_FOLDING." ) ) { - type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_PANEL_FOLDING; + type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_DOOR_FOLDING; } - else if( std_iequal( arg, ".DOUBLE_PANEL_LIFTING_VERTICAL." ) ) + else if( std_iequal( arg, ".DOUBLE_DOOR_LIFTING_VERTICAL." ) ) { - type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_PANEL_LIFTING_VERTICAL; + type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_DOOR_LIFTING_VERTICAL; } - else if( std_iequal( arg, ".DOUBLE_PANEL_SINGLE_SWING." ) ) + else if( std_iequal( arg, ".DOUBLE_DOOR_SINGLE_SWING." ) ) { - type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_PANEL_SINGLE_SWING; + type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_DOOR_SINGLE_SWING; } - else if( std_iequal( arg, ".DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT." ) ) + else if( std_iequal( arg, ".DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT." ) ) { - type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT; + type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT; } - else if( std_iequal( arg, ".DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT." ) ) + else if( std_iequal( arg, ".DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT." ) ) { - type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT; + type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT; } - else if( std_iequal( arg, ".DOUBLE_PANEL_SLIDING." ) ) + else if( std_iequal( arg, ".DOUBLE_DOOR_SLIDING." ) ) { - type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_PANEL_SLIDING; + type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_DOUBLE_DOOR_SLIDING; } else if( std_iequal( arg, ".DOUBLE_SWING_LEFT." ) ) { @@ -104,9 +104,9 @@ shared_ptr IFC4X3::IfcDoorTypeOperationEnum::c { type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_LIFTING_VERTICAL_RIGHT; } - else if( std_iequal( arg, ".REVOLVING_HORIZONTAL." ) ) + else if( std_iequal( arg, ".REVOLVING." ) ) { - type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_REVOLVING_HORIZONTAL; + type_object->m_enum = IfcDoorTypeOperationEnum::ENUM_REVOLVING; } else if( std_iequal( arg, ".REVOLVING_VERTICAL." ) ) { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDraughtingPreDefinedColour.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDraughtingPreDefinedColour.cpp index 3b42333c9..1459572eb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDraughtingPreDefinedColour.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDraughtingPreDefinedColour.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcDraughtingPreDefinedColour::getStepParameter( std::stringstream& void IFC4X3::IfcDraughtingPreDefinedColour::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDraughtingPreDefinedColour, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcDraughtingPreDefinedColour, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDraughtingPreDefinedColour::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDraughtingPreDefinedCurveFont.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDraughtingPreDefinedCurveFont.cpp index f7fd598ad..7d44b62f2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDraughtingPreDefinedCurveFont.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDraughtingPreDefinedCurveFont.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcDraughtingPreDefinedCurveFont::getStepParameter( std::stringstre void IFC4X3::IfcDraughtingPreDefinedCurveFont::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDraughtingPreDefinedCurveFont, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcDraughtingPreDefinedCurveFont, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDraughtingPreDefinedCurveFont::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctFitting.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctFitting.cpp index cfdaf90af..411a62be9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctFitting.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctFitting.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcDuctFitting::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcDuctFitting::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDuctFitting, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcDuctFittingTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcDuctFittingTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDuctFitting, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDuctFitting::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctFittingType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctFittingType.cpp index 54d32db64..680cfe299 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctFittingType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctFittingType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcDuctFittingType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcDuctFittingType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDuctFittingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcDuctFittingTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcDuctFittingTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcDuctFittingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDuctFittingType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSegment.cpp index 4a77ad887..be8522a47 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcDuctSegment::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcDuctSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDuctSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcDuctSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcDuctSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDuctSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDuctSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSegmentType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSegmentType.cpp index 83c7e3bb6..591d661ce 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSegmentType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSegmentType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcDuctSegmentType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcDuctSegmentType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDuctSegmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcDuctSegmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcDuctSegmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcDuctSegmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDuctSegmentType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSilencer.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSilencer.cpp index 6527fcd74..50f9b37e0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSilencer.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSilencer.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcDuctSilencer::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcDuctSilencer::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDuctSilencer, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcDuctSilencerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcDuctSilencerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcDuctSilencer, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDuctSilencer::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSilencerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSilencerType.cpp index 391d70cac..2eb14d2cf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSilencerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcDuctSilencerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcDuctSilencerType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcDuctSilencerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcDuctSilencerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcDuctSilencerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcDuctSilencerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcDuctSilencerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcDuctSilencerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksCut.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksCut.cpp index 05d5e628b..b38bb2245 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksCut.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksCut.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcEarthworksCut::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcEarthworksCut::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEarthworksCut, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcEarthworksCutTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcEarthworksCutTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcEarthworksCut, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEarthworksCut::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksElement.cpp index 2e9da2419..68ce1b4d1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcEarthworksElement::getStepParameter( std::stringstream& stream, void IFC4X3::IfcEarthworksElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEarthworksElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcEarthworksElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEarthworksElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksFill.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksFill.cpp index 65e2beda2..6a4391480 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksFill.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEarthworksFill.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcEarthworksFill::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcEarthworksFill::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEarthworksFill, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcEarthworksFillTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcEarthworksFillTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcEarthworksFill, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEarthworksFill::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdge.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdge.cpp index 334a5e5c3..23c30adac 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdge.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdge.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -26,9 +23,9 @@ void IFC4X3::IfcEdge::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcEdge::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEdge, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_EdgeStart, map, errorStream ); - readEntityReference( args[1], m_EdgeEnd, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_EdgeStart, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_EdgeEnd, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcEdge, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEdge::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdgeCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdgeCurve.cpp index ef934662c..a0c046d52 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdgeCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdgeCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcEdgeCurve::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcEdgeCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEdgeCurve, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_EdgeStart, map, errorStream ); - readEntityReference( args[1], m_EdgeEnd, map, errorStream ); - readEntityReference( args[2], m_EdgeGeometry, map, errorStream ); - m_SameSense = IfcBoolean::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_EdgeStart, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_EdgeEnd, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_EdgeGeometry, map, errorStream );} + if( num_args > 3 ){m_SameSense = IfcBoolean::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcEdgeCurve, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEdgeCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdgeLoop.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdgeLoop.cpp index e5bf0b351..832f61ea5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdgeLoop.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEdgeLoop.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcEdgeLoop::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcEdgeLoop::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEdgeLoop, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_EdgeList, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_EdgeList, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcEdgeLoop, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEdgeLoop::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricAppliance.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricAppliance.cpp index 3a699b285..e3ba66383 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricAppliance.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricAppliance.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcElectricAppliance::getStepParameter( std::stringstream& stream, void IFC4X3::IfcElectricAppliance::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricAppliance, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcElectricApplianceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcElectricApplianceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcElectricAppliance, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricAppliance::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricApplianceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricApplianceType.cpp index 8bedab10b..956f0812f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricApplianceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricApplianceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcElectricApplianceType::getStepParameter( std::stringstream& stre void IFC4X3::IfcElectricApplianceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricApplianceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcElectricApplianceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcElectricApplianceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcElectricApplianceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricApplianceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricDistributionBoard.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricDistributionBoard.cpp index 2baeb2165..571dec5e8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricDistributionBoard.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricDistributionBoard.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcElectricDistributionBoard::getStepParameter( std::stringstream& void IFC4X3::IfcElectricDistributionBoard::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricDistributionBoard, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcElectricDistributionBoardTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcElectricDistributionBoardTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcElectricDistributionBoard, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricDistributionBoard::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricDistributionBoardType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricDistributionBoardType.cpp index f24fcb3cf..9bebd5d5b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricDistributionBoardType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricDistributionBoardType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcElectricDistributionBoardType::getStepParameter( std::stringstre void IFC4X3::IfcElectricDistributionBoardType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricDistributionBoardType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcElectricDistributionBoardTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcElectricDistributionBoardTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcElectricDistributionBoardType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricDistributionBoardType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowStorageDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowStorageDevice.cpp index 2330edb4d..c2760c180 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowStorageDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowStorageDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcElectricFlowStorageDevice::getStepParameter( std::stringstream& void IFC4X3::IfcElectricFlowStorageDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricFlowStorageDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcElectricFlowStorageDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcElectricFlowStorageDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcElectricFlowStorageDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricFlowStorageDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowStorageDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowStorageDeviceType.cpp index 8b5ee30d8..75f88b5e6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowStorageDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowStorageDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcElectricFlowStorageDeviceType::getStepParameter( std::stringstre void IFC4X3::IfcElectricFlowStorageDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricFlowStorageDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcElectricFlowStorageDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcElectricFlowStorageDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcElectricFlowStorageDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricFlowStorageDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowTreatmentDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowTreatmentDevice.cpp index 10fbd51b9..479e9e02e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowTreatmentDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowTreatmentDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcElectricFlowTreatmentDevice::getStepParameter( std::stringstream void IFC4X3::IfcElectricFlowTreatmentDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricFlowTreatmentDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcElectricFlowTreatmentDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcElectricFlowTreatmentDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcElectricFlowTreatmentDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricFlowTreatmentDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowTreatmentDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowTreatmentDeviceType.cpp index 8b04fcf40..4b558fa70 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowTreatmentDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricFlowTreatmentDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcElectricFlowTreatmentDeviceType::getStepParameter( std::stringst void IFC4X3::IfcElectricFlowTreatmentDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricFlowTreatmentDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcElectricFlowTreatmentDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcElectricFlowTreatmentDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcElectricFlowTreatmentDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricFlowTreatmentDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricGenerator.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricGenerator.cpp index fa8ddc4d7..a7b4a8115 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricGenerator.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricGenerator.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcElectricGenerator::getStepParameter( std::stringstream& stream, void IFC4X3::IfcElectricGenerator::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricGenerator, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcElectricGeneratorTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcElectricGeneratorTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcElectricGenerator, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricGenerator::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricGeneratorType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricGeneratorType.cpp index 2e51053bb..8d25915df 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricGeneratorType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricGeneratorType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcElectricGeneratorType::getStepParameter( std::stringstream& stre void IFC4X3::IfcElectricGeneratorType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricGeneratorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcElectricGeneratorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcElectricGeneratorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcElectricGeneratorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricGeneratorType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricMotor.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricMotor.cpp index ba9e4b490..66ee2c2b1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricMotor.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricMotor.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcElectricMotor::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcElectricMotor::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricMotor, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcElectricMotorTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcElectricMotorTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcElectricMotor, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricMotor::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricMotorType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricMotorType.cpp index 3cd63506f..80e2cc0b5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricMotorType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricMotorType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcElectricMotorType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcElectricMotorType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricMotorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcElectricMotorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcElectricMotorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcElectricMotorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricMotorType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricTimeControl.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricTimeControl.cpp index aa7348dc4..9420ba932 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricTimeControl.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricTimeControl.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcElectricTimeControl::getStepParameter( std::stringstream& stream void IFC4X3::IfcElectricTimeControl::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricTimeControl, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcElectricTimeControlTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcElectricTimeControlTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcElectricTimeControl, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricTimeControl::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricTimeControlType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricTimeControlType.cpp index d567ceeaf..d0dc3bee3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricTimeControlType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElectricTimeControlType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcElectricTimeControlType::getStepParameter( std::stringstream& st void IFC4X3::IfcElectricTimeControlType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElectricTimeControlType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcElectricTimeControlTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcElectricTimeControlTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcElectricTimeControlType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElectricTimeControlType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElement.cpp index 0f8bd15fc..b120f1540 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcElement::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementAssembly.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementAssembly.cpp index 30404b32e..f445d602f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementAssembly.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementAssembly.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -69,17 +66,17 @@ void IFC4X3::IfcElementAssembly::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcElementAssembly::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElementAssembly, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_AssemblyPlace = IfcAssemblyPlaceEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcElementAssemblyTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_AssemblyPlace = IfcAssemblyPlaceEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcElementAssemblyTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcElementAssembly, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElementAssembly::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementAssemblyType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementAssemblyType.cpp index 0a5a7e689..74f310609 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementAssemblyType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementAssemblyType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcElementAssemblyType::getStepParameter( std::stringstream& stream void IFC4X3::IfcElementAssemblyType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElementAssemblyType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcElementAssemblyTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcElementAssemblyTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcElementAssemblyType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElementAssemblyType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementComponent.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementComponent.cpp index 2437d628e..f31b7a13f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementComponent.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementComponent.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcElementComponent::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcElementComponent::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElementComponent, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcElementComponent, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElementComponent::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementComponentType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementComponentType.cpp index f2f924370..9aa60ee0b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementComponentType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementComponentType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcElementComponentType::getStepParameter( std::stringstream& strea void IFC4X3::IfcElementComponentType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElementComponentType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcElementComponentType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElementComponentType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementQuantity.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementQuantity.cpp index 03a55f15a..273c09a28 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementQuantity.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementQuantity.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -41,13 +38,13 @@ void IFC4X3::IfcElementQuantity::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcElementQuantity::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElementQuantity, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_MethodOfMeasurement = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_Quantities, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_MethodOfMeasurement = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_Quantities, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcElementQuantity, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElementQuantity::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementType.cpp index 9e5b4a0cc..c1d17ef67 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcElementType::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementarySurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementarySurface.cpp index 8b6bf38a1..14f125465 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementarySurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcElementarySurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcElementarySurface::getStepParameter( std::stringstream& stream, void IFC4X3::IfcElementarySurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcElementarySurface, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcElementarySurface, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcElementarySurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEllipse.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEllipse.cpp index 631b0dae5..9d7ea9ed7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEllipse.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEllipse.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcEllipse::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcEllipse::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEllipse, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); - m_SemiAxis1 = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_SemiAxis2 = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_SemiAxis1 = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_SemiAxis2 = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcEllipse, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEllipse::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEllipseProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEllipseProfileDef.cpp index bf582b829..eb5c23bcd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEllipseProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEllipseProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcEllipseProfileDef::getStepParameter( std::stringstream& stream, void IFC4X3::IfcEllipseProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEllipseProfileDef, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_SemiAxis1 = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_SemiAxis2 = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_SemiAxis1 = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_SemiAxis2 = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcEllipseProfileDef, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEllipseProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEnergyConversionDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEnergyConversionDevice.cpp index 10fdf3065..3c5fb412d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEnergyConversionDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEnergyConversionDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,15 +62,15 @@ void IFC4X3::IfcEnergyConversionDevice::getStepParameter( std::stringstream& str void IFC4X3::IfcEnergyConversionDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEnergyConversionDevice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcEnergyConversionDevice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEnergyConversionDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEnergyConversionDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEnergyConversionDeviceType.cpp index a56bbc6c8..ab2f4ea53 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEnergyConversionDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEnergyConversionDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcEnergyConversionDeviceType::getStepParameter( std::stringstream& void IFC4X3::IfcEnergyConversionDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEnergyConversionDeviceType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcEnergyConversionDeviceType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEnergyConversionDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEngine.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEngine.cpp index b3cfc337c..2e1bee6b4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEngine.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEngine.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcEngine::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcEngine::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEngine, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcEngineTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcEngineTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcEngine, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEngine::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEngineType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEngineType.cpp index 285c8df61..dc522c3b1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEngineType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEngineType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcEngineType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcEngineType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEngineType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcEngineTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcEngineTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcEngineType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEngineType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporativeCooler.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporativeCooler.cpp index 4f3c534d1..d0bc0202c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporativeCooler.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporativeCooler.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcEvaporativeCooler::getStepParameter( std::stringstream& stream, void IFC4X3::IfcEvaporativeCooler::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEvaporativeCooler, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcEvaporativeCoolerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcEvaporativeCoolerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcEvaporativeCooler, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEvaporativeCooler::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporativeCoolerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporativeCoolerType.cpp index dd3deb46e..58b48dcbf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporativeCoolerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporativeCoolerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcEvaporativeCoolerType::getStepParameter( std::stringstream& stre void IFC4X3::IfcEvaporativeCoolerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEvaporativeCoolerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcEvaporativeCoolerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcEvaporativeCoolerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcEvaporativeCoolerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEvaporativeCoolerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporator.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporator.cpp index 13eb981d0..10582cda3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporator.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporator.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcEvaporator::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcEvaporator::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEvaporator, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcEvaporatorTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcEvaporatorTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcEvaporator, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEvaporator::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporatorType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporatorType.cpp index d302c449f..f8778e4db 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporatorType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvaporatorType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcEvaporatorType::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcEvaporatorType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEvaporatorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcEvaporatorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcEvaporatorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcEvaporatorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEvaporatorType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvent.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvent.cpp index df7c83baf..e016a4e8a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvent.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEvent.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,18 +56,18 @@ void IFC4X3::IfcEvent::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcEvent::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEvent, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - m_PredefinedType = IfcEventTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_EventTriggerType = IfcEventTriggerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_UserDefinedEventTriggerType = IfcLabel::createObjectFromSTEP( args[9], map, errorStream ); - readEntityReference( args[10], m_EventOccurenceTime, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_PredefinedType = IfcEventTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_EventTriggerType = IfcEventTriggerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_UserDefinedEventTriggerType = IfcLabel::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_EventOccurenceTime, map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcEvent, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEvent::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEventTime.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEventTime.cpp index 7795e36f0..e5d75e958 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEventTime.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEventTime.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,14 +33,14 @@ void IFC4X3::IfcEventTime::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcEventTime::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEventTime, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_ActualDate = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream ); - m_EarlyDate = IfcDateTime::createObjectFromSTEP( args[4], map, errorStream ); - m_LateDate = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream ); - m_ScheduleDate = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ActualDate = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_EarlyDate = IfcDateTime::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LateDate = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_ScheduleDate = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcEventTime, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEventTime::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEventType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEventType.cpp index 2bf0451e1..44db80844 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEventType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcEventType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,19 +55,19 @@ void IFC4X3::IfcEventType::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcEventType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcEventType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ProcessType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcEventTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_EventTriggerType = IfcEventTriggerTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); - m_UserDefinedEventTriggerType = IfcLabel::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ProcessType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcEventTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_EventTriggerType = IfcEventTriggerTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_UserDefinedEventTriggerType = IfcLabel::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcEventType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcEventType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtendedProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtendedProperties.cpp index dd4cc955b..14d2cf9df 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtendedProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtendedProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcExtendedProperties::getStepParameter( std::stringstream& stream, void IFC4X3::IfcExtendedProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcExtendedProperties, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_Properties, map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_Properties, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcExtendedProperties, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcExtendedProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalInformation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalInformation.cpp index a04405ea5..b1d05038b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalInformation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalInformation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalReference.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalReference.cpp index 5622f6801..2d0d624fa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalReference.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalReference.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcExternalReference::getStepParameter( std::stringstream& stream, void IFC4X3::IfcExternalReference::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcExternalReference, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcExternalReference, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcExternalReference::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalReferenceRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalReferenceRelationship.cpp index 8bbdf119a..5a56877c9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalReferenceRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalReferenceRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -60,11 +57,11 @@ void IFC4X3::IfcExternalReferenceRelationship::getStepParameter( std::stringstre void IFC4X3::IfcExternalReferenceRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcExternalReferenceRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_RelatingReference, map, errorStream ); - readSelectList( args[3], m_RelatedResourceObjects, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_RelatingReference, map, errorStream );} + if( num_args > 3 ){readSelectList( args[3], m_RelatedResourceObjects, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcExternalReferenceRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcExternalReferenceRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalSpatialElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalSpatialElement.cpp index 7868df3e0..a4191fda1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalSpatialElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalSpatialElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,16 +56,16 @@ void IFC4X3::IfcExternalSpatialElement::getStepParameter( std::stringstream& str void IFC4X3::IfcExternalSpatialElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcExternalSpatialElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcExternalSpatialElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcExternalSpatialElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcExternalSpatialElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcExternalSpatialElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalSpatialStructureElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalSpatialStructureElement.cpp index b8b740146..29aaec1ef 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalSpatialStructureElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternalSpatialStructureElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -55,15 +52,15 @@ void IFC4X3::IfcExternalSpatialStructureElement::getStepParameter( std::stringst void IFC4X3::IfcExternalSpatialStructureElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcExternalSpatialStructureElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcExternalSpatialStructureElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcExternalSpatialStructureElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedHatchStyle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedHatchStyle.cpp index 4fe72999e..8b8b35e51 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedHatchStyle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedHatchStyle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcExternallyDefinedHatchStyle::getStepParameter( std::stringstream void IFC4X3::IfcExternallyDefinedHatchStyle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcExternallyDefinedHatchStyle, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcExternallyDefinedHatchStyle, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcExternallyDefinedHatchStyle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedSurfaceStyle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedSurfaceStyle.cpp index 56de06c01..a882f997e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedSurfaceStyle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedSurfaceStyle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcExternallyDefinedSurfaceStyle::getStepParameter( std::stringstre void IFC4X3::IfcExternallyDefinedSurfaceStyle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcExternallyDefinedSurfaceStyle, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcExternallyDefinedSurfaceStyle, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcExternallyDefinedSurfaceStyle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedTextFont.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedTextFont.cpp index 51c3ec25e..72faecc67 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedTextFont.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExternallyDefinedTextFont.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcExternallyDefinedTextFont::getStepParameter( std::stringstream& void IFC4X3::IfcExternallyDefinedTextFont::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcExternallyDefinedTextFont, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcExternallyDefinedTextFont, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcExternallyDefinedTextFont::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtrudedAreaSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtrudedAreaSolid.cpp index fd3e09647..c02a8f2db 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtrudedAreaSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtrudedAreaSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcExtrudedAreaSolid::getStepParameter( std::stringstream& stream, void IFC4X3::IfcExtrudedAreaSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcExtrudedAreaSolid, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptArea, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); - readEntityReference( args[2], m_ExtrudedDirection, map, errorStream ); - m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptArea, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_ExtrudedDirection, map, errorStream );} + if( num_args > 3 ){m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcExtrudedAreaSolid, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcExtrudedAreaSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtrudedAreaSolidTapered.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtrudedAreaSolidTapered.cpp index 0c9c6fb15..d8219c5bb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtrudedAreaSolidTapered.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcExtrudedAreaSolidTapered.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcExtrudedAreaSolidTapered::getStepParameter( std::stringstream& s void IFC4X3::IfcExtrudedAreaSolidTapered::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcExtrudedAreaSolidTapered, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptArea, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); - readEntityReference( args[2], m_ExtrudedDirection, map, errorStream ); - m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_EndSweptArea, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptArea, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_ExtrudedDirection, map, errorStream );} + if( num_args > 3 ){m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_EndSweptArea, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcExtrudedAreaSolidTapered, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcExtrudedAreaSolidTapered::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFace.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFace.cpp index 0f869bc7d..1290a2be8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFace.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFace.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,8 +22,8 @@ void IFC4X3::IfcFace::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcFace::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFace, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Bounds, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Bounds, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcFace, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFace::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceBasedSurfaceModel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceBasedSurfaceModel.cpp index 860e7c4f8..be5fabf40 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceBasedSurfaceModel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceBasedSurfaceModel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcFaceBasedSurfaceModel::getStepParameter( std::stringstream& stre void IFC4X3::IfcFaceBasedSurfaceModel::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFaceBasedSurfaceModel, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_FbsmFaces, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_FbsmFaces, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcFaceBasedSurfaceModel, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFaceBasedSurfaceModel::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceBound.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceBound.cpp index cc470f124..b323f3481 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceBound.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceBound.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcFaceBound::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcFaceBound::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFaceBound, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Bound, map, errorStream ); - m_Orientation = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Bound, map, errorStream );} + if( num_args > 1 ){m_Orientation = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcFaceBound, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFaceBound::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceOuterBound.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceOuterBound.cpp index 6ffb6c9da..5a3d4bb05 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceOuterBound.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceOuterBound.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcFaceOuterBound::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcFaceOuterBound::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFaceOuterBound, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Bound, map, errorStream ); - m_Orientation = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Bound, map, errorStream );} + if( num_args > 1 ){m_Orientation = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcFaceOuterBound, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFaceOuterBound::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceSurface.cpp index 6234dfd9e..ec4028f26 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFaceSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,10 +28,10 @@ void IFC4X3::IfcFaceSurface::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcFaceSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFaceSurface, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Bounds, map, errorStream ); - readEntityReference( args[1], m_FaceSurface, map, errorStream ); - m_SameSense = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Bounds, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_FaceSurface, map, errorStream );} + if( num_args > 2 ){m_SameSense = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcFaceSurface, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFaceSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacetedBrep.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacetedBrep.cpp index 8d167ecd4..52c834c20 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacetedBrep.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacetedBrep.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcFacetedBrep::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcFacetedBrep::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFacetedBrep, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Outer, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Outer, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcFacetedBrep, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFacetedBrep::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacetedBrepWithVoids.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacetedBrepWithVoids.cpp index 5fdd03470..e1ca5dcf5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacetedBrepWithVoids.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacetedBrepWithVoids.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -26,9 +23,9 @@ void IFC4X3::IfcFacetedBrepWithVoids::getStepParameter( std::stringstream& strea void IFC4X3::IfcFacetedBrepWithVoids::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFacetedBrepWithVoids, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Outer, map, errorStream ); - readEntityReferenceList( args[1], m_Voids, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Outer, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_Voids, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcFacetedBrepWithVoids, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFacetedBrepWithVoids::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacility.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacility.cpp index d7aae433b..27e180b0d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacility.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacility.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,16 +55,16 @@ void IFC4X3::IfcFacility::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcFacility::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFacility, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFacility, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFacility::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacilityPart.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacilityPart.cpp index 9351f13b7..34c67062e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacilityPart.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacilityPart.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,17 +58,17 @@ void IFC4X3::IfcFacilityPart::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcFacilityPart::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFacilityPart, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcFacilityPart, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFacilityPart::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacilityPartCommon.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacilityPartCommon.cpp index 6a197e0b6..37cb4dfe3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacilityPartCommon.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFacilityPartCommon.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -64,18 +61,18 @@ void IFC4X3::IfcFacilityPartCommon::getStepParameter( std::stringstream& stream, void IFC4X3::IfcFacilityPartCommon::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFacilityPartCommon, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_PredefinedType = IfcFacilityPartCommonTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcFacilityPartCommonTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcFacilityPartCommon, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFacilityPartCommon::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFailureConnectionCondition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFailureConnectionCondition.cpp index 0129cd7fc..af5fcf9e8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFailureConnectionCondition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFailureConnectionCondition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,14 +32,14 @@ void IFC4X3::IfcFailureConnectionCondition::getStepParameter( std::stringstream& void IFC4X3::IfcFailureConnectionCondition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFailureConnectionCondition, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_TensionFailureX = IfcForceMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_TensionFailureY = IfcForceMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_TensionFailureZ = IfcForceMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_CompressionFailureX = IfcForceMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_CompressionFailureY = IfcForceMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_CompressionFailureZ = IfcForceMeasure::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_TensionFailureX = IfcForceMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_TensionFailureY = IfcForceMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_TensionFailureZ = IfcForceMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_CompressionFailureX = IfcForceMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_CompressionFailureY = IfcForceMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_CompressionFailureZ = IfcForceMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcFailureConnectionCondition, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFailureConnectionCondition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFan.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFan.cpp index d3f3f2eca..d7ce996fd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFan.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFan.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcFan::getStepParameter( std::stringstream& stream, bool /*is_sele void IFC4X3::IfcFan::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFan, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcFanTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcFanTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFan, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFan::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFanType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFanType.cpp index 6ddcd230c..5864bb184 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFanType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFanType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcFanType::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcFanType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFanType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcFanTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcFanTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcFanType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFanType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFastener.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFastener.cpp index 95c597323..8cde02b64 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFastener.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFastener.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcFastener::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcFastener::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFastener, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcFastenerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcFastenerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFastener, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFastener::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFastenerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFastenerType.cpp index 0709b7efc..a6b715dfa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFastenerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFastenerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcFastenerType::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcFastenerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFastenerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcFastenerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcFastenerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcFastenerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFastenerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElement.cpp index fea51d0a6..b3d499893 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcFeatureElement::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcFeatureElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFeatureElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFeatureElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFeatureElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElementAddition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElementAddition.cpp index 423dec175..b89b0e866 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElementAddition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElementAddition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcFeatureElementAddition::getStepParameter( std::stringstream& str void IFC4X3::IfcFeatureElementAddition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFeatureElementAddition, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFeatureElementAddition, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFeatureElementAddition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElementSubtraction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElementSubtraction.cpp index d32f4b8e4..3a5df739a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElementSubtraction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFeatureElementSubtraction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcFeatureElementSubtraction::getStepParameter( std::stringstream& void IFC4X3::IfcFeatureElementSubtraction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFeatureElementSubtraction, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFeatureElementSubtraction, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFeatureElementSubtraction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyle.cpp index 007c7ed22..3a82f0cd1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -45,10 +42,10 @@ void IFC4X3::IfcFillAreaStyle::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcFillAreaStyle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFillAreaStyle, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readSelectList( args[1], m_FillStyles, map, errorStream ); - m_ModelOrDraughting = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readSelectList( args[1], m_FillStyles, map, errorStream );} + if( num_args > 2 ){m_ModelOrDraughting = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcFillAreaStyle, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFillAreaStyle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyleHatching.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyleHatching.cpp index 399cd6b71..7f3e01996 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyleHatching.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyleHatching.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcFillAreaStyleHatching::getStepParameter( std::stringstream& stre void IFC4X3::IfcFillAreaStyleHatching::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFillAreaStyleHatching, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_HatchLineAppearance, map, errorStream ); - m_StartOfNextHatchLine = IfcHatchLineDistanceSelect::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_PointOfReferenceHatchLine, map, errorStream ); - readEntityReference( args[3], m_PatternStart, map, errorStream ); - m_HatchLineAngle = IfcPlaneAngleMeasure::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_HatchLineAppearance, map, errorStream );} + if( num_args > 1 ){m_StartOfNextHatchLine = IfcHatchLineDistanceSelect::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_PointOfReferenceHatchLine, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_PatternStart, map, errorStream );} + if( num_args > 4 ){m_HatchLineAngle = IfcPlaneAngleMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcFillAreaStyleHatching, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFillAreaStyleHatching::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyleTiles.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyleTiles.cpp index 3f8b805b8..77ea931e7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyleTiles.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFillAreaStyleTiles.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcFillAreaStyleTiles::getStepParameter( std::stringstream& stream, void IFC4X3::IfcFillAreaStyleTiles::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFillAreaStyleTiles, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_TilingPattern, map, errorStream ); - readEntityReferenceList( args[1], m_Tiles, map, errorStream ); - m_TilingScale = IfcPositiveRatioMeasure::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_TilingPattern, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_Tiles, map, errorStream );} + if( num_args > 2 ){m_TilingScale = IfcPositiveRatioMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcFillAreaStyleTiles, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFillAreaStyleTiles::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFilter.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFilter.cpp index 1e0a3ba62..bd9a01764 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFilter.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFilter.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcFilter::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcFilter::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFilter, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcFilterTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcFilterTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFilter, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFilter::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFilterType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFilterType.cpp index 033dcfd36..eb706776c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFilterType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFilterType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcFilterType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcFilterType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFilterType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcFilterTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcFilterTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcFilterType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFilterType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFireSuppressionTerminal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFireSuppressionTerminal.cpp index fc62170e7..6952c02cd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFireSuppressionTerminal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFireSuppressionTerminal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcFireSuppressionTerminal::getStepParameter( std::stringstream& st void IFC4X3::IfcFireSuppressionTerminal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFireSuppressionTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcFireSuppressionTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcFireSuppressionTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFireSuppressionTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFireSuppressionTerminal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFireSuppressionTerminalType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFireSuppressionTerminalType.cpp index aa6ae60c2..807c449fe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFireSuppressionTerminalType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFireSuppressionTerminalType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcFireSuppressionTerminalType::getStepParameter( std::stringstream void IFC4X3::IfcFireSuppressionTerminalType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFireSuppressionTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcFireSuppressionTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcFireSuppressionTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcFireSuppressionTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFireSuppressionTerminalType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFixedReferenceSweptAreaSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFixedReferenceSweptAreaSolid.cpp index 4270a9723..d3e0817c1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFixedReferenceSweptAreaSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFixedReferenceSweptAreaSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -38,13 +35,13 @@ void IFC4X3::IfcFixedReferenceSweptAreaSolid::getStepParameter( std::stringstrea void IFC4X3::IfcFixedReferenceSweptAreaSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFixedReferenceSweptAreaSolid, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptArea, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); - readEntityReference( args[2], m_Directrix, map, errorStream ); - m_StartParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_EndParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_FixedReference, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptArea, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Directrix, map, errorStream );} + if( num_args > 3 ){m_StartParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_EndParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_FixedReference, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcFixedReferenceSweptAreaSolid, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFixedReferenceSweptAreaSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowController.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowController.cpp index a7b99b109..ffaa3a869 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowController.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowController.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,15 +62,15 @@ void IFC4X3::IfcFlowController::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcFlowController::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowController, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFlowController, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowController::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowControllerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowControllerType.cpp index a9b21da2a..12f05a725 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowControllerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowControllerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcFlowControllerType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcFlowControllerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowControllerType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFlowControllerType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowControllerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowFitting.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowFitting.cpp index 381e4f095..7d1baae94 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowFitting.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowFitting.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,15 +62,15 @@ void IFC4X3::IfcFlowFitting::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcFlowFitting::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowFitting, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFlowFitting, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowFitting::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowFittingType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowFittingType.cpp index c1ee7b769..dbba24d57 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowFittingType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowFittingType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcFlowFittingType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcFlowFittingType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowFittingType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFlowFittingType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowFittingType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowInstrument.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowInstrument.cpp index 0c3595dd6..6ee781c08 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowInstrument.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowInstrument.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcFlowInstrument::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcFlowInstrument::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowInstrument, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcFlowInstrumentTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcFlowInstrumentTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFlowInstrument, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowInstrument::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowInstrumentType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowInstrumentType.cpp index 79bb385ca..a6133446c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowInstrumentType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowInstrumentType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcFlowInstrumentType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcFlowInstrumentType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowInstrumentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcFlowInstrumentTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcFlowInstrumentTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcFlowInstrumentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowInstrumentType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMeter.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMeter.cpp index 8b05f3714..83d9b216a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMeter.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMeter.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcFlowMeter::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcFlowMeter::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowMeter, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcFlowMeterTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcFlowMeterTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFlowMeter, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowMeter::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMeterType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMeterType.cpp index c2eaf2a0d..c344d0012 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMeterType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMeterType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcFlowMeterType::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcFlowMeterType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowMeterType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcFlowMeterTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcFlowMeterTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcFlowMeterType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowMeterType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMovingDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMovingDevice.cpp index 04a661405..b9cb3e129 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMovingDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMovingDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,15 +62,15 @@ void IFC4X3::IfcFlowMovingDevice::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcFlowMovingDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowMovingDevice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFlowMovingDevice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowMovingDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMovingDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMovingDeviceType.cpp index 6836e8e0e..168d1de58 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMovingDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowMovingDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcFlowMovingDeviceType::getStepParameter( std::stringstream& strea void IFC4X3::IfcFlowMovingDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowMovingDeviceType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFlowMovingDeviceType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowMovingDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowSegment.cpp index 2782558d7..f5a0f6629 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,15 +62,15 @@ void IFC4X3::IfcFlowSegment::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcFlowSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowSegment, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFlowSegment, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowSegmentType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowSegmentType.cpp index 970fea35e..396b1b3a2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowSegmentType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowSegmentType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcFlowSegmentType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcFlowSegmentType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowSegmentType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFlowSegmentType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowSegmentType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowStorageDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowStorageDevice.cpp index 429926500..b67056eb3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowStorageDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowStorageDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,15 +62,15 @@ void IFC4X3::IfcFlowStorageDevice::getStepParameter( std::stringstream& stream, void IFC4X3::IfcFlowStorageDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowStorageDevice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFlowStorageDevice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowStorageDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowStorageDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowStorageDeviceType.cpp index 30cfd5f0a..1ef48639b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowStorageDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowStorageDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcFlowStorageDeviceType::getStepParameter( std::stringstream& stre void IFC4X3::IfcFlowStorageDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowStorageDeviceType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFlowStorageDeviceType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowStorageDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTerminal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTerminal.cpp index f8e10b504..e76f1a2f1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTerminal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTerminal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,15 +62,15 @@ void IFC4X3::IfcFlowTerminal::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcFlowTerminal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowTerminal, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFlowTerminal, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowTerminal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTerminalType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTerminalType.cpp index 543060b43..2675959aa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTerminalType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTerminalType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcFlowTerminalType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcFlowTerminalType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowTerminalType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFlowTerminalType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowTerminalType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTreatmentDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTreatmentDevice.cpp index 3cfae7e3a..93b33a105 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTreatmentDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTreatmentDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,15 +62,15 @@ void IFC4X3::IfcFlowTreatmentDevice::getStepParameter( std::stringstream& stream void IFC4X3::IfcFlowTreatmentDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowTreatmentDevice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFlowTreatmentDevice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowTreatmentDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTreatmentDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTreatmentDeviceType.cpp index 8d3f4bac6..09770b694 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTreatmentDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFlowTreatmentDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcFlowTreatmentDeviceType::getStepParameter( std::stringstream& st void IFC4X3::IfcFlowTreatmentDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFlowTreatmentDeviceType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFlowTreatmentDeviceType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFlowTreatmentDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFooting.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFooting.cpp index 33bbb692f..4c2afc8e6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFooting.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFooting.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcFooting::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcFooting::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFooting, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcFootingTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcFootingTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFooting, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFooting::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFootingType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFootingType.cpp index a3566225a..39b1944bd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFootingType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFootingType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcFootingType::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcFootingType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFootingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcFootingTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcFootingTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcFootingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFootingType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnishingElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnishingElement.cpp index 7c2825c10..5c2ef4257 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnishingElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnishingElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcFurnishingElement::getStepParameter( std::stringstream& stream, void IFC4X3::IfcFurnishingElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFurnishingElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcFurnishingElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFurnishingElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnishingElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnishingElementType.cpp index aa0043a43..80a164044 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnishingElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnishingElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcFurnishingElementType::getStepParameter( std::stringstream& stre void IFC4X3::IfcFurnishingElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFurnishingElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFurnishingElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFurnishingElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurniture.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurniture.cpp index 99962a7c1..bf4d59143 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurniture.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurniture.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcFurniture::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcFurniture::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFurniture, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcFurnitureTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcFurnitureTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcFurniture, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFurniture::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnitureType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnitureType.cpp index 395a5c666..c5ada22e8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnitureType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcFurnitureType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -57,18 +54,18 @@ void IFC4X3::IfcFurnitureType::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcFurnitureType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcFurnitureType, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_AssemblyPlace = IfcAssemblyPlaceEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_PredefinedType = IfcFurnitureTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_AssemblyPlace = IfcAssemblyPlaceEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcFurnitureTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcFurnitureType, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcFurnitureType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeographicElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeographicElement.cpp index 6eea83757..7f8927cca 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeographicElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeographicElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcGeographicElement::getStepParameter( std::stringstream& stream, void IFC4X3::IfcGeographicElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeographicElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcGeographicElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcGeographicElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcGeographicElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeographicElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeographicElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeographicElementType.cpp index 6d9a20496..865a69345 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeographicElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeographicElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcGeographicElementType::getStepParameter( std::stringstream& stre void IFC4X3::IfcGeographicElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeographicElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcGeographicElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcGeographicElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcGeographicElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeographicElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricCurveSet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricCurveSet.cpp index 4687af1cc..8a246371b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricCurveSet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricCurveSet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -41,8 +38,8 @@ void IFC4X3::IfcGeometricCurveSet::getStepParameter( std::stringstream& stream, void IFC4X3::IfcGeometricCurveSet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeometricCurveSet, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readSelectList( args[0], m_Elements, map, errorStream ); + if( num_args > 0 ){readSelectList( args[0], m_Elements, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcGeometricCurveSet, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeometricCurveSet::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationContext.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationContext.cpp index caa5b5ce6..b02eb0686 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationContext.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationContext.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,13 +36,13 @@ void IFC4X3::IfcGeometricRepresentationContext::getStepParameter( std::stringstr void IFC4X3::IfcGeometricRepresentationContext::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeometricRepresentationContext, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ContextIdentifier = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_ContextType = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_CoordinateSpaceDimension = IfcDimensionCount::createObjectFromSTEP( args[2], map, errorStream ); - m_Precision = IfcReal::createObjectFromSTEP( args[3], map, errorStream ); - m_WorldCoordinateSystem = IfcAxis2Placement::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_TrueNorth, map, errorStream ); + if( num_args > 0 ){m_ContextIdentifier = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ContextType = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_CoordinateSpaceDimension = IfcDimensionCount::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Precision = IfcReal::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_WorldCoordinateSystem = IfcAxis2Placement::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_TrueNorth, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcGeometricRepresentationContext, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeometricRepresentationContext::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationItem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationItem.cpp index 708e61c4b..58e4acc9b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationItem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationItem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationSubContext.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationSubContext.cpp index 8ef7e5142..e26138016 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationSubContext.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricRepresentationSubContext.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,17 +46,17 @@ void IFC4X3::IfcGeometricRepresentationSubContext::getStepParameter( std::string void IFC4X3::IfcGeometricRepresentationSubContext::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeometricRepresentationSubContext, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ContextIdentifier = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_ContextType = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_CoordinateSpaceDimension = IfcDimensionCount::createObjectFromSTEP( args[2], map, errorStream ); - m_Precision = IfcReal::createObjectFromSTEP( args[3], map, errorStream ); - m_WorldCoordinateSystem = IfcAxis2Placement::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_TrueNorth, map, errorStream ); - readEntityReference( args[6], m_ParentContext, map, errorStream ); - m_TargetScale = IfcPositiveRatioMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_TargetView = IfcGeometricProjectionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_UserDefinedTargetView = IfcLabel::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_ContextIdentifier = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ContextType = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_CoordinateSpaceDimension = IfcDimensionCount::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Precision = IfcReal::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_WorldCoordinateSystem = IfcAxis2Placement::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_TrueNorth, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_ParentContext, map, errorStream );} + if( num_args > 7 ){m_TargetScale = IfcPositiveRatioMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_TargetView = IfcGeometricProjectionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_UserDefinedTargetView = IfcLabel::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcGeometricRepresentationSubContext, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeometricRepresentationSubContext::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricSet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricSet.cpp index ae9ca2f61..d9168ed38 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricSet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeometricSet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -41,8 +38,8 @@ void IFC4X3::IfcGeometricSet::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcGeometricSet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeometricSet, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readSelectList( args[0], m_Elements, map, errorStream ); + if( num_args > 0 ){readSelectList( args[0], m_Elements, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcGeometricSet, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeometricSet::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeomodel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeomodel.cpp index 9d95eab16..44958ec7e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeomodel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeomodel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcGeomodel::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcGeomodel::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeomodel, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcGeomodel, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeomodel::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeoslice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeoslice.cpp index 3056e4c44..d16ee2273 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeoslice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeoslice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcGeoslice::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcGeoslice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeoslice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcGeoslice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeoslice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalAssembly.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalAssembly.cpp index 04eab0414..b9786482a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalAssembly.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalAssembly.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcGeotechnicalAssembly::getStepParameter( std::stringstream& strea void IFC4X3::IfcGeotechnicalAssembly::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeotechnicalAssembly, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcGeotechnicalAssembly, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeotechnicalAssembly::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalElement.cpp index 9c40393c3..87f728856 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcGeotechnicalElement::getStepParameter( std::stringstream& stream void IFC4X3::IfcGeotechnicalElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeotechnicalElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcGeotechnicalElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeotechnicalElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalStratum.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalStratum.cpp index 2815197c8..c488db0af 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalStratum.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGeotechnicalStratum.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcGeotechnicalStratum::getStepParameter( std::stringstream& stream void IFC4X3::IfcGeotechnicalStratum::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGeotechnicalStratum, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcGeotechnicalStratumTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcGeotechnicalStratumTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcGeotechnicalStratum, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGeotechnicalStratum::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGradientCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGradientCurve.cpp index ff83496b6..f50770349 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGradientCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGradientCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcGradientCurve::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcGradientCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGradientCurve, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Segments, map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_BaseCurve, map, errorStream ); - readEntityReference( args[3], m_EndPoint, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Segments, map, errorStream );} + if( num_args > 1 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_BaseCurve, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_EndPoint, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcGradientCurve, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGradientCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGrid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGrid.cpp index c196f394c..42ffd41ae 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGrid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGrid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,18 +58,18 @@ void IFC4X3::IfcGrid::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcGrid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGrid, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReferenceList( args[7], m_UAxes, map, errorStream ); - readEntityReferenceList( args[8], m_VAxes, map, errorStream ); - readEntityReferenceList( args[9], m_WAxes, map, errorStream ); - m_PredefinedType = IfcGridTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_UAxes, map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_VAxes, map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_WAxes, map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcGridTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcGrid, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGrid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGridAxis.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGridAxis.cpp index 261ce45de..9b7772cc1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGridAxis.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGridAxis.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcGridAxis::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcGridAxis::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGridAxis, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_AxisTag = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_AxisCurve, map, errorStream ); - m_SameSense = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_AxisTag = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_AxisCurve, map, errorStream );} + if( num_args > 2 ){m_SameSense = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcGridAxis, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGridAxis::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGridPlacement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGridPlacement.cpp index 77483d448..918757ae3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGridPlacement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGridPlacement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcGridPlacement::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcGridPlacement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGridPlacement, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_PlacementRelTo, map, errorStream ); - readEntityReference( args[1], m_PlacementLocation, map, errorStream ); - m_PlacementRefDirection = IfcGridPlacementDirectionSelect::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_PlacementRelTo, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_PlacementLocation, map, errorStream );} + if( num_args > 2 ){m_PlacementRefDirection = IfcGridPlacementDirectionSelect::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcGridPlacement, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGridPlacement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGroup.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGroup.cpp index 12210d121..78c7e210f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGroup.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcGroup.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -43,12 +40,12 @@ void IFC4X3::IfcGroup::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcGroup::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcGroup, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcGroup, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcGroup::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHalfSpaceSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHalfSpaceSolid.cpp index 139e90abb..71df1de82 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHalfSpaceSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHalfSpaceSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcHalfSpaceSolid::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcHalfSpaceSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcHalfSpaceSolid, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BaseSurface, map, errorStream ); - m_AgreementFlag = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BaseSurface, map, errorStream );} + if( num_args > 1 ){m_AgreementFlag = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcHalfSpaceSolid, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcHalfSpaceSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHeatExchanger.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHeatExchanger.cpp index c01923dde..d0af9de32 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHeatExchanger.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHeatExchanger.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcHeatExchanger::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcHeatExchanger::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcHeatExchanger, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcHeatExchangerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcHeatExchangerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcHeatExchanger, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcHeatExchanger::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHeatExchangerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHeatExchangerType.cpp index cc2188547..4bb4e9acb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHeatExchangerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHeatExchangerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcHeatExchangerType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcHeatExchangerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcHeatExchangerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcHeatExchangerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcHeatExchangerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcHeatExchangerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcHeatExchangerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHumidifier.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHumidifier.cpp index 1220afcde..67ebdf779 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHumidifier.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHumidifier.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcHumidifier::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcHumidifier::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcHumidifier, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcHumidifierTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcHumidifierTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcHumidifier, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcHumidifier::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHumidifierType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHumidifierType.cpp index 25db2991e..12bd34368 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHumidifierType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcHumidifierType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcHumidifierType::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcHumidifierType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcHumidifierType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcHumidifierTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcHumidifierTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcHumidifierType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcHumidifierType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIShapeProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIShapeProfileDef.cpp index a1c8a5b93..95b10762e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIShapeProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIShapeProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -47,17 +44,17 @@ void IFC4X3::IfcIShapeProfileDef::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcIShapeProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIShapeProfileDef, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_OverallWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_OverallDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_WebThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_FlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_FlangeEdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_FlangeSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_OverallWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_OverallDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_WebThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_FlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_FlangeEdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_FlangeSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcIShapeProfileDef, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIShapeProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImageTexture.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImageTexture.cpp index 24a489636..7de3b3f4f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImageTexture.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImageTexture.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,13 +55,13 @@ void IFC4X3::IfcImageTexture::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcImageTexture::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcImageTexture, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_RepeatS = IfcBoolean::createObjectFromSTEP( args[0], map, errorStream ); - m_RepeatT = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - m_Mode = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_TextureTransform, map, errorStream ); - readTypeOfStringList( args[4], m_Parameter ); - m_URLReference = IfcURIReference::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_RepeatS = IfcBoolean::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_RepeatT = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Mode = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_TextureTransform, map, errorStream );} + if( num_args > 4 ){readTypeOfStringList( args[4], m_Parameter );} + if( num_args > 5 ){m_URLReference = IfcURIReference::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcImageTexture, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcImageTexture::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImpactProtectionDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImpactProtectionDevice.cpp index 9eff1ea4b..d8e971167 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImpactProtectionDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImpactProtectionDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcImpactProtectionDevice::getStepParameter( std::stringstream& str void IFC4X3::IfcImpactProtectionDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcImpactProtectionDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcImpactProtectionDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcImpactProtectionDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcImpactProtectionDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcImpactProtectionDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImpactProtectionDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImpactProtectionDeviceType.cpp index 461b0f3da..55d49f492 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImpactProtectionDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcImpactProtectionDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcImpactProtectionDeviceType::getStepParameter( std::stringstream& void IFC4X3::IfcImpactProtectionDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcImpactProtectionDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcImpactProtectionDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcImpactProtectionDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcImpactProtectionDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcImpactProtectionDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedColourMap.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedColourMap.cpp index 1f5819cd1..c08edc183 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedColourMap.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedColourMap.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -48,11 +45,11 @@ void IFC4X3::IfcIndexedColourMap::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcIndexedColourMap::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIndexedColourMap, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_MappedTo, map, errorStream ); - m_Opacity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Colours, map, errorStream ); - readTypeOfIntegerList( args[3], m_ColourIndex ); + if( num_args > 0 ){readEntityReference( args[0], m_MappedTo, map, errorStream );} + if( num_args > 1 ){m_Opacity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Colours, map, errorStream );} + if( num_args > 3 ){readTypeOfIntegerList( args[3], m_ColourIndex );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcIndexedColourMap, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIndexedColourMap::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolyCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolyCurve.cpp index e5ef02a44..e3a3489f2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolyCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolyCurve.cpp @@ -1,15 +1,12 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" +#include "ifcpp/IFC4X3/include/IfcBoolean.h" #include "ifcpp/IFC4X3/include/IfcCartesianPointList.h" #include "ifcpp/IFC4X3/include/IfcIndexedPolyCurve.h" -#include "ifcpp/IFC4X3/include/IfcLogical.h" #include "ifcpp/IFC4X3/include/IfcPresentationLayerAssignment.h" #include "ifcpp/IFC4X3/include/IfcSegmentIndexSelect.h" #include "ifcpp/IFC4X3/include/IfcStyledItem.h" @@ -51,10 +48,10 @@ void IFC4X3::IfcIndexedPolyCurve::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcIndexedPolyCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIndexedPolyCurve, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Points, map, errorStream ); - readSelectList( args[1], m_Segments, map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Points, map, errorStream );} + if( num_args > 1 ){readSelectList( args[1], m_Segments, map, errorStream );} + if( num_args > 2 ){m_SelfIntersect = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcIndexedPolyCurve, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIndexedPolyCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalFace.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalFace.cpp index c92b35b2f..ef09c8db0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalFace.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalFace.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -43,8 +40,8 @@ void IFC4X3::IfcIndexedPolygonalFace::getStepParameter( std::stringstream& strea void IFC4X3::IfcIndexedPolygonalFace::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIndexedPolygonalFace, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readTypeOfIntegerList( args[0], m_CoordIndex ); + if( num_args > 0 ){readTypeOfIntegerList( args[0], m_CoordIndex );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcIndexedPolygonalFace, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIndexedPolygonalFace::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalFaceWithVoids.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalFaceWithVoids.cpp index 4df7e0eca..2ed032cbe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalFaceWithVoids.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalFaceWithVoids.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -45,9 +42,9 @@ void IFC4X3::IfcIndexedPolygonalFaceWithVoids::getStepParameter( std::stringstre void IFC4X3::IfcIndexedPolygonalFaceWithVoids::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIndexedPolygonalFaceWithVoids, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readTypeOfIntegerList( args[0], m_CoordIndex ); - readTypeOfIntegerList2D( args[1], m_InnerCoordIndices ); + if( num_args > 0 ){readTypeOfIntegerList( args[0], m_CoordIndex );} + if( num_args > 1 ){readTypeOfIntegerList2D( args[1], m_InnerCoordIndices );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcIndexedPolygonalFaceWithVoids, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIndexedPolygonalFaceWithVoids::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalTextureMap.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalTextureMap.cpp index b35b4599c..103dedc65 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalTextureMap.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedPolygonalTextureMap.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcIndexedPolygonalTextureMap::getStepParameter( std::stringstream& void IFC4X3::IfcIndexedPolygonalTextureMap::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIndexedPolygonalTextureMap, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Maps, map, errorStream ); - readEntityReference( args[1], m_MappedTo, map, errorStream ); - readEntityReference( args[2], m_TexCoords, map, errorStream ); - readEntityReferenceList( args[3], m_TexCoordIndices, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Maps, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_MappedTo, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_TexCoords, map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_TexCoordIndices, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcIndexedPolygonalTextureMap, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIndexedPolygonalTextureMap::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedTextureMap.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedTextureMap.cpp index f9b9e15e6..a41529929 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedTextureMap.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedTextureMap.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -28,10 +25,10 @@ void IFC4X3::IfcIndexedTextureMap::getStepParameter( std::stringstream& stream, void IFC4X3::IfcIndexedTextureMap::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIndexedTextureMap, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Maps, map, errorStream ); - readEntityReference( args[1], m_MappedTo, map, errorStream ); - readEntityReference( args[2], m_TexCoords, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Maps, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_MappedTo, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_TexCoords, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcIndexedTextureMap, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIndexedTextureMap::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedTriangleTextureMap.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedTriangleTextureMap.cpp index 54b1cf9b8..0501374a6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedTriangleTextureMap.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIndexedTriangleTextureMap.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcIndexedTriangleTextureMap::getStepParameter( std::stringstream& void IFC4X3::IfcIndexedTriangleTextureMap::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIndexedTriangleTextureMap, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Maps, map, errorStream ); - readEntityReference( args[1], m_MappedTo, map, errorStream ); - readEntityReference( args[2], m_TexCoords, map, errorStream ); - readTypeOfIntegerList2D( args[3], m_TexCoordIndex ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Maps, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_MappedTo, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_TexCoords, map, errorStream );} + if( num_args > 3 ){readTypeOfIntegerList2D( args[3], m_TexCoordIndex );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcIndexedTriangleTextureMap, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIndexedTriangleTextureMap::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInterceptor.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInterceptor.cpp index d3ac5a942..8870fabc4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInterceptor.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInterceptor.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcInterceptor::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcInterceptor::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcInterceptor, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcInterceptorTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcInterceptorTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcInterceptor, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcInterceptor::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInterceptorType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInterceptorType.cpp index 63a55b098..3a3a84e57 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInterceptorType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInterceptorType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcInterceptorType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcInterceptorType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcInterceptorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcInterceptorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcInterceptorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcInterceptorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcInterceptorType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIntersectionCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIntersectionCurve.cpp index feadf3ae6..4e191ca32 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIntersectionCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIntersectionCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcIntersectionCurve::getStepParameter( std::stringstream& stream, void IFC4X3::IfcIntersectionCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIntersectionCurve, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Curve3D, map, errorStream ); - readEntityReferenceList( args[1], m_AssociatedGeometry, map, errorStream ); - m_MasterRepresentation = IfcPreferredSurfaceCurveRepresentation::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Curve3D, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_AssociatedGeometry, map, errorStream );} + if( num_args > 2 ){m_MasterRepresentation = IfcPreferredSurfaceCurveRepresentation::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcIntersectionCurve, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIntersectionCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInventory.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInventory.cpp index 3e35be631..78e50ae1c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInventory.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcInventory.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -60,18 +57,18 @@ void IFC4X3::IfcInventory::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcInventory::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcInventory, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_PredefinedType = IfcInventoryTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_Jurisdiction = IfcActorSelect::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_ResponsiblePersons, map, errorStream ); - m_LastUpdateDate = IfcDate::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReference( args[9], m_CurrentValue, map, errorStream ); - readEntityReference( args[10], m_OriginalValue, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_PredefinedType = IfcInventoryTypeEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Jurisdiction = IfcActorSelect::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_ResponsiblePersons, map, errorStream );} + if( num_args > 8 ){m_LastUpdateDate = IfcDate::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_CurrentValue, map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_OriginalValue, map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcInventory, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcInventory::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIrregularTimeSeries.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIrregularTimeSeries.cpp index b70186827..2541eae0d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIrregularTimeSeries.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIrregularTimeSeries.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -45,16 +42,16 @@ void IFC4X3::IfcIrregularTimeSeries::getStepParameter( std::stringstream& stream void IFC4X3::IfcIrregularTimeSeries::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIrregularTimeSeries, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_StartTime = IfcDateTime::createObjectFromSTEP( args[2], map, errorStream ); - m_EndTime = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream ); - m_TimeSeriesDataType = IfcTimeSeriesDataTypeEnum::createObjectFromSTEP( args[4], map, errorStream ); - m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - m_Unit = IfcUnit::createObjectFromSTEP( args[7], map, errorStream ); - readEntityReferenceList( args[8], m_Values, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_StartTime = IfcDateTime::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_EndTime = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_TimeSeriesDataType = IfcTimeSeriesDataTypeEnum::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Unit = IfcUnit::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_Values, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcIrregularTimeSeries, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIrregularTimeSeries::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIrregularTimeSeriesValue.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIrregularTimeSeriesValue.cpp index fa6c98b30..c99ab400e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIrregularTimeSeriesValue.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcIrregularTimeSeriesValue.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -42,9 +39,9 @@ void IFC4X3::IfcIrregularTimeSeriesValue::getStepParameter( std::stringstream& s void IFC4X3::IfcIrregularTimeSeriesValue::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcIrregularTimeSeriesValue, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_TimeStamp = IfcDateTime::createObjectFromSTEP( args[0], map, errorStream ); - readSelectList( args[1], m_ListValues, map, errorStream ); + if( num_args > 0 ){m_TimeStamp = IfcDateTime::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readSelectList( args[1], m_ListValues, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcIrregularTimeSeriesValue, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcIrregularTimeSeriesValue::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcJunctionBox.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcJunctionBox.cpp index 5afe74fdc..45e0e62ac 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcJunctionBox.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcJunctionBox.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcJunctionBox::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcJunctionBox::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcJunctionBox, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcJunctionBoxTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcJunctionBoxTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcJunctionBox, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcJunctionBox::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcJunctionBoxType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcJunctionBoxType.cpp index 6ef8b21d5..1e62b515c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcJunctionBoxType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcJunctionBoxType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcJunctionBoxType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcJunctionBoxType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcJunctionBoxType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcJunctionBoxTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcJunctionBoxTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcJunctionBoxType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcJunctionBoxType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerb.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerb.cpp index d67375578..e8a105cbe 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerb.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerb.cpp @@ -1,16 +1,13 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" -#include "ifcpp/IFC4X3/include/IfcBoolean.h" #include "ifcpp/IFC4X3/include/IfcGloballyUniqueId.h" #include "ifcpp/IFC4X3/include/IfcIdentifier.h" #include "ifcpp/IFC4X3/include/IfcKerb.h" +#include "ifcpp/IFC4X3/include/IfcKerbTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcLabel.h" #include "ifcpp/IFC4X3/include/IfcObjectPlacement.h" #include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" @@ -59,28 +56,28 @@ void IFC4X3::IfcKerb::getStepLine( std::stringstream& stream ) const stream << ","; if( m_Tag ) { m_Tag->getStepParameter( stream ); } else { stream << "$"; } stream << ","; - if( m_Mountable ) { m_Mountable->getStepParameter( stream ); } else { stream << "$"; } + if( m_PredefinedType ) { m_PredefinedType->getStepParameter( stream ); } else { stream << "$"; } stream << ");"; } void IFC4X3::IfcKerb::getStepParameter( std::stringstream& stream, bool /*is_select_type*/ ) const { stream << "#" << m_tag; } void IFC4X3::IfcKerb::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcKerb, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_Mountable = IfcBoolean::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcKerbTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcKerb, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcKerb::getAttributes( std::vector > >& vec_attributes ) const { IFC4X3::IfcBuiltElement::getAttributes( vec_attributes ); - vec_attributes.emplace_back( std::make_pair( "Mountable", m_Mountable ) ); + vec_attributes.emplace_back( std::make_pair( "PredefinedType", m_PredefinedType ) ); } void IFC4X3::IfcKerb::getAttributesInverse( std::vector > >& vec_attributes_inverse ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerbType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerbType.cpp index 10632041d..e2d942367 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerbType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerbType.cpp @@ -1,16 +1,13 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" -#include "ifcpp/IFC4X3/include/IfcBoolean.h" #include "ifcpp/IFC4X3/include/IfcGloballyUniqueId.h" #include "ifcpp/IFC4X3/include/IfcIdentifier.h" #include "ifcpp/IFC4X3/include/IfcKerbType.h" +#include "ifcpp/IFC4X3/include/IfcKerbTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcLabel.h" #include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" #include "ifcpp/IFC4X3/include/IfcPropertySetDefinition.h" @@ -47,29 +44,29 @@ void IFC4X3::IfcKerbType::getStepLine( std::stringstream& stream ) const stream << ","; if( m_ElementType ) { m_ElementType->getStepParameter( stream ); } else { stream << "$"; } stream << ","; - if( m_Mountable ) { m_Mountable->getStepParameter( stream ); } else { stream << "$"; } + if( m_PredefinedType ) { m_PredefinedType->getStepParameter( stream ); } else { stream << "$"; } stream << ");"; } void IFC4X3::IfcKerbType::getStepParameter( std::stringstream& stream, bool /*is_select_type*/ ) const { stream << "#" << m_tag; } void IFC4X3::IfcKerbType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcKerbType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_Mountable = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcKerbTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcKerbType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcKerbType::getAttributes( std::vector > >& vec_attributes ) const { IFC4X3::IfcBuiltElementType::getAttributes( vec_attributes ); - vec_attributes.emplace_back( std::make_pair( "Mountable", m_Mountable ) ); + vec_attributes.emplace_back( std::make_pair( "PredefinedType", m_PredefinedType ) ); } void IFC4X3::IfcKerbType::getAttributesInverse( std::vector > >& vec_attributes_inverse ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerbTypeEnum.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerbTypeEnum.cpp new file mode 100644 index 000000000..ad42e42ed --- /dev/null +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcKerbTypeEnum.cpp @@ -0,0 +1,37 @@ +/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ + +#include +#include +#include +#include "ifcpp/reader/ReaderUtil.h" +#include "ifcpp/writer/WriterUtil.h" +#include "ifcpp/model/BasicTypes.h" +#include "ifcpp/model/BuildingException.h" +#include "ifcpp/IFC4X3/include/IfcKerbTypeEnum.h" + +// TYPE IfcKerbTypeEnum = ENUMERATION OF (USERDEFINED ,NOTDEFINED); +void IFC4X3::IfcKerbTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const +{ + if( is_select_type ) { stream << "IFCKERBTYPEENUM("; } + switch( m_enum ) + { + case ENUM_USERDEFINED: stream << ".USERDEFINED."; break; + case ENUM_NOTDEFINED: stream << ".NOTDEFINED."; break; + } + if( is_select_type ) { stream << ")"; } +} +shared_ptr IFC4X3::IfcKerbTypeEnum::createObjectFromSTEP( const std::string& arg, const std::map >& map, std::stringstream& errorStream ) +{ + if( arg.compare( "$" ) == 0 ) { return shared_ptr(); } + if( arg.compare( "*" ) == 0 ) { return shared_ptr(); } + shared_ptr type_object( new IfcKerbTypeEnum() ); + if( std_iequal( arg, ".USERDEFINED." ) ) + { + type_object->m_enum = IfcKerbTypeEnum::ENUM_USERDEFINED; + } + else if( std_iequal( arg, ".NOTDEFINED." ) ) + { + type_object->m_enum = IfcKerbTypeEnum::ENUM_NOTDEFINED; + } + return type_object; +} diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLShapeProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLShapeProfileDef.cpp index 05b95025b..7d920435a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLShapeProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLShapeProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -45,16 +42,16 @@ void IFC4X3::IfcLShapeProfileDef::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcLShapeProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLShapeProfileDef, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_Width = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_Thickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_EdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_LegSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Width = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Thickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_EdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_LegSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcLShapeProfileDef, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLShapeProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLaborResource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLaborResource.cpp index 85d4b4ab6..2596800f7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLaborResource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLaborResource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,18 +56,18 @@ void IFC4X3::IfcLaborResource::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcLaborResource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLaborResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReference( args[7], m_Usage, map, errorStream ); - readEntityReferenceList( args[8], m_BaseCosts, map, errorStream ); - readEntityReference( args[9], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcLaborResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_Usage, map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_BaseCosts, map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_BaseQuantity, map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcLaborResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcLaborResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLaborResource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLaborResourceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLaborResourceType.cpp index 322151060..04e6baff7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLaborResourceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLaborResourceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,19 +56,19 @@ void IFC4X3::IfcLaborResourceType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcLaborResourceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLaborResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReferenceList( args[9], m_BaseCosts, map, errorStream ); - readEntityReference( args[10], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcLaborResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_BaseCosts, map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_BaseQuantity, map, errorStream );} + if( num_args > 11 ){m_PredefinedType = IfcLaborResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcLaborResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLaborResourceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLagTime.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLagTime.cpp index 4295e310d..ba277a849 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLagTime.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLagTime.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,12 +30,12 @@ void IFC4X3::IfcLagTime::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcLagTime::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLagTime, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_LagValue = IfcTimeOrRatioSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_DurationType = IfcTaskDurationEnum::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_LagValue = IfcTimeOrRatioSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_DurationType = IfcTaskDurationEnum::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcLagTime, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLagTime::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLamp.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLamp.cpp index 5b617d114..5792c2e1c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLamp.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLamp.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcLamp::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcLamp::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLamp, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcLampTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcLampTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcLamp, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLamp::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLampType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLampType.cpp index e7d6ab8a6..cfec373bc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLampType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLampType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcLampType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcLampType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLampType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcLampTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcLampTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcLampType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLampType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLibraryInformation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLibraryInformation.cpp index 2b379f25c..2dc51e258 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLibraryInformation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLibraryInformation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -38,13 +35,13 @@ void IFC4X3::IfcLibraryInformation::getStepParameter( std::stringstream& stream, void IFC4X3::IfcLibraryInformation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLibraryInformation, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Version = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_Publisher = IfcActorSelect::createObjectFromSTEP( args[2], map, errorStream ); - m_VersionDate = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream ); - m_Location = IfcURIReference::createObjectFromSTEP( args[4], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Version = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Publisher = IfcActorSelect::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_VersionDate = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Location = IfcURIReference::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Description = IfcText::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcLibraryInformation, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLibraryInformation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLibraryReference.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLibraryReference.cpp index 6b6da2fb7..1754fc8ee 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLibraryReference.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLibraryReference.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,13 +36,13 @@ void IFC4X3::IfcLibraryReference::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcLibraryReference::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLibraryReference, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_Language = IfcLanguageId::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ReferencedLibrary, map, errorStream ); + if( num_args > 0 ){m_Location = IfcURIReference::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Language = IfcLanguageId::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ReferencedLibrary, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcLibraryReference, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLibraryReference::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightDistributionData.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightDistributionData.cpp index de625d2b3..f7d175d3f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightDistributionData.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightDistributionData.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,10 +24,10 @@ void IFC4X3::IfcLightDistributionData::getStepParameter( std::stringstream& stre void IFC4X3::IfcLightDistributionData::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightDistributionData, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_MainPlaneAngle = IfcPlaneAngleMeasure::createObjectFromSTEP( args[0], map, errorStream ); - readTypeOfRealList( args[1], m_SecondaryPlaneAngle ); - readTypeOfRealList( args[2], m_LuminousIntensity ); + if( num_args > 0 ){m_MainPlaneAngle = IfcPlaneAngleMeasure::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readTypeOfRealList( args[1], m_SecondaryPlaneAngle );} + if( num_args > 2 ){readTypeOfRealList( args[2], m_LuminousIntensity );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcLightDistributionData, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLightDistributionData::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightFixture.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightFixture.cpp index 01e8853a1..65de877ee 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightFixture.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightFixture.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcLightFixture::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcLightFixture::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightFixture, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcLightFixtureTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcLightFixtureTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcLightFixture, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLightFixture::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightFixtureType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightFixtureType.cpp index 4b66f2274..c396410bc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightFixtureType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightFixtureType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcLightFixtureType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcLightFixtureType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightFixtureType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcLightFixtureTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcLightFixtureTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcLightFixtureType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLightFixtureType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightIntensityDistribution.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightIntensityDistribution.cpp index e165f9abd..debe8fb52 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightIntensityDistribution.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightIntensityDistribution.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,9 +22,9 @@ void IFC4X3::IfcLightIntensityDistribution::getStepParameter( std::stringstream& void IFC4X3::IfcLightIntensityDistribution::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightIntensityDistribution, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_LightDistributionCurve = IfcLightDistributionCurveEnum::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReferenceList( args[1], m_DistributionData, map, errorStream ); + if( num_args > 0 ){m_LightDistributionCurve = IfcLightDistributionCurveEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_DistributionData, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcLightIntensityDistribution, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLightIntensityDistribution::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSource.cpp index 9faefc68c..37bad55a6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcLightSource::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcLightSource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightSource, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_LightColour, map, errorStream ); - m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_LightColour, map, errorStream );} + if( num_args > 2 ){m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcLightSource, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLightSource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceAmbient.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceAmbient.cpp index 1acedfe82..8c0a26864 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceAmbient.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceAmbient.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcLightSourceAmbient::getStepParameter( std::stringstream& stream, void IFC4X3::IfcLightSourceAmbient::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightSourceAmbient, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_LightColour, map, errorStream ); - m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_LightColour, map, errorStream );} + if( num_args > 2 ){m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcLightSourceAmbient, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLightSourceAmbient::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceDirectional.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceDirectional.cpp index 51192b115..8bbaf38ed 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceDirectional.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceDirectional.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcLightSourceDirectional::getStepParameter( std::stringstream& str void IFC4X3::IfcLightSourceDirectional::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightSourceDirectional, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_LightColour, map, errorStream ); - m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_Orientation, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_LightColour, map, errorStream );} + if( num_args > 2 ){m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_Orientation, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcLightSourceDirectional, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLightSourceDirectional::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceGoniometric.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceGoniometric.cpp index 08f0c5325..3f35a60c5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceGoniometric.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceGoniometric.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,17 +46,17 @@ void IFC4X3::IfcLightSourceGoniometric::getStepParameter( std::stringstream& str void IFC4X3::IfcLightSourceGoniometric::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightSourceGoniometric, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_LightColour, map, errorStream ); - m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_Position, map, errorStream ); - readEntityReference( args[5], m_ColourAppearance, map, errorStream ); - m_ColourTemperature = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_LuminousFlux = IfcLuminousFluxMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_LightEmissionSource = IfcLightEmissionSourceEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_LightDistributionDataSource = IfcLightDistributionDataSourceSelect::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_LightColour, map, errorStream );} + if( num_args > 2 ){m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_Position, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ColourAppearance, map, errorStream );} + if( num_args > 6 ){m_ColourTemperature = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LuminousFlux = IfcLuminousFluxMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_LightEmissionSource = IfcLightEmissionSourceEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_LightDistributionDataSource = IfcLightDistributionDataSourceSelect::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcLightSourceGoniometric, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLightSourceGoniometric::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourcePositional.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourcePositional.cpp index 309e66baa..50c073291 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourcePositional.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourcePositional.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -45,16 +42,16 @@ void IFC4X3::IfcLightSourcePositional::getStepParameter( std::stringstream& stre void IFC4X3::IfcLightSourcePositional::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightSourcePositional, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_LightColour, map, errorStream ); - m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_Position, map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_ConstantAttenuation = IfcReal::createObjectFromSTEP( args[6], map, errorStream ); - m_DistanceAttenuation = IfcReal::createObjectFromSTEP( args[7], map, errorStream ); - m_QuadricAttenuation = IfcReal::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_LightColour, map, errorStream );} + if( num_args > 2 ){m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_Position, map, errorStream );} + if( num_args > 5 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_ConstantAttenuation = IfcReal::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_DistanceAttenuation = IfcReal::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_QuadricAttenuation = IfcReal::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcLightSourcePositional, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLightSourcePositional::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceSpot.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceSpot.cpp index 234bd5a28..c6008b454 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceSpot.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLightSourceSpot.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -55,20 +52,20 @@ void IFC4X3::IfcLightSourceSpot::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcLightSourceSpot::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 13 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLightSourceSpot, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_LightColour, map, errorStream ); - m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_Position, map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_ConstantAttenuation = IfcReal::createObjectFromSTEP( args[6], map, errorStream ); - m_DistanceAttenuation = IfcReal::createObjectFromSTEP( args[7], map, errorStream ); - m_QuadricAttenuation = IfcReal::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReference( args[9], m_Orientation, map, errorStream ); - m_ConcentrationExponent = IfcReal::createObjectFromSTEP( args[10], map, errorStream ); - m_SpreadAngle = IfcPositivePlaneAngleMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_BeamWidthAngle = IfcPositivePlaneAngleMeasure::createObjectFromSTEP( args[12], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_LightColour, map, errorStream );} + if( num_args > 2 ){m_AmbientIntensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Intensity = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_Position, map, errorStream );} + if( num_args > 5 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_ConstantAttenuation = IfcReal::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_DistanceAttenuation = IfcReal::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_QuadricAttenuation = IfcReal::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_Orientation, map, errorStream );} + if( num_args > 10 ){m_ConcentrationExponent = IfcReal::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_SpreadAngle = IfcPositivePlaneAngleMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_BeamWidthAngle = IfcPositivePlaneAngleMeasure::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args != 13 ){ errorStream << "Wrong parameter count for entity IfcLightSourceSpot, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLightSourceSpot::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLine.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLine.cpp index 904af3b07..b6a975f18 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLine.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLine.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcLine::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcLine::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLine, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Pnt, map, errorStream ); - readEntityReference( args[1], m_Dir, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Pnt, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Dir, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcLine, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLine::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearElement.cpp index 4166a3071..390fdda33 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -50,14 +47,14 @@ void IFC4X3::IfcLinearElement::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcLinearElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLinearElement, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcLinearElement, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLinearElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearPlacement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearPlacement.cpp index 6c8464b79..d68fcf9ae 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearPlacement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearPlacement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcLinearPlacement::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcLinearPlacement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLinearPlacement, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_PlacementRelTo, map, errorStream ); - readEntityReference( args[1], m_RelativePlacement, map, errorStream ); - readEntityReference( args[2], m_CartesianPosition, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_PlacementRelTo, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_RelativePlacement, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_CartesianPosition, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcLinearPlacement, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLinearPlacement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearPositioningElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearPositioningElement.cpp index f1686d4c9..2fb9b7da0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearPositioningElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLinearPositioningElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,14 +48,14 @@ void IFC4X3::IfcLinearPositioningElement::getStepParameter( std::stringstream& s void IFC4X3::IfcLinearPositioningElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLinearPositioningElement, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcLinearPositioningElement, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLinearPositioningElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLiquidTerminal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLiquidTerminal.cpp index 5a123be98..3d038ecf6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLiquidTerminal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLiquidTerminal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcLiquidTerminal::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcLiquidTerminal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLiquidTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcLiquidTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcLiquidTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcLiquidTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLiquidTerminal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLiquidTerminalType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLiquidTerminalType.cpp index 4c2ab734b..a114ddc3c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLiquidTerminalType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLiquidTerminalType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcLiquidTerminalType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcLiquidTerminalType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLiquidTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcLiquidTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcLiquidTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcLiquidTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLiquidTerminalType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLocalPlacement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLocalPlacement.cpp index 81594a743..f30948b61 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLocalPlacement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLocalPlacement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -26,9 +23,9 @@ void IFC4X3::IfcLocalPlacement::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcLocalPlacement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcLocalPlacement, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_PlacementRelTo, map, errorStream ); - m_RelativePlacement = IfcAxis2Placement::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_PlacementRelTo, map, errorStream );} + if( num_args > 1 ){m_RelativePlacement = IfcAxis2Placement::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcLocalPlacement, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcLocalPlacement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLoop.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLoop.cpp index d3cbb3b46..856474d7a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLoop.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcLoop.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcManifoldSolidBrep.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcManifoldSolidBrep.cpp index 8ce574353..e36d77894 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcManifoldSolidBrep.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcManifoldSolidBrep.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcManifoldSolidBrep::getStepParameter( std::stringstream& stream, void IFC4X3::IfcManifoldSolidBrep::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcManifoldSolidBrep, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Outer, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Outer, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcManifoldSolidBrep, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcManifoldSolidBrep::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMapConversion.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMapConversion.cpp index 476582b36..d03da54f9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMapConversion.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMapConversion.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -43,17 +40,17 @@ void IFC4X3::IfcMapConversion::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcMapConversion::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMapConversion, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_SourceCRS = IfcCoordinateReferenceSystemSelect::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_TargetCRS, map, errorStream ); - m_Eastings = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_Northings = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_OrthogonalHeight = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_XAxisAbscissa = IfcReal::createObjectFromSTEP( args[5], map, errorStream ); - m_XAxisOrdinate = IfcReal::createObjectFromSTEP( args[6], map, errorStream ); - m_Scale = IfcReal::createObjectFromSTEP( args[7], map, errorStream ); - m_ScaleY = IfcReal::createObjectFromSTEP( args[8], map, errorStream ); - m_ScaleZ = IfcReal::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_SourceCRS = IfcCoordinateReferenceSystemSelect::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_TargetCRS, map, errorStream );} + if( num_args > 2 ){m_Eastings = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Northings = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_OrthogonalHeight = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_XAxisAbscissa = IfcReal::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_XAxisOrdinate = IfcReal::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Scale = IfcReal::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ScaleY = IfcReal::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_ScaleZ = IfcReal::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcMapConversion, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMapConversion::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMappedItem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMappedItem.cpp index 2474a1d17..0b1d7a1bc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMappedItem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMappedItem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcMappedItem::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcMappedItem::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMappedItem, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_MappingSource, map, errorStream ); - readEntityReference( args[1], m_MappingTarget, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_MappingSource, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_MappingTarget, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcMappedItem, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMappedItem::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMarineFacility.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMarineFacility.cpp index 76453756d..3ac84938f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMarineFacility.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMarineFacility.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,17 +58,17 @@ void IFC4X3::IfcMarineFacility::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcMarineFacility::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMarineFacility, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcMarineFacilityTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcMarineFacilityTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcMarineFacility, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMarineFacility::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMarinePart.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMarinePart.cpp index 628fbd7a3..5e01daa40 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMarinePart.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMarinePart.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -64,18 +61,18 @@ void IFC4X3::IfcMarinePart::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcMarinePart::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMarinePart, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_PredefinedType = IfcMarinePartTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcMarinePartTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcMarinePart, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMarinePart::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterial.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterial.cpp index 0f32e8e39..c38afe30d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterial.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterial.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,10 +29,10 @@ void IFC4X3::IfcMaterial::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcMaterial::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterial, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_Category = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Category = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcMaterial, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterial::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialClassificationRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialClassificationRelationship.cpp index efea864d2..449f22094 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialClassificationRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialClassificationRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -42,9 +39,9 @@ void IFC4X3::IfcMaterialClassificationRelationship::getStepParameter( std::strin void IFC4X3::IfcMaterialClassificationRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialClassificationRelationship, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readSelectList( args[0], m_MaterialClassifications, map, errorStream ); - readEntityReference( args[1], m_ClassifiedMaterial, map, errorStream ); + if( num_args > 0 ){readSelectList( args[0], m_MaterialClassifications, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_ClassifiedMaterial, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcMaterialClassificationRelationship, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialClassificationRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialConstituent.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialConstituent.cpp index d7005d8e1..07776e32d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialConstituent.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialConstituent.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,12 +34,12 @@ void IFC4X3::IfcMaterialConstituent::getStepParameter( std::stringstream& stream void IFC4X3::IfcMaterialConstituent::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialConstituent, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Material, map, errorStream ); - m_Fraction = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_Category = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Material, map, errorStream );} + if( num_args > 3 ){m_Fraction = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Category = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcMaterialConstituent, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialConstituent::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialConstituentSet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialConstituentSet.cpp index 83a54af2e..023564320 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialConstituentSet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialConstituentSet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,10 +28,10 @@ void IFC4X3::IfcMaterialConstituentSet::getStepParameter( std::stringstream& str void IFC4X3::IfcMaterialConstituentSet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialConstituentSet, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_MaterialConstituents, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_MaterialConstituents, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcMaterialConstituentSet, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialConstituentSet::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialDefinition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialDefinition.cpp index eeaab6d30..e840a3ca7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialDefinition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialDefinition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialDefinitionRepresentation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialDefinitionRepresentation.cpp index 99a727252..8de8e666f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialDefinitionRepresentation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialDefinitionRepresentation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcMaterialDefinitionRepresentation::getStepParameter( std::strings void IFC4X3::IfcMaterialDefinitionRepresentation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialDefinitionRepresentation, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_Representations, map, errorStream ); - readEntityReference( args[3], m_RepresentedMaterial, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_Representations, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_RepresentedMaterial, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcMaterialDefinitionRepresentation, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialDefinitionRepresentation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayer.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayer.cpp index cd1b900f4..9342aa919 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayer.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayer.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -43,14 +40,14 @@ void IFC4X3::IfcMaterialLayer::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcMaterialLayer::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialLayer, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Material, map, errorStream ); - m_LayerThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_IsVentilated = IfcLogical::createObjectFromSTEP( args[2], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[3], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[4], map, errorStream ); - m_Category = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - m_Priority = IfcInteger::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Material, map, errorStream );} + if( num_args > 1 ){m_LayerThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_IsVentilated = IfcLogical::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Name = IfcLabel::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Description = IfcText::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Category = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Priority = IfcInteger::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcMaterialLayer, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialLayer::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerSet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerSet.cpp index 5bc085fe5..ab08b9ca7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerSet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerSet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,10 +28,10 @@ void IFC4X3::IfcMaterialLayerSet::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcMaterialLayerSet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialLayerSet, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_MaterialLayers, map, errorStream ); - m_LayerSetName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_MaterialLayers, map, errorStream );} + if( num_args > 1 ){m_LayerSetName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcMaterialLayerSet, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialLayerSet::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerSetUsage.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerSetUsage.cpp index faec78976..6fc45d123 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerSetUsage.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerSetUsage.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcMaterialLayerSetUsage::getStepParameter( std::stringstream& stre void IFC4X3::IfcMaterialLayerSetUsage::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialLayerSetUsage, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ForLayerSet, map, errorStream ); - m_LayerSetDirection = IfcLayerSetDirectionEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_DirectionSense = IfcDirectionSenseEnum::createObjectFromSTEP( args[2], map, errorStream ); - m_OffsetFromReferenceLine = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_ReferenceExtent = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ForLayerSet, map, errorStream );} + if( num_args > 1 ){m_LayerSetDirection = IfcLayerSetDirectionEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_DirectionSense = IfcDirectionSenseEnum::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_OffsetFromReferenceLine = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ReferenceExtent = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcMaterialLayerSetUsage, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialLayerSetUsage::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerWithOffsets.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerWithOffsets.cpp index 8d4dfe983..362495002 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerWithOffsets.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialLayerWithOffsets.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,16 +46,16 @@ void IFC4X3::IfcMaterialLayerWithOffsets::getStepParameter( std::stringstream& s void IFC4X3::IfcMaterialLayerWithOffsets::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialLayerWithOffsets, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Material, map, errorStream ); - m_LayerThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_IsVentilated = IfcLogical::createObjectFromSTEP( args[2], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[3], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[4], map, errorStream ); - m_Category = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - m_Priority = IfcInteger::createObjectFromSTEP( args[6], map, errorStream ); - m_OffsetDirection = IfcLayerSetDirectionEnum::createObjectFromSTEP( args[7], map, errorStream ); - readTypeOfRealList( args[8], m_OffsetValues ); + if( num_args > 0 ){readEntityReference( args[0], m_Material, map, errorStream );} + if( num_args > 1 ){m_LayerThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_IsVentilated = IfcLogical::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Name = IfcLabel::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Description = IfcText::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Category = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Priority = IfcInteger::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_OffsetDirection = IfcLayerSetDirectionEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){readTypeOfRealList( args[8], m_OffsetValues );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcMaterialLayerWithOffsets, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialLayerWithOffsets::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialList.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialList.cpp index a38efe434..86f155357 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialList.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialList.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcMaterialList::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcMaterialList::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialList, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Materials, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Materials, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcMaterialList, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialList::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfile.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfile.cpp index 6f0983581..713813d9a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfile.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfile.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -40,13 +37,13 @@ void IFC4X3::IfcMaterialProfile::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcMaterialProfile::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialProfile, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Material, map, errorStream ); - readEntityReference( args[3], m_Profile, map, errorStream ); - m_Priority = IfcInteger::createObjectFromSTEP( args[4], map, errorStream ); - m_Category = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Material, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_Profile, map, errorStream );} + if( num_args > 4 ){m_Priority = IfcInteger::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Category = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcMaterialProfile, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialProfile::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSet.cpp index 883ad4823..7e765f890 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,11 +31,11 @@ void IFC4X3::IfcMaterialProfileSet::getStepParameter( std::stringstream& stream, void IFC4X3::IfcMaterialProfileSet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialProfileSet, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_MaterialProfiles, map, errorStream ); - readEntityReference( args[3], m_CompositeProfile, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_MaterialProfiles, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_CompositeProfile, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcMaterialProfileSet, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialProfileSet::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSetUsage.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSetUsage.cpp index bf14c0454..00fe78743 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSetUsage.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSetUsage.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcMaterialProfileSetUsage::getStepParameter( std::stringstream& st void IFC4X3::IfcMaterialProfileSetUsage::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialProfileSetUsage, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ForProfileSet, map, errorStream ); - m_CardinalPoint = IfcCardinalPointReference::createObjectFromSTEP( args[1], map, errorStream ); - m_ReferenceExtent = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ForProfileSet, map, errorStream );} + if( num_args > 1 ){m_CardinalPoint = IfcCardinalPointReference::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_ReferenceExtent = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcMaterialProfileSetUsage, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialProfileSetUsage::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSetUsageTapering.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSetUsageTapering.cpp index 37950aa94..619bc3cda 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSetUsageTapering.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileSetUsageTapering.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,12 +30,12 @@ void IFC4X3::IfcMaterialProfileSetUsageTapering::getStepParameter( std::stringst void IFC4X3::IfcMaterialProfileSetUsageTapering::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialProfileSetUsageTapering, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ForProfileSet, map, errorStream ); - m_CardinalPoint = IfcCardinalPointReference::createObjectFromSTEP( args[1], map, errorStream ); - m_ReferenceExtent = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_ForProfileEndSet, map, errorStream ); - m_CardinalEndPoint = IfcCardinalPointReference::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ForProfileSet, map, errorStream );} + if( num_args > 1 ){m_CardinalPoint = IfcCardinalPointReference::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_ReferenceExtent = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_ForProfileEndSet, map, errorStream );} + if( num_args > 4 ){m_CardinalEndPoint = IfcCardinalPointReference::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcMaterialProfileSetUsageTapering, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialProfileSetUsageTapering::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileWithOffsets.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileWithOffsets.cpp index eb0804e26..2635be131 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileWithOffsets.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProfileWithOffsets.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -43,14 +40,14 @@ void IFC4X3::IfcMaterialProfileWithOffsets::getStepParameter( std::stringstream& void IFC4X3::IfcMaterialProfileWithOffsets::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialProfileWithOffsets, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Material, map, errorStream ); - readEntityReference( args[3], m_Profile, map, errorStream ); - m_Priority = IfcInteger::createObjectFromSTEP( args[4], map, errorStream ); - m_Category = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - readTypeOfRealList( args[6], m_OffsetValues ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Material, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_Profile, map, errorStream );} + if( num_args > 4 ){m_Priority = IfcInteger::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Category = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readTypeOfRealList( args[6], m_OffsetValues );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcMaterialProfileWithOffsets, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialProfileWithOffsets::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProperties.cpp index 729b07182..d145687fc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcMaterialProperties::getStepParameter( std::stringstream& stream, void IFC4X3::IfcMaterialProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialProperties, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_Properties, map, errorStream ); - readEntityReference( args[3], m_Material, map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_Properties, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_Material, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcMaterialProperties, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialRelationship.cpp index e98d40607..966d0d8d0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,12 +29,12 @@ void IFC4X3::IfcMaterialRelationship::getStepParameter( std::stringstream& strea void IFC4X3::IfcMaterialRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMaterialRelationship, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_RelatingMaterial, map, errorStream ); - readEntityReferenceList( args[3], m_RelatedMaterials, map, errorStream ); - m_MaterialExpression = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_RelatingMaterial, map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_RelatedMaterials, map, errorStream );} + if( num_args > 4 ){m_MaterialExpression = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcMaterialRelationship, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMaterialRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialUsageDefinition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialUsageDefinition.cpp index 4b7346004..d07a5a181 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialUsageDefinition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMaterialUsageDefinition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMeasureWithUnit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMeasureWithUnit.cpp index f9cfb7a7e..ad7d7b02c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMeasureWithUnit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMeasureWithUnit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,9 +22,9 @@ void IFC4X3::IfcMeasureWithUnit::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcMeasureWithUnit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMeasureWithUnit, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ValueComponent = IfcValue::createObjectFromSTEP( args[0], map, errorStream ); - m_UnitComponent = IfcUnit::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_ValueComponent = IfcValue::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_UnitComponent = IfcUnit::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcMeasureWithUnit, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMeasureWithUnit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMechanicalFastener.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMechanicalFastener.cpp index 62dd63475..a08a8aec8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMechanicalFastener.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMechanicalFastener.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -71,18 +68,18 @@ void IFC4X3::IfcMechanicalFastener::getStepParameter( std::stringstream& stream, void IFC4X3::IfcMechanicalFastener::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMechanicalFastener, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_NominalLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_PredefinedType = IfcMechanicalFastenerTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_NominalLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcMechanicalFastenerTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcMechanicalFastener, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMechanicalFastener::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMechanicalFastenerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMechanicalFastenerType.cpp index 69c070ebc..09718de6d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMechanicalFastenerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMechanicalFastenerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,19 +56,19 @@ void IFC4X3::IfcMechanicalFastenerType::getStepParameter( std::stringstream& str void IFC4X3::IfcMechanicalFastenerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMechanicalFastenerType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcMechanicalFastenerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_NominalLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcMechanicalFastenerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_NominalLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcMechanicalFastenerType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMechanicalFastenerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMedicalDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMedicalDevice.cpp index e92aa4b6f..a813ac48d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMedicalDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMedicalDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcMedicalDevice::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcMedicalDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMedicalDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcMedicalDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcMedicalDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcMedicalDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMedicalDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMedicalDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMedicalDeviceType.cpp index 3aa133908..982fbc249 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMedicalDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMedicalDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcMedicalDeviceType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcMedicalDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMedicalDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcMedicalDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcMedicalDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcMedicalDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMedicalDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMember.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMember.cpp index 03f5e6d45..cd6676f29 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMember.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMember.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcMember::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcMember::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMember, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcMemberTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcMemberTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcMember, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMember::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMemberType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMemberType.cpp index 614be06cb..f9755ba34 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMemberType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMemberType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcMemberType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcMemberType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMemberType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcMemberTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcMemberTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcMemberType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMemberType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMetric.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMetric.cpp index ffa38c289..1708bbf73 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMetric.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMetric.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,18 +48,18 @@ void IFC4X3::IfcMetric::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcMetric::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMetric, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_ConstraintGrade = IfcConstraintEnum::createObjectFromSTEP( args[2], map, errorStream ); - m_ConstraintSource = IfcLabel::createObjectFromSTEP( args[3], map, errorStream ); - m_CreatingActor = IfcActorSelect::createObjectFromSTEP( args[4], map, errorStream ); - m_CreationTime = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream ); - m_UserDefinedGrade = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - m_Benchmark = IfcBenchmarkEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_ValueSource = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_DataValue = IfcMetricValueSelect::createObjectFromSTEP( args[9], map, errorStream ); - readEntityReference( args[10], m_ReferencePath, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_ConstraintGrade = IfcConstraintEnum::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ConstraintSource = IfcLabel::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_CreatingActor = IfcActorSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_CreationTime = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_UserDefinedGrade = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Benchmark = IfcBenchmarkEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ValueSource = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_DataValue = IfcMetricValueSelect::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_ReferencePath, map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcMetric, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMetric::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMirroredProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMirroredProfileDef.cpp index 12e4ddf36..afbfe759d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMirroredProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMirroredProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcMirroredProfileDef::getStepParameter( std::stringstream& stream, void IFC4X3::IfcMirroredProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMirroredProfileDef, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_ParentProfile, map, errorStream ); - readEntityReference( args[3], m_Operator, map, errorStream ); - m_Label = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_ParentProfile, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_Operator, map, errorStream );} + if( num_args > 4 ){m_Label = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcMirroredProfileDef, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMirroredProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMobileTelecommunicationsAppliance.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMobileTelecommunicationsAppliance.cpp index d35b12c46..741d6ea8e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMobileTelecommunicationsAppliance.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMobileTelecommunicationsAppliance.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcMobileTelecommunicationsAppliance::getStepParameter( std::string void IFC4X3::IfcMobileTelecommunicationsAppliance::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMobileTelecommunicationsAppliance, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcMobileTelecommunicationsApplianceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcMobileTelecommunicationsApplianceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcMobileTelecommunicationsAppliance, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMobileTelecommunicationsAppliance::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMobileTelecommunicationsApplianceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMobileTelecommunicationsApplianceType.cpp index 55b8c48d7..580169736 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMobileTelecommunicationsApplianceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMobileTelecommunicationsApplianceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcMobileTelecommunicationsApplianceType::getStepParameter( std::st void IFC4X3::IfcMobileTelecommunicationsApplianceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMobileTelecommunicationsApplianceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcMobileTelecommunicationsApplianceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcMobileTelecommunicationsApplianceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcMobileTelecommunicationsApplianceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMobileTelecommunicationsApplianceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMonetaryUnit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMonetaryUnit.cpp index 297821703..b52d7346a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMonetaryUnit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMonetaryUnit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcMonetaryUnit::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcMonetaryUnit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMonetaryUnit, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Currency = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Currency = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcMonetaryUnit, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMonetaryUnit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMooringDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMooringDevice.cpp index a53412283..2607c61d7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMooringDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMooringDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcMooringDevice::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcMooringDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMooringDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcMooringDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcMooringDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcMooringDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMooringDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMooringDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMooringDeviceType.cpp index ce90671bd..1ae005164 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMooringDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMooringDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcMooringDeviceType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcMooringDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMooringDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcMooringDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcMooringDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcMooringDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMooringDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMotorConnection.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMotorConnection.cpp index d3b3dd239..22bfa0187 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMotorConnection.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMotorConnection.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcMotorConnection::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcMotorConnection::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMotorConnection, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcMotorConnectionTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcMotorConnectionTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcMotorConnection, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMotorConnection::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMotorConnectionType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMotorConnectionType.cpp index de5b0a6e2..993172e66 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMotorConnectionType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcMotorConnectionType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcMotorConnectionType::getStepParameter( std::stringstream& stream void IFC4X3::IfcMotorConnectionType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcMotorConnectionType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcMotorConnectionTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcMotorConnectionTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcMotorConnectionType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcMotorConnectionType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNamedUnit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNamedUnit.cpp index 8128c6b82..731c95285 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNamedUnit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNamedUnit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,9 +22,9 @@ void IFC4X3::IfcNamedUnit::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcNamedUnit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcNamedUnit, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Dimensions, map, errorStream ); - m_UnitType = IfcUnitEnum::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Dimensions, map, errorStream );} + if( num_args > 1 ){m_UnitType = IfcUnitEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcNamedUnit, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcNamedUnit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNavigationElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNavigationElement.cpp index 6fb587eab..d284a1938 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNavigationElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNavigationElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcNavigationElement::getStepParameter( std::stringstream& stream, void IFC4X3::IfcNavigationElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcNavigationElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcNavigationElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcNavigationElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcNavigationElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcNavigationElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNavigationElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNavigationElementType.cpp index a3004b06d..30596e4ca 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNavigationElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcNavigationElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcNavigationElementType::getStepParameter( std::stringstream& stre void IFC4X3::IfcNavigationElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcNavigationElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcNavigationElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcNavigationElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcNavigationElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcNavigationElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObject.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObject.cpp index 786939ac7..6efb10d02 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObject.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObject.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -41,12 +38,12 @@ void IFC4X3::IfcObject::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcObject::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcObject, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcObject, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcObject::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectDefinition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectDefinition.cpp index 29f9ac96d..33fdc7733 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectDefinition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectDefinition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,11 +33,11 @@ void IFC4X3::IfcObjectDefinition::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcObjectDefinition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcObjectDefinition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcObjectDefinition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcObjectDefinition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectPlacement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectPlacement.cpp index 9822a4d27..e5574d9fd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectPlacement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectPlacement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcObjectPlacement::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcObjectPlacement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcObjectPlacement, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_PlacementRelTo, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_PlacementRelTo, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcObjectPlacement, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcObjectPlacement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectTypeEnum.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectTypeEnum.cpp deleted file mode 100644 index a481bcfd1..000000000 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjectTypeEnum.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ - -#include -#include -#include -#include "ifcpp/reader/ReaderUtil.h" -#include "ifcpp/writer/WriterUtil.h" -#include "ifcpp/model/BasicTypes.h" -#include "ifcpp/model/BuildingException.h" -#include "ifcpp/IFC4X3/include/IfcObjectTypeEnum.h" - -// TYPE IfcObjectTypeEnum = ENUMERATION OF (ACTOR ,CONTROL ,GROUP ,PROCESS ,PRODUCT ,PROJECT ,RESOURCE ,NOTDEFINED); -void IFC4X3::IfcObjectTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const -{ - if( is_select_type ) { stream << "IFCOBJECTTYPEENUM("; } - switch( m_enum ) - { - case ENUM_ACTOR: stream << ".ACTOR."; break; - case ENUM_CONTROL: stream << ".CONTROL."; break; - case ENUM_GROUP: stream << ".GROUP."; break; - case ENUM_PROCESS: stream << ".PROCESS."; break; - case ENUM_PRODUCT: stream << ".PRODUCT."; break; - case ENUM_PROJECT: stream << ".PROJECT."; break; - case ENUM_RESOURCE: stream << ".RESOURCE."; break; - case ENUM_NOTDEFINED: stream << ".NOTDEFINED."; break; - } - if( is_select_type ) { stream << ")"; } -} -shared_ptr IFC4X3::IfcObjectTypeEnum::createObjectFromSTEP( const std::string& arg, const std::map >& map, std::stringstream& errorStream ) -{ - if( arg.compare( "$" ) == 0 ) { return shared_ptr(); } - if( arg.compare( "*" ) == 0 ) { return shared_ptr(); } - shared_ptr type_object( new IfcObjectTypeEnum() ); - if( std_iequal( arg, ".ACTOR." ) ) - { - type_object->m_enum = IfcObjectTypeEnum::ENUM_ACTOR; - } - else if( std_iequal( arg, ".CONTROL." ) ) - { - type_object->m_enum = IfcObjectTypeEnum::ENUM_CONTROL; - } - else if( std_iequal( arg, ".GROUP." ) ) - { - type_object->m_enum = IfcObjectTypeEnum::ENUM_GROUP; - } - else if( std_iequal( arg, ".PROCESS." ) ) - { - type_object->m_enum = IfcObjectTypeEnum::ENUM_PROCESS; - } - else if( std_iequal( arg, ".PRODUCT." ) ) - { - type_object->m_enum = IfcObjectTypeEnum::ENUM_PRODUCT; - } - else if( std_iequal( arg, ".PROJECT." ) ) - { - type_object->m_enum = IfcObjectTypeEnum::ENUM_PROJECT; - } - else if( std_iequal( arg, ".RESOURCE." ) ) - { - type_object->m_enum = IfcObjectTypeEnum::ENUM_RESOURCE; - } - else if( std_iequal( arg, ".NOTDEFINED." ) ) - { - type_object->m_enum = IfcObjectTypeEnum::ENUM_NOTDEFINED; - } - return type_object; -} diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjective.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjective.cpp index 7061e9756..0970ce718 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjective.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcObjective.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,18 +48,18 @@ void IFC4X3::IfcObjective::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcObjective::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcObjective, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_ConstraintGrade = IfcConstraintEnum::createObjectFromSTEP( args[2], map, errorStream ); - m_ConstraintSource = IfcLabel::createObjectFromSTEP( args[3], map, errorStream ); - m_CreatingActor = IfcActorSelect::createObjectFromSTEP( args[4], map, errorStream ); - m_CreationTime = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream ); - m_UserDefinedGrade = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_BenchmarkValues, map, errorStream ); - m_LogicalAggregator = IfcLogicalOperatorEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_ObjectiveQualifier = IfcObjectiveEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_UserDefinedQualifier = IfcLabel::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_ConstraintGrade = IfcConstraintEnum::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ConstraintSource = IfcLabel::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_CreatingActor = IfcActorSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_CreationTime = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_UserDefinedGrade = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_BenchmarkValues, map, errorStream );} + if( num_args > 8 ){m_LogicalAggregator = IfcLogicalOperatorEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_ObjectiveQualifier = IfcObjectiveEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_UserDefinedQualifier = IfcLabel::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcObjective, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcObjective::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOccupant.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOccupant.cpp index 50921b31b..95a65b074 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOccupant.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOccupant.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -48,14 +45,14 @@ void IFC4X3::IfcOccupant::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcOccupant::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOccupant, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_TheActor = IfcActorSelect::createObjectFromSTEP( args[5], map, errorStream ); - m_PredefinedType = IfcOccupantTypeEnum::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_TheActor = IfcActorSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_PredefinedType = IfcOccupantTypeEnum::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcOccupant, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOccupant::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve.cpp index 43c2743da..6987fe923 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcOffsetCurve::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcOffsetCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOffsetCurve, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisCurve, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisCurve, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcOffsetCurve, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOffsetCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve2D.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve2D.cpp index e94342f7a..dd4724f17 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve2D.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve2D.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcOffsetCurve2D::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcOffsetCurve2D::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOffsetCurve2D, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisCurve, map, errorStream ); - m_Distance = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisCurve, map, errorStream );} + if( num_args > 1 ){m_Distance = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcOffsetCurve2D, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOffsetCurve2D::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve3D.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve3D.cpp index a489be8a0..19b32e668 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve3D.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurve3D.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcOffsetCurve3D::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcOffsetCurve3D::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOffsetCurve3D, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisCurve, map, errorStream ); - m_Distance = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_RefDirection, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisCurve, map, errorStream );} + if( num_args > 1 ){m_Distance = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_RefDirection, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcOffsetCurve3D, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOffsetCurve3D::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurveByDistances.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurveByDistances.cpp index 243318ec5..aeb2faa43 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurveByDistances.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOffsetCurveByDistances.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcOffsetCurveByDistances::getStepParameter( std::stringstream& str void IFC4X3::IfcOffsetCurveByDistances::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOffsetCurveByDistances, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisCurve, map, errorStream ); - readEntityReferenceList( args[1], m_OffsetValues, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisCurve, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_OffsetValues, map, errorStream );} + if( num_args > 2 ){m_Tag = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcOffsetCurveByDistances, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOffsetCurveByDistances::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpenCrossProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpenCrossProfileDef.cpp index 2f3637d4c..027ba069a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpenCrossProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpenCrossProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -79,14 +76,14 @@ void IFC4X3::IfcOpenCrossProfileDef::getStepParameter( std::stringstream& stream void IFC4X3::IfcOpenCrossProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOpenCrossProfileDef, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_HorizontalWidths = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream ); - readTypeOfRealList( args[3], m_Widths ); - readTypeOfRealList( args[4], m_Slopes ); - readTypeOfStringList( args[5], m_Tags ); - readEntityReference( args[6], m_OffsetPoint, map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_HorizontalWidths = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readTypeOfRealList( args[3], m_Widths );} + if( num_args > 4 ){readTypeOfRealList( args[4], m_Slopes );} + if( num_args > 5 ){readTypeOfStringList( args[5], m_Tags );} + if( num_args > 6 ){readEntityReference( args[6], m_OffsetPoint, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcOpenCrossProfileDef, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOpenCrossProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpenShell.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpenShell.cpp index 5a0335fe9..0dd0059b7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpenShell.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpenShell.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcOpenShell::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcOpenShell::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOpenShell, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_CfsFaces, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_CfsFaces, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcOpenShell, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOpenShell::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpeningElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpeningElement.cpp index 23f98082e..7e88f9787 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpeningElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOpeningElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcOpeningElement::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcOpeningElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOpeningElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcOpeningElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcOpeningElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcOpeningElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOpeningElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrganization.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrganization.cpp index ae5d542ac..d4742c085 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrganization.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrganization.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,12 +33,12 @@ void IFC4X3::IfcOrganization::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcOrganization::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOrganization, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Identification = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReferenceList( args[3], m_Roles, map, errorStream ); - readEntityReferenceList( args[4], m_Addresses, map, errorStream ); + if( num_args > 0 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Name = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_Roles, map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_Addresses, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcOrganization, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOrganization::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrganizationRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrganizationRelationship.cpp index 7ee8f6365..63455970e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrganizationRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrganizationRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,11 +27,11 @@ void IFC4X3::IfcOrganizationRelationship::getStepParameter( std::stringstream& s void IFC4X3::IfcOrganizationRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOrganizationRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_RelatingOrganization, map, errorStream ); - readEntityReferenceList( args[3], m_RelatedOrganizations, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_RelatingOrganization, map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_RelatedOrganizations, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcOrganizationRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOrganizationRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrientedEdge.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrientedEdge.cpp index c51810882..80b84ed13 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrientedEdge.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOrientedEdge.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcOrientedEdge::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcOrientedEdge::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOrientedEdge, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_EdgeStart, map, errorStream ); - readEntityReference( args[1], m_EdgeEnd, map, errorStream ); - readEntityReference( args[2], m_EdgeElement, map, errorStream ); - m_Orientation = IfcBoolean::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_EdgeStart, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_EdgeEnd, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_EdgeElement, map, errorStream );} + if( num_args > 3 ){m_Orientation = IfcBoolean::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcOrientedEdge, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOrientedEdge::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOuterBoundaryCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOuterBoundaryCurve.cpp index ddb354f23..3f8c2ddda 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOuterBoundaryCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOuterBoundaryCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcOuterBoundaryCurve::getStepParameter( std::stringstream& stream, void IFC4X3::IfcOuterBoundaryCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOuterBoundaryCurve, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Segments, map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Segments, map, errorStream );} + if( num_args > 1 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcOuterBoundaryCurve, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOuterBoundaryCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOutlet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOutlet.cpp index 3affe8c9a..7cc912c6c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOutlet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOutlet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcOutlet::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcOutlet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOutlet, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcOutletTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcOutletTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcOutlet, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOutlet::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOutletType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOutletType.cpp index 39258a123..f8f348dc7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOutletType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOutletType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcOutletType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcOutletType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOutletType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcOutletTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcOutletTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcOutletType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOutletType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOwnerHistory.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOwnerHistory.cpp index 718232413..1ec9e83ef 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOwnerHistory.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcOwnerHistory.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -40,15 +37,15 @@ void IFC4X3::IfcOwnerHistory::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcOwnerHistory::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcOwnerHistory, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_OwningUser, map, errorStream ); - readEntityReference( args[1], m_OwningApplication, map, errorStream ); - m_State = IfcStateEnum::createObjectFromSTEP( args[2], map, errorStream ); - m_ChangeAction = IfcChangeActionEnum::createObjectFromSTEP( args[3], map, errorStream ); - m_LastModifiedDate = IfcTimeStamp::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_LastModifyingUser, map, errorStream ); - readEntityReference( args[6], m_LastModifyingApplication, map, errorStream ); - m_CreationDate = IfcTimeStamp::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_OwningUser, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwningApplication, map, errorStream );} + if( num_args > 2 ){m_State = IfcStateEnum::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ChangeAction = IfcChangeActionEnum::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_LastModifiedDate = IfcTimeStamp::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_LastModifyingUser, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_LastModifyingApplication, map, errorStream );} + if( num_args > 7 ){m_CreationDate = IfcTimeStamp::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcOwnerHistory, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcOwnerHistory::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcParameterizedProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcParameterizedProfileDef.cpp index b8affd950..201b5ff56 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcParameterizedProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcParameterizedProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcParameterizedProfileDef::getStepParameter( std::stringstream& st void IFC4X3::IfcParameterizedProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcParameterizedProfileDef, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcParameterizedProfileDef, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcParameterizedProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPath.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPath.cpp index 6786ddeea..d5af32170 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPath.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPath.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcPath::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcPath::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPath, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_EdgeList, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_EdgeList, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcPath, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPath::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPavement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPavement.cpp index 8485f1d7d..88cd5e1b0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPavement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPavement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcPavement::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcPavement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPavement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcPavementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcPavementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcPavement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPavement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPavementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPavementType.cpp index aafd3faea..57889e3df 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPavementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPavementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcPavementType::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcPavementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPavementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcPavementTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcPavementTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcPavementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPavementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPcurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPcurve.cpp index 3881bd48a..0c3c6edc0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPcurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPcurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcPcurve::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcPcurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPcurve, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisSurface, map, errorStream ); - readEntityReference( args[1], m_ReferenceCurve, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisSurface, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_ReferenceCurve, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcPcurve, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPcurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPerformanceHistory.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPerformanceHistory.cpp index 6f47f3302..751084e87 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPerformanceHistory.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPerformanceHistory.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -50,15 +47,15 @@ void IFC4X3::IfcPerformanceHistory::getStepParameter( std::stringstream& stream, void IFC4X3::IfcPerformanceHistory::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPerformanceHistory, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LifeCyclePhase = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - m_PredefinedType = IfcPerformanceHistoryTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LifeCyclePhase = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_PredefinedType = IfcPerformanceHistoryTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcPerformanceHistory, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPerformanceHistory::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPermeableCoveringProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPermeableCoveringProperties.cpp index 077fe9c2f..316df7131 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPermeableCoveringProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPermeableCoveringProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -50,16 +47,16 @@ void IFC4X3::IfcPermeableCoveringProperties::getStepParameter( std::stringstream void IFC4X3::IfcPermeableCoveringProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPermeableCoveringProperties, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_OperationType = IfcPermeableCoveringOperationEnum::createObjectFromSTEP( args[4], map, errorStream ); - m_PanelPosition = IfcWindowPanelPositionEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_FrameDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_FrameThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - readEntityReference( args[8], m_ShapeAspectStyle, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_OperationType = IfcPermeableCoveringOperationEnum::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_PanelPosition = IfcWindowPanelPositionEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_FrameDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_FrameThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_ShapeAspectStyle, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcPermeableCoveringProperties, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPermeableCoveringProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPermit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPermit.cpp index f0ab1c52e..1774f8b02 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPermit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPermit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -52,16 +49,16 @@ void IFC4X3::IfcPermit::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcPermit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPermit, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_PredefinedType = IfcPermitTypeEnum::createObjectFromSTEP( args[6], map, errorStream ); - m_Status = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_PredefinedType = IfcPermitTypeEnum::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Status = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_LongDescription = IfcText::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcPermit, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPermit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPerson.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPerson.cpp index 1c2ca5711..32ff98e02 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPerson.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPerson.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -103,15 +100,15 @@ void IFC4X3::IfcPerson::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcPerson::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPerson, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Identification = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_FamilyName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_GivenName = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readTypeOfStringList( args[3], m_MiddleNames ); - readTypeOfStringList( args[4], m_PrefixTitles ); - readTypeOfStringList( args[5], m_SuffixTitles ); - readEntityReferenceList( args[6], m_Roles, map, errorStream ); - readEntityReferenceList( args[7], m_Addresses, map, errorStream ); + if( num_args > 0 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_FamilyName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_GivenName = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readTypeOfStringList( args[3], m_MiddleNames );} + if( num_args > 4 ){readTypeOfStringList( args[4], m_PrefixTitles );} + if( num_args > 5 ){readTypeOfStringList( args[5], m_SuffixTitles );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_Roles, map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_Addresses, map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcPerson, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPerson::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPersonAndOrganization.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPersonAndOrganization.cpp index 21a021e43..e467d2a3c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPersonAndOrganization.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPersonAndOrganization.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -28,10 +25,10 @@ void IFC4X3::IfcPersonAndOrganization::getStepParameter( std::stringstream& stre void IFC4X3::IfcPersonAndOrganization::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPersonAndOrganization, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ThePerson, map, errorStream ); - readEntityReference( args[1], m_TheOrganization, map, errorStream ); - readEntityReferenceList( args[2], m_Roles, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ThePerson, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_TheOrganization, map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_Roles, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcPersonAndOrganization, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPersonAndOrganization::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalComplexQuantity.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalComplexQuantity.cpp index e8136e459..b231be3fa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalComplexQuantity.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalComplexQuantity.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,13 +32,13 @@ void IFC4X3::IfcPhysicalComplexQuantity::getStepParameter( std::stringstream& st void IFC4X3::IfcPhysicalComplexQuantity::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPhysicalComplexQuantity, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_HasQuantities, map, errorStream ); - m_Discrimination = IfcLabel::createObjectFromSTEP( args[3], map, errorStream ); - m_Quality = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Usage = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_HasQuantities, map, errorStream );} + if( num_args > 3 ){m_Discrimination = IfcLabel::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Quality = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Usage = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcPhysicalComplexQuantity, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPhysicalComplexQuantity::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalQuantity.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalQuantity.cpp index 7ff1b9974..95d537270 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalQuantity.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalQuantity.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcPhysicalQuantity::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcPhysicalQuantity::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPhysicalQuantity, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcPhysicalQuantity, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPhysicalQuantity::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalSimpleQuantity.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalSimpleQuantity.cpp index 7cf8f7623..0062195e3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalSimpleQuantity.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPhysicalSimpleQuantity.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcPhysicalSimpleQuantity::getStepParameter( std::stringstream& str void IFC4X3::IfcPhysicalSimpleQuantity::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPhysicalSimpleQuantity, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Unit, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Unit, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcPhysicalSimpleQuantity, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPhysicalSimpleQuantity::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPile.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPile.cpp index fe69e78f4..23a59823b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPile.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPile.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -69,17 +66,17 @@ void IFC4X3::IfcPile::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcPile::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPile, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcPileTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_ConstructionType = IfcPileConstructionEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcPileTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_ConstructionType = IfcPileConstructionEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcPile, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPile::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPileType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPileType.cpp index e8b14b2cb..5d075f803 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPileType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPileType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcPileType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcPileType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPileType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcPileTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcPileTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcPileType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPileType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeFitting.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeFitting.cpp index d008c3a6c..02343e4e8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeFitting.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeFitting.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcPipeFitting::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcPipeFitting::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPipeFitting, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcPipeFittingTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcPipeFittingTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcPipeFitting, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPipeFitting::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeFittingType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeFittingType.cpp index b1badfd8a..115c55797 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeFittingType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeFittingType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcPipeFittingType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcPipeFittingType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPipeFittingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcPipeFittingTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcPipeFittingTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcPipeFittingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPipeFittingType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeSegment.cpp index 27f189d69..a9d85f146 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcPipeSegment::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcPipeSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPipeSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcPipeSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcPipeSegmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcPipeSegment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPipeSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeSegmentType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeSegmentType.cpp index 132b087a2..0c3ee6c1a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeSegmentType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPipeSegmentType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcPipeSegmentType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcPipeSegmentType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPipeSegmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcPipeSegmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcPipeSegmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcPipeSegmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPipeSegmentType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPixelTexture.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPixelTexture.cpp index 439ac4caf..d5e9bd133 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPixelTexture.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPixelTexture.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -82,16 +79,16 @@ void IFC4X3::IfcPixelTexture::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcPixelTexture::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPixelTexture, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_RepeatS = IfcBoolean::createObjectFromSTEP( args[0], map, errorStream ); - m_RepeatT = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - m_Mode = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_TextureTransform, map, errorStream ); - readTypeOfStringList( args[4], m_Parameter ); - m_Width = IfcInteger::createObjectFromSTEP( args[5], map, errorStream ); - m_Height = IfcInteger::createObjectFromSTEP( args[6], map, errorStream ); - m_ColourComponents = IfcInteger::createObjectFromSTEP( args[7], map, errorStream ); - readTypeOfStringList( args[8], m_Pixel ); + if( num_args > 0 ){m_RepeatS = IfcBoolean::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_RepeatT = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Mode = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_TextureTransform, map, errorStream );} + if( num_args > 4 ){readTypeOfStringList( args[4], m_Parameter );} + if( num_args > 5 ){m_Width = IfcInteger::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Height = IfcInteger::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_ColourComponents = IfcInteger::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){readTypeOfStringList( args[8], m_Pixel );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcPixelTexture, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPixelTexture::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlacement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlacement.cpp index 440178b63..b1b27f2bd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlacement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlacement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcPlacement::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcPlacement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPlacement, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Location, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Location, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcPlacement, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPlacement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlanarBox.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlanarBox.cpp index b1efee7b0..f8fb6717e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlanarBox.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlanarBox.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcPlanarBox::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcPlanarBox::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPlanarBox, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_SizeInX = IfcLengthMeasure::createObjectFromSTEP( args[0], map, errorStream ); - m_SizeInY = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_Placement = IfcAxis2Placement::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_SizeInX = IfcLengthMeasure::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_SizeInY = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Placement = IfcAxis2Placement::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcPlanarBox, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPlanarBox::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlanarExtent.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlanarExtent.cpp index 4ee1a053c..2b8e8df3c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlanarExtent.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlanarExtent.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -26,9 +23,9 @@ void IFC4X3::IfcPlanarExtent::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcPlanarExtent::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPlanarExtent, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_SizeInX = IfcLengthMeasure::createObjectFromSTEP( args[0], map, errorStream ); - m_SizeInY = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_SizeInX = IfcLengthMeasure::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_SizeInY = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcPlanarExtent, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPlanarExtent::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlane.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlane.cpp index 04128d9a0..2c60d4355 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlane.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlane.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcPlane::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcPlane::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPlane, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcPlane, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPlane::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlate.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlate.cpp index 784fa3c91..7f6df89c6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlate.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlate.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcPlate::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcPlate::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPlate, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcPlateTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcPlateTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcPlate, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPlate::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlateType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlateType.cpp index ce80bd148..5d3037ed1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlateType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPlateType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcPlateType::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcPlateType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPlateType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcPlateTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcPlateTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcPlateType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPlateType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPoint.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPoint.cpp index 5285bd3d1..e63905845 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPoint.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPoint.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointByDistanceExpression.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointByDistanceExpression.cpp index e8ecda22a..9358178d8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointByDistanceExpression.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointByDistanceExpression.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,12 +31,12 @@ void IFC4X3::IfcPointByDistanceExpression::getStepParameter( std::stringstream& void IFC4X3::IfcPointByDistanceExpression::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPointByDistanceExpression, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_DistanceAlong = IfcCurveMeasureSelect::createObjectFromSTEP( args[0], map, errorStream ); - m_OffsetLateral = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_OffsetVertical = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_OffsetLongitudinal = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_BasisCurve, map, errorStream ); + if( num_args > 0 ){m_DistanceAlong = IfcCurveMeasureSelect::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_OffsetLateral = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_OffsetVertical = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_OffsetLongitudinal = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_BasisCurve, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcPointByDistanceExpression, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPointByDistanceExpression::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointOnCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointOnCurve.cpp index eebc393c1..2748bf654 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointOnCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointOnCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcPointOnCurve::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcPointOnCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPointOnCurve, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisCurve, map, errorStream ); - m_PointParameter = IfcParameterValue::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisCurve, map, errorStream );} + if( num_args > 1 ){m_PointParameter = IfcParameterValue::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcPointOnCurve, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPointOnCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointOnSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointOnSurface.cpp index 1d011e3c5..b8b100350 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointOnSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPointOnSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcPointOnSurface::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcPointOnSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPointOnSurface, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisSurface, map, errorStream ); - m_PointParameterU = IfcParameterValue::createObjectFromSTEP( args[1], map, errorStream ); - m_PointParameterV = IfcParameterValue::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisSurface, map, errorStream );} + if( num_args > 1 ){m_PointParameterU = IfcParameterValue::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_PointParameterV = IfcParameterValue::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcPointOnSurface, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPointOnSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolyLoop.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolyLoop.cpp index ed8bef3c3..8e0cec0ff 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolyLoop.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolyLoop.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcPolyLoop::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcPolyLoop::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPolyLoop, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Polygon, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Polygon, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcPolyLoop, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPolyLoop::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolygonalBoundedHalfSpace.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolygonalBoundedHalfSpace.cpp index c582f52dd..31f6ffa56 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolygonalBoundedHalfSpace.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolygonalBoundedHalfSpace.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcPolygonalBoundedHalfSpace::getStepParameter( std::stringstream& void IFC4X3::IfcPolygonalBoundedHalfSpace::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPolygonalBoundedHalfSpace, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BaseSurface, map, errorStream ); - m_AgreementFlag = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - readEntityReference( args[3], m_PolygonalBoundary, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BaseSurface, map, errorStream );} + if( num_args > 1 ){m_AgreementFlag = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_PolygonalBoundary, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPolygonalBoundedHalfSpace, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPolygonalBoundedHalfSpace::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolygonalFaceSet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolygonalFaceSet.cpp index 7eca9f1b7..5bc30d300 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolygonalFaceSet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolygonalFaceSet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,15 +53,16 @@ void IFC4X3::IfcPolygonalFaceSet::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcPolygonalFaceSet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPolygonalFaceSet, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Coordinates, map, errorStream ); - m_Closed = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_Faces, map, errorStream ); - readTypeOfIntegerList( args[3], m_PnIndex ); + if( num_args > 0 ){readEntityReference( args[0], m_Coordinates, map, errorStream );} + if( num_args > 1 ){m_Closed = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_Faces, map, errorStream );} + if( num_args > 3 ){readTypeOfIntegerList( args[3], m_PnIndex );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPolygonalFaceSet, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPolygonalFaceSet::getAttributes( std::vector > >& vec_attributes ) const { IFC4X3::IfcTessellatedFaceSet::getAttributes( vec_attributes ); + vec_attributes.emplace_back( std::make_pair( "Closed", m_Closed ) ); shared_ptr Faces_vec_object( new AttributeObjectVector() ); std::copy( m_Faces.begin(), m_Faces.end(), std::back_inserter( Faces_vec_object->m_vec ) ); vec_attributes.emplace_back( std::make_pair( "Faces", Faces_vec_object ) ); diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolyline.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolyline.cpp index 80696b8a6..c6fcea67a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolyline.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolyline.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcPolyline::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcPolyline::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPolyline, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Points, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Points, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcPolyline, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPolyline::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolynomialCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolynomialCurve.cpp index caa2c94c8..a3a699a19 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolynomialCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPolynomialCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcPolynomialCurve::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcPolynomialCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPolynomialCurve, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); - readTypeOfRealList( args[1], m_CoefficientsX ); - readTypeOfRealList( args[2], m_CoefficientsY ); - readTypeOfRealList( args[3], m_CoefficientsZ ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args > 1 ){readTypeOfRealList( args[1], m_CoefficientsX );} + if( num_args > 2 ){readTypeOfRealList( args[2], m_CoefficientsY );} + if( num_args > 3 ){readTypeOfRealList( args[3], m_CoefficientsZ );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPolynomialCurve, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPolynomialCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPort.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPort.cpp index 227702598..20abd85c6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPort.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPort.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -52,14 +49,14 @@ void IFC4X3::IfcPort::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcPort::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPort, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcPort, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPort::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPositioningElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPositioningElement.cpp index cc1ec14ef..58286d82b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPositioningElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPositioningElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,14 +48,14 @@ void IFC4X3::IfcPositioningElement::getStepParameter( std::stringstream& stream, void IFC4X3::IfcPositioningElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPositioningElement, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcPositioningElement, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPositioningElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPostalAddress.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPostalAddress.cpp index 248799834..4b3966e8a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPostalAddress.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPostalAddress.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,17 +62,17 @@ void IFC4X3::IfcPostalAddress::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcPostalAddress::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPostalAddress, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Purpose = IfcAddressTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedPurpose = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_InternalLocation = IfcLabel::createObjectFromSTEP( args[3], map, errorStream ); - readTypeOfStringList( args[4], m_AddressLines ); - m_PostalBox = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - m_Town = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - m_Region = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_PostalCode = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_Country = IfcLabel::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_Purpose = IfcAddressTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedPurpose = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_InternalLocation = IfcLabel::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readTypeOfStringList( args[4], m_AddressLines );} + if( num_args > 5 ){m_PostalBox = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Town = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Region = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PostalCode = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_Country = IfcLabel::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcPostalAddress, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPostalAddress::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedColour.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedColour.cpp index 7b7e4b8e2..cf92c575b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedColour.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedColour.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcPreDefinedColour::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcPreDefinedColour::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPreDefinedColour, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcPreDefinedColour, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPreDefinedColour::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedCurveFont.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedCurveFont.cpp index 9c78d5b91..3a0505c6a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedCurveFont.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedCurveFont.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcPreDefinedCurveFont::getStepParameter( std::stringstream& stream void IFC4X3::IfcPreDefinedCurveFont::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPreDefinedCurveFont, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcPreDefinedCurveFont, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPreDefinedCurveFont::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedItem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedItem.cpp index 58f671aab..c2cee5119 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedItem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedItem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcPreDefinedItem::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcPreDefinedItem::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPreDefinedItem, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcPreDefinedItem, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPreDefinedItem::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedProperties.cpp index 58cce7e18..11597c517 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedPropertySet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedPropertySet.cpp index 2c1ef8e5c..09a5a29f4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedPropertySet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedPropertySet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,11 +33,11 @@ void IFC4X3::IfcPreDefinedPropertySet::getStepParameter( std::stringstream& stre void IFC4X3::IfcPreDefinedPropertySet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPreDefinedPropertySet, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPreDefinedPropertySet, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPreDefinedPropertySet::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedTextFont.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedTextFont.cpp index 806b291eb..86b424f83 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedTextFont.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPreDefinedTextFont.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcPreDefinedTextFont::getStepParameter( std::stringstream& stream, void IFC4X3::IfcPreDefinedTextFont::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPreDefinedTextFont, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcPreDefinedTextFont, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPreDefinedTextFont::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationItem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationItem.cpp index 61a9032cb..af011e8d2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationItem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationItem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationLayerAssignment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationLayerAssignment.cpp index b09b6609b..dbd8450d3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationLayerAssignment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationLayerAssignment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -50,11 +47,11 @@ void IFC4X3::IfcPresentationLayerAssignment::getStepParameter( std::stringstream void IFC4X3::IfcPresentationLayerAssignment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPresentationLayerAssignment, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readSelectList( args[2], m_AssignedItems, map, errorStream ); - m_Identifier = IfcIdentifier::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readSelectList( args[2], m_AssignedItems, map, errorStream );} + if( num_args > 3 ){m_Identifier = IfcIdentifier::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPresentationLayerAssignment, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPresentationLayerAssignment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationLayerWithStyle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationLayerWithStyle.cpp index a46478c36..c6b15cfb9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationLayerWithStyle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationLayerWithStyle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,15 +55,15 @@ void IFC4X3::IfcPresentationLayerWithStyle::getStepParameter( std::stringstream& void IFC4X3::IfcPresentationLayerWithStyle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPresentationLayerWithStyle, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readSelectList( args[2], m_AssignedItems, map, errorStream ); - m_Identifier = IfcIdentifier::createObjectFromSTEP( args[3], map, errorStream ); - m_LayerOn = IfcLogical::createObjectFromSTEP( args[4], map, errorStream ); - m_LayerFrozen = IfcLogical::createObjectFromSTEP( args[5], map, errorStream ); - m_LayerBlocked = IfcLogical::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_LayerStyles, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readSelectList( args[2], m_AssignedItems, map, errorStream );} + if( num_args > 3 ){m_Identifier = IfcIdentifier::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_LayerOn = IfcLogical::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LayerFrozen = IfcLogical::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LayerBlocked = IfcLogical::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_LayerStyles, map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcPresentationLayerWithStyle, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPresentationLayerWithStyle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationStyle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationStyle.cpp index 3a231b88c..212827541 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationStyle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationStyle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcPresentationStyle::getStepParameter( std::stringstream& stream, void IFC4X3::IfcPresentationStyle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPresentationStyle, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcPresentationStyle, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPresentationStyle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationStyleAssignment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationStyleAssignment.cpp index 50a086098..85d5698e8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationStyleAssignment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPresentationStyleAssignment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,9 +22,9 @@ void IFC4X3::IfcPresentationStyleAssignment::getStepParameter( std::stringstream void IFC4X3::IfcPresentationStyleAssignment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPresentationStyleAssignment, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReferenceList( args[1], m_Styles, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_Styles, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcPresentationStyleAssignment, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPresentationStyleAssignment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcedure.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcedure.cpp index 655f0b845..98e3e8b31 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcedure.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcedure.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,15 +48,15 @@ void IFC4X3::IfcProcedure::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcProcedure::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProcedure, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - m_PredefinedType = IfcProcedureTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_PredefinedType = IfcProcedureTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcProcedure, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProcedure::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcedureType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcedureType.cpp index 71999bb7a..627be481a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcedureType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcedureType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -53,17 +50,17 @@ void IFC4X3::IfcProcedureType::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcProcedureType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProcedureType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ProcessType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcProcedureTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ProcessType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcProcedureTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcProcedureType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProcedureType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcess.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcess.cpp index 5e05fd410..91eed4b28 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcess.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProcess.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -48,14 +45,14 @@ void IFC4X3::IfcProcess::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcProcess::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProcess, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcProcess, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProcess::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProduct.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProduct.cpp index 845a95652..d23a099cb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProduct.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProduct.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,14 +48,14 @@ void IFC4X3::IfcProduct::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcProduct::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProduct, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcProduct, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProduct::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProductDefinitionShape.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProductDefinitionShape.cpp index c60abcdcd..78be34b9b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProductDefinitionShape.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProductDefinitionShape.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcProductDefinitionShape::getStepParameter( std::stringstream& str void IFC4X3::IfcProductDefinitionShape::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProductDefinitionShape, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_Representations, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_Representations, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcProductDefinitionShape, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProductDefinitionShape::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProductRepresentation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProductRepresentation.cpp index e7bb24a99..769dba18a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProductRepresentation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProductRepresentation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -28,10 +25,10 @@ void IFC4X3::IfcProductRepresentation::getStepParameter( std::stringstream& stre void IFC4X3::IfcProductRepresentation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProductRepresentation, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_Representations, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_Representations, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcProductRepresentation, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProductRepresentation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProfileDef.cpp index 6716496fd..2aa71c21a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcProfileDef::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProfileDef, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcProfileDef, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProfileProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProfileProperties.cpp index 3ba0a73e0..f1db833d9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProfileProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProfileProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,11 +29,11 @@ void IFC4X3::IfcProfileProperties::getStepParameter( std::stringstream& stream, void IFC4X3::IfcProfileProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProfileProperties, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList( args[2], m_Properties, map, errorStream ); - readEntityReference( args[3], m_ProfileDefinition, map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_Properties, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_ProfileDefinition, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcProfileProperties, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProfileProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProject.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProject.cpp index 286fc50fc..d7943dea3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProject.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProject.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,16 +46,16 @@ void IFC4X3::IfcProject::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcProject::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProject, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - m_Phase = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_RepresentationContexts, map, errorStream ); - readEntityReference( args[8], m_UnitsInContext, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Phase = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_RepresentationContexts, map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_UnitsInContext, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcProject, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProject::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectLibrary.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectLibrary.cpp index c001ee9fb..99cc481bb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectLibrary.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectLibrary.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,16 +46,16 @@ void IFC4X3::IfcProjectLibrary::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcProjectLibrary::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProjectLibrary, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - m_Phase = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_RepresentationContexts, map, errorStream ); - readEntityReference( args[8], m_UnitsInContext, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Phase = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_RepresentationContexts, map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_UnitsInContext, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcProjectLibrary, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProjectLibrary::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectOrder.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectOrder.cpp index 571a201ed..a4b0d0e6f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectOrder.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectOrder.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -52,16 +49,16 @@ void IFC4X3::IfcProjectOrder::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcProjectOrder::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProjectOrder, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_PredefinedType = IfcProjectOrderTypeEnum::createObjectFromSTEP( args[6], map, errorStream ); - m_Status = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_PredefinedType = IfcProjectOrderTypeEnum::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Status = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_LongDescription = IfcText::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcProjectOrder, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProjectOrder::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectedCRS.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectedCRS.cpp index 3b39574b6..395ebebc0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectedCRS.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectedCRS.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -38,14 +35,14 @@ void IFC4X3::IfcProjectedCRS::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcProjectedCRS::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProjectedCRS, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_GeodeticDatum = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream ); - m_VerticalDatum = IfcIdentifier::createObjectFromSTEP( args[3], map, errorStream ); - m_MapProjection = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - m_MapZone = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_MapUnit, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_GeodeticDatum = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_VerticalDatum = IfcIdentifier::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_MapProjection = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_MapZone = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_MapUnit, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcProjectedCRS, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProjectedCRS::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectionElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectionElement.cpp index e212f48f9..b15652d0b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectionElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProjectionElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcProjectionElement::getStepParameter( std::stringstream& stream, void IFC4X3::IfcProjectionElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProjectionElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcProjectionElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcProjectionElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcProjectionElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProjectionElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProperty.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProperty.cpp index 10321566b..edcddb2e2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProperty.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProperty.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,9 +28,9 @@ void IFC4X3::IfcProperty::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcProperty::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProperty, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcProperty, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProperty::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyAbstraction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyAbstraction.cpp index 03a4272e5..f25e95000 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyAbstraction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyAbstraction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyBoundedValue.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyBoundedValue.cpp index 2e71a16f8..a75fcb844 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyBoundedValue.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyBoundedValue.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -41,13 +38,13 @@ void IFC4X3::IfcPropertyBoundedValue::getStepParameter( std::stringstream& strea void IFC4X3::IfcPropertyBoundedValue::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertyBoundedValue, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_UpperBoundValue = IfcValue::createObjectFromSTEP( args[2], map, errorStream ); - m_LowerBoundValue = IfcValue::createObjectFromSTEP( args[3], map, errorStream ); - m_Unit = IfcUnit::createObjectFromSTEP( args[4], map, errorStream ); - m_SetPointValue = IfcValue::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UpperBoundValue = IfcValue::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_LowerBoundValue = IfcValue::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Unit = IfcUnit::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_SetPointValue = IfcValue::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcPropertyBoundedValue, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertyBoundedValue::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyDefinition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyDefinition.cpp index 38d4747b4..6f8bcb37c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyDefinition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyDefinition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcPropertyDefinition::getStepParameter( std::stringstream& stream, void IFC4X3::IfcPropertyDefinition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertyDefinition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPropertyDefinition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertyDefinition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyDependencyRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyDependencyRelationship.cpp index 7dc68d41f..882aee285 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyDependencyRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyDependencyRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,12 +29,12 @@ void IFC4X3::IfcPropertyDependencyRelationship::getStepParameter( std::stringstr void IFC4X3::IfcPropertyDependencyRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertyDependencyRelationship, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_DependingProperty, map, errorStream ); - readEntityReference( args[3], m_DependantProperty, map, errorStream ); - m_Expression = IfcText::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_DependingProperty, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_DependantProperty, map, errorStream );} + if( num_args > 4 ){m_Expression = IfcText::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcPropertyDependencyRelationship, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertyDependencyRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyEnumeratedValue.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyEnumeratedValue.cpp index 551e71d75..e0ea45302 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyEnumeratedValue.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyEnumeratedValue.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,11 +55,11 @@ void IFC4X3::IfcPropertyEnumeratedValue::getStepParameter( std::stringstream& st void IFC4X3::IfcPropertyEnumeratedValue::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertyEnumeratedValue, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readSelectList( args[2], m_EnumerationValues, map, errorStream ); - readEntityReference( args[3], m_EnumerationReference, map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readSelectList( args[2], m_EnumerationValues, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_EnumerationReference, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPropertyEnumeratedValue, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertyEnumeratedValue::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyEnumeration.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyEnumeration.cpp index ec511d9f1..bf7fe8dc7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyEnumeration.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyEnumeration.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -46,10 +43,10 @@ void IFC4X3::IfcPropertyEnumeration::getStepParameter( std::stringstream& stream void IFC4X3::IfcPropertyEnumeration::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertyEnumeration, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readSelectList( args[1], m_EnumerationValues, map, errorStream ); - m_Unit = IfcUnit::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readSelectList( args[1], m_EnumerationValues, map, errorStream );} + if( num_args > 2 ){m_Unit = IfcUnit::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcPropertyEnumeration, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertyEnumeration::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyListValue.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyListValue.cpp index 36f00fa42..1274508ff 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyListValue.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyListValue.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,11 +55,11 @@ void IFC4X3::IfcPropertyListValue::getStepParameter( std::stringstream& stream, void IFC4X3::IfcPropertyListValue::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertyListValue, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readSelectList( args[2], m_ListValues, map, errorStream ); - m_Unit = IfcUnit::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readSelectList( args[2], m_ListValues, map, errorStream );} + if( num_args > 3 ){m_Unit = IfcUnit::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPropertyListValue, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertyListValue::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyReferenceValue.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyReferenceValue.cpp index 4f538c4f8..8207cf6aa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyReferenceValue.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyReferenceValue.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,11 +33,11 @@ void IFC4X3::IfcPropertyReferenceValue::getStepParameter( std::stringstream& str void IFC4X3::IfcPropertyReferenceValue::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertyReferenceValue, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_UsageName = IfcText::createObjectFromSTEP( args[2], map, errorStream ); - m_PropertyReference = IfcObjectReferenceSelect::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UsageName = IfcText::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_PropertyReference = IfcObjectReferenceSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPropertyReferenceValue, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertyReferenceValue::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySet.cpp index d8930330d..e479a53c8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,12 +36,12 @@ void IFC4X3::IfcPropertySet::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcPropertySet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertySet, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_HasProperties, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_HasProperties, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcPropertySet, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertySet::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySetDefinition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySetDefinition.cpp index 6517440ab..99097872b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySetDefinition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySetDefinition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,11 +33,11 @@ void IFC4X3::IfcPropertySetDefinition::getStepParameter( std::stringstream& stre void IFC4X3::IfcPropertySetDefinition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertySetDefinition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPropertySetDefinition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertySetDefinition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySetTemplate.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySetTemplate.cpp index 8942dc21a..6b8d0eefd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySetTemplate.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySetTemplate.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -43,14 +40,14 @@ void IFC4X3::IfcPropertySetTemplate::getStepParameter( std::stringstream& stream void IFC4X3::IfcPropertySetTemplate::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertySetTemplate, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_TemplateType = IfcPropertySetTemplateTypeEnum::createObjectFromSTEP( args[4], map, errorStream ); - m_ApplicableEntity = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReferenceList( args[6], m_HasPropertyTemplates, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_TemplateType = IfcPropertySetTemplateTypeEnum::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_ApplicableEntity = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_HasPropertyTemplates, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcPropertySetTemplate, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertySetTemplate::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySingleValue.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySingleValue.cpp index 7299edbc2..86cb76190 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySingleValue.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertySingleValue.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,11 +34,11 @@ void IFC4X3::IfcPropertySingleValue::getStepParameter( std::stringstream& stream void IFC4X3::IfcPropertySingleValue::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertySingleValue, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_NominalValue = IfcValue::createObjectFromSTEP( args[2], map, errorStream ); - m_Unit = IfcUnit::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_NominalValue = IfcValue::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Unit = IfcUnit::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPropertySingleValue, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertySingleValue::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTableValue.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTableValue.cpp index c37a4a59e..1519f60b5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTableValue.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTableValue.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -88,15 +85,15 @@ void IFC4X3::IfcPropertyTableValue::getStepParameter( std::stringstream& stream, void IFC4X3::IfcPropertyTableValue::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertyTableValue, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readSelectList( args[2], m_DefiningValues, map, errorStream ); - readSelectList( args[3], m_DefinedValues, map, errorStream ); - m_Expression = IfcText::createObjectFromSTEP( args[4], map, errorStream ); - m_DefiningUnit = IfcUnit::createObjectFromSTEP( args[5], map, errorStream ); - m_DefinedUnit = IfcUnit::createObjectFromSTEP( args[6], map, errorStream ); - m_CurveInterpolation = IfcCurveInterpolationEnum::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readSelectList( args[2], m_DefiningValues, map, errorStream );} + if( num_args > 3 ){readSelectList( args[3], m_DefinedValues, map, errorStream );} + if( num_args > 4 ){m_Expression = IfcText::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_DefiningUnit = IfcUnit::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_DefinedUnit = IfcUnit::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_CurveInterpolation = IfcCurveInterpolationEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcPropertyTableValue, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertyTableValue::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTemplate.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTemplate.cpp index 30cbb4963..a3148918e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTemplate.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTemplate.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,11 +32,11 @@ void IFC4X3::IfcPropertyTemplate::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcPropertyTemplate::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertyTemplate, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPropertyTemplate, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertyTemplate::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTemplateDefinition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTemplateDefinition.cpp index 5e362144f..0e72a8634 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTemplateDefinition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPropertyTemplateDefinition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcPropertyTemplateDefinition::getStepParameter( std::stringstream& void IFC4X3::IfcPropertyTemplateDefinition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPropertyTemplateDefinition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcPropertyTemplateDefinition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPropertyTemplateDefinition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDevice.cpp index 789961b5d..2013165ad 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcProtectiveDevice::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcProtectiveDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProtectiveDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcProtectiveDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcProtectiveDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcProtectiveDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProtectiveDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceTrippingUnit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceTrippingUnit.cpp index 1d1e9eb8a..8290b4852 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceTrippingUnit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceTrippingUnit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcProtectiveDeviceTrippingUnit::getStepParameter( std::stringstrea void IFC4X3::IfcProtectiveDeviceTrippingUnit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProtectiveDeviceTrippingUnit, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcProtectiveDeviceTrippingUnitTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcProtectiveDeviceTrippingUnitTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcProtectiveDeviceTrippingUnit, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProtectiveDeviceTrippingUnit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceTrippingUnitType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceTrippingUnitType.cpp index b01e54aef..0843a2548 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceTrippingUnitType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceTrippingUnitType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcProtectiveDeviceTrippingUnitType::getStepParameter( std::strings void IFC4X3::IfcProtectiveDeviceTrippingUnitType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProtectiveDeviceTrippingUnitType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcProtectiveDeviceTrippingUnitTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcProtectiveDeviceTrippingUnitTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcProtectiveDeviceTrippingUnitType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProtectiveDeviceTrippingUnitType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceType.cpp index b808c91f3..558819fc1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcProtectiveDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcProtectiveDeviceType::getStepParameter( std::stringstream& strea void IFC4X3::IfcProtectiveDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcProtectiveDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcProtectiveDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcProtectiveDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcProtectiveDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcProtectiveDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPump.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPump.cpp index 2ba9f0858..9dd44f8f7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPump.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPump.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcPump::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcPump::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPump, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcPumpTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcPumpTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcPump, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPump::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPumpType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPumpType.cpp index e13f7a7f3..f6409bfe3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPumpType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcPumpType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcPumpType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcPumpType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPumpType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcPumpTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcPumpTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcPumpType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcPumpType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityArea.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityArea.cpp index abaadad12..257fafc75 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityArea.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityArea.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcQuantityArea::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcQuantityArea::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcQuantityArea, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Unit, map, errorStream ); - m_AreaValue = IfcAreaMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Unit, map, errorStream );} + if( num_args > 3 ){m_AreaValue = IfcAreaMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcQuantityArea, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcQuantityArea::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityCount.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityCount.cpp index d088eb255..31fb96866 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityCount.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityCount.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcQuantityCount::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcQuantityCount::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcQuantityCount, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Unit, map, errorStream ); - m_CountValue = IfcCountMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Unit, map, errorStream );} + if( num_args > 3 ){m_CountValue = IfcCountMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcQuantityCount, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcQuantityCount::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityLength.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityLength.cpp index b91f94f07..31af1430c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityLength.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityLength.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcQuantityLength::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcQuantityLength::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcQuantityLength, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Unit, map, errorStream ); - m_LengthValue = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Unit, map, errorStream );} + if( num_args > 3 ){m_LengthValue = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcQuantityLength, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcQuantityLength::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityNumber.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityNumber.cpp index 90cf33b11..b3d64707f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityNumber.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityNumber.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcQuantityNumber::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcQuantityNumber::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcQuantityNumber, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Unit, map, errorStream ); - m_NumberValue = IfcNumericMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Unit, map, errorStream );} + if( num_args > 3 ){m_NumberValue = IfcNumericMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcQuantityNumber, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcQuantityNumber::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantitySet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantitySet.cpp index 76e23cbbd..d9fd0fbcc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantitySet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantitySet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,11 +33,11 @@ void IFC4X3::IfcQuantitySet::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcQuantitySet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcQuantitySet, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcQuantitySet, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcQuantitySet::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityTime.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityTime.cpp index 9a8309ad1..5c9b7ce8b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityTime.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityTime.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcQuantityTime::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcQuantityTime::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcQuantityTime, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Unit, map, errorStream ); - m_TimeValue = IfcTimeMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Unit, map, errorStream );} + if( num_args > 3 ){m_TimeValue = IfcTimeMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcQuantityTime, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcQuantityTime::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityVolume.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityVolume.cpp index 5466ac8e9..92d1f7d21 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityVolume.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityVolume.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcQuantityVolume::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcQuantityVolume::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcQuantityVolume, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Unit, map, errorStream ); - m_VolumeValue = IfcVolumeMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Unit, map, errorStream );} + if( num_args > 3 ){m_VolumeValue = IfcVolumeMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcQuantityVolume, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcQuantityVolume::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityWeight.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityWeight.cpp index fbb3b8b8d..e98e53e1f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityWeight.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcQuantityWeight.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcQuantityWeight::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcQuantityWeight::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcQuantityWeight, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Unit, map, errorStream ); - m_WeightValue = IfcMassMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Unit, map, errorStream );} + if( num_args > 3 ){m_WeightValue = IfcMassMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_Formula = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcQuantityWeight, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcQuantityWeight::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRail.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRail.cpp index 100a0df6c..8d29c73f4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRail.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRail.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcRail::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcRail::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRail, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcRailTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcRailTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcRail, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRail::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailType.cpp index f3f7e0ef3..2d319addc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcRailType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcRailType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRailType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcRailTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcRailTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRailType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRailType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailing.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailing.cpp index c29fa14e6..596fa5fbf 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailing.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailing.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcRailing::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcRailing::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRailing, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcRailingTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcRailingTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcRailing, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRailing::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailingType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailingType.cpp index 546e022e9..31d142abd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailingType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailingType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcRailingType::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcRailingType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRailingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcRailingTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcRailingTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRailingType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRailingType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailway.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailway.cpp index a32cfcfff..16b27372d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailway.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailway.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,17 +58,17 @@ void IFC4X3::IfcRailway::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcRailway::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRailway, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcRailwayTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcRailwayTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRailway, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRailway::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailwayPart.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailwayPart.cpp index 4bdffa6c3..c98457337 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailwayPart.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRailwayPart.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -64,18 +61,18 @@ void IFC4X3::IfcRailwayPart::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcRailwayPart::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRailwayPart, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_PredefinedType = IfcRailwayPartTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcRailwayPartTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcRailwayPart, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRailwayPart::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRamp.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRamp.cpp index 8d480c93a..711251e36 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRamp.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRamp.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcRamp::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcRamp::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRamp, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcRampTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcRampTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcRamp, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRamp::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampFlight.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampFlight.cpp index 5f6d00aeb..fc3f927f2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampFlight.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampFlight.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcRampFlight::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcRampFlight::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRampFlight, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcRampFlightTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcRampFlightTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcRampFlight, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRampFlight::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampFlightType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampFlightType.cpp index b8b96f6d8..07164fb56 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampFlightType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampFlightType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcRampFlightType::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcRampFlightType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRampFlightType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcRampFlightTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcRampFlightTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRampFlightType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRampFlightType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampType.cpp index 871fafcc5..306291e20 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRampType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcRampType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcRampType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRampType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcRampTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcRampTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRampType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRampType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRationalBSplineCurveWithKnots.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRationalBSplineCurveWithKnots.cpp index 1efbf810c..01e16b9e9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRationalBSplineCurveWithKnots.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRationalBSplineCurveWithKnots.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -46,16 +43,16 @@ void IFC4X3::IfcRationalBSplineCurveWithKnots::getStepParameter( std::stringstre void IFC4X3::IfcRationalBSplineCurveWithKnots::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRationalBSplineCurveWithKnots, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Degree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReferenceList( args[1], m_ControlPointsList, map, errorStream ); - m_CurveForm = IfcBSplineCurveForm::createObjectFromSTEP( args[2], map, errorStream ); - m_ClosedCurve = IfcLogical::createObjectFromSTEP( args[3], map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[4], map, errorStream ); - readTypeOfIntegerList( args[5], m_KnotMultiplicities ); - readTypeOfRealList( args[6], m_Knots ); - m_KnotSpec = IfcKnotType::createObjectFromSTEP( args[7], map, errorStream ); - readTypeOfRealList( args[8], m_WeightsData ); + if( num_args > 0 ){m_Degree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_ControlPointsList, map, errorStream );} + if( num_args > 2 ){m_CurveForm = IfcBSplineCurveForm::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ClosedCurve = IfcLogical::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readTypeOfIntegerList( args[5], m_KnotMultiplicities );} + if( num_args > 6 ){readTypeOfRealList( args[6], m_Knots );} + if( num_args > 7 ){m_KnotSpec = IfcKnotType::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){readTypeOfRealList( args[8], m_WeightsData );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcRationalBSplineCurveWithKnots, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRationalBSplineCurveWithKnots::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRationalBSplineSurfaceWithKnots.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRationalBSplineSurfaceWithKnots.cpp index 372226792..16ac7c0d4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRationalBSplineSurfaceWithKnots.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRationalBSplineSurfaceWithKnots.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,20 +51,20 @@ void IFC4X3::IfcRationalBSplineSurfaceWithKnots::getStepParameter( std::stringst void IFC4X3::IfcRationalBSplineSurfaceWithKnots::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 13 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRationalBSplineSurfaceWithKnots, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_UDegree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream ); - m_VDegree = IfcInteger::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReferenceList2D( args[2], m_ControlPointsList, map, errorStream ); - m_SurfaceForm = IfcBSplineSurfaceForm::createObjectFromSTEP( args[3], map, errorStream ); - m_UClosed = IfcLogical::createObjectFromSTEP( args[4], map, errorStream ); - m_VClosed = IfcLogical::createObjectFromSTEP( args[5], map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[6], map, errorStream ); - readTypeOfIntegerList( args[7], m_UMultiplicities ); - readTypeOfIntegerList( args[8], m_VMultiplicities ); - readTypeOfRealList( args[9], m_UKnots ); - readTypeOfRealList( args[10], m_VKnots ); - m_KnotSpec = IfcKnotType::createObjectFromSTEP( args[11], map, errorStream ); - readTypeOfRealList2D( args[12], m_WeightsData ); + if( num_args > 0 ){m_UDegree = IfcInteger::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_VDegree = IfcInteger::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReferenceList2D( args[2], m_ControlPointsList, map, errorStream );} + if( num_args > 3 ){m_SurfaceForm = IfcBSplineSurfaceForm::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_UClosed = IfcLogical::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_VClosed = IfcLogical::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readTypeOfIntegerList( args[7], m_UMultiplicities );} + if( num_args > 8 ){readTypeOfIntegerList( args[8], m_VMultiplicities );} + if( num_args > 9 ){readTypeOfRealList( args[9], m_UKnots );} + if( num_args > 10 ){readTypeOfRealList( args[10], m_VKnots );} + if( num_args > 11 ){m_KnotSpec = IfcKnotType::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){readTypeOfRealList2D( args[12], m_WeightsData );} + if( num_args != 13 ){ errorStream << "Wrong parameter count for entity IfcRationalBSplineSurfaceWithKnots, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRationalBSplineSurfaceWithKnots::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangleHollowProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangleHollowProfileDef.cpp index 44452db0e..f44aa4b37 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangleHollowProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangleHollowProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -42,15 +39,15 @@ void IFC4X3::IfcRectangleHollowProfileDef::getStepParameter( std::stringstream& void IFC4X3::IfcRectangleHollowProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRectangleHollowProfileDef, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_XDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_YDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_WallThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_InnerFilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_OuterFilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_XDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_YDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_WallThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_InnerFilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_OuterFilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcRectangleHollowProfileDef, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRectangleHollowProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangleProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangleProfileDef.cpp index 24d5f1103..b6018e781 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangleProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangleProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcRectangleProfileDef::getStepParameter( std::stringstream& stream void IFC4X3::IfcRectangleProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRectangleProfileDef, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_XDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_YDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_XDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_YDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcRectangleProfileDef, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRectangleProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangularPyramid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangularPyramid.cpp index 306de7ab7..3d37d222c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangularPyramid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangularPyramid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcRectangularPyramid::getStepParameter( std::stringstream& stream, void IFC4X3::IfcRectangularPyramid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRectangularPyramid, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); - m_XLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_YLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_Height = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args > 1 ){m_XLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_YLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Height = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcRectangularPyramid, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRectangularPyramid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangularTrimmedSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangularTrimmedSurface.cpp index ec0fb5f64..d528177f1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangularTrimmedSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRectangularTrimmedSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -38,14 +35,14 @@ void IFC4X3::IfcRectangularTrimmedSurface::getStepParameter( std::stringstream& void IFC4X3::IfcRectangularTrimmedSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRectangularTrimmedSurface, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisSurface, map, errorStream ); - m_U1 = IfcParameterValue::createObjectFromSTEP( args[1], map, errorStream ); - m_V1 = IfcParameterValue::createObjectFromSTEP( args[2], map, errorStream ); - m_U2 = IfcParameterValue::createObjectFromSTEP( args[3], map, errorStream ); - m_V2 = IfcParameterValue::createObjectFromSTEP( args[4], map, errorStream ); - m_Usense = IfcBoolean::createObjectFromSTEP( args[5], map, errorStream ); - m_Vsense = IfcBoolean::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisSurface, map, errorStream );} + if( num_args > 1 ){m_U1 = IfcParameterValue::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_V1 = IfcParameterValue::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_U2 = IfcParameterValue::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_V2 = IfcParameterValue::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Usense = IfcBoolean::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Vsense = IfcBoolean::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcRectangularTrimmedSurface, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRectangularTrimmedSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRecurrencePattern.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRecurrencePattern.cpp index 8f60d89fa..70c835164 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRecurrencePattern.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRecurrencePattern.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -41,15 +38,15 @@ void IFC4X3::IfcRecurrencePattern::getStepParameter( std::stringstream& stream, void IFC4X3::IfcRecurrencePattern::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRecurrencePattern, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_RecurrenceType = IfcRecurrenceTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - readTypeOfIntegerList( args[1], m_DayComponent ); - readTypeOfIntegerList( args[2], m_WeekdayComponent ); - readTypeOfIntegerList( args[3], m_MonthComponent ); - m_Position = IfcInteger::createObjectFromSTEP( args[4], map, errorStream ); - m_Interval = IfcInteger::createObjectFromSTEP( args[5], map, errorStream ); - m_Occurrences = IfcInteger::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_TimePeriods, map, errorStream ); + if( num_args > 0 ){m_RecurrenceType = IfcRecurrenceTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readTypeOfIntegerList( args[1], m_DayComponent );} + if( num_args > 2 ){readTypeOfIntegerList( args[2], m_WeekdayComponent );} + if( num_args > 3 ){readTypeOfIntegerList( args[3], m_MonthComponent );} + if( num_args > 4 ){m_Position = IfcInteger::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Interval = IfcInteger::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_Occurrences = IfcInteger::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_TimePeriods, map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcRecurrencePattern, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRecurrencePattern::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReference.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReference.cpp index 0d1cc6588..cc0b3d13a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReference.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReference.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -32,12 +29,12 @@ void IFC4X3::IfcReference::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcReference::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReference, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_TypeIdentifier = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_AttributeIdentifier = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream ); - m_InstanceName = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readTypeOfIntegerList( args[3], m_ListPositions ); - readEntityReference( args[4], m_InnerReference, map, errorStream ); + if( num_args > 0 ){m_TypeIdentifier = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_AttributeIdentifier = IfcIdentifier::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_InstanceName = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readTypeOfIntegerList( args[3], m_ListPositions );} + if( num_args > 4 ){readEntityReference( args[4], m_InnerReference, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcReference, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReference::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReferent.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReferent.cpp index d32aa2e70..0cce25063 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReferent.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReferent.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,15 +51,15 @@ void IFC4X3::IfcReferent::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcReferent::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReferent, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_PredefinedType = IfcReferentTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_PredefinedType = IfcReferentTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcReferent, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReferent::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRegularTimeSeries.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRegularTimeSeries.cpp index 1115ca3d6..50bb8d5e4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRegularTimeSeries.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRegularTimeSeries.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -48,17 +45,17 @@ void IFC4X3::IfcRegularTimeSeries::getStepParameter( std::stringstream& stream, void IFC4X3::IfcRegularTimeSeries::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRegularTimeSeries, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_StartTime = IfcDateTime::createObjectFromSTEP( args[2], map, errorStream ); - m_EndTime = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream ); - m_TimeSeriesDataType = IfcTimeSeriesDataTypeEnum::createObjectFromSTEP( args[4], map, errorStream ); - m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - m_Unit = IfcUnit::createObjectFromSTEP( args[7], map, errorStream ); - m_TimeStep = IfcTimeMeasure::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReferenceList( args[9], m_Values, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_StartTime = IfcDateTime::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_EndTime = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_TimeSeriesDataType = IfcTimeSeriesDataTypeEnum::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Unit = IfcUnit::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_TimeStep = IfcTimeMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_Values, map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRegularTimeSeries, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRegularTimeSeries::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcedSoil.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcedSoil.cpp index bc8f0c0d7..86beb063e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcedSoil.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcedSoil.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcReinforcedSoil::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcReinforcedSoil::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReinforcedSoil, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcReinforcedSoilTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcReinforcedSoilTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcReinforcedSoil, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReinforcedSoil::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcementBarProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcementBarProperties.cpp index b10313bea..5ee7b1d3e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcementBarProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcementBarProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -38,13 +35,13 @@ void IFC4X3::IfcReinforcementBarProperties::getStepParameter( std::stringstream& void IFC4X3::IfcReinforcementBarProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReinforcementBarProperties, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_TotalCrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[0], map, errorStream ); - m_SteelGrade = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_BarSurface = IfcReinforcingBarSurfaceEnum::createObjectFromSTEP( args[2], map, errorStream ); - m_EffectiveDepth = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_NominalBarDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_BarCount = IfcCountMeasure::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_TotalCrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_SteelGrade = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_BarSurface = IfcReinforcingBarSurfaceEnum::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_EffectiveDepth = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_NominalBarDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_BarCount = IfcCountMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcReinforcementBarProperties, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReinforcementBarProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcementDefinitionProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcementDefinitionProperties.cpp index d6d4bbe82..ba27790f8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcementDefinitionProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcementDefinitionProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -41,13 +38,13 @@ void IFC4X3::IfcReinforcementDefinitionProperties::getStepParameter( std::string void IFC4X3::IfcReinforcementDefinitionProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReinforcementDefinitionProperties, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_DefinitionType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_ReinforcementSectionDefinitions, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_DefinitionType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_ReinforcementSectionDefinitions, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcReinforcementDefinitionProperties, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReinforcementDefinitionProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingBar.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingBar.cpp index e14a65133..73228d213 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingBar.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingBar.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -79,21 +76,21 @@ void IFC4X3::IfcReinforcingBar::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcReinforcingBar::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 14 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReinforcingBar, expecting 14, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_CrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_BarLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_PredefinedType = IfcReinforcingBarTypeEnum::createObjectFromSTEP( args[12], map, errorStream ); - m_BarSurface = IfcReinforcingBarSurfaceEnum::createObjectFromSTEP( args[13], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_CrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_BarLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_PredefinedType = IfcReinforcingBarTypeEnum::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_BarSurface = IfcReinforcingBarSurfaceEnum::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args != 14 ){ errorStream << "Wrong parameter count for entity IfcReinforcingBar, expecting 14, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReinforcingBar::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingBarType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingBarType.cpp index 0801919c2..eb0640881 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingBarType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingBarType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -91,23 +88,23 @@ void IFC4X3::IfcReinforcingBarType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcReinforcingBarType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 16 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReinforcingBarType, expecting 16, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcReinforcingBarTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_CrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_BarLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[12], map, errorStream ); - m_BarSurface = IfcReinforcingBarSurfaceEnum::createObjectFromSTEP( args[13], map, errorStream ); - m_BendingShapeCode = IfcLabel::createObjectFromSTEP( args[14], map, errorStream ); - readSelectList( args[15], m_BendingParameters, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcReinforcingBarTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_CrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_BarLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_BarSurface = IfcReinforcingBarSurfaceEnum::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){m_BendingShapeCode = IfcLabel::createObjectFromSTEP( args[14], map, errorStream );} + if( num_args > 15 ){readSelectList( args[15], m_BendingParameters, map, errorStream );} + if( num_args != 16 ){ errorStream << "Wrong parameter count for entity IfcReinforcingBarType, expecting 16, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReinforcingBarType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingElement.cpp index f00e5d54b..fd30d7189 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,16 +62,16 @@ void IFC4X3::IfcReinforcingElement::getStepParameter( std::stringstream& stream, void IFC4X3::IfcReinforcingElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReinforcingElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcReinforcingElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReinforcingElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingElementType.cpp index 1c4dd5403..69af68118 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcReinforcingElementType::getStepParameter( std::stringstream& str void IFC4X3::IfcReinforcingElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReinforcingElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcReinforcingElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReinforcingElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingMesh.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingMesh.cpp index 00397330e..f4c48f4d6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingMesh.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingMesh.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -86,25 +83,25 @@ void IFC4X3::IfcReinforcingMesh::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcReinforcingMesh::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 18 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReinforcingMesh, expecting 18, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_MeshLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_MeshWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_LongitudinalBarNominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_TransverseBarNominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[12], map, errorStream ); - m_LongitudinalBarCrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[13], map, errorStream ); - m_TransverseBarCrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[14], map, errorStream ); - m_LongitudinalBarSpacing = IfcPositiveLengthMeasure::createObjectFromSTEP( args[15], map, errorStream ); - m_TransverseBarSpacing = IfcPositiveLengthMeasure::createObjectFromSTEP( args[16], map, errorStream ); - m_PredefinedType = IfcReinforcingMeshTypeEnum::createObjectFromSTEP( args[17], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_MeshLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_MeshWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_LongitudinalBarNominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_TransverseBarNominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_LongitudinalBarCrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){m_TransverseBarCrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[14], map, errorStream );} + if( num_args > 15 ){m_LongitudinalBarSpacing = IfcPositiveLengthMeasure::createObjectFromSTEP( args[15], map, errorStream );} + if( num_args > 16 ){m_TransverseBarSpacing = IfcPositiveLengthMeasure::createObjectFromSTEP( args[16], map, errorStream );} + if( num_args > 17 ){m_PredefinedType = IfcReinforcingMeshTypeEnum::createObjectFromSTEP( args[17], map, errorStream );} + if( num_args != 18 ){ errorStream << "Wrong parameter count for entity IfcReinforcingMesh, expecting 18, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReinforcingMesh::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingMeshType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingMeshType.cpp index 88813c181..fccb80733 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingMeshType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReinforcingMeshType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -98,27 +95,27 @@ void IFC4X3::IfcReinforcingMeshType::getStepParameter( std::stringstream& stream void IFC4X3::IfcReinforcingMeshType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 20 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReinforcingMeshType, expecting 20, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcReinforcingMeshTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_MeshLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_MeshWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_LongitudinalBarNominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[12], map, errorStream ); - m_TransverseBarNominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[13], map, errorStream ); - m_LongitudinalBarCrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[14], map, errorStream ); - m_TransverseBarCrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[15], map, errorStream ); - m_LongitudinalBarSpacing = IfcPositiveLengthMeasure::createObjectFromSTEP( args[16], map, errorStream ); - m_TransverseBarSpacing = IfcPositiveLengthMeasure::createObjectFromSTEP( args[17], map, errorStream ); - m_BendingShapeCode = IfcLabel::createObjectFromSTEP( args[18], map, errorStream ); - readSelectList( args[19], m_BendingParameters, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcReinforcingMeshTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_MeshLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_MeshWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_LongitudinalBarNominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_TransverseBarNominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){m_LongitudinalBarCrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[14], map, errorStream );} + if( num_args > 15 ){m_TransverseBarCrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[15], map, errorStream );} + if( num_args > 16 ){m_LongitudinalBarSpacing = IfcPositiveLengthMeasure::createObjectFromSTEP( args[16], map, errorStream );} + if( num_args > 17 ){m_TransverseBarSpacing = IfcPositiveLengthMeasure::createObjectFromSTEP( args[17], map, errorStream );} + if( num_args > 18 ){m_BendingShapeCode = IfcLabel::createObjectFromSTEP( args[18], map, errorStream );} + if( num_args > 19 ){readSelectList( args[19], m_BendingParameters, map, errorStream );} + if( num_args != 20 ){ errorStream << "Wrong parameter count for entity IfcReinforcingMeshType, expecting 20, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReinforcingMeshType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAdheresToElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAdheresToElement.cpp index 97f0ebeef..2089b4ed9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAdheresToElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAdheresToElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelAdheresToElement::getStepParameter( std::stringstream& stream void IFC4X3::IfcRelAdheresToElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAdheresToElement, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingElement, map, errorStream ); - readEntityReferenceList( args[5], m_RelatedSurfaceFeatures, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingElement, map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_RelatedSurfaceFeatures, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelAdheresToElement, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAdheresToElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAggregates.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAggregates.cpp index 98aa75b0d..4b918d152 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAggregates.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAggregates.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,13 +33,13 @@ void IFC4X3::IfcRelAggregates::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcRelAggregates::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAggregates, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingObject, map, errorStream ); - readEntityReferenceList( args[5], m_RelatedObjects, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingObject, map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_RelatedObjects, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelAggregates, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAggregates::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssigns.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssigns.cpp index ee832ed86..c511e932a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssigns.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssigns.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -10,9 +7,9 @@ #include "ifcpp/IFC4X3/include/IfcGloballyUniqueId.h" #include "ifcpp/IFC4X3/include/IfcLabel.h" #include "ifcpp/IFC4X3/include/IfcObjectDefinition.h" -#include "ifcpp/IFC4X3/include/IfcObjectTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" #include "ifcpp/IFC4X3/include/IfcRelAssigns.h" +#include "ifcpp/IFC4X3/include/IfcStrippedOptional.h" #include "ifcpp/IFC4X3/include/IfcText.h" // ENTITY IfcRelAssigns @@ -37,13 +34,13 @@ void IFC4X3::IfcRelAssigns::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcRelAssigns::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssigns, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatedObjectsType = IfcObjectTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatedObjectsType = IfcStrippedOptional::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelAssigns, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssigns::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToActor.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToActor.cpp index 1710d515c..8b2c8bf68 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToActor.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToActor.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -12,9 +9,9 @@ #include "ifcpp/IFC4X3/include/IfcGloballyUniqueId.h" #include "ifcpp/IFC4X3/include/IfcLabel.h" #include "ifcpp/IFC4X3/include/IfcObjectDefinition.h" -#include "ifcpp/IFC4X3/include/IfcObjectTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" #include "ifcpp/IFC4X3/include/IfcRelAssignsToActor.h" +#include "ifcpp/IFC4X3/include/IfcStrippedOptional.h" #include "ifcpp/IFC4X3/include/IfcText.h" // ENTITY IfcRelAssignsToActor @@ -43,15 +40,15 @@ void IFC4X3::IfcRelAssignsToActor::getStepParameter( std::stringstream& stream, void IFC4X3::IfcRelAssignsToActor::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssignsToActor, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatedObjectsType = IfcObjectTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_RelatingActor, map, errorStream ); - readEntityReference( args[7], m_ActingRole, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatedObjectsType = IfcStrippedOptional::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_RelatingActor, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_ActingRole, map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcRelAssignsToActor, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssignsToActor::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToControl.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToControl.cpp index 4d068a0e8..c710cfb9a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToControl.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToControl.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -11,9 +8,9 @@ #include "ifcpp/IFC4X3/include/IfcGloballyUniqueId.h" #include "ifcpp/IFC4X3/include/IfcLabel.h" #include "ifcpp/IFC4X3/include/IfcObjectDefinition.h" -#include "ifcpp/IFC4X3/include/IfcObjectTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" #include "ifcpp/IFC4X3/include/IfcRelAssignsToControl.h" +#include "ifcpp/IFC4X3/include/IfcStrippedOptional.h" #include "ifcpp/IFC4X3/include/IfcText.h" // ENTITY IfcRelAssignsToControl @@ -40,14 +37,14 @@ void IFC4X3::IfcRelAssignsToControl::getStepParameter( std::stringstream& stream void IFC4X3::IfcRelAssignsToControl::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssignsToControl, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatedObjectsType = IfcObjectTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_RelatingControl, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatedObjectsType = IfcStrippedOptional::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_RelatingControl, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcRelAssignsToControl, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssignsToControl::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToGroup.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToGroup.cpp index 573e42fcf..479d208ae 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToGroup.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToGroup.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -11,9 +8,9 @@ #include "ifcpp/IFC4X3/include/IfcGroup.h" #include "ifcpp/IFC4X3/include/IfcLabel.h" #include "ifcpp/IFC4X3/include/IfcObjectDefinition.h" -#include "ifcpp/IFC4X3/include/IfcObjectTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" #include "ifcpp/IFC4X3/include/IfcRelAssignsToGroup.h" +#include "ifcpp/IFC4X3/include/IfcStrippedOptional.h" #include "ifcpp/IFC4X3/include/IfcText.h" // ENTITY IfcRelAssignsToGroup @@ -40,14 +37,14 @@ void IFC4X3::IfcRelAssignsToGroup::getStepParameter( std::stringstream& stream, void IFC4X3::IfcRelAssignsToGroup::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssignsToGroup, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatedObjectsType = IfcObjectTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_RelatingGroup, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatedObjectsType = IfcStrippedOptional::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_RelatingGroup, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcRelAssignsToGroup, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssignsToGroup::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToGroupByFactor.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToGroupByFactor.cpp index 8568cdd4f..664e33b14 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToGroupByFactor.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToGroupByFactor.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -11,10 +8,10 @@ #include "ifcpp/IFC4X3/include/IfcGroup.h" #include "ifcpp/IFC4X3/include/IfcLabel.h" #include "ifcpp/IFC4X3/include/IfcObjectDefinition.h" -#include "ifcpp/IFC4X3/include/IfcObjectTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" #include "ifcpp/IFC4X3/include/IfcRatioMeasure.h" #include "ifcpp/IFC4X3/include/IfcRelAssignsToGroupByFactor.h" +#include "ifcpp/IFC4X3/include/IfcStrippedOptional.h" #include "ifcpp/IFC4X3/include/IfcText.h" // ENTITY IfcRelAssignsToGroupByFactor @@ -43,15 +40,15 @@ void IFC4X3::IfcRelAssignsToGroupByFactor::getStepParameter( std::stringstream& void IFC4X3::IfcRelAssignsToGroupByFactor::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssignsToGroupByFactor, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatedObjectsType = IfcObjectTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_RelatingGroup, map, errorStream ); - m_Factor = IfcRatioMeasure::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatedObjectsType = IfcStrippedOptional::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_RelatingGroup, map, errorStream );} + if( num_args > 7 ){m_Factor = IfcRatioMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcRelAssignsToGroupByFactor, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssignsToGroupByFactor::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToProcess.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToProcess.cpp index 200cb835b..8c16596f7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToProcess.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToProcess.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -11,11 +8,11 @@ #include "ifcpp/IFC4X3/include/IfcLabel.h" #include "ifcpp/IFC4X3/include/IfcMeasureWithUnit.h" #include "ifcpp/IFC4X3/include/IfcObjectDefinition.h" -#include "ifcpp/IFC4X3/include/IfcObjectTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" #include "ifcpp/IFC4X3/include/IfcProcess.h" #include "ifcpp/IFC4X3/include/IfcProcessSelect.h" #include "ifcpp/IFC4X3/include/IfcRelAssignsToProcess.h" +#include "ifcpp/IFC4X3/include/IfcStrippedOptional.h" #include "ifcpp/IFC4X3/include/IfcText.h" #include "ifcpp/IFC4X3/include/IfcTypeProcess.h" @@ -45,15 +42,15 @@ void IFC4X3::IfcRelAssignsToProcess::getStepParameter( std::stringstream& stream void IFC4X3::IfcRelAssignsToProcess::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssignsToProcess, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatedObjectsType = IfcObjectTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_RelatingProcess = IfcProcessSelect::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReference( args[7], m_QuantityInProcess, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatedObjectsType = IfcStrippedOptional::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_RelatingProcess = IfcProcessSelect::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_QuantityInProcess, map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcRelAssignsToProcess, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssignsToProcess::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToProduct.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToProduct.cpp index cab1d8876..b081319b6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToProduct.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToProduct.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -10,11 +7,11 @@ #include "ifcpp/IFC4X3/include/IfcGloballyUniqueId.h" #include "ifcpp/IFC4X3/include/IfcLabel.h" #include "ifcpp/IFC4X3/include/IfcObjectDefinition.h" -#include "ifcpp/IFC4X3/include/IfcObjectTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" #include "ifcpp/IFC4X3/include/IfcProduct.h" #include "ifcpp/IFC4X3/include/IfcProductSelect.h" #include "ifcpp/IFC4X3/include/IfcRelAssignsToProduct.h" +#include "ifcpp/IFC4X3/include/IfcStrippedOptional.h" #include "ifcpp/IFC4X3/include/IfcText.h" #include "ifcpp/IFC4X3/include/IfcTypeProduct.h" @@ -42,14 +39,14 @@ void IFC4X3::IfcRelAssignsToProduct::getStepParameter( std::stringstream& stream void IFC4X3::IfcRelAssignsToProduct::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssignsToProduct, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatedObjectsType = IfcObjectTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_RelatingProduct = IfcProductSelect::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatedObjectsType = IfcStrippedOptional::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_RelatingProduct = IfcProductSelect::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcRelAssignsToProduct, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssignsToProduct::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToResource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToResource.cpp index 9e3481f1f..5767eddf1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToResource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssignsToResource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -10,11 +7,11 @@ #include "ifcpp/IFC4X3/include/IfcGloballyUniqueId.h" #include "ifcpp/IFC4X3/include/IfcLabel.h" #include "ifcpp/IFC4X3/include/IfcObjectDefinition.h" -#include "ifcpp/IFC4X3/include/IfcObjectTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcOwnerHistory.h" #include "ifcpp/IFC4X3/include/IfcRelAssignsToResource.h" #include "ifcpp/IFC4X3/include/IfcResource.h" #include "ifcpp/IFC4X3/include/IfcResourceSelect.h" +#include "ifcpp/IFC4X3/include/IfcStrippedOptional.h" #include "ifcpp/IFC4X3/include/IfcText.h" #include "ifcpp/IFC4X3/include/IfcTypeResource.h" @@ -42,14 +39,14 @@ void IFC4X3::IfcRelAssignsToResource::getStepParameter( std::stringstream& strea void IFC4X3::IfcRelAssignsToResource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssignsToResource, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatedObjectsType = IfcObjectTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_RelatingResource = IfcResourceSelect::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatedObjectsType = IfcStrippedOptional::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_RelatingResource = IfcResourceSelect::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcRelAssignsToResource, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssignsToResource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociates.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociates.cpp index 881193274..442fbed00 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociates.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociates.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -53,12 +50,12 @@ void IFC4X3::IfcRelAssociates::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcRelAssociates::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssociates, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readSelectList( args[4], m_RelatedObjects, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readSelectList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcRelAssociates, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssociates::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesApproval.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesApproval.cpp index 7b3529daa..45dda899e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesApproval.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesApproval.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,13 +51,13 @@ void IFC4X3::IfcRelAssociatesApproval::getStepParameter( std::stringstream& stre void IFC4X3::IfcRelAssociatesApproval::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssociatesApproval, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readSelectList( args[4], m_RelatedObjects, map, errorStream ); - readEntityReference( args[5], m_RelatingApproval, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readSelectList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingApproval, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelAssociatesApproval, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssociatesApproval::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesClassification.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesClassification.cpp index c089eca91..4ce256a47 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesClassification.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesClassification.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,13 +53,13 @@ void IFC4X3::IfcRelAssociatesClassification::getStepParameter( std::stringstream void IFC4X3::IfcRelAssociatesClassification::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssociatesClassification, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readSelectList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatingClassification = IfcClassificationSelect::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readSelectList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatingClassification = IfcClassificationSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelAssociatesClassification, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssociatesClassification::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesConstraint.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesConstraint.cpp index d1f5be135..6b9d5d27d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesConstraint.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesConstraint.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,14 +53,14 @@ void IFC4X3::IfcRelAssociatesConstraint::getStepParameter( std::stringstream& st void IFC4X3::IfcRelAssociatesConstraint::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssociatesConstraint, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readSelectList( args[4], m_RelatedObjects, map, errorStream ); - m_Intent = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_RelatingConstraint, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readSelectList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_Intent = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_RelatingConstraint, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcRelAssociatesConstraint, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssociatesConstraint::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesDocument.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesDocument.cpp index ef5b548be..20788de42 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesDocument.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesDocument.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,13 +53,13 @@ void IFC4X3::IfcRelAssociatesDocument::getStepParameter( std::stringstream& stre void IFC4X3::IfcRelAssociatesDocument::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssociatesDocument, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readSelectList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatingDocument = IfcDocumentSelect::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readSelectList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatingDocument = IfcDocumentSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelAssociatesDocument, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssociatesDocument::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesLibrary.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesLibrary.cpp index fb8485db9..872b79bc6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesLibrary.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesLibrary.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,13 +53,13 @@ void IFC4X3::IfcRelAssociatesLibrary::getStepParameter( std::stringstream& strea void IFC4X3::IfcRelAssociatesLibrary::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssociatesLibrary, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readSelectList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatingLibrary = IfcLibrarySelect::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readSelectList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatingLibrary = IfcLibrarySelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelAssociatesLibrary, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssociatesLibrary::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesMaterial.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesMaterial.cpp index 2d970c6d6..ca6fb88f4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesMaterial.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesMaterial.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,13 +53,13 @@ void IFC4X3::IfcRelAssociatesMaterial::getStepParameter( std::stringstream& stre void IFC4X3::IfcRelAssociatesMaterial::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssociatesMaterial, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readSelectList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatingMaterial = IfcMaterialSelect::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readSelectList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatingMaterial = IfcMaterialSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelAssociatesMaterial, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssociatesMaterial::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesProfileDef.cpp index aeaf81674..4cfccedeb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelAssociatesProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,13 +51,13 @@ void IFC4X3::IfcRelAssociatesProfileDef::getStepParameter( std::stringstream& st void IFC4X3::IfcRelAssociatesProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelAssociatesProfileDef, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readSelectList( args[4], m_RelatedObjects, map, errorStream ); - readEntityReference( args[5], m_RelatingProfileDef, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readSelectList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingProfileDef, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelAssociatesProfileDef, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelAssociatesProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnects.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnects.cpp index 248daaa2f..69073c538 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnects.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnects.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcRelConnects::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcRelConnects::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelConnects, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcRelConnects, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelConnects::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsElements.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsElements.cpp index 170e8fe5d..c1387d533 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsElements.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsElements.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,14 +36,14 @@ void IFC4X3::IfcRelConnectsElements::getStepParameter( std::stringstream& stream void IFC4X3::IfcRelConnectsElements::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelConnectsElements, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_ConnectionGeometry, map, errorStream ); - readEntityReference( args[5], m_RelatingElement, map, errorStream ); - readEntityReference( args[6], m_RelatedElement, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_ConnectionGeometry, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingElement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_RelatedElement, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcRelConnectsElements, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelConnectsElements::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPathElements.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPathElements.cpp index 343093734..1ee79aaa6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPathElements.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPathElements.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,18 +46,18 @@ void IFC4X3::IfcRelConnectsPathElements::getStepParameter( std::stringstream& st void IFC4X3::IfcRelConnectsPathElements::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelConnectsPathElements, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_ConnectionGeometry, map, errorStream ); - readEntityReference( args[5], m_RelatingElement, map, errorStream ); - readEntityReference( args[6], m_RelatedElement, map, errorStream ); - readTypeOfIntegerList( args[7], m_RelatingPriorities ); - readTypeOfIntegerList( args[8], m_RelatedPriorities ); - m_RelatedConnectionType = IfcConnectionTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_RelatingConnectionType = IfcConnectionTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_ConnectionGeometry, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingElement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_RelatedElement, map, errorStream );} + if( num_args > 7 ){readTypeOfIntegerList( args[7], m_RelatingPriorities );} + if( num_args > 8 ){readTypeOfIntegerList( args[8], m_RelatedPriorities );} + if( num_args > 9 ){m_RelatedConnectionType = IfcConnectionTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_RelatingConnectionType = IfcConnectionTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcRelConnectsPathElements, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelConnectsPathElements::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPortToElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPortToElement.cpp index 8ff08876a..6215b30dc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPortToElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPortToElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelConnectsPortToElement::getStepParameter( std::stringstream& s void IFC4X3::IfcRelConnectsPortToElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelConnectsPortToElement, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingPort, map, errorStream ); - readEntityReference( args[5], m_RelatedElement, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingPort, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedElement, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelConnectsPortToElement, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelConnectsPortToElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPorts.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPorts.cpp index c3d64cbab..8d3140f7d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPorts.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsPorts.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,14 +36,14 @@ void IFC4X3::IfcRelConnectsPorts::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcRelConnectsPorts::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelConnectsPorts, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingPort, map, errorStream ); - readEntityReference( args[5], m_RelatedPort, map, errorStream ); - readEntityReference( args[6], m_RealizingElement, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingPort, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedPort, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_RealizingElement, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcRelConnectsPorts, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelConnectsPorts::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsStructuralActivity.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsStructuralActivity.cpp index 4936a3899..1824cc8f5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsStructuralActivity.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsStructuralActivity.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -38,13 +35,13 @@ void IFC4X3::IfcRelConnectsStructuralActivity::getStepParameter( std::stringstre void IFC4X3::IfcRelConnectsStructuralActivity::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelConnectsStructuralActivity, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_RelatingElement = IfcStructuralActivityAssignmentSelect::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_RelatedStructuralActivity, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_RelatingElement = IfcStructuralActivityAssignmentSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedStructuralActivity, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelConnectsStructuralActivity, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelConnectsStructuralActivity::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsStructuralMember.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsStructuralMember.cpp index 4daf8675d..67626112f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsStructuralMember.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsStructuralMember.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,17 +46,17 @@ void IFC4X3::IfcRelConnectsStructuralMember::getStepParameter( std::stringstream void IFC4X3::IfcRelConnectsStructuralMember::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelConnectsStructuralMember, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingStructuralMember, map, errorStream ); - readEntityReference( args[5], m_RelatedStructuralConnection, map, errorStream ); - readEntityReference( args[6], m_AppliedCondition, map, errorStream ); - readEntityReference( args[7], m_AdditionalConditions, map, errorStream ); - m_SupportedLength = IfcLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReference( args[9], m_ConditionCoordinateSystem, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingStructuralMember, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedStructuralConnection, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_AppliedCondition, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AdditionalConditions, map, errorStream );} + if( num_args > 8 ){m_SupportedLength = IfcLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_ConditionCoordinateSystem, map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRelConnectsStructuralMember, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelConnectsStructuralMember::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsWithEccentricity.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsWithEccentricity.cpp index 4987daba9..683555927 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsWithEccentricity.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsWithEccentricity.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -52,18 +49,18 @@ void IFC4X3::IfcRelConnectsWithEccentricity::getStepParameter( std::stringstream void IFC4X3::IfcRelConnectsWithEccentricity::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelConnectsWithEccentricity, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingStructuralMember, map, errorStream ); - readEntityReference( args[5], m_RelatedStructuralConnection, map, errorStream ); - readEntityReference( args[6], m_AppliedCondition, map, errorStream ); - readEntityReference( args[7], m_AdditionalConditions, map, errorStream ); - m_SupportedLength = IfcLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReference( args[9], m_ConditionCoordinateSystem, map, errorStream ); - readEntityReference( args[10], m_ConnectionConstraint, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingStructuralMember, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedStructuralConnection, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_AppliedCondition, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AdditionalConditions, map, errorStream );} + if( num_args > 8 ){m_SupportedLength = IfcLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_ConditionCoordinateSystem, map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_ConnectionConstraint, map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcRelConnectsWithEccentricity, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelConnectsWithEccentricity::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsWithRealizingElements.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsWithRealizingElements.cpp index 2707560b3..c9157350c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsWithRealizingElements.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelConnectsWithRealizingElements.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -43,16 +40,16 @@ void IFC4X3::IfcRelConnectsWithRealizingElements::getStepParameter( std::strings void IFC4X3::IfcRelConnectsWithRealizingElements::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelConnectsWithRealizingElements, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_ConnectionGeometry, map, errorStream ); - readEntityReference( args[5], m_RelatingElement, map, errorStream ); - readEntityReference( args[6], m_RelatedElement, map, errorStream ); - readEntityReferenceList( args[7], m_RealizingElements, map, errorStream ); - m_ConnectionType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_ConnectionGeometry, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingElement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_RelatedElement, map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_RealizingElements, map, errorStream );} + if( num_args > 8 ){m_ConnectionType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcRelConnectsWithRealizingElements, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelConnectsWithRealizingElements::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelContainedInSpatialStructure.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelContainedInSpatialStructure.cpp index c03df354d..fb8b36916 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelContainedInSpatialStructure.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelContainedInSpatialStructure.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -40,13 +37,13 @@ void IFC4X3::IfcRelContainedInSpatialStructure::getStepParameter( std::stringstr void IFC4X3::IfcRelContainedInSpatialStructure::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelContainedInSpatialStructure, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedElements, map, errorStream ); - readEntityReference( args[5], m_RelatingStructure, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedElements, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingStructure, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelContainedInSpatialStructure, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelContainedInSpatialStructure::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelCoversBldgElements.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelCoversBldgElements.cpp index a74508e38..2c4f83efd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelCoversBldgElements.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelCoversBldgElements.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelCoversBldgElements::getStepParameter( std::stringstream& stre void IFC4X3::IfcRelCoversBldgElements::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelCoversBldgElements, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingBuildingElement, map, errorStream ); - readEntityReferenceList( args[5], m_RelatedCoverings, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingBuildingElement, map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_RelatedCoverings, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelCoversBldgElements, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelCoversBldgElements::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelCoversSpaces.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelCoversSpaces.cpp index 6aae07c66..122ca0775 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelCoversSpaces.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelCoversSpaces.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelCoversSpaces::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcRelCoversSpaces::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelCoversSpaces, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingSpace, map, errorStream ); - readEntityReferenceList( args[5], m_RelatedCoverings, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingSpace, map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_RelatedCoverings, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelCoversSpaces, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelCoversSpaces::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDeclares.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDeclares.cpp index 3df1015ed..7de240ca8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDeclares.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDeclares.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,13 +53,13 @@ void IFC4X3::IfcRelDeclares::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcRelDeclares::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelDeclares, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingContext, map, errorStream ); - readSelectList( args[5], m_RelatedDefinitions, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingContext, map, errorStream );} + if( num_args > 5 ){readSelectList( args[5], m_RelatedDefinitions, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelDeclares, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelDeclares::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDecomposes.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDecomposes.cpp index 97418bf47..b6ce3459a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDecomposes.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDecomposes.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcRelDecomposes::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcRelDecomposes::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelDecomposes, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcRelDecomposes, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelDecomposes::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefines.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefines.cpp index 10eb8692b..9020ceb91 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefines.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefines.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcRelDefines::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcRelDefines::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelDefines, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcRelDefines, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelDefines::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByObject.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByObject.cpp index 4f50333a9..67e132b80 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByObject.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByObject.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,13 +33,13 @@ void IFC4X3::IfcRelDefinesByObject::getStepParameter( std::stringstream& stream, void IFC4X3::IfcRelDefinesByObject::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelDefinesByObject, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - readEntityReference( args[5], m_RelatingObject, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingObject, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelDefinesByObject, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelDefinesByObject::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByProperties.cpp index 71965931f..54b8ac053 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -40,13 +37,13 @@ void IFC4X3::IfcRelDefinesByProperties::getStepParameter( std::stringstream& str void IFC4X3::IfcRelDefinesByProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelDefinesByProperties, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - m_RelatingPropertyDefinition = IfcPropertySetDefinitionSelect::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){m_RelatingPropertyDefinition = IfcPropertySetDefinitionSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelDefinesByProperties, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelDefinesByProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByTemplate.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByTemplate.cpp index 58a5a6945..7ef482b3b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByTemplate.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByTemplate.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelDefinesByTemplate::getStepParameter( std::stringstream& strea void IFC4X3::IfcRelDefinesByTemplate::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelDefinesByTemplate, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedPropertySets, map, errorStream ); - readEntityReference( args[5], m_RelatingTemplate, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedPropertySets, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingTemplate, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelDefinesByTemplate, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelDefinesByTemplate::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByType.cpp index c10bcbc02..66e97152a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelDefinesByType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelDefinesByType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcRelDefinesByType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelDefinesByType, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream ); - readEntityReference( args[5], m_RelatingType, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedObjects, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingType, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelDefinesByType, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelDefinesByType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelFillsElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelFillsElement.cpp index 4931480dd..c1b40c466 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelFillsElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelFillsElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelFillsElement::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcRelFillsElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelFillsElement, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingOpeningElement, map, errorStream ); - readEntityReference( args[5], m_RelatedBuildingElement, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingOpeningElement, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedBuildingElement, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelFillsElement, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelFillsElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelFlowControlElements.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelFlowControlElements.cpp index b18ca539b..2353d3b4f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelFlowControlElements.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelFlowControlElements.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelFlowControlElements::getStepParameter( std::stringstream& str void IFC4X3::IfcRelFlowControlElements::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelFlowControlElements, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReferenceList( args[4], m_RelatedControlElements, map, errorStream ); - readEntityReference( args[5], m_RelatingFlowElement, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReferenceList( args[4], m_RelatedControlElements, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingFlowElement, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelFlowControlElements, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelFlowControlElements::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelInterferesElements.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelInterferesElements.cpp index 4aec2ac90..456c93083 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelInterferesElements.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelInterferesElements.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,28 +36,28 @@ void IFC4X3::IfcRelInterferesElements::getStepLine( std::stringstream& stream ) stream << ","; if( m_InterferenceGeometry ) { stream << "#" << m_InterferenceGeometry->m_tag; } else { stream << "$"; } stream << ","; - if( m_InterferenceSpace ) { stream << "#" << m_InterferenceSpace->m_tag; } else { stream << "$"; } - stream << ","; if( m_InterferenceType ) { m_InterferenceType->getStepParameter( stream ); } else { stream << "$"; } stream << ","; if( m_ImpliedOrder ) { m_ImpliedOrder->getStepParameter( stream ); } else { stream << "$"; } + stream << ","; + if( m_InterferenceSpace ) { stream << "#" << m_InterferenceSpace->m_tag; } else { stream << "$"; } stream << ");"; } void IFC4X3::IfcRelInterferesElements::getStepParameter( std::stringstream& stream, bool /*is_select_type*/ ) const { stream << "#" << m_tag; } void IFC4X3::IfcRelInterferesElements::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelInterferesElements, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_RelatingElement = IfcInterferenceSelect::createObjectFromSTEP( args[4], map, errorStream ); - m_RelatedElement = IfcInterferenceSelect::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_InterferenceGeometry, map, errorStream ); - readEntityReference( args[7], m_InterferenceSpace, map, errorStream ); - m_InterferenceType = IfcIdentifier::createObjectFromSTEP( args[8], map, errorStream ); - m_ImpliedOrder = IfcLogical::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_RelatingElement = IfcInterferenceSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_RelatedElement = IfcInterferenceSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_InterferenceGeometry, map, errorStream );} + if( num_args > 7 ){m_InterferenceType = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ImpliedOrder = IfcLogical::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_InterferenceSpace, map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRelInterferesElements, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelInterferesElements::getAttributes( std::vector > >& vec_attributes ) const { @@ -68,9 +65,9 @@ void IFC4X3::IfcRelInterferesElements::getAttributes( std::vector > >& vec_attributes_inverse ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelNests.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelNests.cpp index 075456ed2..ea56c6bcb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelNests.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelNests.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,13 +33,13 @@ void IFC4X3::IfcRelNests::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcRelNests::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelNests, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingObject, map, errorStream ); - readEntityReferenceList( args[5], m_RelatedObjects, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingObject, map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_RelatedObjects, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelNests, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelNests::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelPositions.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelPositions.cpp index 8cb76dddd..57f757cc7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelPositions.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelPositions.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelPositions::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcRelPositions::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelPositions, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingPositioningElement, map, errorStream ); - readEntityReferenceList( args[5], m_RelatedProducts, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingPositioningElement, map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_RelatedProducts, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelPositions, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelPositions::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelProjectsElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelProjectsElement.cpp index 72f551628..525a3d7ac 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelProjectsElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelProjectsElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelProjectsElement::getStepParameter( std::stringstream& stream, void IFC4X3::IfcRelProjectsElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelProjectsElement, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingElement, map, errorStream ); - readEntityReference( args[5], m_RelatedFeatureElement, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingElement, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedFeatureElement, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelProjectsElement, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelProjectsElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelReferencedInSpatialStructure.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelReferencedInSpatialStructure.cpp index 5ef9ca51e..bb66f6762 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelReferencedInSpatialStructure.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelReferencedInSpatialStructure.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -57,13 +54,13 @@ void IFC4X3::IfcRelReferencedInSpatialStructure::getStepParameter( std::stringst void IFC4X3::IfcRelReferencedInSpatialStructure::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelReferencedInSpatialStructure, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readSelectList( args[4], m_RelatedElements, map, errorStream ); - readEntityReference( args[5], m_RelatingStructure, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readSelectList( args[4], m_RelatedElements, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatingStructure, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelReferencedInSpatialStructure, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelReferencedInSpatialStructure::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSequence.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSequence.cpp index da2b783d4..f2d256ff3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSequence.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSequence.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -44,16 +41,16 @@ void IFC4X3::IfcRelSequence::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcRelSequence::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelSequence, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingProcess, map, errorStream ); - readEntityReference( args[5], m_RelatedProcess, map, errorStream ); - readEntityReference( args[6], m_TimeLag, map, errorStream ); - m_SequenceType = IfcSequenceEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_UserDefinedSequenceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingProcess, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedProcess, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_TimeLag, map, errorStream );} + if( num_args > 7 ){m_SequenceType = IfcSequenceEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_UserDefinedSequenceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcRelSequence, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelSequence::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelServicesBuildings.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelServicesBuildings.cpp index d301e02ff..4feb1fcad 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelServicesBuildings.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelServicesBuildings.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelServicesBuildings::getStepParameter( std::stringstream& strea void IFC4X3::IfcRelServicesBuildings::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelServicesBuildings, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingSystem, map, errorStream ); - readEntityReferenceList( args[5], m_RelatedBuildings, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingSystem, map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_RelatedBuildings, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelServicesBuildings, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelServicesBuildings::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary.cpp index b9404cad7..2823bd75d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -48,16 +45,16 @@ void IFC4X3::IfcRelSpaceBoundary::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcRelSpaceBoundary::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelSpaceBoundary, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_RelatingSpace = IfcSpaceBoundarySelect::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_RelatedBuildingElement, map, errorStream ); - readEntityReference( args[6], m_ConnectionGeometry, map, errorStream ); - m_PhysicalOrVirtualBoundary = IfcPhysicalOrVirtualEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_InternalOrExternalBoundary = IfcInternalOrExternalEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_RelatingSpace = IfcSpaceBoundarySelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedBuildingElement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_ConnectionGeometry, map, errorStream );} + if( num_args > 7 ){m_PhysicalOrVirtualBoundary = IfcPhysicalOrVirtualEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_InternalOrExternalBoundary = IfcInternalOrExternalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcRelSpaceBoundary, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelSpaceBoundary::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary1stLevel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary1stLevel.cpp index 247f66af5..59e074a57 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary1stLevel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary1stLevel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -48,17 +45,17 @@ void IFC4X3::IfcRelSpaceBoundary1stLevel::getStepParameter( std::stringstream& s void IFC4X3::IfcRelSpaceBoundary1stLevel::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelSpaceBoundary1stLevel, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_RelatingSpace = IfcSpaceBoundarySelect::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_RelatedBuildingElement, map, errorStream ); - readEntityReference( args[6], m_ConnectionGeometry, map, errorStream ); - m_PhysicalOrVirtualBoundary = IfcPhysicalOrVirtualEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_InternalOrExternalBoundary = IfcInternalOrExternalEnum::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReference( args[9], m_ParentBoundary, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_RelatingSpace = IfcSpaceBoundarySelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedBuildingElement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_ConnectionGeometry, map, errorStream );} + if( num_args > 7 ){m_PhysicalOrVirtualBoundary = IfcPhysicalOrVirtualEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_InternalOrExternalBoundary = IfcInternalOrExternalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_ParentBoundary, map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRelSpaceBoundary1stLevel, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelSpaceBoundary1stLevel::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary2ndLevel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary2ndLevel.cpp index fafe3773e..0e90d87c1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary2ndLevel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelSpaceBoundary2ndLevel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,18 +48,18 @@ void IFC4X3::IfcRelSpaceBoundary2ndLevel::getStepParameter( std::stringstream& s void IFC4X3::IfcRelSpaceBoundary2ndLevel::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelSpaceBoundary2ndLevel, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_RelatingSpace = IfcSpaceBoundarySelect::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_RelatedBuildingElement, map, errorStream ); - readEntityReference( args[6], m_ConnectionGeometry, map, errorStream ); - m_PhysicalOrVirtualBoundary = IfcPhysicalOrVirtualEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_InternalOrExternalBoundary = IfcInternalOrExternalEnum::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReference( args[9], m_ParentBoundary, map, errorStream ); - readEntityReference( args[10], m_CorrespondingBoundary, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_RelatingSpace = IfcSpaceBoundarySelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedBuildingElement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_ConnectionGeometry, map, errorStream );} + if( num_args > 7 ){m_PhysicalOrVirtualBoundary = IfcPhysicalOrVirtualEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_InternalOrExternalBoundary = IfcInternalOrExternalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_ParentBoundary, map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_CorrespondingBoundary, map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcRelSpaceBoundary2ndLevel, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelSpaceBoundary2ndLevel::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelVoidsElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelVoidsElement.cpp index a5905a4c0..d83c99423 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelVoidsElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelVoidsElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRelVoidsElement::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcRelVoidsElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelVoidsElement, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_RelatingBuildingElement, map, errorStream ); - readEntityReference( args[5], m_RelatedOpeningElement, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_RelatingBuildingElement, map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_RelatedOpeningElement, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRelVoidsElement, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelVoidsElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelationship.cpp index ff53c080d..ef387814d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcRelationship::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReparametrisedCompositeCurveSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReparametrisedCompositeCurveSegment.cpp index 91c375127..22bbfb67e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReparametrisedCompositeCurveSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcReparametrisedCompositeCurveSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,11 +31,11 @@ void IFC4X3::IfcReparametrisedCompositeCurveSegment::getStepParameter( std::stri void IFC4X3::IfcReparametrisedCompositeCurveSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcReparametrisedCompositeCurveSegment, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Transition = IfcTransitionCode::createObjectFromSTEP( args[0], map, errorStream ); - m_SameSense = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_ParentCurve, map, errorStream ); - m_ParamLength = IfcParameterValue::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Transition = IfcTransitionCode::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_SameSense = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_ParentCurve, map, errorStream );} + if( num_args > 3 ){m_ParamLength = IfcParameterValue::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcReparametrisedCompositeCurveSegment, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcReparametrisedCompositeCurveSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentation.cpp index 648c5e6ea..0feb648fd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcRepresentation::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcRepresentation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRepresentation, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ContextOfItems, map, errorStream ); - m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReferenceList( args[3], m_Items, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ContextOfItems, map, errorStream );} + if( num_args > 1 ){m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_Items, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcRepresentation, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRepresentation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationContext.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationContext.cpp index c6a2d2f96..965374da9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationContext.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationContext.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,9 +22,9 @@ void IFC4X3::IfcRepresentationContext::getStepParameter( std::stringstream& stre void IFC4X3::IfcRepresentationContext::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRepresentationContext, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ContextIdentifier = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_ContextType = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_ContextIdentifier = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ContextType = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcRepresentationContext, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRepresentationContext::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationItem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationItem.cpp index 7b51e5b32..77c696699 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationItem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationItem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationMap.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationMap.cpp index e7b9db6a6..a4610bece 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationMap.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRepresentationMap.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcRepresentationMap::getStepParameter( std::stringstream& stream, void IFC4X3::IfcRepresentationMap::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRepresentationMap, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_MappingOrigin = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_MappedRepresentation, map, errorStream ); + if( num_args > 0 ){m_MappingOrigin = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_MappedRepresentation, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcRepresentationMap, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRepresentationMap::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResource.cpp index 2e774e1ab..bd39e55cd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -47,14 +44,14 @@ void IFC4X3::IfcResource::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcResource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcResource, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcResource, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcResource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceApprovalRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceApprovalRelationship.cpp index 5160f5957..05d6edf00 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceApprovalRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceApprovalRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,11 +46,11 @@ void IFC4X3::IfcResourceApprovalRelationship::getStepParameter( std::stringstrea void IFC4X3::IfcResourceApprovalRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcResourceApprovalRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readSelectList( args[2], m_RelatedResourceObjects, map, errorStream ); - readEntityReference( args[3], m_RelatingApproval, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readSelectList( args[2], m_RelatedResourceObjects, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_RelatingApproval, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcResourceApprovalRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcResourceApprovalRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceConstraintRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceConstraintRelationship.cpp index 51c33d2c8..a8a8d837f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceConstraintRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceConstraintRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,11 +46,11 @@ void IFC4X3::IfcResourceConstraintRelationship::getStepParameter( std::stringstr void IFC4X3::IfcResourceConstraintRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcResourceConstraintRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_RelatingConstraint, map, errorStream ); - readSelectList( args[3], m_RelatedResourceObjects, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_RelatingConstraint, map, errorStream );} + if( num_args > 3 ){readSelectList( args[3], m_RelatedResourceObjects, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcResourceConstraintRelationship, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcResourceConstraintRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceLevelRelationship.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceLevelRelationship.cpp index 3b59ef7a5..0ecf5a68f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceLevelRelationship.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceLevelRelationship.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,9 +22,9 @@ void IFC4X3::IfcResourceLevelRelationship::getStepParameter( std::stringstream& void IFC4X3::IfcResourceLevelRelationship::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcResourceLevelRelationship, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcResourceLevelRelationship, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcResourceLevelRelationship::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceTime.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceTime.cpp index 882358d17..e81318bba 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceTime.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcResourceTime.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,25 +58,25 @@ void IFC4X3::IfcResourceTime::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcResourceTime::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 18 ){ std::stringstream err; err << "Wrong parameter count for entity IfcResourceTime, expecting 18, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_ScheduleWork = IfcDuration::createObjectFromSTEP( args[3], map, errorStream ); - m_ScheduleUsage = IfcPositiveRatioMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_ScheduleStart = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream ); - m_ScheduleFinish = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream ); - m_ScheduleContour = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_LevelingDelay = IfcDuration::createObjectFromSTEP( args[8], map, errorStream ); - m_IsOverAllocated = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream ); - m_StatusTime = IfcDateTime::createObjectFromSTEP( args[10], map, errorStream ); - m_ActualWork = IfcDuration::createObjectFromSTEP( args[11], map, errorStream ); - m_ActualUsage = IfcPositiveRatioMeasure::createObjectFromSTEP( args[12], map, errorStream ); - m_ActualStart = IfcDateTime::createObjectFromSTEP( args[13], map, errorStream ); - m_ActualFinish = IfcDateTime::createObjectFromSTEP( args[14], map, errorStream ); - m_RemainingWork = IfcDuration::createObjectFromSTEP( args[15], map, errorStream ); - m_RemainingUsage = IfcPositiveRatioMeasure::createObjectFromSTEP( args[16], map, errorStream ); - m_Completion = IfcPositiveRatioMeasure::createObjectFromSTEP( args[17], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ScheduleWork = IfcDuration::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ScheduleUsage = IfcPositiveRatioMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_ScheduleStart = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_ScheduleFinish = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_ScheduleContour = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_LevelingDelay = IfcDuration::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_IsOverAllocated = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_StatusTime = IfcDateTime::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_ActualWork = IfcDuration::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_ActualUsage = IfcPositiveRatioMeasure::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_ActualStart = IfcDateTime::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){m_ActualFinish = IfcDateTime::createObjectFromSTEP( args[14], map, errorStream );} + if( num_args > 15 ){m_RemainingWork = IfcDuration::createObjectFromSTEP( args[15], map, errorStream );} + if( num_args > 16 ){m_RemainingUsage = IfcPositiveRatioMeasure::createObjectFromSTEP( args[16], map, errorStream );} + if( num_args > 17 ){m_Completion = IfcPositiveRatioMeasure::createObjectFromSTEP( args[17], map, errorStream );} + if( num_args != 18 ){ errorStream << "Wrong parameter count for entity IfcResourceTime, expecting 18, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcResourceTime::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRevolvedAreaSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRevolvedAreaSolid.cpp index f7e44f475..b70b39537 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRevolvedAreaSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRevolvedAreaSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcRevolvedAreaSolid::getStepParameter( std::stringstream& stream, void IFC4X3::IfcRevolvedAreaSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRevolvedAreaSolid, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptArea, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); - readEntityReference( args[2], m_Axis, map, errorStream ); - m_Angle = IfcPlaneAngleMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptArea, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Axis, map, errorStream );} + if( num_args > 3 ){m_Angle = IfcPlaneAngleMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcRevolvedAreaSolid, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRevolvedAreaSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRevolvedAreaSolidTapered.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRevolvedAreaSolidTapered.cpp index ea41eac93..ad3ffa651 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRevolvedAreaSolidTapered.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRevolvedAreaSolidTapered.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,12 +32,12 @@ void IFC4X3::IfcRevolvedAreaSolidTapered::getStepParameter( std::stringstream& s void IFC4X3::IfcRevolvedAreaSolidTapered::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRevolvedAreaSolidTapered, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptArea, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); - readEntityReference( args[2], m_Axis, map, errorStream ); - m_Angle = IfcPlaneAngleMeasure::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_EndSweptArea, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptArea, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Axis, map, errorStream );} + if( num_args > 3 ){m_Angle = IfcPlaneAngleMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_EndSweptArea, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcRevolvedAreaSolidTapered, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRevolvedAreaSolidTapered::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRightCircularCone.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRightCircularCone.cpp index c37ff2db0..46a637bc2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRightCircularCone.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRightCircularCone.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcRightCircularCone::getStepParameter( std::stringstream& stream, void IFC4X3::IfcRightCircularCone::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRightCircularCone, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); - m_Height = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_BottomRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args > 1 ){m_Height = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_BottomRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcRightCircularCone, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRightCircularCone::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRightCircularCylinder.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRightCircularCylinder.cpp index 4834dd15c..a6b1e4024 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRightCircularCylinder.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRightCircularCylinder.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcRightCircularCylinder::getStepParameter( std::stringstream& stre void IFC4X3::IfcRightCircularCylinder::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRightCircularCylinder, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); - m_Height = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args > 1 ){m_Height = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcRightCircularCylinder, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRightCircularCylinder::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoad.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoad.cpp index a93a94058..019c80916 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoad.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoad.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,17 +58,17 @@ void IFC4X3::IfcRoad::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcRoad::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRoad, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcRoadTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcRoadTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRoad, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRoad::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoadPart.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoadPart.cpp index f4c9c912d..3fa7fe057 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoadPart.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoadPart.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -64,18 +61,18 @@ void IFC4X3::IfcRoadPart::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcRoadPart::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRoadPart, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_PredefinedType = IfcRoadPartTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_UsageType = IfcFacilityUsageEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcRoadPartTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcRoadPart, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRoadPart::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoof.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoof.cpp index ec882616b..99668bb4f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoof.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoof.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcRoof::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcRoof::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRoof, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcRoofTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcRoofTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcRoof, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRoof::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoofType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoofType.cpp index d98bafb0a..15afc54c6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoofType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoofType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcRoofType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcRoofType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRoofType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcRoofTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcRoofTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcRoofType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRoofType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoot.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoot.cpp index 374df8c15..f6f8116ff 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoot.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoot.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcRoot::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcRoot::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRoot, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcRoot, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRoot::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoundedRectangleProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoundedRectangleProfileDef.cpp index be3dcef75..2d0064090 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoundedRectangleProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcRoundedRectangleProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcRoundedRectangleProfileDef::getStepParameter( std::stringstream& void IFC4X3::IfcRoundedRectangleProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcRoundedRectangleProfileDef, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_XDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_YDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_RoundingRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_XDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_YDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_RoundingRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcRoundedRectangleProfileDef, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcRoundedRectangleProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSIUnit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSIUnit.cpp index 1d02b469e..5ea0c59a5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSIUnit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSIUnit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcSIUnit::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcSIUnit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSIUnit, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Dimensions, map, errorStream ); - m_UnitType = IfcUnitEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_Prefix = IfcSIPrefix::createObjectFromSTEP( args[2], map, errorStream ); - m_Name = IfcSIUnitName::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Dimensions, map, errorStream );} + if( num_args > 1 ){m_UnitType = IfcUnitEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Prefix = IfcSIPrefix::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Name = IfcSIUnitName::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcSIUnit, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSIUnit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSanitaryTerminal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSanitaryTerminal.cpp index e47cb9088..b4a23b653 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSanitaryTerminal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSanitaryTerminal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcSanitaryTerminal::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcSanitaryTerminal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSanitaryTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSanitaryTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSanitaryTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSanitaryTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSanitaryTerminal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSanitaryTerminalType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSanitaryTerminalType.cpp index 05e8d3688..3a18e214f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSanitaryTerminalType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSanitaryTerminalType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcSanitaryTerminalType::getStepParameter( std::stringstream& strea void IFC4X3::IfcSanitaryTerminalType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSanitaryTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSanitaryTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSanitaryTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcSanitaryTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSanitaryTerminalType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSchedulingTime.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSchedulingTime.cpp index e17fd37e3..6f1df1417 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSchedulingTime.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSchedulingTime.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,10 +24,10 @@ void IFC4X3::IfcSchedulingTime::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcSchedulingTime::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSchedulingTime, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcSchedulingTime, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSchedulingTime::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSeamCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSeamCurve.cpp index 0e350568a..762b1879c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSeamCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSeamCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcSeamCurve::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcSeamCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSeamCurve, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Curve3D, map, errorStream ); - readEntityReferenceList( args[1], m_AssociatedGeometry, map, errorStream ); - m_MasterRepresentation = IfcPreferredSurfaceCurveRepresentation::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Curve3D, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_AssociatedGeometry, map, errorStream );} + if( num_args > 2 ){m_MasterRepresentation = IfcPreferredSurfaceCurveRepresentation::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcSeamCurve, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSeamCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSecondOrderPolynomialSpiral.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSecondOrderPolynomialSpiral.cpp index 2adccd73f..4020ab757 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSecondOrderPolynomialSpiral.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSecondOrderPolynomialSpiral.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcSecondOrderPolynomialSpiral::getStepParameter( std::stringstream void IFC4X3::IfcSecondOrderPolynomialSpiral::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSecondOrderPolynomialSpiral, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); - m_QuadraticTerm = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_LinearTerm = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_ConstantTerm = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_QuadraticTerm = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_LinearTerm = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ConstantTerm = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcSecondOrderPolynomialSpiral, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSecondOrderPolynomialSpiral::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionProperties.cpp index a47ffb03e..33d6f96de 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -28,10 +25,10 @@ void IFC4X3::IfcSectionProperties::getStepParameter( std::stringstream& stream, void IFC4X3::IfcSectionProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSectionProperties, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_SectionType = IfcSectionTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_StartProfile, map, errorStream ); - readEntityReference( args[2], m_EndProfile, map, errorStream ); + if( num_args > 0 ){m_SectionType = IfcSectionTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_StartProfile, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_EndProfile, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcSectionProperties, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSectionProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionReinforcementProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionReinforcementProperties.cpp index b68f81ba1..dfcb4d9e3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionReinforcementProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionReinforcementProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,13 +33,13 @@ void IFC4X3::IfcSectionReinforcementProperties::getStepParameter( std::stringstr void IFC4X3::IfcSectionReinforcementProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSectionReinforcementProperties, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_LongitudinalStartPosition = IfcLengthMeasure::createObjectFromSTEP( args[0], map, errorStream ); - m_LongitudinalEndPosition = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_TransversePosition = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_ReinforcementRole = IfcReinforcingBarRoleEnum::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_SectionDefinition, map, errorStream ); - readEntityReferenceList( args[5], m_CrossSectionReinforcementDefinitions, map, errorStream ); + if( num_args > 0 ){m_LongitudinalStartPosition = IfcLengthMeasure::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_LongitudinalEndPosition = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_TransversePosition = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ReinforcementRole = IfcReinforcingBarRoleEnum::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_SectionDefinition, map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_CrossSectionReinforcementDefinitions, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcSectionReinforcementProperties, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSectionReinforcementProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSolid.cpp index fcea9d143..ec095e525 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcSectionedSolid::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcSectionedSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSectionedSolid, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Directrix, map, errorStream ); - readEntityReferenceList( args[1], m_CrossSections, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Directrix, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_CrossSections, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcSectionedSolid, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSectionedSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSolidHorizontal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSolidHorizontal.cpp index 04930b543..c956a3135 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSolidHorizontal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSolidHorizontal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcSectionedSolidHorizontal::getStepParameter( std::stringstream& s void IFC4X3::IfcSectionedSolidHorizontal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSectionedSolidHorizontal, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Directrix, map, errorStream ); - readEntityReferenceList( args[1], m_CrossSections, map, errorStream ); - readEntityReferenceList( args[2], m_CrossSectionPositions, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Directrix, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_CrossSections, map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_CrossSectionPositions, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcSectionedSolidHorizontal, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSectionedSolidHorizontal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSpine.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSpine.cpp index f55019530..0e38c4b3c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSpine.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSpine.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcSectionedSpine::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcSectionedSpine::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSectionedSpine, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SpineCurve, map, errorStream ); - readEntityReferenceList( args[1], m_CrossSections, map, errorStream ); - readEntityReferenceList( args[2], m_CrossSectionPositions, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SpineCurve, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_CrossSections, map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_CrossSectionPositions, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcSectionedSpine, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSectionedSpine::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSurface.cpp index 151ff8979..fa19588db 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSectionedSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcSectionedSurface::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcSectionedSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSectionedSurface, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Directrix, map, errorStream ); - readEntityReferenceList( args[1], m_CrossSectionPositions, map, errorStream ); - readEntityReferenceList( args[2], m_CrossSections, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Directrix, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_CrossSectionPositions, map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_CrossSections, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcSectionedSurface, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSectionedSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSegment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSegment.cpp index 3f08211c1..6a38982fb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSegment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSegment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,8 +22,8 @@ void IFC4X3::IfcSegment::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcSegment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSegment, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Transition = IfcTransitionCode::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Transition = IfcTransitionCode::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcSegment, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSegment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSegmentedReferenceCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSegmentedReferenceCurve.cpp index 7bfd2c44e..4a6e88ea4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSegmentedReferenceCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSegmentedReferenceCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcSegmentedReferenceCurve::getStepParameter( std::stringstream& st void IFC4X3::IfcSegmentedReferenceCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSegmentedReferenceCurve, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Segments, map, errorStream ); - m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_BaseCurve, map, errorStream ); - readEntityReference( args[3], m_EndPoint, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Segments, map, errorStream );} + if( num_args > 1 ){m_SelfIntersect = IfcLogical::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_BaseCurve, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_EndPoint, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcSegmentedReferenceCurve, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSegmentedReferenceCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSensor.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSensor.cpp index 8c6cb4e73..f610c0d38 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSensor.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSensor.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcSensor::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcSensor::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSensor, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSensorTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSensorTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSensor, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSensor::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSensorType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSensorType.cpp index 5067875b9..9f0740484 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSensorType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSensorType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcSensorType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcSensorType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSensorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSensorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSensorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcSensorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSensorType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSeventhOrderPolynomialSpiral.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSeventhOrderPolynomialSpiral.cpp index 47bf2bbc8..b93c6861b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSeventhOrderPolynomialSpiral.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSeventhOrderPolynomialSpiral.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -41,16 +38,16 @@ void IFC4X3::IfcSeventhOrderPolynomialSpiral::getStepParameter( std::stringstrea void IFC4X3::IfcSeventhOrderPolynomialSpiral::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSeventhOrderPolynomialSpiral, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); - m_SepticTerm = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_SexticTerm = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_QuinticTerm = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_QuarticTerm = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_CubicTerm = IfcLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_QuadraticTerm = IfcLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_LinearTerm = IfcLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_ConstantTerm = IfcLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_SepticTerm = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_SexticTerm = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_QuinticTerm = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_QuarticTerm = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_CubicTerm = IfcLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_QuadraticTerm = IfcLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LinearTerm = IfcLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ConstantTerm = IfcLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSeventhOrderPolynomialSpiral, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSeventhOrderPolynomialSpiral::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShadingDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShadingDevice.cpp index 36219a5df..4f7e3c81b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShadingDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShadingDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcShadingDevice::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcShadingDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcShadingDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcShadingDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcShadingDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcShadingDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcShadingDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShadingDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShadingDeviceType.cpp index 724d83daa..bfc7df413 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShadingDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShadingDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcShadingDeviceType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcShadingDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcShadingDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcShadingDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcShadingDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcShadingDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcShadingDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeAspect.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeAspect.cpp index 6c9989903..d555b49a2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeAspect.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeAspect.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,12 +34,12 @@ void IFC4X3::IfcShapeAspect::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcShapeAspect::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcShapeAspect, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_ShapeRepresentations, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream ); - m_ProductDefinitional = IfcLogical::createObjectFromSTEP( args[3], map, errorStream ); - m_PartOfProductDefinitionShape = IfcProductRepresentationSelect::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_ShapeRepresentations, map, errorStream );} + if( num_args > 1 ){m_Name = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ProductDefinitional = IfcLogical::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_PartOfProductDefinitionShape = IfcProductRepresentationSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcShapeAspect, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcShapeAspect::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeModel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeModel.cpp index 0635702b2..e596303cd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeModel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeModel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,11 +31,11 @@ void IFC4X3::IfcShapeModel::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcShapeModel::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcShapeModel, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ContextOfItems, map, errorStream ); - m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReferenceList( args[3], m_Items, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ContextOfItems, map, errorStream );} + if( num_args > 1 ){m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_Items, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcShapeModel, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcShapeModel::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeRepresentation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeRepresentation.cpp index c4836d45d..453976974 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeRepresentation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShapeRepresentation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,11 +31,11 @@ void IFC4X3::IfcShapeRepresentation::getStepParameter( std::stringstream& stream void IFC4X3::IfcShapeRepresentation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcShapeRepresentation, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ContextOfItems, map, errorStream ); - m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReferenceList( args[3], m_Items, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ContextOfItems, map, errorStream );} + if( num_args > 1 ){m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_Items, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcShapeRepresentation, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcShapeRepresentation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShellBasedSurfaceModel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShellBasedSurfaceModel.cpp index e28f2beed..d97554c3a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShellBasedSurfaceModel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcShellBasedSurfaceModel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -41,8 +38,8 @@ void IFC4X3::IfcShellBasedSurfaceModel::getStepParameter( std::stringstream& str void IFC4X3::IfcShellBasedSurfaceModel::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcShellBasedSurfaceModel, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readSelectList( args[0], m_SbsmBoundary, map, errorStream ); + if( num_args > 0 ){readSelectList( args[0], m_SbsmBoundary, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcShellBasedSurfaceModel, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcShellBasedSurfaceModel::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSign.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSign.cpp index a6327f0a9..1c99de76f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSign.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSign.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcSign::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcSign::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSign, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSignTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSignTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSign, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSign::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignType.cpp index 63a4b116a..fbd24ae1a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcSignType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcSignType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSignType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSignTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSignTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcSignType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSignType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignal.cpp index d2bca8b95..3a82bcd5f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcSignal::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcSignal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSignal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSignalTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSignalTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSignal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSignal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignalType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignalType.cpp index f619620b5..6c4f6bcf6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignalType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSignalType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcSignalType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcSignalType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSignalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSignalTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSignalTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcSignalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSignalType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSimpleProperty.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSimpleProperty.cpp index 04ec3fb2e..cda5f43c9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSimpleProperty.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSimpleProperty.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,9 +28,9 @@ void IFC4X3::IfcSimpleProperty::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcSimpleProperty::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSimpleProperty, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_Name = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Specification = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcSimpleProperty, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSimpleProperty::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSimplePropertyTemplate.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSimplePropertyTemplate.cpp index 679136bfb..4b6cae74f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSimplePropertyTemplate.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSimplePropertyTemplate.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -55,19 +52,19 @@ void IFC4X3::IfcSimplePropertyTemplate::getStepParameter( std::stringstream& str void IFC4X3::IfcSimplePropertyTemplate::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSimplePropertyTemplate, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_TemplateType = IfcSimplePropertyTemplateTypeEnum::createObjectFromSTEP( args[4], map, errorStream ); - m_PrimaryMeasureType = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - m_SecondaryMeasureType = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReference( args[7], m_Enumerators, map, errorStream ); - m_PrimaryUnit = IfcUnit::createObjectFromSTEP( args[8], map, errorStream ); - m_SecondaryUnit = IfcUnit::createObjectFromSTEP( args[9], map, errorStream ); - m_Expression = IfcLabel::createObjectFromSTEP( args[10], map, errorStream ); - m_AccessState = IfcStateEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_TemplateType = IfcSimplePropertyTemplateTypeEnum::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_PrimaryMeasureType = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_SecondaryMeasureType = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_Enumerators, map, errorStream );} + if( num_args > 8 ){m_PrimaryUnit = IfcUnit::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_SecondaryUnit = IfcUnit::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_Expression = IfcLabel::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_AccessState = IfcStateEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcSimplePropertyTemplate, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSimplePropertyTemplate::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSineSpiral.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSineSpiral.cpp index bf3acc639..4a8e9f16d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSineSpiral.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSineSpiral.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -31,11 +28,11 @@ void IFC4X3::IfcSineSpiral::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcSineSpiral::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSineSpiral, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); - m_SineTerm = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_LinearTerm = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_ConstantTerm = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_SineTerm = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_LinearTerm = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ConstantTerm = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcSineSpiral, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSineSpiral::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSite.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSite.cpp index 550cd7303..68f8f449f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSite.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSite.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -71,21 +68,21 @@ void IFC4X3::IfcSite::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcSite::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 14 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSite, expecting 14, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_RefLatitude = IfcCompoundPlaneAngleMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_RefLongitude = IfcCompoundPlaneAngleMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_RefElevation = IfcLengthMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_LandTitleNumber = IfcLabel::createObjectFromSTEP( args[12], map, errorStream ); - readEntityReference( args[13], m_SiteAddress, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_RefLatitude = IfcCompoundPlaneAngleMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_RefLongitude = IfcCompoundPlaneAngleMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_RefElevation = IfcLengthMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_LandTitleNumber = IfcLabel::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){readEntityReference( args[13], m_SiteAddress, map, errorStream );} + if( num_args != 14 ){ errorStream << "Wrong parameter count for entity IfcSite, expecting 14, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSite::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlab.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlab.cpp index 4734e4cc8..cea37108e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlab.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlab.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcSlab::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcSlab::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSlab, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSlabTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSlabTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSlab, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSlab::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlabType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlabType.cpp index 22d40b69c..37e326e02 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlabType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlabType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcSlabType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcSlabType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSlabType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSlabTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSlabTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcSlabType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSlabType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlippageConnectionCondition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlippageConnectionCondition.cpp index c9621affc..4e7c0f0dc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlippageConnectionCondition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSlippageConnectionCondition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,11 +26,11 @@ void IFC4X3::IfcSlippageConnectionCondition::getStepParameter( std::stringstream void IFC4X3::IfcSlippageConnectionCondition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSlippageConnectionCondition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_SlippageX = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_SlippageY = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_SlippageZ = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_SlippageX = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_SlippageY = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_SlippageZ = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcSlippageConnectionCondition, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSlippageConnectionCondition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolarDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolarDevice.cpp index 9bb6c3475..affb70691 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolarDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolarDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcSolarDevice::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcSolarDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSolarDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSolarDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSolarDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSolarDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSolarDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolarDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolarDeviceType.cpp index 891525cf6..a07bd319b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolarDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolarDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcSolarDeviceType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcSolarDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSolarDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSolarDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSolarDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcSolarDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSolarDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolidModel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolidModel.cpp index 9891894f9..2b069792e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolidModel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSolidModel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpace.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpace.cpp index 72e61fdf0..31ef22fc6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpace.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpace.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,18 +63,18 @@ void IFC4X3::IfcSpace::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcSpace::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpace, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSpaceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_ElevationWithFlooring = IfcLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSpaceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_ElevationWithFlooring = IfcLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcSpace, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpace::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceHeater.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceHeater.cpp index 454557079..1358ab235 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceHeater.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceHeater.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcSpaceHeater::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcSpaceHeater::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpaceHeater, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSpaceHeaterTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSpaceHeaterTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSpaceHeater, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpaceHeater::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceHeaterType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceHeaterType.cpp index 124d8ac82..26a2800c9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceHeaterType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceHeaterType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcSpaceHeaterType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcSpaceHeaterType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpaceHeaterType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSpaceHeaterTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSpaceHeaterTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcSpaceHeaterType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpaceHeaterType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceType.cpp index cb91314d4..8b4be1882 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpaceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,18 +53,18 @@ void IFC4X3::IfcSpaceType::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcSpaceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpaceType, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSpaceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSpaceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_LongName = IfcLabel::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcSpaceType, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpaceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialElement.cpp index 8fa96fd22..4c639ce75 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -55,15 +52,15 @@ void IFC4X3::IfcSpatialElement::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcSpatialElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpatialElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcSpatialElement, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpatialElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialElementType.cpp index 353270790..771e8afe6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcSpatialElementType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcSpatialElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpatialElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSpatialElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpatialElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialStructureElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialStructureElement.cpp index 5fa8d76cb..425462fd1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialStructureElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialStructureElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,16 +55,16 @@ void IFC4X3::IfcSpatialStructureElement::getStepParameter( std::stringstream& st void IFC4X3::IfcSpatialStructureElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpatialStructureElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_CompositionType = IfcElementCompositionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSpatialStructureElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpatialStructureElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialStructureElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialStructureElementType.cpp index 41307754e..9eaf40402 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialStructureElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialStructureElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcSpatialStructureElementType::getStepParameter( std::stringstream void IFC4X3::IfcSpatialStructureElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpatialStructureElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSpatialStructureElementType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpatialStructureElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialZone.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialZone.cpp index 3dfc18ec8..b909048f9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialZone.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialZone.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,16 +55,16 @@ void IFC4X3::IfcSpatialZone::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcSpatialZone::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpatialZone, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSpatialZoneTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_LongName = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSpatialZoneTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSpatialZone, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpatialZone::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialZoneType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialZoneType.cpp index 68e274a7f..7fe7cae90 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialZoneType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpatialZoneType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -56,18 +53,18 @@ void IFC4X3::IfcSpatialZoneType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcSpatialZoneType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpatialZoneType, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSpatialZoneTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSpatialZoneTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_LongName = IfcLabel::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcSpatialZoneType, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpatialZoneType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSphere.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSphere.cpp index e2610261d..dfa23bfde 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSphere.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSphere.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcSphere::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcSphere::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSphere, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args > 1 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcSphere, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSphere::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSphericalSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSphericalSurface.cpp index cf54fdda6..6e373c350 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSphericalSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSphericalSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcSphericalSurface::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcSphericalSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSphericalSurface, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args > 1 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcSphericalSurface, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSphericalSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpiral.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpiral.cpp index d4c81cce5..8a1a34180 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpiral.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSpiral.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcSpiral::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcSpiral::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSpiral, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcSpiral, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSpiral::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStackTerminal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStackTerminal.cpp index 61bda5fe6..dccdebba5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStackTerminal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStackTerminal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcStackTerminal::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcStackTerminal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStackTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcStackTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcStackTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStackTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStackTerminal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStackTerminalType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStackTerminalType.cpp index 5fbc763c5..55dad05be 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStackTerminalType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStackTerminalType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcStackTerminalType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcStackTerminalType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStackTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcStackTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcStackTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcStackTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStackTerminalType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStair.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStair.cpp index f1b9be068..c253de92a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStair.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStair.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcStair::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcStair::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStair, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcStairTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcStairTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStair, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStair::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairFlight.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairFlight.cpp index 6f3a17057..0979a2220 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairFlight.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairFlight.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -76,20 +73,20 @@ void IFC4X3::IfcStairFlight::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcStairFlight::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 13 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStairFlight, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_NumberOfRisers = IfcInteger::createObjectFromSTEP( args[8], map, errorStream ); - m_NumberOfTreads = IfcInteger::createObjectFromSTEP( args[9], map, errorStream ); - m_RiserHeight = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_TreadLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_PredefinedType = IfcStairFlightTypeEnum::createObjectFromSTEP( args[12], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_NumberOfRisers = IfcInteger::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_NumberOfTreads = IfcInteger::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_RiserHeight = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_TreadLength = IfcPositiveLengthMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_PredefinedType = IfcStairFlightTypeEnum::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args != 13 ){ errorStream << "Wrong parameter count for entity IfcStairFlight, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStairFlight::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairFlightType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairFlightType.cpp index 522d75cc8..c560470d3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairFlightType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairFlightType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcStairFlightType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcStairFlightType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStairFlightType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcStairFlightTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcStairFlightTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcStairFlightType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStairFlightType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairType.cpp index 5ee3a61ad..ba834912a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStairType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcStairType::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcStairType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStairType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcStairTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcStairTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcStairType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStairType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStrippedOptional.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStrippedOptional.cpp new file mode 100644 index 000000000..cb6089d05 --- /dev/null +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStrippedOptional.cpp @@ -0,0 +1,34 @@ +/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ + +#include +#include +#include +#include "ifcpp/reader/ReaderUtil.h" +#include "ifcpp/writer/WriterUtil.h" +#include "ifcpp/model/BasicTypes.h" +#include "ifcpp/model/BuildingException.h" +#include "ifcpp/IFC4X3/include/IfcStrippedOptional.h" + +// TYPE IfcStrippedOptional = BOOLEAN; +IFC4X3::IfcStrippedOptional::IfcStrippedOptional( bool value ) { m_value = value; } +void IFC4X3::IfcStrippedOptional::getStepParameter( std::stringstream& stream, bool is_select_type ) const +{ + if( is_select_type ) { stream << "IFCSTRIPPEDOPTIONAL("; } + if( m_value == false ) + { + stream << ".F."; + } + else if( m_value == true ) + { + stream << ".T."; + } + if( is_select_type ) { stream << ")"; } +} +shared_ptr IFC4X3::IfcStrippedOptional::createObjectFromSTEP( const std::string& arg, const std::map >& map, std::stringstream& errorStream ) +{ + if( arg.compare( "$" ) == 0 ) { return shared_ptr(); } + if( arg.compare( "*" ) == 0 ) { return shared_ptr(); } + shared_ptr type_object( new IfcStrippedOptional() ); + readBool( arg, type_object->m_value ); + return type_object; +} diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralAction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralAction.cpp index 8273732a2..498097b85 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralAction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralAction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -60,17 +57,17 @@ void IFC4X3::IfcStructuralAction::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcStructuralAction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralAction, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcStructuralAction, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralAction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralActivity.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralActivity.cpp index 757844c21..6c6929de8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralActivity.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralActivity.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -57,16 +54,16 @@ void IFC4X3::IfcStructuralActivity::getStepParameter( std::stringstream& stream, void IFC4X3::IfcStructuralActivity::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralActivity, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStructuralActivity, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralActivity::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralAnalysisModel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralAnalysisModel.cpp index 138fcd306..cba5ca8f0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralAnalysisModel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralAnalysisModel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,17 +56,17 @@ void IFC4X3::IfcStructuralAnalysisModel::getStepParameter( std::stringstream& st void IFC4X3::IfcStructuralAnalysisModel::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralAnalysisModel, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_PredefinedType = IfcAnalysisModelTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_OrientationOf2DPlane, map, errorStream ); - readEntityReferenceList( args[7], m_LoadedBy, map, errorStream ); - readEntityReferenceList( args[8], m_HasResults, map, errorStream ); - readEntityReference( args[9], m_SharedPlacement, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_PredefinedType = IfcAnalysisModelTypeEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_OrientationOf2DPlane, map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_LoadedBy, map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_HasResults, map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_SharedPlacement, map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcStructuralAnalysisModel, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralAnalysisModel::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralConnection.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralConnection.cpp index 21e7213ef..db52f41f5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralConnection.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralConnection.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -55,15 +52,15 @@ void IFC4X3::IfcStructuralConnection::getStepParameter( std::stringstream& strea void IFC4X3::IfcStructuralConnection::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralConnection, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedCondition, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedCondition, map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcStructuralConnection, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralConnection::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralConnectionCondition.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralConnectionCondition.cpp index 2ac4d033a..53658ad61 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralConnectionCondition.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralConnectionCondition.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcStructuralConnectionCondition::getStepParameter( std::stringstre void IFC4X3::IfcStructuralConnectionCondition::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralConnectionCondition, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcStructuralConnectionCondition, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralConnectionCondition::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveAction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveAction.cpp index bcd6e41f2..436c82a32 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveAction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveAction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,19 +63,19 @@ void IFC4X3::IfcStructuralCurveAction::getStepParameter( std::stringstream& stre void IFC4X3::IfcStructuralCurveAction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralCurveAction, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream ); - m_ProjectedOrTrue = IfcProjectedOrTrueLengthEnum::createObjectFromSTEP( args[10], map, errorStream ); - m_PredefinedType = IfcStructuralCurveActivityTypeEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_ProjectedOrTrue = IfcProjectedOrTrueLengthEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_PredefinedType = IfcStructuralCurveActivityTypeEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcStructuralCurveAction, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralCurveAction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveConnection.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveConnection.cpp index a3d59c99e..a1cd65a6b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveConnection.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveConnection.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,16 +55,16 @@ void IFC4X3::IfcStructuralCurveConnection::getStepParameter( std::stringstream& void IFC4X3::IfcStructuralCurveConnection::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralCurveConnection, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedCondition, map, errorStream ); - readEntityReference( args[8], m_AxisDirection, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedCondition, map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_AxisDirection, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStructuralCurveConnection, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralCurveConnection::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveMember.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveMember.cpp index fb02ba460..e8e33b331 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveMember.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveMember.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,16 +55,16 @@ void IFC4X3::IfcStructuralCurveMember::getStepParameter( std::stringstream& stre void IFC4X3::IfcStructuralCurveMember::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralCurveMember, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_PredefinedType = IfcStructuralCurveMemberTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); - readEntityReference( args[8], m_Axis, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_PredefinedType = IfcStructuralCurveMemberTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_Axis, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStructuralCurveMember, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralCurveMember::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveMemberVarying.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveMemberVarying.cpp index 81e0419a9..9a2d05630 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveMemberVarying.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveMemberVarying.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,16 +55,16 @@ void IFC4X3::IfcStructuralCurveMemberVarying::getStepParameter( std::stringstrea void IFC4X3::IfcStructuralCurveMemberVarying::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralCurveMemberVarying, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_PredefinedType = IfcStructuralCurveMemberTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); - readEntityReference( args[8], m_Axis, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_PredefinedType = IfcStructuralCurveMemberTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_Axis, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStructuralCurveMemberVarying, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralCurveMemberVarying::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveReaction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveReaction.cpp index 31a1ad6a1..a968c866c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveReaction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralCurveReaction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -60,17 +57,17 @@ void IFC4X3::IfcStructuralCurveReaction::getStepParameter( std::stringstream& st void IFC4X3::IfcStructuralCurveReaction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralCurveReaction, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcStructuralCurveActivityTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcStructuralCurveActivityTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcStructuralCurveReaction, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralCurveReaction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralItem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralItem.cpp index fb8bf653d..30fbe739c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralItem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralItem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,14 +48,14 @@ void IFC4X3::IfcStructuralItem::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcStructuralItem::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralItem, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcStructuralItem, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralItem::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLinearAction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLinearAction.cpp index f2e6ba607..38bba17b4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLinearAction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLinearAction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,19 +63,19 @@ void IFC4X3::IfcStructuralLinearAction::getStepParameter( std::stringstream& str void IFC4X3::IfcStructuralLinearAction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLinearAction, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream ); - m_ProjectedOrTrue = IfcProjectedOrTrueLengthEnum::createObjectFromSTEP( args[10], map, errorStream ); - m_PredefinedType = IfcStructuralCurveActivityTypeEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_ProjectedOrTrue = IfcProjectedOrTrueLengthEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_PredefinedType = IfcStructuralCurveActivityTypeEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcStructuralLinearAction, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLinearAction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoad.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoad.cpp index 69f72d27d..aa102a439 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoad.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoad.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcStructuralLoad::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcStructuralLoad::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoad, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoad, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoad::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadCase.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadCase.cpp index 05cde2bb5..06c8a6199 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadCase.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadCase.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -61,18 +58,18 @@ void IFC4X3::IfcStructuralLoadCase::getStepParameter( std::stringstream& stream, void IFC4X3::IfcStructuralLoadCase::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadCase, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_PredefinedType = IfcLoadGroupTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_ActionType = IfcActionTypeEnum::createObjectFromSTEP( args[6], map, errorStream ); - m_ActionSource = IfcActionSourceTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_Coefficient = IfcRatioMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_Purpose = IfcLabel::createObjectFromSTEP( args[9], map, errorStream ); - readTypeOfRealList( args[10], m_SelfWeightCoefficients ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_PredefinedType = IfcLoadGroupTypeEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_ActionType = IfcActionTypeEnum::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_ActionSource = IfcActionSourceTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_Coefficient = IfcRatioMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_Purpose = IfcLabel::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){readTypeOfRealList( args[10], m_SelfWeightCoefficients );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadCase, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadCase::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadConfiguration.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadConfiguration.cpp index e93f1cf55..59e631c46 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadConfiguration.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadConfiguration.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -28,10 +25,10 @@ void IFC4X3::IfcStructuralLoadConfiguration::getStepParameter( std::stringstream void IFC4X3::IfcStructuralLoadConfiguration::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadConfiguration, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReferenceList( args[1], m_Values, map, errorStream ); - readTypeOfRealList2D( args[2], m_Locations ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_Values, map, errorStream );} + if( num_args > 2 ){readTypeOfRealList2D( args[2], m_Locations );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadConfiguration, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadConfiguration::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadGroup.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadGroup.cpp index ee6d0c023..71fbdd8e4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadGroup.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadGroup.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,17 +56,17 @@ void IFC4X3::IfcStructuralLoadGroup::getStepParameter( std::stringstream& stream void IFC4X3::IfcStructuralLoadGroup::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadGroup, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_PredefinedType = IfcLoadGroupTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_ActionType = IfcActionTypeEnum::createObjectFromSTEP( args[6], map, errorStream ); - m_ActionSource = IfcActionSourceTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_Coefficient = IfcRatioMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_Purpose = IfcLabel::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_PredefinedType = IfcLoadGroupTypeEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_ActionType = IfcActionTypeEnum::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_ActionSource = IfcActionSourceTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_Coefficient = IfcRatioMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_Purpose = IfcLabel::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadGroup, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadGroup::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadLinearForce.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadLinearForce.cpp index 41fd0147c..9da1bd861 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadLinearForce.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadLinearForce.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,14 +33,14 @@ void IFC4X3::IfcStructuralLoadLinearForce::getStepParameter( std::stringstream& void IFC4X3::IfcStructuralLoadLinearForce::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadLinearForce, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_LinearForceX = IfcLinearForceMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_LinearForceY = IfcLinearForceMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_LinearForceZ = IfcLinearForceMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_LinearMomentX = IfcLinearMomentMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_LinearMomentY = IfcLinearMomentMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_LinearMomentZ = IfcLinearMomentMeasure::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_LinearForceX = IfcLinearForceMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_LinearForceY = IfcLinearForceMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_LinearForceZ = IfcLinearForceMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_LinearMomentX = IfcLinearMomentMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LinearMomentY = IfcLinearMomentMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LinearMomentZ = IfcLinearMomentMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadLinearForce, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadLinearForce::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadOrResult.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadOrResult.cpp index 770aa12c7..4b2c86842 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadOrResult.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadOrResult.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcStructuralLoadOrResult::getStepParameter( std::stringstream& str void IFC4X3::IfcStructuralLoadOrResult::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadOrResult, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadOrResult, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadOrResult::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadPlanarForce.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadPlanarForce.cpp index add412a11..88c59eac6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadPlanarForce.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadPlanarForce.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,11 +26,11 @@ void IFC4X3::IfcStructuralLoadPlanarForce::getStepParameter( std::stringstream& void IFC4X3::IfcStructuralLoadPlanarForce::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadPlanarForce, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_PlanarForceX = IfcPlanarForceMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_PlanarForceY = IfcPlanarForceMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_PlanarForceZ = IfcPlanarForceMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_PlanarForceX = IfcPlanarForceMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_PlanarForceY = IfcPlanarForceMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_PlanarForceZ = IfcPlanarForceMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadPlanarForce, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadPlanarForce::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleDisplacement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleDisplacement.cpp index 25a7d1a48..7a89890e1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleDisplacement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleDisplacement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,14 +33,14 @@ void IFC4X3::IfcStructuralLoadSingleDisplacement::getStepParameter( std::strings void IFC4X3::IfcStructuralLoadSingleDisplacement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadSingleDisplacement, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_DisplacementX = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_DisplacementY = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_DisplacementZ = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_RotationalDisplacementRX = IfcPlaneAngleMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_RotationalDisplacementRY = IfcPlaneAngleMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_RotationalDisplacementRZ = IfcPlaneAngleMeasure::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DisplacementX = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_DisplacementY = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_DisplacementZ = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_RotationalDisplacementRX = IfcPlaneAngleMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_RotationalDisplacementRY = IfcPlaneAngleMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_RotationalDisplacementRZ = IfcPlaneAngleMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadSingleDisplacement, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadSingleDisplacement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleDisplacementDistortion.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleDisplacementDistortion.cpp index a47f8834d..16f178b1b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleDisplacementDistortion.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleDisplacementDistortion.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,15 +36,15 @@ void IFC4X3::IfcStructuralLoadSingleDisplacementDistortion::getStepParameter( st void IFC4X3::IfcStructuralLoadSingleDisplacementDistortion::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadSingleDisplacementDistortion, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_DisplacementX = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_DisplacementY = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_DisplacementZ = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_RotationalDisplacementRX = IfcPlaneAngleMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_RotationalDisplacementRY = IfcPlaneAngleMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_RotationalDisplacementRZ = IfcPlaneAngleMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_Distortion = IfcCurvatureMeasure::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DisplacementX = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_DisplacementY = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_DisplacementZ = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_RotationalDisplacementRX = IfcPlaneAngleMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_RotationalDisplacementRY = IfcPlaneAngleMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_RotationalDisplacementRZ = IfcPlaneAngleMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Distortion = IfcCurvatureMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadSingleDisplacementDistortion, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadSingleDisplacementDistortion::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleForce.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleForce.cpp index d9c0902d7..df3ee5c08 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleForce.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleForce.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,14 +33,14 @@ void IFC4X3::IfcStructuralLoadSingleForce::getStepParameter( std::stringstream& void IFC4X3::IfcStructuralLoadSingleForce::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadSingleForce, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_ForceX = IfcForceMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_ForceY = IfcForceMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_ForceZ = IfcForceMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_MomentX = IfcTorqueMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_MomentY = IfcTorqueMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_MomentZ = IfcTorqueMeasure::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ForceX = IfcForceMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_ForceY = IfcForceMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ForceZ = IfcForceMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_MomentX = IfcTorqueMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_MomentY = IfcTorqueMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_MomentZ = IfcTorqueMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadSingleForce, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadSingleForce::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleForceWarping.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleForceWarping.cpp index c0209d40b..b0ae37b33 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleForceWarping.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadSingleForceWarping.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,15 +36,15 @@ void IFC4X3::IfcStructuralLoadSingleForceWarping::getStepParameter( std::strings void IFC4X3::IfcStructuralLoadSingleForceWarping::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadSingleForceWarping, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_ForceX = IfcForceMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_ForceY = IfcForceMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_ForceZ = IfcForceMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_MomentX = IfcTorqueMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_MomentY = IfcTorqueMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_MomentZ = IfcTorqueMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_WarpingMoment = IfcWarpingMomentMeasure::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ForceX = IfcForceMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_ForceY = IfcForceMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_ForceZ = IfcForceMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_MomentX = IfcTorqueMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_MomentY = IfcTorqueMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_MomentZ = IfcTorqueMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_WarpingMoment = IfcWarpingMomentMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadSingleForceWarping, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadSingleForceWarping::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadStatic.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadStatic.cpp index 755f7dc6c..820cfb638 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadStatic.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadStatic.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcStructuralLoadStatic::getStepParameter( std::stringstream& strea void IFC4X3::IfcStructuralLoadStatic::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadStatic, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadStatic, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadStatic::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadTemperature.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadTemperature.cpp index 98b5984a1..569ad9dd6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadTemperature.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralLoadTemperature.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,11 +26,11 @@ void IFC4X3::IfcStructuralLoadTemperature::getStepParameter( std::stringstream& void IFC4X3::IfcStructuralLoadTemperature::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralLoadTemperature, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_DeltaTConstant = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_DeltaTY = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_DeltaTZ = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DeltaTConstant = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_DeltaTY = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_DeltaTZ = IfcThermodynamicTemperatureMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcStructuralLoadTemperature, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralLoadTemperature::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralMember.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralMember.cpp index 7f14026ca..b8b3bbf7b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralMember.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralMember.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -52,14 +49,14 @@ void IFC4X3::IfcStructuralMember::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcStructuralMember::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralMember, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcStructuralMember, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralMember::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPlanarAction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPlanarAction.cpp index 56558f093..bfc909349 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPlanarAction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPlanarAction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,19 +63,19 @@ void IFC4X3::IfcStructuralPlanarAction::getStepParameter( std::stringstream& str void IFC4X3::IfcStructuralPlanarAction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralPlanarAction, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream ); - m_ProjectedOrTrue = IfcProjectedOrTrueLengthEnum::createObjectFromSTEP( args[10], map, errorStream ); - m_PredefinedType = IfcStructuralSurfaceActivityTypeEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_ProjectedOrTrue = IfcProjectedOrTrueLengthEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_PredefinedType = IfcStructuralSurfaceActivityTypeEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcStructuralPlanarAction, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralPlanarAction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointAction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointAction.cpp index a87413b13..438e495c6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointAction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointAction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -60,17 +57,17 @@ void IFC4X3::IfcStructuralPointAction::getStepParameter( std::stringstream& stre void IFC4X3::IfcStructuralPointAction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralPointAction, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcStructuralPointAction, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralPointAction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointConnection.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointConnection.cpp index 121c187eb..2ef654def 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointConnection.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointConnection.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,16 +55,16 @@ void IFC4X3::IfcStructuralPointConnection::getStepParameter( std::stringstream& void IFC4X3::IfcStructuralPointConnection::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralPointConnection, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedCondition, map, errorStream ); - readEntityReference( args[8], m_ConditionCoordinateSystem, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedCondition, map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_ConditionCoordinateSystem, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStructuralPointConnection, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralPointConnection::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointReaction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointReaction.cpp index 94cb214ec..3b99f6e4c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointReaction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralPointReaction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -57,16 +54,16 @@ void IFC4X3::IfcStructuralPointReaction::getStepParameter( std::stringstream& st void IFC4X3::IfcStructuralPointReaction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralPointReaction, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStructuralPointReaction, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralPointReaction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralReaction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralReaction.cpp index a2a5e35bc..d4c834d8c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralReaction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralReaction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -57,16 +54,16 @@ void IFC4X3::IfcStructuralReaction::getStepParameter( std::stringstream& stream, void IFC4X3::IfcStructuralReaction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralReaction, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStructuralReaction, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralReaction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralResultGroup.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralResultGroup.cpp index 704c8490a..e0ce0979e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralResultGroup.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralResultGroup.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -53,15 +50,15 @@ void IFC4X3::IfcStructuralResultGroup::getStepParameter( std::stringstream& stre void IFC4X3::IfcStructuralResultGroup::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralResultGroup, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_TheoryType = IfcAnalysisTheoryTypeEnum::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReference( args[6], m_ResultForLoadGroup, map, errorStream ); - m_IsLinear = IfcBoolean::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_TheoryType = IfcAnalysisTheoryTypeEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_ResultForLoadGroup, map, errorStream );} + if( num_args > 7 ){m_IsLinear = IfcBoolean::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcStructuralResultGroup, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralResultGroup::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceAction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceAction.cpp index 1e4e814d6..641346a08 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceAction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceAction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,19 +63,19 @@ void IFC4X3::IfcStructuralSurfaceAction::getStepParameter( std::stringstream& st void IFC4X3::IfcStructuralSurfaceAction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralSurfaceAction, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream ); - m_ProjectedOrTrue = IfcProjectedOrTrueLengthEnum::createObjectFromSTEP( args[10], map, errorStream ); - m_PredefinedType = IfcStructuralSurfaceActivityTypeEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_DestabilizingLoad = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_ProjectedOrTrue = IfcProjectedOrTrueLengthEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_PredefinedType = IfcStructuralSurfaceActivityTypeEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcStructuralSurfaceAction, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralSurfaceAction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceConnection.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceConnection.cpp index e28fc06dd..1a1435e29 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceConnection.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceConnection.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -55,15 +52,15 @@ void IFC4X3::IfcStructuralSurfaceConnection::getStepParameter( std::stringstream void IFC4X3::IfcStructuralSurfaceConnection::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralSurfaceConnection, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedCondition, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedCondition, map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcStructuralSurfaceConnection, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralSurfaceConnection::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceMember.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceMember.cpp index d10e7c636..55ad9e46e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceMember.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceMember.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,16 +55,16 @@ void IFC4X3::IfcStructuralSurfaceMember::getStepParameter( std::stringstream& st void IFC4X3::IfcStructuralSurfaceMember::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralSurfaceMember, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_PredefinedType = IfcStructuralSurfaceMemberTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_Thickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_PredefinedType = IfcStructuralSurfaceMemberTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_Thickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStructuralSurfaceMember, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralSurfaceMember::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceMemberVarying.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceMemberVarying.cpp index 896f7c0ba..71e894b0a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceMemberVarying.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceMemberVarying.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -58,16 +55,16 @@ void IFC4X3::IfcStructuralSurfaceMemberVarying::getStepParameter( std::stringstr void IFC4X3::IfcStructuralSurfaceMemberVarying::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralSurfaceMemberVarying, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_PredefinedType = IfcStructuralSurfaceMemberTypeEnum::createObjectFromSTEP( args[7], map, errorStream ); - m_Thickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_PredefinedType = IfcStructuralSurfaceMemberTypeEnum::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_Thickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcStructuralSurfaceMemberVarying, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralSurfaceMemberVarying::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceReaction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceReaction.cpp index 263c43bf9..02c8b088b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceReaction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStructuralSurfaceReaction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -60,17 +57,17 @@ void IFC4X3::IfcStructuralSurfaceReaction::getStepParameter( std::stringstream& void IFC4X3::IfcStructuralSurfaceReaction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStructuralSurfaceReaction, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - readEntityReference( args[7], m_AppliedLoad, map, errorStream ); - m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcStructuralSurfaceActivityTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_AppliedLoad, map, errorStream );} + if( num_args > 8 ){m_GlobalOrLocal = IfcGlobalOrLocalEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcStructuralSurfaceActivityTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcStructuralSurfaceReaction, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStructuralSurfaceReaction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyleModel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyleModel.cpp index b6669790b..61211c9f3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyleModel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyleModel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcStyleModel::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcStyleModel::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStyleModel, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ContextOfItems, map, errorStream ); - m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReferenceList( args[3], m_Items, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ContextOfItems, map, errorStream );} + if( num_args > 1 ){m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_Items, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcStyleModel, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStyleModel::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyledItem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyledItem.cpp index af4b239c9..9d38cde89 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyledItem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyledItem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcStyledItem::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcStyledItem::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStyledItem, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Item, map, errorStream ); - readEntityReferenceList( args[1], m_Styles, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Item, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_Styles, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcStyledItem, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStyledItem::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyledRepresentation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyledRepresentation.cpp index a167ac8e1..8018758aa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyledRepresentation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcStyledRepresentation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcStyledRepresentation::getStepParameter( std::stringstream& strea void IFC4X3::IfcStyledRepresentation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcStyledRepresentation, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ContextOfItems, map, errorStream ); - m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReferenceList( args[3], m_Items, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ContextOfItems, map, errorStream );} + if( num_args > 1 ){m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_Items, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcStyledRepresentation, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcStyledRepresentation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubContractResource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubContractResource.cpp index fe3b075d7..344beedc6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubContractResource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubContractResource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,18 +56,18 @@ void IFC4X3::IfcSubContractResource::getStepParameter( std::stringstream& stream void IFC4X3::IfcSubContractResource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSubContractResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReference( args[7], m_Usage, map, errorStream ); - readEntityReferenceList( args[8], m_BaseCosts, map, errorStream ); - readEntityReference( args[9], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcSubContractResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReference( args[7], m_Usage, map, errorStream );} + if( num_args > 8 ){readEntityReferenceList( args[8], m_BaseCosts, map, errorStream );} + if( num_args > 9 ){readEntityReference( args[9], m_BaseQuantity, map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcSubContractResourceTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcSubContractResource, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSubContractResource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubContractResourceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubContractResourceType.cpp index 791a151a3..5ab8943fa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubContractResourceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubContractResourceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -59,19 +56,19 @@ void IFC4X3::IfcSubContractResourceType::getStepParameter( std::stringstream& st void IFC4X3::IfcSubContractResourceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSubContractResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - readEntityReferenceList( args[9], m_BaseCosts, map, errorStream ); - readEntityReference( args[10], m_BaseQuantity, map, errorStream ); - m_PredefinedType = IfcSubContractResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){readEntityReferenceList( args[9], m_BaseCosts, map, errorStream );} + if( num_args > 10 ){readEntityReference( args[10], m_BaseQuantity, map, errorStream );} + if( num_args > 11 ){m_PredefinedType = IfcSubContractResourceTypeEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcSubContractResourceType, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSubContractResourceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubedge.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubedge.cpp index b7a31a395..01ef33e12 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubedge.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSubedge.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcSubedge::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcSubedge::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSubedge, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_EdgeStart, map, errorStream ); - readEntityReference( args[1], m_EdgeEnd, map, errorStream ); - readEntityReference( args[2], m_ParentEdge, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_EdgeStart, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_EdgeEnd, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_ParentEdge, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcSubedge, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSubedge::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurface.cpp index 34983fd1c..19b468cb2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceCurve.cpp index 806b11493..5f8bbc783 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcSurfaceCurve::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcSurfaceCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceCurve, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Curve3D, map, errorStream ); - readEntityReferenceList( args[1], m_AssociatedGeometry, map, errorStream ); - m_MasterRepresentation = IfcPreferredSurfaceCurveRepresentation::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Curve3D, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_AssociatedGeometry, map, errorStream );} + if( num_args > 2 ){m_MasterRepresentation = IfcPreferredSurfaceCurveRepresentation::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcSurfaceCurve, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceCurveSweptAreaSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceCurveSweptAreaSolid.cpp index fa2c6da2b..5941ed90d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceCurveSweptAreaSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceCurveSweptAreaSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -38,13 +35,13 @@ void IFC4X3::IfcSurfaceCurveSweptAreaSolid::getStepParameter( std::stringstream& void IFC4X3::IfcSurfaceCurveSweptAreaSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceCurveSweptAreaSolid, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptArea, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); - readEntityReference( args[2], m_Directrix, map, errorStream ); - m_StartParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_EndParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ReferenceSurface, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptArea, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Directrix, map, errorStream );} + if( num_args > 3 ){m_StartParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_EndParam = IfcCurveMeasureSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ReferenceSurface, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcSurfaceCurveSweptAreaSolid, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceCurveSweptAreaSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceFeature.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceFeature.cpp index 9ca66b377..368486a3d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceFeature.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceFeature.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcSurfaceFeature::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcSurfaceFeature::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceFeature, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSurfaceFeatureTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSurfaceFeatureTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSurfaceFeature, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceFeature::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceOfLinearExtrusion.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceOfLinearExtrusion.cpp index 07327eb33..369fb0b33 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceOfLinearExtrusion.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceOfLinearExtrusion.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,11 +30,11 @@ void IFC4X3::IfcSurfaceOfLinearExtrusion::getStepParameter( std::stringstream& s void IFC4X3::IfcSurfaceOfLinearExtrusion::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceOfLinearExtrusion, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptCurve, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); - readEntityReference( args[2], m_ExtrudedDirection, map, errorStream ); - m_Depth = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptCurve, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_ExtrudedDirection, map, errorStream );} + if( num_args > 3 ){m_Depth = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcSurfaceOfLinearExtrusion, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceOfLinearExtrusion::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceOfRevolution.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceOfRevolution.cpp index 3a1e3a548..f0af5a185 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceOfRevolution.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceOfRevolution.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcSurfaceOfRevolution::getStepParameter( std::stringstream& stream void IFC4X3::IfcSurfaceOfRevolution::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceOfRevolution, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptCurve, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); - readEntityReference( args[2], m_AxisPosition, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptCurve, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_AxisPosition, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcSurfaceOfRevolution, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceOfRevolution::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceReinforcementArea.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceReinforcementArea.cpp index 34cdb4929..956662fb2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceReinforcementArea.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceReinforcementArea.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,11 +27,11 @@ void IFC4X3::IfcSurfaceReinforcementArea::getStepParameter( std::stringstream& s void IFC4X3::IfcSurfaceReinforcementArea::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceReinforcementArea, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readTypeOfRealList( args[1], m_SurfaceReinforcement1 ); - readTypeOfRealList( args[2], m_SurfaceReinforcement2 ); - m_ShearReinforcement = IfcRatioMeasure::createObjectFromSTEP( args[3], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readTypeOfRealList( args[1], m_SurfaceReinforcement1 );} + if( num_args > 2 ){readTypeOfRealList( args[2], m_SurfaceReinforcement2 );} + if( num_args > 3 ){m_ShearReinforcement = IfcRatioMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcSurfaceReinforcementArea, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceReinforcementArea::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyle.cpp index 8553e4513..ba6054445 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -45,10 +42,10 @@ void IFC4X3::IfcSurfaceStyle::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcSurfaceStyle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceStyle, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Side = IfcSurfaceSide::createObjectFromSTEP( args[1], map, errorStream ); - readSelectList( args[2], m_Styles, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Side = IfcSurfaceSide::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readSelectList( args[2], m_Styles, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcSurfaceStyle, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceStyle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleLighting.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleLighting.cpp index b1930536f..95e60b70f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleLighting.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleLighting.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -28,11 +25,11 @@ void IFC4X3::IfcSurfaceStyleLighting::getStepParameter( std::stringstream& strea void IFC4X3::IfcSurfaceStyleLighting::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceStyleLighting, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_DiffuseTransmissionColour, map, errorStream ); - readEntityReference( args[1], m_DiffuseReflectionColour, map, errorStream ); - readEntityReference( args[2], m_TransmissionColour, map, errorStream ); - readEntityReference( args[3], m_ReflectanceColour, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_DiffuseTransmissionColour, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_DiffuseReflectionColour, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_TransmissionColour, map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_ReflectanceColour, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcSurfaceStyleLighting, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceStyleLighting::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleRefraction.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleRefraction.cpp index 0c0d296ef..8f5dc06b9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleRefraction.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleRefraction.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,9 +21,9 @@ void IFC4X3::IfcSurfaceStyleRefraction::getStepParameter( std::stringstream& str void IFC4X3::IfcSurfaceStyleRefraction::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceStyleRefraction, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_RefractionIndex = IfcReal::createObjectFromSTEP( args[0], map, errorStream ); - m_DispersionFactor = IfcReal::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_RefractionIndex = IfcReal::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DispersionFactor = IfcReal::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcSurfaceStyleRefraction, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceStyleRefraction::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleRendering.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleRendering.cpp index 39ea2e1db..7877acc23 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleRendering.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleRendering.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -42,16 +39,16 @@ void IFC4X3::IfcSurfaceStyleRendering::getStepParameter( std::stringstream& stre void IFC4X3::IfcSurfaceStyleRendering::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceStyleRendering, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SurfaceColour, map, errorStream ); - m_Transparency = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_DiffuseColour = IfcColourOrFactor::createObjectFromSTEP( args[2], map, errorStream ); - m_TransmissionColour = IfcColourOrFactor::createObjectFromSTEP( args[3], map, errorStream ); - m_DiffuseTransmissionColour = IfcColourOrFactor::createObjectFromSTEP( args[4], map, errorStream ); - m_ReflectionColour = IfcColourOrFactor::createObjectFromSTEP( args[5], map, errorStream ); - m_SpecularColour = IfcColourOrFactor::createObjectFromSTEP( args[6], map, errorStream ); - m_SpecularHighlight = IfcSpecularHighlightSelect::createObjectFromSTEP( args[7], map, errorStream ); - m_ReflectanceMethod = IfcReflectanceMethodEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SurfaceColour, map, errorStream );} + if( num_args > 1 ){m_Transparency = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_DiffuseColour = IfcColourOrFactor::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_TransmissionColour = IfcColourOrFactor::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_DiffuseTransmissionColour = IfcColourOrFactor::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_ReflectionColour = IfcColourOrFactor::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_SpecularColour = IfcColourOrFactor::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_SpecularHighlight = IfcSpecularHighlightSelect::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ReflectanceMethod = IfcReflectanceMethodEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSurfaceStyleRendering, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceStyleRendering::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleShading.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleShading.cpp index 3cc36acea..70293ca95 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleShading.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleShading.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,9 +22,9 @@ void IFC4X3::IfcSurfaceStyleShading::getStepParameter( std::stringstream& stream void IFC4X3::IfcSurfaceStyleShading::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceStyleShading, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SurfaceColour, map, errorStream ); - m_Transparency = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SurfaceColour, map, errorStream );} + if( num_args > 1 ){m_Transparency = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcSurfaceStyleShading, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceStyleShading::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleWithTextures.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleWithTextures.cpp index 6cf72780b..435182b06 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleWithTextures.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceStyleWithTextures.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcSurfaceStyleWithTextures::getStepParameter( std::stringstream& s void IFC4X3::IfcSurfaceStyleWithTextures::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceStyleWithTextures, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Textures, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Textures, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcSurfaceStyleWithTextures, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceStyleWithTextures::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceTexture.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceTexture.cpp index 08107fabc..6c9204929 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceTexture.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSurfaceTexture.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -55,12 +52,12 @@ void IFC4X3::IfcSurfaceTexture::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcSurfaceTexture::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSurfaceTexture, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_RepeatS = IfcBoolean::createObjectFromSTEP( args[0], map, errorStream ); - m_RepeatT = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - m_Mode = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_TextureTransform, map, errorStream ); - readTypeOfStringList( args[4], m_Parameter ); + if( num_args > 0 ){m_RepeatS = IfcBoolean::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_RepeatT = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Mode = IfcIdentifier::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_TextureTransform, map, errorStream );} + if( num_args > 4 ){readTypeOfStringList( args[4], m_Parameter );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcSurfaceTexture, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSurfaceTexture::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptAreaSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptAreaSolid.cpp index 65b70cfc3..9fc3fd176 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptAreaSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptAreaSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcSweptAreaSolid::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcSweptAreaSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSweptAreaSolid, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptArea, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptArea, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcSweptAreaSolid, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSweptAreaSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptDiskSolid.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptDiskSolid.cpp index ba8459ba6..066c4e9ad 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptDiskSolid.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptDiskSolid.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,12 +31,12 @@ void IFC4X3::IfcSweptDiskSolid::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcSweptDiskSolid::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSweptDiskSolid, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Directrix, map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_InnerRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_StartParam = IfcParameterValue::createObjectFromSTEP( args[3], map, errorStream ); - m_EndParam = IfcParameterValue::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Directrix, map, errorStream );} + if( num_args > 1 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_InnerRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_StartParam = IfcParameterValue::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_EndParam = IfcParameterValue::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcSweptDiskSolid, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSweptDiskSolid::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptDiskSolidPolygonal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptDiskSolidPolygonal.cpp index 99b3451fe..639cfc253 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptDiskSolidPolygonal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptDiskSolidPolygonal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,13 +34,13 @@ void IFC4X3::IfcSweptDiskSolidPolygonal::getStepParameter( std::stringstream& st void IFC4X3::IfcSweptDiskSolidPolygonal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSweptDiskSolidPolygonal, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Directrix, map, errorStream ); - m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_InnerRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_StartParam = IfcParameterValue::createObjectFromSTEP( args[3], map, errorStream ); - m_EndParam = IfcParameterValue::createObjectFromSTEP( args[4], map, errorStream ); - m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Directrix, map, errorStream );} + if( num_args > 1 ){m_Radius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_InnerRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_StartParam = IfcParameterValue::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_EndParam = IfcParameterValue::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcSweptDiskSolidPolygonal, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSweptDiskSolidPolygonal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptSurface.cpp index a148d0639..55f734d48 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSweptSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcSweptSurface::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcSweptSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSweptSurface, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_SweptCurve, map, errorStream ); - readEntityReference( args[1], m_Position, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_SweptCurve, map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_Position, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcSweptSurface, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSweptSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSwitchingDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSwitchingDevice.cpp index 892eff2b5..9d17b496a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSwitchingDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSwitchingDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcSwitchingDevice::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcSwitchingDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSwitchingDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSwitchingDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSwitchingDeviceTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSwitchingDevice, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSwitchingDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSwitchingDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSwitchingDeviceType.cpp index 2b3ea2b7c..5b5b8818e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSwitchingDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSwitchingDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcSwitchingDeviceType::getStepParameter( std::stringstream& stream void IFC4X3::IfcSwitchingDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSwitchingDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSwitchingDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSwitchingDeviceTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcSwitchingDeviceType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSwitchingDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystem.cpp index 15ff6b966..0f10202c1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -44,12 +41,12 @@ void IFC4X3::IfcSystem::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcSystem::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSystem, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcSystem, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSystem::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystemFurnitureElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystemFurnitureElement.cpp index 269e82752..3e10a4b6f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystemFurnitureElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystemFurnitureElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcSystemFurnitureElement::getStepParameter( std::stringstream& str void IFC4X3::IfcSystemFurnitureElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSystemFurnitureElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcSystemFurnitureElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcSystemFurnitureElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcSystemFurnitureElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSystemFurnitureElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystemFurnitureElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystemFurnitureElementType.cpp index e81729ed9..ecbe4de4d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystemFurnitureElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcSystemFurnitureElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcSystemFurnitureElementType::getStepParameter( std::stringstream& void IFC4X3::IfcSystemFurnitureElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcSystemFurnitureElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcSystemFurnitureElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcSystemFurnitureElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcSystemFurnitureElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcSystemFurnitureElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTShapeProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTShapeProfileDef.cpp index fc54fd647..5360ebfa8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTShapeProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTShapeProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,19 +48,19 @@ void IFC4X3::IfcTShapeProfileDef::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcTShapeProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTShapeProfileDef, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_FlangeWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_WebThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_FlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_FlangeEdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_WebEdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_WebSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_FlangeSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_FlangeWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_WebThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_FlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_FlangeEdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_WebEdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_WebSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_FlangeSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcTShapeProfileDef, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTShapeProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTable.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTable.cpp index 4819685db..33c142c5a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTable.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTable.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -28,10 +25,10 @@ void IFC4X3::IfcTable::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcTable::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTable, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReferenceList( args[1], m_Rows, map, errorStream ); - readEntityReferenceList( args[2], m_Columns, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_Rows, map, errorStream );} + if( num_args > 2 ){readEntityReferenceList( args[2], m_Columns, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcTable, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTable::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTableColumn.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTableColumn.cpp index b5bbb5aa5..265bd7eb2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTableColumn.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTableColumn.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,12 +31,12 @@ void IFC4X3::IfcTableColumn::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcTableColumn::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTableColumn, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Identifier = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream ); - m_Unit = IfcUnit::createObjectFromSTEP( args[3], map, errorStream ); - readEntityReference( args[4], m_ReferencePath, map, errorStream ); + if( num_args > 0 ){m_Identifier = IfcIdentifier::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Name = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Description = IfcText::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Unit = IfcUnit::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){readEntityReference( args[4], m_ReferencePath, map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcTableColumn, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTableColumn::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTableRow.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTableRow.cpp index 2b028718d..a393ca4b7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTableRow.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTableRow.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -46,9 +43,9 @@ void IFC4X3::IfcTableRow::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcTableRow::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTableRow, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readSelectList( args[0], m_RowCells, map, errorStream ); - m_IsHeading = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readSelectList( args[0], m_RowCells, map, errorStream );} + if( num_args > 1 ){m_IsHeading = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcTableRow, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTableRow::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTank.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTank.cpp index c279af392..19f0ddaf4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTank.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTank.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcTank::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcTank::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTank, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcTankTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcTankTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcTank, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTank::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTankType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTankType.cpp index 414b727c9..86cf1e431 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTankType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTankType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcTankType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcTankType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTankType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTankTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTankTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcTankType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTankType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTask.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTask.cpp index a6580efdf..92667613f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTask.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTask.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -64,20 +61,20 @@ void IFC4X3::IfcTask::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcTask::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 13 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTask, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream ); - m_Status = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_WorkMethod = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_IsMilestone = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream ); - m_Priority = IfcInteger::createObjectFromSTEP( args[10], map, errorStream ); - readEntityReference( args[11], m_TaskTime, map, errorStream ); - m_PredefinedType = IfcTaskTypeEnum::createObjectFromSTEP( args[12], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LongDescription = IfcText::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Status = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_WorkMethod = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_IsMilestone = IfcBoolean::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_Priority = IfcInteger::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){readEntityReference( args[11], m_TaskTime, map, errorStream );} + if( num_args > 12 ){m_PredefinedType = IfcTaskTypeEnum::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args != 13 ){ errorStream << "Wrong parameter count for entity IfcTask, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTask::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskTime.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskTime.cpp index 52f6a8018..fa9eb22e3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskTime.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskTime.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,27 +63,27 @@ void IFC4X3::IfcTaskTime::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcTaskTime::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 20 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTaskTime, expecting 20, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_DurationType = IfcTaskDurationEnum::createObjectFromSTEP( args[3], map, errorStream ); - m_ScheduleDuration = IfcDuration::createObjectFromSTEP( args[4], map, errorStream ); - m_ScheduleStart = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream ); - m_ScheduleFinish = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream ); - m_EarlyStart = IfcDateTime::createObjectFromSTEP( args[7], map, errorStream ); - m_EarlyFinish = IfcDateTime::createObjectFromSTEP( args[8], map, errorStream ); - m_LateStart = IfcDateTime::createObjectFromSTEP( args[9], map, errorStream ); - m_LateFinish = IfcDateTime::createObjectFromSTEP( args[10], map, errorStream ); - m_FreeFloat = IfcDuration::createObjectFromSTEP( args[11], map, errorStream ); - m_TotalFloat = IfcDuration::createObjectFromSTEP( args[12], map, errorStream ); - m_IsCritical = IfcBoolean::createObjectFromSTEP( args[13], map, errorStream ); - m_StatusTime = IfcDateTime::createObjectFromSTEP( args[14], map, errorStream ); - m_ActualDuration = IfcDuration::createObjectFromSTEP( args[15], map, errorStream ); - m_ActualStart = IfcDateTime::createObjectFromSTEP( args[16], map, errorStream ); - m_ActualFinish = IfcDateTime::createObjectFromSTEP( args[17], map, errorStream ); - m_RemainingTime = IfcDuration::createObjectFromSTEP( args[18], map, errorStream ); - m_Completion = IfcPositiveRatioMeasure::createObjectFromSTEP( args[19], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_DurationType = IfcTaskDurationEnum::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ScheduleDuration = IfcDuration::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_ScheduleStart = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_ScheduleFinish = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_EarlyStart = IfcDateTime::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_EarlyFinish = IfcDateTime::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_LateStart = IfcDateTime::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_LateFinish = IfcDateTime::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_FreeFloat = IfcDuration::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_TotalFloat = IfcDuration::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_IsCritical = IfcBoolean::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){m_StatusTime = IfcDateTime::createObjectFromSTEP( args[14], map, errorStream );} + if( num_args > 15 ){m_ActualDuration = IfcDuration::createObjectFromSTEP( args[15], map, errorStream );} + if( num_args > 16 ){m_ActualStart = IfcDateTime::createObjectFromSTEP( args[16], map, errorStream );} + if( num_args > 17 ){m_ActualFinish = IfcDateTime::createObjectFromSTEP( args[17], map, errorStream );} + if( num_args > 18 ){m_RemainingTime = IfcDuration::createObjectFromSTEP( args[18], map, errorStream );} + if( num_args > 19 ){m_Completion = IfcPositiveRatioMeasure::createObjectFromSTEP( args[19], map, errorStream );} + if( num_args != 20 ){ errorStream << "Wrong parameter count for entity IfcTaskTime, expecting 20, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTaskTime::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskTimeRecurring.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskTimeRecurring.cpp index 725ac6367..403d1a904 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskTimeRecurring.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskTimeRecurring.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -69,28 +66,28 @@ void IFC4X3::IfcTaskTimeRecurring::getStepParameter( std::stringstream& stream, void IFC4X3::IfcTaskTimeRecurring::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 21 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTaskTimeRecurring, expecting 21, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_DurationType = IfcTaskDurationEnum::createObjectFromSTEP( args[3], map, errorStream ); - m_ScheduleDuration = IfcDuration::createObjectFromSTEP( args[4], map, errorStream ); - m_ScheduleStart = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream ); - m_ScheduleFinish = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream ); - m_EarlyStart = IfcDateTime::createObjectFromSTEP( args[7], map, errorStream ); - m_EarlyFinish = IfcDateTime::createObjectFromSTEP( args[8], map, errorStream ); - m_LateStart = IfcDateTime::createObjectFromSTEP( args[9], map, errorStream ); - m_LateFinish = IfcDateTime::createObjectFromSTEP( args[10], map, errorStream ); - m_FreeFloat = IfcDuration::createObjectFromSTEP( args[11], map, errorStream ); - m_TotalFloat = IfcDuration::createObjectFromSTEP( args[12], map, errorStream ); - m_IsCritical = IfcBoolean::createObjectFromSTEP( args[13], map, errorStream ); - m_StatusTime = IfcDateTime::createObjectFromSTEP( args[14], map, errorStream ); - m_ActualDuration = IfcDuration::createObjectFromSTEP( args[15], map, errorStream ); - m_ActualStart = IfcDateTime::createObjectFromSTEP( args[16], map, errorStream ); - m_ActualFinish = IfcDateTime::createObjectFromSTEP( args[17], map, errorStream ); - m_RemainingTime = IfcDuration::createObjectFromSTEP( args[18], map, errorStream ); - m_Completion = IfcPositiveRatioMeasure::createObjectFromSTEP( args[19], map, errorStream ); - readEntityReference( args[20], m_Recurrence, map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_DurationType = IfcTaskDurationEnum::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ScheduleDuration = IfcDuration::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_ScheduleStart = IfcDateTime::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_ScheduleFinish = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_EarlyStart = IfcDateTime::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_EarlyFinish = IfcDateTime::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_LateStart = IfcDateTime::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_LateFinish = IfcDateTime::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_FreeFloat = IfcDuration::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_TotalFloat = IfcDuration::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_IsCritical = IfcBoolean::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){m_StatusTime = IfcDateTime::createObjectFromSTEP( args[14], map, errorStream );} + if( num_args > 15 ){m_ActualDuration = IfcDuration::createObjectFromSTEP( args[15], map, errorStream );} + if( num_args > 16 ){m_ActualStart = IfcDateTime::createObjectFromSTEP( args[16], map, errorStream );} + if( num_args > 17 ){m_ActualFinish = IfcDateTime::createObjectFromSTEP( args[17], map, errorStream );} + if( num_args > 18 ){m_RemainingTime = IfcDuration::createObjectFromSTEP( args[18], map, errorStream );} + if( num_args > 19 ){m_Completion = IfcPositiveRatioMeasure::createObjectFromSTEP( args[19], map, errorStream );} + if( num_args > 20 ){readEntityReference( args[20], m_Recurrence, map, errorStream );} + if( num_args != 21 ){ errorStream << "Wrong parameter count for entity IfcTaskTimeRecurring, expecting 21, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTaskTimeRecurring::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskType.cpp index 4f4127fe0..801220472 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTaskType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -55,18 +52,18 @@ void IFC4X3::IfcTaskType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcTaskType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 11 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTaskType, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ProcessType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTaskTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_WorkMethod = IfcLabel::createObjectFromSTEP( args[10], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ProcessType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTaskTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_WorkMethod = IfcLabel::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args != 11 ){ errorStream << "Wrong parameter count for entity IfcTaskType, expecting 11, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTaskType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTelecomAddress.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTelecomAddress.cpp index a79c23a5b..7b95980fb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTelecomAddress.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTelecomAddress.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -127,16 +124,16 @@ void IFC4X3::IfcTelecomAddress::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcTelecomAddress::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTelecomAddress, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Purpose = IfcAddressTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedPurpose = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readTypeOfStringList( args[3], m_TelephoneNumbers ); - readTypeOfStringList( args[4], m_FacsimileNumbers ); - m_PagerNumber = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); - readTypeOfStringList( args[6], m_ElectronicMailAddresses ); - m_WWWHomePageURL = IfcURIReference::createObjectFromSTEP( args[7], map, errorStream ); - readTypeOfStringList( args[8], m_MessagingIDs ); + if( num_args > 0 ){m_Purpose = IfcAddressTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedPurpose = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readTypeOfStringList( args[3], m_TelephoneNumbers );} + if( num_args > 4 ){readTypeOfStringList( args[4], m_FacsimileNumbers );} + if( num_args > 5 ){m_PagerNumber = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readTypeOfStringList( args[6], m_ElectronicMailAddresses );} + if( num_args > 7 ){m_WWWHomePageURL = IfcURIReference::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){readTypeOfStringList( args[8], m_MessagingIDs );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcTelecomAddress, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTelecomAddress::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendon.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendon.cpp index 00be60025..050d9e75d 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendon.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendon.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -87,24 +84,24 @@ void IFC4X3::IfcTendon::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcTendon::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 17 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTendon, expecting 17, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTendonTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_CrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_TensionForce = IfcForceMeasure::createObjectFromSTEP( args[12], map, errorStream ); - m_PreStress = IfcPressureMeasure::createObjectFromSTEP( args[13], map, errorStream ); - m_FrictionCoefficient = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[14], map, errorStream ); - m_AnchorageSlip = IfcPositiveLengthMeasure::createObjectFromSTEP( args[15], map, errorStream ); - m_MinCurvatureRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[16], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTendonTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_CrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_TensionForce = IfcForceMeasure::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_PreStress = IfcPressureMeasure::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){m_FrictionCoefficient = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[14], map, errorStream );} + if( num_args > 15 ){m_AnchorageSlip = IfcPositiveLengthMeasure::createObjectFromSTEP( args[15], map, errorStream );} + if( num_args > 16 ){m_MinCurvatureRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[16], map, errorStream );} + if( num_args != 17 ){ errorStream << "Wrong parameter count for entity IfcTendon, expecting 17, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTendon::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonAnchor.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonAnchor.cpp index d04bce382..943dc24bd 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonAnchor.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonAnchor.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,17 +65,17 @@ void IFC4X3::IfcTendonAnchor::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcTendonAnchor::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTendonAnchor, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTendonAnchorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTendonAnchorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcTendonAnchor, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTendonAnchor::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonAnchorType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonAnchorType.cpp index cf29e6f34..1d31cd8c0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonAnchorType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonAnchorType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcTendonAnchorType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcTendonAnchorType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTendonAnchorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTendonAnchorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTendonAnchorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcTendonAnchorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTendonAnchorType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonConduit.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonConduit.cpp index 3bf03f5b7..b31fdef57 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonConduit.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonConduit.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,17 +65,17 @@ void IFC4X3::IfcTendonConduit::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcTendonConduit::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTendonConduit, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTendonConduitTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_SteelGrade = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTendonConduitTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcTendonConduit, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTendonConduit::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonConduitType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonConduitType.cpp index f7b3b6ebb..96fae5eda 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonConduitType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonConduitType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcTendonConduitType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcTendonConduitType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTendonConduitType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTendonConduitTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTendonConduitTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcTendonConduitType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTendonConduitType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonType.cpp index ed377f4cd..5eaf2e873 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTendonType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -62,20 +59,20 @@ void IFC4X3::IfcTendonType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcTendonType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 13 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTendonType, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTendonTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_CrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[11], map, errorStream ); - m_SheathDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[12], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTendonTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_NominalDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_CrossSectionArea = IfcAreaMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_SheathDiameter = IfcPositiveLengthMeasure::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args != 13 ){ errorStream << "Wrong parameter count for entity IfcTendonType, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTendonType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTessellatedFaceSet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTessellatedFaceSet.cpp index eeb0bc45a..7e1f69307 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTessellatedFaceSet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTessellatedFaceSet.cpp @@ -1,13 +1,9 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" -#include "ifcpp/IFC4X3/include/IfcBoolean.h" #include "ifcpp/IFC4X3/include/IfcCartesianPointList3D.h" #include "ifcpp/IFC4X3/include/IfcIndexedColourMap.h" #include "ifcpp/IFC4X3/include/IfcIndexedTextureMap.h" @@ -21,23 +17,19 @@ void IFC4X3::IfcTessellatedFaceSet::getStepLine( std::stringstream& stream ) con { stream << "#" << m_tag << "= IFCTESSELLATEDFACESET" << "("; if( m_Coordinates ) { stream << "#" << m_Coordinates->m_tag; } else { stream << "$"; } - stream << ","; - if( m_Closed ) { m_Closed->getStepParameter( stream ); } else { stream << "$"; } stream << ");"; } void IFC4X3::IfcTessellatedFaceSet::getStepParameter( std::stringstream& stream, bool /*is_select_type*/ ) const { stream << "#" << m_tag; } void IFC4X3::IfcTessellatedFaceSet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTessellatedFaceSet, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Coordinates, map, errorStream ); - m_Closed = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Coordinates, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcTessellatedFaceSet, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTessellatedFaceSet::getAttributes( std::vector > >& vec_attributes ) const { IFC4X3::IfcTessellatedItem::getAttributes( vec_attributes ); vec_attributes.emplace_back( std::make_pair( "Coordinates", m_Coordinates ) ); - vec_attributes.emplace_back( std::make_pair( "Closed", m_Closed ) ); } void IFC4X3::IfcTessellatedFaceSet::getAttributesInverse( std::vector > >& vec_attributes_inverse ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTessellatedItem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTessellatedItem.cpp index fcb38bf29..11f5afc30 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTessellatedItem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTessellatedItem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextLiteral.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextLiteral.cpp index c98651c4e..4e84c54e3 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextLiteral.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextLiteral.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -30,10 +27,10 @@ void IFC4X3::IfcTextLiteral::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcTextLiteral::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextLiteral, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Literal = IfcPresentableText::createObjectFromSTEP( args[0], map, errorStream ); - m_Placement = IfcAxis2Placement::createObjectFromSTEP( args[1], map, errorStream ); - m_Path = IfcTextPath::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){m_Literal = IfcPresentableText::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Placement = IfcAxis2Placement::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Path = IfcTextPath::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcTextLiteral, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextLiteral::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextLiteralWithExtent.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextLiteralWithExtent.cpp index 79af7366a..c3a93b267 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextLiteralWithExtent.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextLiteralWithExtent.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -36,12 +33,12 @@ void IFC4X3::IfcTextLiteralWithExtent::getStepParameter( std::stringstream& stre void IFC4X3::IfcTextLiteralWithExtent::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextLiteralWithExtent, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Literal = IfcPresentableText::createObjectFromSTEP( args[0], map, errorStream ); - m_Placement = IfcAxis2Placement::createObjectFromSTEP( args[1], map, errorStream ); - m_Path = IfcTextPath::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_Extent, map, errorStream ); - m_BoxAlignment = IfcBoxAlignment::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Literal = IfcPresentableText::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Placement = IfcAxis2Placement::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_Path = IfcTextPath::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_Extent, map, errorStream );} + if( num_args > 4 ){m_BoxAlignment = IfcBoxAlignment::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcTextLiteralWithExtent, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextLiteralWithExtent::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyle.cpp index 2b6d1f973..2607b2093 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,12 +31,12 @@ void IFC4X3::IfcTextStyle::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcTextStyle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextStyle, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_TextCharacterAppearance, map, errorStream ); - readEntityReference( args[2], m_TextStyle, map, errorStream ); - m_TextFontStyle = IfcTextFontSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_ModelOrDraughting = IfcBoolean::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_TextCharacterAppearance, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_TextStyle, map, errorStream );} + if( num_args > 3 ){m_TextFontStyle = IfcTextFontSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ModelOrDraughting = IfcBoolean::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcTextStyle, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextStyle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleFontModel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleFontModel.cpp index 559ae6c54..4beccc084 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleFontModel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleFontModel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,13 +51,13 @@ void IFC4X3::IfcTextStyleFontModel::getStepParameter( std::stringstream& stream, void IFC4X3::IfcTextStyleFontModel::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextStyleFontModel, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - readTypeOfStringList( args[1], m_FontFamily ); - m_FontStyle = IfcFontStyle::createObjectFromSTEP( args[2], map, errorStream ); - m_FontVariant = IfcFontVariant::createObjectFromSTEP( args[3], map, errorStream ); - m_FontWeight = IfcFontWeight::createObjectFromSTEP( args[4], map, errorStream ); - m_FontSize = IfcSizeSelect::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readTypeOfStringList( args[1], m_FontFamily );} + if( num_args > 2 ){m_FontStyle = IfcFontStyle::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_FontVariant = IfcFontVariant::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_FontWeight = IfcFontWeight::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_FontSize = IfcSizeSelect::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcTextStyleFontModel, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextStyleFontModel::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleForDefinedFont.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleForDefinedFont.cpp index 932685d6a..6cf5b2093 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleForDefinedFont.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleForDefinedFont.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,9 +21,9 @@ void IFC4X3::IfcTextStyleForDefinedFont::getStepParameter( std::stringstream& st void IFC4X3::IfcTextStyleForDefinedFont::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextStyleForDefinedFont, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Colour = IfcColour::createObjectFromSTEP( args[0], map, errorStream ); - m_BackgroundColour = IfcColour::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_Colour = IfcColour::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_BackgroundColour = IfcColour::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcTextStyleForDefinedFont, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextStyleForDefinedFont::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleTextModel.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleTextModel.cpp index 90c6e092c..7304a2e0a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleTextModel.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextStyleTextModel.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -37,14 +34,14 @@ void IFC4X3::IfcTextStyleTextModel::getStepParameter( std::stringstream& stream, void IFC4X3::IfcTextStyleTextModel::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextStyleTextModel, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_TextIndent = IfcSizeSelect::createObjectFromSTEP( args[0], map, errorStream ); - m_TextAlign = IfcTextAlignment::createObjectFromSTEP( args[1], map, errorStream ); - m_TextDecoration = IfcTextDecoration::createObjectFromSTEP( args[2], map, errorStream ); - m_LetterSpacing = IfcSizeSelect::createObjectFromSTEP( args[3], map, errorStream ); - m_WordSpacing = IfcSizeSelect::createObjectFromSTEP( args[4], map, errorStream ); - m_TextTransform = IfcTextTransformation::createObjectFromSTEP( args[5], map, errorStream ); - m_LineHeight = IfcSizeSelect::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_TextIndent = IfcSizeSelect::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_TextAlign = IfcTextAlignment::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_TextDecoration = IfcTextDecoration::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_LetterSpacing = IfcSizeSelect::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_WordSpacing = IfcSizeSelect::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_TextTransform = IfcTextTransformation::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_LineHeight = IfcSizeSelect::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcTextStyleTextModel, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextStyleTextModel::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinate.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinate.cpp index 11c478177..948254487 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinate.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinate.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcTextureCoordinate::getStepParameter( std::stringstream& stream, void IFC4X3::IfcTextureCoordinate::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextureCoordinate, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Maps, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Maps, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcTextureCoordinate, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextureCoordinate::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateGenerator.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateGenerator.cpp index 3e2835297..b93fee179 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateGenerator.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateGenerator.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -28,10 +25,10 @@ void IFC4X3::IfcTextureCoordinateGenerator::getStepParameter( std::stringstream& void IFC4X3::IfcTextureCoordinateGenerator::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextureCoordinateGenerator, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Maps, map, errorStream ); - m_Mode = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readTypeOfRealList( args[2], m_Parameter ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Maps, map, errorStream );} + if( num_args > 1 ){m_Mode = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readTypeOfRealList( args[2], m_Parameter );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcTextureCoordinateGenerator, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextureCoordinateGenerator::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateIndices.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateIndices.cpp index ec6751e4d..e197090d1 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateIndices.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateIndices.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -43,9 +40,9 @@ void IFC4X3::IfcTextureCoordinateIndices::getStepParameter( std::stringstream& s void IFC4X3::IfcTextureCoordinateIndices::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextureCoordinateIndices, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readTypeOfIntegerList( args[0], m_TexCoordIndex ); - readEntityReference( args[1], m_TexCoordsOf, map, errorStream ); + if( num_args > 0 ){readTypeOfIntegerList( args[0], m_TexCoordIndex );} + if( num_args > 1 ){readEntityReference( args[1], m_TexCoordsOf, map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcTextureCoordinateIndices, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextureCoordinateIndices::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateIndicesWithVoids.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateIndicesWithVoids.cpp index 340129fdc..052538585 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateIndicesWithVoids.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureCoordinateIndicesWithVoids.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -45,10 +42,10 @@ void IFC4X3::IfcTextureCoordinateIndicesWithVoids::getStepParameter( std::string void IFC4X3::IfcTextureCoordinateIndicesWithVoids::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextureCoordinateIndicesWithVoids, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readTypeOfIntegerList( args[0], m_TexCoordIndex ); - readEntityReference( args[1], m_TexCoordsOf, map, errorStream ); - readTypeOfIntegerList2D( args[2], m_InnerTexCoordIndices ); + if( num_args > 0 ){readTypeOfIntegerList( args[0], m_TexCoordIndex );} + if( num_args > 1 ){readEntityReference( args[1], m_TexCoordsOf, map, errorStream );} + if( num_args > 2 ){readTypeOfIntegerList2D( args[2], m_InnerTexCoordIndices );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcTextureCoordinateIndicesWithVoids, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextureCoordinateIndicesWithVoids::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureMap.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureMap.cpp index a8203f7d5..85e883990 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureMap.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureMap.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -28,10 +25,10 @@ void IFC4X3::IfcTextureMap::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcTextureMap::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextureMap, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_Maps, map, errorStream ); - readEntityReferenceList( args[1], m_Vertices, map, errorStream ); - readEntityReference( args[2], m_MappedTo, map, errorStream ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_Maps, map, errorStream );} + if( num_args > 1 ){readEntityReferenceList( args[1], m_Vertices, map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_MappedTo, map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcTextureMap, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextureMap::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureVertex.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureVertex.cpp index b521aa0fa..e76b65b31 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureVertex.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureVertex.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcTextureVertex::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcTextureVertex::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextureVertex, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readTypeOfRealList( args[0], m_Coordinates ); + if( num_args > 0 ){readTypeOfRealList( args[0], m_Coordinates );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcTextureVertex, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextureVertex::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureVertexList.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureVertexList.cpp index 4bf4c9eb1..761c5bc07 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureVertexList.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTextureVertexList.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -22,8 +19,8 @@ void IFC4X3::IfcTextureVertexList::getStepParameter( std::stringstream& stream, void IFC4X3::IfcTextureVertexList::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTextureVertexList, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readTypeOfRealList2D( args[0], m_TexCoordsList ); + if( num_args > 0 ){readTypeOfRealList2D( args[0], m_TexCoordsList );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcTextureVertexList, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTextureVertexList::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcThirdOrderPolynomialSpiral.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcThirdOrderPolynomialSpiral.cpp index f392d079b..5f4692679 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcThirdOrderPolynomialSpiral.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcThirdOrderPolynomialSpiral.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -33,12 +30,12 @@ void IFC4X3::IfcThirdOrderPolynomialSpiral::getStepParameter( std::stringstream& void IFC4X3::IfcThirdOrderPolynomialSpiral::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcThirdOrderPolynomialSpiral, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream ); - m_CubicTerm = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_QuadraticTerm = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); - m_LinearTerm = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_ConstantTerm = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){m_Position = IfcAxis2Placement::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_CubicTerm = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_QuadraticTerm = IfcLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_LinearTerm = IfcLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ConstantTerm = IfcLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcThirdOrderPolynomialSpiral, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcThirdOrderPolynomialSpiral::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimePeriod.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimePeriod.cpp index 5d8f6ca51..1d72a55c8 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimePeriod.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimePeriod.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,9 +21,9 @@ void IFC4X3::IfcTimePeriod::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcTimePeriod::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTimePeriod, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_StartTime = IfcTime::createObjectFromSTEP( args[0], map, errorStream ); - m_EndTime = IfcTime::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){m_StartTime = IfcTime::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_EndTime = IfcTime::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcTimePeriod, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTimePeriod::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimeSeries.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimeSeries.cpp index fddcd058c..f0079feea 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimeSeries.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimeSeries.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -42,15 +39,15 @@ void IFC4X3::IfcTimeSeries::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcTimeSeries::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTimeSeries, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream ); - m_StartTime = IfcDateTime::createObjectFromSTEP( args[2], map, errorStream ); - m_EndTime = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream ); - m_TimeSeriesDataType = IfcTimeSeriesDataTypeEnum::createObjectFromSTEP( args[4], map, errorStream ); - m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[6], map, errorStream ); - m_Unit = IfcUnit::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_Description = IfcText::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_StartTime = IfcDateTime::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_EndTime = IfcDateTime::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_TimeSeriesDataType = IfcTimeSeriesDataTypeEnum::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_Unit = IfcUnit::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcTimeSeries, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTimeSeries::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimeSeriesValue.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimeSeriesValue.cpp index b0f2b3dd2..bca557cff 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimeSeriesValue.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTimeSeriesValue.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,8 +36,8 @@ void IFC4X3::IfcTimeSeriesValue::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcTimeSeriesValue::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTimeSeriesValue, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readSelectList( args[0], m_ListValues, map, errorStream ); + if( num_args > 0 ){readSelectList( args[0], m_ListValues, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcTimeSeriesValue, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTimeSeriesValue::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTopologicalRepresentationItem.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTopologicalRepresentationItem.cpp index 3ebf25c5d..b0ceed7d7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTopologicalRepresentationItem.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTopologicalRepresentationItem.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTopologyRepresentation.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTopologyRepresentation.cpp index 4d9294985..ee274ce1b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTopologyRepresentation.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTopologyRepresentation.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -34,11 +31,11 @@ void IFC4X3::IfcTopologyRepresentation::getStepParameter( std::stringstream& str void IFC4X3::IfcTopologyRepresentation::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTopologyRepresentation, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_ContextOfItems, map, errorStream ); - m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReferenceList( args[3], m_Items, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_ContextOfItems, map, errorStream );} + if( num_args > 1 ){m_RepresentationIdentifier = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_RepresentationType = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReferenceList( args[3], m_Items, map, errorStream );} + if( num_args != 4 ){ errorStream << "Wrong parameter count for entity IfcTopologyRepresentation, expecting 4, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTopologyRepresentation::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcToroidalSurface.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcToroidalSurface.cpp index dc8d69eb6..f84856672 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcToroidalSurface.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcToroidalSurface.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -29,10 +26,10 @@ void IFC4X3::IfcToroidalSurface::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcToroidalSurface::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 3 ){ std::stringstream err; err << "Wrong parameter count for entity IfcToroidalSurface, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Position, map, errorStream ); - m_MajorRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); - m_MinorRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Position, map, errorStream );} + if( num_args > 1 ){m_MajorRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_MinorRadius = IfcPositiveLengthMeasure::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args != 3 ){ errorStream << "Wrong parameter count for entity IfcToroidalSurface, expecting 3, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcToroidalSurface::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrackElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrackElement.cpp index 8bd27a242..76abe467b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrackElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrackElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcTrackElement::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcTrackElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTrackElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcTrackElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcTrackElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcTrackElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTrackElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrackElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrackElementType.cpp index 125cd2e72..c7ef43c0c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrackElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrackElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcTrackElementType::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcTrackElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTrackElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTrackElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTrackElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcTrackElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTrackElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransformer.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransformer.cpp index 5dac18686..9504737ea 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransformer.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransformer.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcTransformer::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcTransformer::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTransformer, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcTransformerTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcTransformerTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcTransformer, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTransformer::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransformerType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransformerType.cpp index ca4db7a80..1fd6cc268 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransformerType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransformerType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcTransformerType::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcTransformerType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTransformerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTransformerTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTransformerTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcTransformerType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTransformerType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportElement.cpp index 5178ba0c3..cbf364685 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcTransportElement::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcTransportElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTransportElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcTransportElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcTransportElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcTransportElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTransportElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportElementType.cpp index b834a5657..eeff2d30a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcTransportElementType::getStepParameter( std::stringstream& strea void IFC4X3::IfcTransportElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTransportElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTransportElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTransportElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcTransportElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTransportElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportationDevice.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportationDevice.cpp index 76ee35591..399894431 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportationDevice.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportationDevice.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -63,15 +60,15 @@ void IFC4X3::IfcTransportationDevice::getStepParameter( std::stringstream& strea void IFC4X3::IfcTransportationDevice::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTransportationDevice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcTransportationDevice, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTransportationDevice::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportationDeviceType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportationDeviceType.cpp index 5dca92618..9a2c4737a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportationDeviceType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTransportationDeviceType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -51,16 +48,16 @@ void IFC4X3::IfcTransportationDeviceType::getStepParameter( std::stringstream& s void IFC4X3::IfcTransportationDeviceType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTransportationDeviceType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcTransportationDeviceType, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTransportationDeviceType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrapeziumProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrapeziumProfileDef.cpp index 62a264df5..e1e3b35f9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrapeziumProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrapeziumProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -40,14 +37,14 @@ void IFC4X3::IfcTrapeziumProfileDef::getStepParameter( std::stringstream& stream void IFC4X3::IfcTrapeziumProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 7 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTrapeziumProfileDef, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_BottomXDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_TopXDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_YDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_TopXOffset = IfcLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_BottomXDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_TopXDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_YDim = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_TopXOffset = IfcLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args != 7 ){ errorStream << "Wrong parameter count for entity IfcTrapeziumProfileDef, expecting 7, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTrapeziumProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTriangulatedFaceSet.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTriangulatedFaceSet.cpp index eeceda476..4a46ef45b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTriangulatedFaceSet.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTriangulatedFaceSet.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,10 +21,10 @@ void IFC4X3::IfcTriangulatedFaceSet::getStepLine( std::stringstream& stream ) co stream << "#" << m_tag << "= IFCTRIANGULATEDFACESET" << "("; if( m_Coordinates ) { stream << "#" << m_Coordinates->m_tag; } else { stream << "$"; } stream << ","; - if( m_Closed ) { m_Closed->getStepParameter( stream ); } else { stream << "$"; } - stream << ","; writeTypeOfRealList2D( stream, m_Normals, true ); stream << ","; + if( m_Closed ) { m_Closed->getStepParameter( stream ); } else { stream << "$"; } + stream << ","; writeTypeOfIntList2D( stream, m_CoordIndex, false ); stream << ","; if( m_PnIndex.size() > 0 ) @@ -58,12 +55,12 @@ void IFC4X3::IfcTriangulatedFaceSet::getStepParameter( std::stringstream& stream void IFC4X3::IfcTriangulatedFaceSet::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTriangulatedFaceSet, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Coordinates, map, errorStream ); - m_Closed = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - readTypeOfRealList2D( args[2], m_Normals ); - readTypeOfIntegerList2D( args[3], m_CoordIndex ); - readTypeOfIntegerList( args[4], m_PnIndex ); + if( num_args > 0 ){readEntityReference( args[0], m_Coordinates, map, errorStream );} + if( num_args > 1 ){readTypeOfRealList2D( args[1], m_Normals );} + if( num_args > 2 ){m_Closed = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readTypeOfIntegerList2D( args[3], m_CoordIndex );} + if( num_args > 4 ){readTypeOfIntegerList( args[4], m_PnIndex );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcTriangulatedFaceSet, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTriangulatedFaceSet::getAttributes( std::vector > >& vec_attributes ) const { @@ -77,6 +74,7 @@ void IFC4X3::IfcTriangulatedFaceSet::getAttributes( std::vectorm_vec.push_back( inner_vector ); std::copy(vec_ii.begin(), vec_ii.end(), std::back_inserter(inner_vector->m_vec)); } + vec_attributes.emplace_back( std::make_pair( "Closed", m_Closed ) ); shared_ptr CoordIndex_vector( new AttributeObjectVector() ); vec_attributes.emplace_back( std::make_pair( "CoordIndex", CoordIndex_vector ) ); for( size_t ii=0; ii -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,10 +22,10 @@ void IFC4X3::IfcTriangulatedIrregularNetwork::getStepLine( std::stringstream& st stream << "#" << m_tag << "= IFCTRIANGULATEDIRREGULARNETWORK" << "("; if( m_Coordinates ) { stream << "#" << m_Coordinates->m_tag; } else { stream << "$"; } stream << ","; - if( m_Closed ) { m_Closed->getStepParameter( stream ); } else { stream << "$"; } - stream << ","; writeTypeOfRealList2D( stream, m_Normals, true ); stream << ","; + if( m_Closed ) { m_Closed->getStepParameter( stream ); } else { stream << "$"; } + stream << ","; writeTypeOfIntList2D( stream, m_CoordIndex, false ); stream << ","; if( m_PnIndex.size() > 0 ) @@ -61,13 +58,13 @@ void IFC4X3::IfcTriangulatedIrregularNetwork::getStepParameter( std::stringstrea void IFC4X3::IfcTriangulatedIrregularNetwork::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTriangulatedIrregularNetwork, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Coordinates, map, errorStream ); - m_Closed = IfcBoolean::createObjectFromSTEP( args[1], map, errorStream ); - readTypeOfRealList2D( args[2], m_Normals ); - readTypeOfIntegerList2D( args[3], m_CoordIndex ); - readTypeOfIntegerList( args[4], m_PnIndex ); - readTypeOfIntegerList( args[5], m_Flags ); + if( num_args > 0 ){readEntityReference( args[0], m_Coordinates, map, errorStream );} + if( num_args > 1 ){readTypeOfRealList2D( args[1], m_Normals );} + if( num_args > 2 ){m_Closed = IfcBoolean::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readTypeOfIntegerList2D( args[3], m_CoordIndex );} + if( num_args > 4 ){readTypeOfIntegerList( args[4], m_PnIndex );} + if( num_args > 5 ){readTypeOfIntegerList( args[5], m_Flags );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcTriangulatedIrregularNetwork, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTriangulatedIrregularNetwork::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrimmedCurve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrimmedCurve.cpp index e41a018c4..90d73867f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrimmedCurve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTrimmedCurve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -69,12 +66,12 @@ void IFC4X3::IfcTrimmedCurve::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcTrimmedCurve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 5 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTrimmedCurve, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_BasisCurve, map, errorStream ); - readSelectList( args[1], m_Trim1, map, errorStream ); - readSelectList( args[2], m_Trim2, map, errorStream ); - m_SenseAgreement = IfcBoolean::createObjectFromSTEP( args[3], map, errorStream ); - m_MasterRepresentation = IfcTrimmingPreference::createObjectFromSTEP( args[4], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_BasisCurve, map, errorStream );} + if( num_args > 1 ){readSelectList( args[1], m_Trim1, map, errorStream );} + if( num_args > 2 ){readSelectList( args[2], m_Trim2, map, errorStream );} + if( num_args > 3 ){m_SenseAgreement = IfcBoolean::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_MasterRepresentation = IfcTrimmingPreference::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args != 5 ){ errorStream << "Wrong parameter count for entity IfcTrimmedCurve, expecting 5, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTrimmedCurve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTubeBundle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTubeBundle.cpp index cf68a14e0..06b3b87a0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTubeBundle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTubeBundle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcTubeBundle::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcTubeBundle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTubeBundle, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcTubeBundleTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcTubeBundleTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcTubeBundle, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTubeBundle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTubeBundleType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTubeBundleType.cpp index b519cb8b1..5c3c3a1d0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTubeBundleType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTubeBundleType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcTubeBundleType::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcTubeBundleType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTubeBundleType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcTubeBundleTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcTubeBundleTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcTubeBundleType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTubeBundleType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeObject.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeObject.cpp index 87e95408a..34304bd14 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeObject.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeObject.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -43,13 +40,13 @@ void IFC4X3::IfcTypeObject::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcTypeObject::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTypeObject, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcTypeObject, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTypeObject::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeProcess.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeProcess.cpp index 3dfa6925d..91eb98147 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeProcess.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeProcess.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -50,16 +47,16 @@ void IFC4X3::IfcTypeProcess::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcTypeProcess::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTypeProcess, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ProcessType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ProcessType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcTypeProcess, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTypeProcess::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeProduct.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeProduct.cpp index 6b1565e55..f191eba84 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeProduct.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeProduct.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -49,15 +46,15 @@ void IFC4X3::IfcTypeProduct::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcTypeProduct::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 8 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTypeProduct, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args != 8 ){ errorStream << "Wrong parameter count for entity IfcTypeProduct, expecting 8, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTypeProduct::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeResource.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeResource.cpp index dd49bfeb4..f541c48fc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeResource.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcTypeResource.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -50,16 +47,16 @@ void IFC4X3::IfcTypeResource::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcTypeResource::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcTypeResource, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream ); - m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream ); - m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_LongDescription = IfcText::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ResourceType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcTypeResource, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcTypeResource::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUShapeProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUShapeProfileDef.cpp index 889498a21..dcc9a9903 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUShapeProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUShapeProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -47,17 +44,17 @@ void IFC4X3::IfcUShapeProfileDef::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcUShapeProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcUShapeProfileDef, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_FlangeWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_WebThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_FlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_EdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_FlangeSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_FlangeWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_WebThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_FlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_EdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_FlangeSlope = IfcPlaneAngleMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcUShapeProfileDef, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcUShapeProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitAssignment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitAssignment.cpp index 270a20160..1b0a2b833 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitAssignment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitAssignment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -39,8 +36,8 @@ void IFC4X3::IfcUnitAssignment::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcUnitAssignment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcUnitAssignment, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readSelectList( args[0], m_Units, map, errorStream ); + if( num_args > 0 ){readSelectList( args[0], m_Units, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcUnitAssignment, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcUnitAssignment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryControlElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryControlElement.cpp index 47d1dde0a..e4908e8e4 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryControlElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryControlElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcUnitaryControlElement::getStepParameter( std::stringstream& stre void IFC4X3::IfcUnitaryControlElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcUnitaryControlElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcUnitaryControlElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcUnitaryControlElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcUnitaryControlElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcUnitaryControlElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryControlElementType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryControlElementType.cpp index 03b7a9c07..43aff0bd2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryControlElementType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryControlElementType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcUnitaryControlElementType::getStepParameter( std::stringstream& void IFC4X3::IfcUnitaryControlElementType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcUnitaryControlElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcUnitaryControlElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcUnitaryControlElementTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcUnitaryControlElementType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcUnitaryControlElementType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryEquipment.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryEquipment.cpp index f58a54e6e..80147d630 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryEquipment.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryEquipment.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcUnitaryEquipment::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcUnitaryEquipment::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcUnitaryEquipment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcUnitaryEquipmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcUnitaryEquipmentTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcUnitaryEquipment, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcUnitaryEquipment::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryEquipmentType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryEquipmentType.cpp index 182b0d774..cc4a205a5 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryEquipmentType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcUnitaryEquipmentType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcUnitaryEquipmentType::getStepParameter( std::stringstream& strea void IFC4X3::IfcUnitaryEquipmentType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcUnitaryEquipmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcUnitaryEquipmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcUnitaryEquipmentTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcUnitaryEquipmentType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcUnitaryEquipmentType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcValve.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcValve.cpp index 45adfb0c4..33f7f8633 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcValve.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcValve.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcValve::getStepParameter( std::stringstream& stream, bool /*is_se void IFC4X3::IfcValve::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcValve, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcValveTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcValveTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcValve, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcValve::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcValveType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcValveType.cpp index 9cf40ddfb..784e39deb 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcValveType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcValveType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcValveType::getStepParameter( std::stringstream& stream, bool /*i void IFC4X3::IfcValveType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcValveType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcValveTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcValveTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcValveType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcValveType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVector.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVector.cpp index 9822ef431..267cb8ba2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVector.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVector.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -27,9 +24,9 @@ void IFC4X3::IfcVector::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcVector::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVector, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_Orientation, map, errorStream ); - m_Magnitude = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_Orientation, map, errorStream );} + if( num_args > 1 ){m_Magnitude = IfcLengthMeasure::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcVector, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVector::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVehicle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVehicle.cpp index 640ecfc88..b23fae2d6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVehicle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVehicle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcVehicle::getStepParameter( std::stringstream& stream, bool /*is_ void IFC4X3::IfcVehicle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVehicle, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcVehicleTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcVehicleTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcVehicle, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVehicle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVehicleType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVehicleType.cpp index fc09df77d..9c2e82f65 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVehicleType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVehicleType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcVehicleType::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcVehicleType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVehicleType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcVehicleTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcVehicleTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcVehicleType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVehicleType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertex.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertex.cpp index cc388e2cd..22c413f37 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertex.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertex.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertexLoop.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertexLoop.cpp index 21abdd486..15e04e461 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertexLoop.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertexLoop.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcVertexLoop::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcVertexLoop::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVertexLoop, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_LoopVertex, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_LoopVertex, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcVertexLoop, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVertexLoop::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertexPoint.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertexPoint.cpp index ce1535c05..70430011c 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertexPoint.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVertexPoint.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -24,8 +21,8 @@ void IFC4X3::IfcVertexPoint::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcVertexPoint::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 1 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVertexPoint, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReference( args[0], m_VertexGeometry, map, errorStream ); + if( num_args > 0 ){readEntityReference( args[0], m_VertexGeometry, map, errorStream );} + if( num_args != 1 ){ errorStream << "Wrong parameter count for entity IfcVertexPoint, expecting 1, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVertexPoint::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationDamper.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationDamper.cpp index 9e83a5a6f..84b679ed9 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationDamper.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationDamper.cpp @@ -1,13 +1,9 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" -#include "ifcpp/IFC4X3/include/IfcDamperTypeEnum.h" #include "ifcpp/IFC4X3/include/IfcGloballyUniqueId.h" #include "ifcpp/IFC4X3/include/IfcIdentifier.h" #include "ifcpp/IFC4X3/include/IfcLabel.h" @@ -37,6 +33,7 @@ #include "ifcpp/IFC4X3/include/IfcRelVoidsElement.h" #include "ifcpp/IFC4X3/include/IfcText.h" #include "ifcpp/IFC4X3/include/IfcVibrationDamper.h" +#include "ifcpp/IFC4X3/include/IfcVibrationDamperTypeEnum.h" // ENTITY IfcVibrationDamper IFC4X3::IfcVibrationDamper::IfcVibrationDamper( int tag ) { m_tag = tag; } @@ -66,16 +63,16 @@ void IFC4X3::IfcVibrationDamper::getStepParameter( std::stringstream& stream, bo void IFC4X3::IfcVibrationDamper::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVibrationDamper, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcDamperTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcVibrationDamperTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcVibrationDamper, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVibrationDamper::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationDamperType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationDamperType.cpp index 0417e9f3b..be4ff43d6 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationDamperType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationDamperType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcVibrationDamperType::getStepParameter( std::stringstream& stream void IFC4X3::IfcVibrationDamperType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVibrationDamperType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcVibrationDamperTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcVibrationDamperTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcVibrationDamperType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVibrationDamperType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationIsolator.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationIsolator.cpp index 356268a15..3454ff767 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationIsolator.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationIsolator.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcVibrationIsolator::getStepParameter( std::stringstream& stream, void IFC4X3::IfcVibrationIsolator::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVibrationIsolator, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcVibrationIsolatorTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcVibrationIsolatorTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcVibrationIsolator, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVibrationIsolator::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationIsolatorType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationIsolatorType.cpp index c5abeaa32..75c000bca 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationIsolatorType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVibrationIsolatorType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcVibrationIsolatorType::getStepParameter( std::stringstream& stre void IFC4X3::IfcVibrationIsolatorType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVibrationIsolatorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcVibrationIsolatorTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcVibrationIsolatorTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcVibrationIsolatorType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVibrationIsolatorType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVirtualElement.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVirtualElement.cpp index 9fb9e555a..b42a5151b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVirtualElement.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVirtualElement.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcVirtualElement::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcVirtualElement::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVirtualElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcVirtualElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcVirtualElementTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcVirtualElement, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVirtualElement::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVirtualGridIntersection.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVirtualGridIntersection.cpp index 28ffd7d10..3dd207ddc 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVirtualGridIntersection.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVirtualGridIntersection.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -25,9 +22,9 @@ void IFC4X3::IfcVirtualGridIntersection::getStepParameter( std::stringstream& st void IFC4X3::IfcVirtualGridIntersection::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 2 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVirtualGridIntersection, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - readEntityReferenceList( args[0], m_IntersectingAxes, map, errorStream ); - readTypeOfRealList( args[1], m_OffsetDistances ); + if( num_args > 0 ){readEntityReferenceList( args[0], m_IntersectingAxes, map, errorStream );} + if( num_args > 1 ){readTypeOfRealList( args[1], m_OffsetDistances );} + if( num_args != 2 ){ errorStream << "Wrong parameter count for entity IfcVirtualGridIntersection, expecting 2, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVirtualGridIntersection::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVoidingFeature.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVoidingFeature.cpp index 1f7483aa4..d370d5399 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVoidingFeature.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcVoidingFeature.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcVoidingFeature::getStepParameter( std::stringstream& stream, boo void IFC4X3::IfcVoidingFeature::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcVoidingFeature, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcVoidingFeatureTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcVoidingFeatureTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcVoidingFeature, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcVoidingFeature::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWall.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWall.cpp index feb12139e..0c6cfce4b 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWall.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWall.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcWall::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcWall::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWall, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcWallTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcWallTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcWall, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWall::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWallStandardCase.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWallStandardCase.cpp index d6cc4a930..0fbbb9e67 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWallStandardCase.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWallStandardCase.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -66,16 +63,16 @@ void IFC4X3::IfcWallStandardCase::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcWallStandardCase::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWallStandardCase, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcWallTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcWallTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcWallStandardCase, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWallStandardCase::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWallType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWallType.cpp index 653fb23bd..fa9e5f78f 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWallType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWallType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcWallType::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcWallType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWallType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcWallTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcWallTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcWallType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWallType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWasteTerminal.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWasteTerminal.cpp index fddbdd172..ee17852e7 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWasteTerminal.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWasteTerminal.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -68,16 +65,16 @@ void IFC4X3::IfcWasteTerminal::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcWasteTerminal::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWasteTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_PredefinedType = IfcWasteTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcWasteTerminalTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcWasteTerminal, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWasteTerminal::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWasteTerminalType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWasteTerminalType.cpp index 8e4b75aac..3c52eeb11 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWasteTerminalType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWasteTerminalType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -54,17 +51,17 @@ void IFC4X3::IfcWasteTerminalType::getStepParameter( std::stringstream& stream, void IFC4X3::IfcWasteTerminalType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 10 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWasteTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcWasteTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcWasteTerminalTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args != 10 ){ errorStream << "Wrong parameter count for entity IfcWasteTerminalType, expecting 10, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWasteTerminalType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindow.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindow.cpp index 90b2bc279..65bd4e5aa 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindow.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindow.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -76,20 +73,20 @@ void IFC4X3::IfcWindow::getStepParameter( std::stringstream& stream, bool /*is_s void IFC4X3::IfcWindow::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 13 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWindow, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReference( args[5], m_ObjectPlacement, map, errorStream ); - readEntityReference( args[6], m_Representation, map, errorStream ); - m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream ); - m_OverallHeight = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_OverallWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_PredefinedType = IfcWindowTypeEnum::createObjectFromSTEP( args[10], map, errorStream ); - m_PartitioningType = IfcWindowTypePartitioningEnum::createObjectFromSTEP( args[11], map, errorStream ); - m_UserDefinedPartitioningType = IfcLabel::createObjectFromSTEP( args[12], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReference( args[5], m_ObjectPlacement, map, errorStream );} + if( num_args > 6 ){readEntityReference( args[6], m_Representation, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcIdentifier::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_OverallHeight = IfcPositiveLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_OverallWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_PredefinedType = IfcWindowTypeEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_PartitioningType = IfcWindowTypePartitioningEnum::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_UserDefinedPartitioningType = IfcLabel::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args != 13 ){ errorStream << "Wrong parameter count for entity IfcWindow, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWindow::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowLiningProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowLiningProperties.cpp index fc6154efb..80d81215e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowLiningProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowLiningProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,23 +62,23 @@ void IFC4X3::IfcWindowLiningProperties::getStepParameter( std::stringstream& str void IFC4X3::IfcWindowLiningProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 16 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWindowLiningProperties, expecting 16, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_LiningDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_LiningThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_TransomThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_MullionThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_FirstTransomOffset = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[8], map, errorStream ); - m_SecondTransomOffset = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[9], map, errorStream ); - m_FirstMullionOffset = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[10], map, errorStream ); - m_SecondMullionOffset = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[11], map, errorStream ); - readEntityReference( args[12], m_ShapeAspectStyle, map, errorStream ); - m_LiningOffset = IfcLengthMeasure::createObjectFromSTEP( args[13], map, errorStream ); - m_LiningToPanelOffsetX = IfcLengthMeasure::createObjectFromSTEP( args[14], map, errorStream ); - m_LiningToPanelOffsetY = IfcLengthMeasure::createObjectFromSTEP( args[15], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_LiningDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LiningThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_TransomThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_MullionThickness = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_FirstTransomOffset = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_SecondTransomOffset = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_FirstMullionOffset = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_SecondMullionOffset = IfcNormalisedRatioMeasure::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){readEntityReference( args[12], m_ShapeAspectStyle, map, errorStream );} + if( num_args > 13 ){m_LiningOffset = IfcLengthMeasure::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args > 14 ){m_LiningToPanelOffsetX = IfcLengthMeasure::createObjectFromSTEP( args[14], map, errorStream );} + if( num_args > 15 ){m_LiningToPanelOffsetY = IfcLengthMeasure::createObjectFromSTEP( args[15], map, errorStream );} + if( num_args != 16 ){ errorStream << "Wrong parameter count for entity IfcWindowLiningProperties, expecting 16, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWindowLiningProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowPanelProperties.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowPanelProperties.cpp index a37f756c4..bf8abb62e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowPanelProperties.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowPanelProperties.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -50,16 +47,16 @@ void IFC4X3::IfcWindowPanelProperties::getStepParameter( std::stringstream& stre void IFC4X3::IfcWindowPanelProperties::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWindowPanelProperties, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_OperationType = IfcWindowPanelOperationEnum::createObjectFromSTEP( args[4], map, errorStream ); - m_PanelPosition = IfcWindowPanelPositionEnum::createObjectFromSTEP( args[5], map, errorStream ); - m_FrameDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_FrameThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - readEntityReference( args[8], m_ShapeAspectStyle, map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_OperationType = IfcWindowPanelOperationEnum::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_PanelPosition = IfcWindowPanelPositionEnum::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_FrameDepth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_FrameThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){readEntityReference( args[8], m_ShapeAspectStyle, map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcWindowPanelProperties, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWindowPanelProperties::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowStyle.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowStyle.cpp index 474e178c9..afa3cc8d0 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowStyle.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowStyle.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -60,19 +57,19 @@ void IFC4X3::IfcWindowStyle::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcWindowStyle::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 12 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWindowStyle, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ConstructionType = IfcWindowStyleConstructionEnum::createObjectFromSTEP( args[8], map, errorStream ); - m_OperationType = IfcWindowStyleOperationEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_ParameterTakesPrecedence = IfcBoolean::createObjectFromSTEP( args[10], map, errorStream ); - m_Sizeable = IfcBoolean::createObjectFromSTEP( args[11], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ConstructionType = IfcWindowStyleConstructionEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_OperationType = IfcWindowStyleOperationEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_ParameterTakesPrecedence = IfcBoolean::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_Sizeable = IfcBoolean::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args != 12 ){ errorStream << "Wrong parameter count for entity IfcWindowStyle, expecting 12, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWindowStyle::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowType.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowType.cpp index f22632f32..8a5d0dc63 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowType.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWindowType.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -62,20 +59,20 @@ void IFC4X3::IfcWindowType::getStepParameter( std::stringstream& stream, bool /* void IFC4X3::IfcWindowType::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 13 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWindowType, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream ); - readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream ); - readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream ); - m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream ); - m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_PredefinedType = IfcWindowTypeEnum::createObjectFromSTEP( args[9], map, errorStream ); - m_PartitioningType = IfcWindowTypePartitioningEnum::createObjectFromSTEP( args[10], map, errorStream ); - m_ParameterTakesPrecedence = IfcBoolean::createObjectFromSTEP( args[11], map, errorStream ); - m_UserDefinedPartitioningType = IfcLabel::createObjectFromSTEP( args[12], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ApplicableOccurrence = IfcIdentifier::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){readEntityReferenceList( args[5], m_HasPropertySets, map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_RepresentationMaps, map, errorStream );} + if( num_args > 7 ){m_Tag = IfcLabel::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_ElementType = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_PredefinedType = IfcWindowTypeEnum::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_PartitioningType = IfcWindowTypePartitioningEnum::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_ParameterTakesPrecedence = IfcBoolean::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_UserDefinedPartitioningType = IfcLabel::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args != 13 ){ errorStream << "Wrong parameter count for entity IfcWindowType, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWindowType::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkCalendar.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkCalendar.cpp index 1747f84f5..7262fbf2a 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkCalendar.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkCalendar.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -53,16 +50,16 @@ void IFC4X3::IfcWorkCalendar::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcWorkCalendar::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWorkCalendar, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - readEntityReferenceList( args[6], m_WorkingTimes, map, errorStream ); - readEntityReferenceList( args[7], m_ExceptionTimes, map, errorStream ); - m_PredefinedType = IfcWorkCalendarTypeEnum::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){readEntityReferenceList( args[6], m_WorkingTimes, map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_ExceptionTimes, map, errorStream );} + if( num_args > 8 ){m_PredefinedType = IfcWorkCalendarTypeEnum::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcWorkCalendar, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWorkCalendar::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkControl.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkControl.cpp index d39e98c04..b55b1c7ae 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkControl.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkControl.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -62,20 +59,20 @@ void IFC4X3::IfcWorkControl::getStepParameter( std::stringstream& stream, bool / void IFC4X3::IfcWorkControl::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 13 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWorkControl, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_CreationDate = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_Creators, map, errorStream ); - m_Purpose = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_Duration = IfcDuration::createObjectFromSTEP( args[9], map, errorStream ); - m_TotalFloat = IfcDuration::createObjectFromSTEP( args[10], map, errorStream ); - m_StartTime = IfcDateTime::createObjectFromSTEP( args[11], map, errorStream ); - m_FinishTime = IfcDateTime::createObjectFromSTEP( args[12], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_CreationDate = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_Creators, map, errorStream );} + if( num_args > 8 ){m_Purpose = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_Duration = IfcDuration::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_TotalFloat = IfcDuration::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_StartTime = IfcDateTime::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_FinishTime = IfcDateTime::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args != 13 ){ errorStream << "Wrong parameter count for entity IfcWorkControl, expecting 13, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWorkControl::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkPlan.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkPlan.cpp index b21bebd07..86563f720 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkPlan.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkPlan.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,21 +62,21 @@ void IFC4X3::IfcWorkPlan::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcWorkPlan::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 14 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWorkPlan, expecting 14, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_CreationDate = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_Creators, map, errorStream ); - m_Purpose = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_Duration = IfcDuration::createObjectFromSTEP( args[9], map, errorStream ); - m_TotalFloat = IfcDuration::createObjectFromSTEP( args[10], map, errorStream ); - m_StartTime = IfcDateTime::createObjectFromSTEP( args[11], map, errorStream ); - m_FinishTime = IfcDateTime::createObjectFromSTEP( args[12], map, errorStream ); - m_PredefinedType = IfcWorkPlanTypeEnum::createObjectFromSTEP( args[13], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_CreationDate = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_Creators, map, errorStream );} + if( num_args > 8 ){m_Purpose = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_Duration = IfcDuration::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_TotalFloat = IfcDuration::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_StartTime = IfcDateTime::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_FinishTime = IfcDateTime::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_PredefinedType = IfcWorkPlanTypeEnum::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args != 14 ){ errorStream << "Wrong parameter count for entity IfcWorkPlan, expecting 14, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWorkPlan::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkSchedule.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkSchedule.cpp index 2554c3def..4c23cbbae 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkSchedule.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkSchedule.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -65,21 +62,21 @@ void IFC4X3::IfcWorkSchedule::getStepParameter( std::stringstream& stream, bool void IFC4X3::IfcWorkSchedule::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 14 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWorkSchedule, expecting 14, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream ); - m_CreationDate = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream ); - readEntityReferenceList( args[7], m_Creators, map, errorStream ); - m_Purpose = IfcLabel::createObjectFromSTEP( args[8], map, errorStream ); - m_Duration = IfcDuration::createObjectFromSTEP( args[9], map, errorStream ); - m_TotalFloat = IfcDuration::createObjectFromSTEP( args[10], map, errorStream ); - m_StartTime = IfcDateTime::createObjectFromSTEP( args[11], map, errorStream ); - m_FinishTime = IfcDateTime::createObjectFromSTEP( args[12], map, errorStream ); - m_PredefinedType = IfcWorkScheduleTypeEnum::createObjectFromSTEP( args[13], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_Identification = IfcIdentifier::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_CreationDate = IfcDateTime::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){readEntityReferenceList( args[7], m_Creators, map, errorStream );} + if( num_args > 8 ){m_Purpose = IfcLabel::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args > 9 ){m_Duration = IfcDuration::createObjectFromSTEP( args[9], map, errorStream );} + if( num_args > 10 ){m_TotalFloat = IfcDuration::createObjectFromSTEP( args[10], map, errorStream );} + if( num_args > 11 ){m_StartTime = IfcDateTime::createObjectFromSTEP( args[11], map, errorStream );} + if( num_args > 12 ){m_FinishTime = IfcDateTime::createObjectFromSTEP( args[12], map, errorStream );} + if( num_args > 13 ){m_PredefinedType = IfcWorkScheduleTypeEnum::createObjectFromSTEP( args[13], map, errorStream );} + if( num_args != 14 ){ errorStream << "Wrong parameter count for entity IfcWorkSchedule, expecting 14, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWorkSchedule::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkTime.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkTime.cpp index a06fa6995..fa88e56ab 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkTime.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcWorkTime.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -35,13 +32,13 @@ void IFC4X3::IfcWorkTime::getStepParameter( std::stringstream& stream, bool /*is void IFC4X3::IfcWorkTime::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcWorkTime, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream ); - m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream ); - m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - readEntityReference( args[3], m_RecurrencePattern, map, errorStream ); - m_StartDate = IfcDate::createObjectFromSTEP( args[4], map, errorStream ); - m_FinishDate = IfcDate::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_Name = IfcLabel::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_DataOrigin = IfcDataOriginEnum::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){m_UserDefinedDataOrigin = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){readEntityReference( args[3], m_RecurrencePattern, map, errorStream );} + if( num_args > 4 ){m_StartDate = IfcDate::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_FinishDate = IfcDate::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcWorkTime, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcWorkTime::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcZShapeProfileDef.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcZShapeProfileDef.cpp index 7f61786c3..0c3f8b81e 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcZShapeProfileDef.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcZShapeProfileDef.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -44,16 +41,16 @@ void IFC4X3::IfcZShapeProfileDef::getStepParameter( std::stringstream& stream, b void IFC4X3::IfcZShapeProfileDef::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 9 ){ std::stringstream err; err << "Wrong parameter count for entity IfcZShapeProfileDef, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream ); - m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream ); - readEntityReference( args[2], m_Position, map, errorStream ); - m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream ); - m_FlangeWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream ); - m_WebThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream ); - m_FlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream ); - m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream ); - m_EdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[8], map, errorStream ); + if( num_args > 0 ){m_ProfileType = IfcProfileTypeEnum::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){m_ProfileName = IfcLabel::createObjectFromSTEP( args[1], map, errorStream );} + if( num_args > 2 ){readEntityReference( args[2], m_Position, map, errorStream );} + if( num_args > 3 ){m_Depth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_FlangeWidth = IfcPositiveLengthMeasure::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_WebThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args > 6 ){m_FlangeThickness = IfcPositiveLengthMeasure::createObjectFromSTEP( args[6], map, errorStream );} + if( num_args > 7 ){m_FilletRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[7], map, errorStream );} + if( num_args > 8 ){m_EdgeRadius = IfcNonNegativeLengthMeasure::createObjectFromSTEP( args[8], map, errorStream );} + if( num_args != 9 ){ errorStream << "Wrong parameter count for entity IfcZShapeProfileDef, expecting 9, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcZShapeProfileDef::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcZone.cpp b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcZone.cpp index 9870cfd59..7cd73d5f2 100644 --- a/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcZone.cpp +++ b/IfcPlusPlus/src/ifcpp/IFC4X3/lib/IfcZone.cpp @@ -1,7 +1,4 @@ /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ -#include -#include - #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" @@ -46,13 +43,13 @@ void IFC4X3::IfcZone::getStepParameter( std::stringstream& stream, bool /*is_sel void IFC4X3::IfcZone::readStepArguments( const std::vector& args, const std::map >& map, std::stringstream& errorStream ) { const size_t num_args = args.size(); - if( num_args != 6 ){ std::stringstream err; err << "Wrong parameter count for entity IfcZone, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; throw BuildingException( err.str().c_str() ); } - m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream ); - readEntityReference( args[1], m_OwnerHistory, map, errorStream ); - m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream ); - m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream ); - m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream ); - m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream ); + if( num_args > 0 ){m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map, errorStream );} + if( num_args > 1 ){readEntityReference( args[1], m_OwnerHistory, map, errorStream );} + if( num_args > 2 ){m_Name = IfcLabel::createObjectFromSTEP( args[2], map, errorStream );} + if( num_args > 3 ){m_Description = IfcText::createObjectFromSTEP( args[3], map, errorStream );} + if( num_args > 4 ){m_ObjectType = IfcLabel::createObjectFromSTEP( args[4], map, errorStream );} + if( num_args > 5 ){m_LongName = IfcLabel::createObjectFromSTEP( args[5], map, errorStream );} + if( num_args != 6 ){ errorStream << "Wrong parameter count for entity IfcZone, expecting 6, having " << num_args << ". Entity ID: " << m_tag << std::endl; } } void IFC4X3::IfcZone::getAttributes( std::vector > >& vec_attributes ) const { diff --git a/IfcPlusPlus/src/ifcpp/geometry/CSG_Adapter.h b/IfcPlusPlus/src/ifcpp/geometry/CSG_Adapter.h index b7a9d2624..bd1d2a97e 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/CSG_Adapter.h +++ b/IfcPlusPlus/src/ifcpp/geometry/CSG_Adapter.h @@ -26,9 +26,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #include "IncludeCarveHeaders.h" #include "MeshOps.h" -#include "MeshUtils.h" +#include "MeshOpsDebug.h" #include "GeometryInputData.h" +//#define _USE_MANIFOLD_CSG #ifdef _USE_MANIFOLD_CSG #include "CSG_Manifold.h" #endif @@ -38,33 +39,8 @@ static int csg_compute_count = 0; #endif #define _USE_CLASSIFY_NORMAL - namespace CSG_Adapter { - //class ScopedEpsilonSetter - //{ - //public: - // ScopedEpsilonSetter( double CARVE_EPSILON) - // { - // m_epsPrevious = CARVE_EPSILON; - // } - - // ~ScopedEpsilonSetter() - // { - // if( m_epsPrevious != 1.0 ) - // { - // carve::setEpsilon(m_epsPrevious, false); - // } - // } - - // void setEpsilonValue( double epsilonToSet ) - // { - // carve::setEpsilon(epsilonToSet, false); - // } - - // double m_epsPrevious = 1.0; - //}; - inline void assignResultOnFail(const shared_ptr >& op1, const shared_ptr >& op2, const carve::csg::CSG::OP operation, shared_ptr >& result) { if( operation == carve::csg::CSG::A_MINUS_B ) @@ -81,7 +57,7 @@ namespace CSG_Adapter } } - inline bool checkBoundinbBoxIntersection(const shared_ptr >& op1, const shared_ptr >& op2, const carve::csg::CSG::OP operation) + inline bool checkBoundinbBoxIntersection(const carve::geom::aabb<3>& bbox1, const carve::geom::aabb<3>& bbox2, const carve::csg::CSG::OP operation, double eps) { if( operation == carve::csg::CSG::UNION ) { @@ -89,80 +65,14 @@ namespace CSG_Adapter return true; } - carve::geom::aabb<3> bbox1 = op1->getAABB(); - carve::geom::aabb<3> bbox2 = op2->getAABB(); - double xmin1 = bbox1.pos.x - bbox1.extent.x; - double xmin2 = bbox2.pos.x - bbox2.extent.x; - double xmax1 = bbox1.pos.x + bbox1.extent.x; - double xmax2 = bbox2.pos.x + bbox2.extent.x; - if( xmin1 >= xmax2 ) - { - return false; - } - if( xmax1 <= xmin2 ) - { - return false; - } - - double ymin1 = bbox1.pos.y - bbox1.extent.y; - double ymin2 = bbox2.pos.y - bbox2.extent.y; - double ymax1 = bbox1.pos.y + bbox1.extent.y; - double ymax2 = bbox2.pos.y + bbox2.extent.y; - if( ymin1 >= ymax2 ) - { - return false; - } - if( ymax1 <= ymin2 ) - { - return false; - } - - double zmin1 = bbox1.pos.z - bbox1.extent.z; - double zmin2 = bbox2.pos.z - bbox2.extent.z; - double zmax1 = bbox1.pos.z + bbox1.extent.z; - double zmax2 = bbox2.pos.z + bbox2.extent.z; - if( zmin1 >= zmax2 ) - { - return false; - } - if( zmax1 <= zmin2 ) - { - return false; - } - - double volume1 = MeshUtils::getMeshVolume(op1.get()); - double volume2 = MeshUtils::getMeshVolume(op2.get()); - - if( std::abs(volume1) < 0.005 ) - { - double maxExtent = std::max(bbox1.extent.x, std::max(bbox1.extent.y, bbox1.extent.z)); - if( maxExtent < 0.01 ) - { -#ifdef _DEBUG - glm::vec4 color(0.7, 0.7, 0.7, 1.0); - GeomDebugDump::moveOffset(0.2); - GeomDebugDump::dumpLocalCoordinateSystem(); - GeomDebugDump::moveOffset(op1); - dumpMeshset(op1, color, false); -#endif - - return false; - } - } - if( std::abs(volume2) < 0.005 ) - { - double maxExtent = std::max(bbox2.extent.x, std::max(bbox2.extent.y, bbox2.extent.z)); - if( maxExtent < 0.01 ) - { - return false; - } - } - - return true; + double deltBbox = bbox1.maxAxisSeparation(bbox2); + bool intersectsWithEpsilon = std::abs(deltBbox) > eps; + bool intersects = intersectsWithEpsilon; + return intersects; } inline bool computeCSG_Carve(const shared_ptr >& op1Orig, const shared_ptr >& op2Orig, const carve::csg::CSG::OP operation, shared_ptr >& result, - shared_ptr& geom_settings, StatusCallback* report_callback, const shared_ptr& entity, bool normalizeCoords) + shared_ptr& geomSettingsDefault, StatusCallback* report_callback, const shared_ptr& entity, bool normalizeCoords) { if( !op1Orig || !op2Orig ) { @@ -182,34 +92,75 @@ namespace CSG_Adapter return false; } - bool intersecting = checkBoundinbBoxIntersection(op1Orig, op2Orig, operation); - if( !intersecting ) - { - assignResultOnFail(op1Orig, op2Orig, operation, result); - return true; - } - - shared_ptr > op1(op1Orig->clone()); - shared_ptr > op2(op2Orig->clone()); - + + carve::geom::aabb<3> bbox1 = op1Orig->getAABB(); + carve::geom::aabb<3> bbox2 = op2Orig->getAABB(); bool result_meshset_ok = false; - bool dumpMeshes = false; bool normalizeCoordsInsteadOfEpsilon = normalizeCoords; - MeshOps::CarveMeshNormalizer normMesh(op1, op2, normalizeCoordsInsteadOfEpsilon); - normMesh.disableNormalizeAll = false; + CarveMeshNormalizer normMesh(bbox1, bbox2, normalizeCoordsInsteadOfEpsilon); + normMesh.m_disableNormalizeAll = false; + GeomProcessingParams paramsUnscaled(geomSettingsDefault, false); + shared_ptr geomSettings(new GeometrySettings(geomSettingsDefault)); double scale = normMesh.getScale(); - double CARVE_EPSILON = 1.0 * EPS_M8 / scale; - geom_settings->setEpsilonCoplanarDistance(CARVE_EPSILON); - double epsCoplanarDistance = geom_settings->getEpsilonCoplanarDistance();// m_epsCoplanarDistance; + if (!normalizeCoords) + { + scale = 1.0; + } + double epsDefault = geomSettings->getEpsilonCoplanarDistance(); + double epsMinFaceAreaDefault = geomSettings->getMinTriangleArea(); + double CARVE_EPSILON = 10.0 * epsDefault * scale; + double epsMinFaceArea = epsMinFaceAreaDefault * ( scale * scale ); + double epsCoplanarAngle = geomSettings->getEpsilonCoplanarAngle() * scale; + double CARVE_EPSILON_restore = epsDefault; + geomSettings->setEpsilonCoplanarDistance(CARVE_EPSILON); + geomSettings->setEpsilonCoplanarAngle(epsCoplanarAngle); + geomSettings->setMinTriangleArea(epsMinFaceArea); + GeomProcessingParams paramsScaled(geomSettings, false); + paramsScaled.ifc_entity = entity.get(); + paramsScaled.callbackFunc = report_callback; + paramsUnscaled.ifc_entity = entity.get(); + paramsUnscaled.callbackFunc = report_callback; + + bool intersecting = checkBoundinbBoxIntersection(bbox1, bbox2, operation, CARVE_EPSILON); + if (!intersecting) + { +#ifdef _DEBUG + shared_ptr > op1(op1Orig->clone()); + shared_ptr > op2(op2Orig->clone()); + int tag = 0; + bool op1_dumped = false, op2_dumped = false; + DumpSettingsStruct dumpColorSettings; + dumpOperands(op1, op2, result, tag, op1_dumped, op2_dumped, dumpColorSettings, paramsUnscaled); +#endif + assignResultOnFail(op1Orig, op2Orig, operation, result); + return true; + } - double CARVE_EPSILON_restore = epsCoplanarDistance; // CARVE_EPSILON - //ScopedEpsilonSetter epsilonSetter; - if( !normalizeCoordsInsteadOfEpsilon ) + size_t numDegenerateFaces1 = MeshOps::countDegeneratedFaces(op1Orig.get()); + size_t numDegenerateFaces2 = MeshOps::countDegeneratedFaces(op2Orig.get()); + if (numDegenerateFaces1 > 0) { - //epsilonSetter.setEpsilonValue(eps); + assignResultOnFail(op1Orig, op2Orig, operation, result); + return true; } + if (numDegenerateFaces2 > 0) + { + assignResultOnFail(op1Orig, op2Orig, operation, result); + return true; + } + + MeshSetInfo infoMesh1orig(report_callback, entity.get()); + MeshSetInfo infoMesh2orig(report_callback, entity.get()); + paramsScaled.allowFinEdges = false; + paramsUnscaled.allowFinEdges = false; + bool operand1origvalid = MeshOps::checkMeshSetValidAndClosed(op1Orig, infoMesh1orig, paramsScaled); + bool operand2origvalid = MeshOps::checkMeshSetValidAndClosed(op2Orig, infoMesh2orig, paramsScaled); + + shared_ptr > op1(op1Orig->clone()); + shared_ptr > op2(op2Orig->clone()); + std::stringstream strs_err; try { @@ -217,253 +168,182 @@ namespace CSG_Adapter normMesh.normalizeMesh(op1, "op1", CARVE_EPSILON); normMesh.normalizeMesh(op2, "op2", CARVE_EPSILON); + bool op1_dumped = false; + bool op2_dumped = false; + int tag = entity->m_tag; + MeshOps::flattenFacePlanes(op1, op2, paramsScaled); + #ifdef _DEBUG - if( csg_compute_count == 2 ) + ++csg_compute_count; + DumpSettingsStruct dumpColorSettings; + dumpColorSettings.eps = CARVE_EPSILON; + if (!normalizeCoords) { - int wait = 0; + dumpColorSettings.normalizer = &normMesh; } - bool op1_dumped = false; - bool op2_dumped = false; - if( op1->vertex_storage.size() > 8 || op2->vertex_storage.size() >= 8 ) + + if (csg_compute_count == 24 || tag == 20896) { - if( entity->m_tag == 20896 || entity->m_tag == 24704 || entity->m_tag == 36849 ) - { - dumpMeshes = true; - } + dumpOperands(op1, op2, result, tag, op1_dumped, op2_dumped, dumpColorSettings, paramsScaled); + //dumpMeshes = true; } #endif - int tag = entity->m_tag; bool triangulateOperands = true; bool shouldBeClosedManifold = true; - MeshOps::simplifyMeshSet(op1, geom_settings, report_callback, entity.get(), triangulateOperands, shouldBeClosedManifold, dumpMeshes, CARVE_EPSILON); - MeshOps::simplifyMeshSet(op2, geom_settings, report_callback, entity.get(), triangulateOperands, shouldBeClosedManifold, dumpMeshes, CARVE_EPSILON); + MeshOps::simplifyMeshSet(op1, geomSettings, paramsScaled, triangulateOperands, shouldBeClosedManifold); + MeshOps::simplifyMeshSet(op2, geomSettings, paramsScaled, triangulateOperands, shouldBeClosedManifold); - MeshOps::retriangulateMeshSetSimple(op1, false, epsCoplanarDistance, 0); - MeshOps::retriangulateMeshSetSimple(op2, false, epsCoplanarDistance, 0); + MeshOps::retriangulateMeshSetSimple(op1, false, paramsScaled, 0); + MeshOps::retriangulateMeshSetSimple(op2, false, paramsScaled, 0); MeshSetInfo infoMesh1(report_callback, entity.get()); MeshSetInfo infoMesh2(report_callback, entity.get()); - bool operand1valid = MeshUtils::checkMeshSetValidAndClosed(op1, infoMesh1, CARVE_EPSILON); - bool operand2valid = MeshUtils::checkMeshSetValidAndClosed(op2, infoMesh2, CARVE_EPSILON); + bool operand1valid = MeshOps::checkMeshSetValidAndClosed(op1, infoMesh1, paramsScaled); + bool operand2valid = MeshOps::checkMeshSetValidAndClosed(op2, infoMesh2, paramsScaled); - if( !operand1valid || !operand2valid ) + if (infoMesh1.finEdges.size() > 0) { - assignResultOnFail(op1Orig, op2Orig, operation, result); - return true; + paramsScaled.allowFinEdges = true; + paramsUnscaled.allowFinEdges = true; } - -#ifdef _DEBUG - struct FaceInfo + if (infoMesh2.finEdges.size() > 0) { - double area = 0; - int numEdges = 0; - std::set* > setEdges; - std::set* > setVertices; - }; - std::multimap mapFaceInfos; - for( auto mesh : op1->meshes) - { - double vol = mesh->volume(); - for( auto face : mesh->faces ) - { - double faceArea = MeshUtils::computeFaceArea(face); - - FaceInfo fi; - fi.area = faceArea; - fi.numEdges = face->n_edges; - auto edge = face->edge; - for( size_t jjEdge = 0; jjEdge < face->n_edges; ++jjEdge ) - { - fi.setEdges.insert(edge); - carve::mesh::Vertex<3>* vert = edge->vert; - fi.setVertices.insert(vert); - edge = edge->next; - } - if( edge != face->edge ) - { - std::cout << "edge != face->edge" << std::endl; - } - mapFaceInfos.insert({ faceArea, fi }); - } + paramsScaled.allowFinEdges = true; + paramsUnscaled.allowFinEdges = true; } - DumpSettingsStruct dumpColorSettings; - glm::vec4 color(0.3, 0.33, 0.33, 1.); - if( tag == 1951294 || tag == 19026) + if (!operand1valid && operand1origvalid) { - dumpMeshes = true; - if( !operand1valid ) - { - std::cout << "incorrect csg operand, csg_compute_count " << csg_compute_count << std::endl; - } + op1 = shared_ptr >(op1Orig->clone()); + MeshSetInfo infoMesh1copy(report_callback, entity.get()); + bool operand1copy_valid = MeshOps::checkMeshSetValidAndClosed(op1, infoMesh1copy, paramsUnscaled); - if( op1->vertex_storage.size() >=50 ) + normMesh.normalizeMesh(op1, "op1orig", CARVE_EPSILON); + operand1valid = MeshOps::checkMeshSetValidAndClosed(op1, infoMesh1, paramsScaled); + if (!operand1valid && operand1origvalid) { - int wait = 0; - } - - glm::vec4 color(0.7, 0.7, 0.7, 1.0); - GeomDebugDump::moveOffset(0.2); - GeomDebugDump::dumpLocalCoordinateSystem(); - GeomDebugDump::moveOffset(op1); - GeomDebugDump::moveOffset(op2); - op1_dumped = true; - op2_dumped = true; - - std::string labelStr = "csg-operands-input"; - GeomDebugDump::dumpVertex( GeomDebugDump::labelPos, color, labelStr); + // normalizing changed the validity, should not happen +#ifdef _DEBUG - dumpMeshset(op1, color, false); - //GeomDebugDump::moveOffset(op1); - //GeomDebugDump::moveOffset(0.3); + dumpOperands(op1, op2, result, tag, op1_dumped, op2_dumped, dumpColorSettings, paramsScaled); + double vol2 = MeshOps::computeMeshsetVolume(op2.get()); +#endif + } + } - GeomDebugDump::dumpFacePolygons(op2.get(), color, false); - dumpMeshset(op2, color); + if( !operand1valid || !operand2valid ) + { + assignResultOnFail(op1Orig, op2Orig, operation, result); + return false; + } - //GeomDebugDump::dumpEntity(entity); + size_t numFacesOp1 = MeshOps::countFaces(op1.get()); + if (op1->vertex_storage.size() < 4 || numFacesOp1 < 4) + { + assignResultOnFail(op1Orig, op2Orig, operation, result); + return false; } - if( !operand2valid ) + size_t numFacesOp2 = MeshOps::countFaces(op2.get()); + if (op2->vertex_storage.size() < 4 || numFacesOp2 < 4) { - glm::vec4 color(0.7, 0.7, 0.7, 1.0); - dumpMeshset(op2, color, true); - op2_dumped = true; + assignResultOnFail(op1Orig, op2Orig, operation, result); + return false; } - ++csg_compute_count; -#endif + + paramsScaled.allowDegenerateEdges = false; + if (infoMesh1.degenerateEdges.size() > 0) { paramsScaled.allowDegenerateEdges = true; } + if (infoMesh2.degenerateEdges.size() > 0) { paramsScaled.allowDegenerateEdges = true; } ////////////////////// compute carve csg operation ///////////////////////////////////////////// carve::csg::CSG csg(CARVE_EPSILON); result = shared_ptr >(csg.compute(op1.get(), op2.get(), operation, nullptr, carve::csg::CSG::CLASSIFY_EDGE)); MeshSetInfo infoResult( report_callback, entity.get() ); - result_meshset_ok = MeshUtils::checkMeshSetValidAndClosed(result, infoResult, CARVE_EPSILON, true, dumpMeshes ); + result_meshset_ok = MeshOps::checkMeshSetValidAndClosed(result, infoResult, paramsScaled); + + if (!result_meshset_ok ) + { +#ifdef _DEBUG + + dumpOperands(op1, op2, result, tag, op1_dumped, op2_dumped, dumpColorSettings, paramsScaled); + double vol2 = MeshOps::computeMeshsetVolume(op2.get()); +#endif + MeshOps::fixMeshset(result, geomSettings, paramsScaled.debugDump); + result_meshset_ok = MeshOps::checkMeshSetValidAndClosed(result, infoResult, paramsScaled); + } + +#ifdef _DEBUG + if (csg_compute_count > 15) + { + double vol2 = MeshOps::computeMeshsetVolume(op2.get()); + dumpOperands(op1, op2, result, tag, op1_dumped, op2_dumped, dumpColorSettings, paramsScaled); + } +#endif // TODO: check for fail with closed mesh, but not fully sliced through. #ifdef _USE_CLASSIFY_NORMAL - if( !result_meshset_ok ) + if (!result_meshset_ok) { - bool shouldBeClosedManifold = true; - MeshOps::mergeCoplanarFacesInMeshSet(op1, geom_settings, shouldBeClosedManifold, dumpMeshes, CARVE_EPSILON); - carve::csg::CSG csg( CARVE_EPSILON ); + carve::csg::CSG csg(CARVE_EPSILON); result = shared_ptr >(csg.compute(op1.get(), op2.get(), operation, nullptr, carve::csg::CSG::CLASSIFY_NORMAL)); - result_meshset_ok = MeshUtils::checkMeshSetValidAndClosed(result, infoResult, CARVE_EPSILON, true, dumpMeshes ); + result_meshset_ok = MeshOps::checkMeshSetValidAndClosed(result, infoResult, paramsScaled); - if( result_meshset_ok ) + if (!result_meshset_ok) { - shared_ptr > result_clone(result->clone()); - MeshOps::retriangulateMeshSetSimple(result_clone, false, CARVE_EPSILON, 0); - result_meshset_ok = MeshUtils::checkMeshSetValidAndClosed(result, infoResult, CARVE_EPSILON); +#ifdef _DEBUG + dumpOperands(op1, op2, result, tag, op1_dumped, op2_dumped, dumpColorSettings, paramsScaled); +#endif + MeshOps::fixMeshset(result, geomSettings, paramsScaled.debugDump); + result_meshset_ok = MeshOps::checkMeshSetValidAndClosed(result, infoResult, paramsScaled); } } #endif - if( !result_meshset_ok ) - { - dumpMeshes = true; - #ifdef _DEBUG - if( dumpMeshes ) - { - bool checkZeroAreaFaces = false; - dumpWithLabel("computeCSG::carve::result", result, dumpColorSettings, checkZeroAreaFaces, true, true); - } -#endif - -#ifdef _USE_MANIFOLD_CSG - computeCSG_Manifold(op1, op2, operation, result, eps, report_callback, entity); - result_meshset_ok = MeshUtils::checkMeshSetValidAndClosed(result, infoResult, report_callback, entity.get()); -#endif + double vol = MeshOps::computeMeshsetVolume(result.get()); + if (vol < 0.0002) + { + std::cout << "empty?" << std::endl; + dumpOperands(op1, op2, result, tag, op1_dumped, op2_dumped, dumpColorSettings, paramsScaled); } +#endif -#ifdef _DEBUG - if( dumpMeshes ) + if( !result_meshset_ok ) { - bool checkZeroAreaFaces = false; - - if( (op2_dumped && !op1_dumped) ) - { - GeomDebugDump::moveOffset(0.3); - } - - if( !op1_dumped ) - { - op1_dumped = true; - dumpWithLabel("computeCSG::op1", op1, dumpColorSettings, checkZeroAreaFaces, true, false); - } - - if( !op2_dumped ) - { - dumpWithLabel("computeCSG::op2", op2, dumpColorSettings, checkZeroAreaFaces, false, true); - op2_dumped = true; - - } - - GeomDebugDump::moveOffset(0.5); - GeomDebugDump::moveOffset(op2); + //dumpMeshes = true; - std::string labelStr = "computeCSG::results"; - GeomDebugDump::dumpVertex( GeomDebugDump::labelPos, color, labelStr); - GeomDebugDump::dumpFacePolygons(op2.get(), color, false); - GeomDebugDump::dumpMeshset(result, color, true); - GeomDebugDump::moveOffset(0.5); - - if( !result_meshset_ok ) - { - dumpWithLabel("computeCSG::results", result, dumpColorSettings, checkZeroAreaFaces, true, true); - } - //GeomDebugDump::dumpMeshsetOpenEdges(result, color, false, true); - - GeomDebugDump::moveOffset(op1); - GeomDebugDump::moveOffset(op2); - GeomDebugDump::moveOffset(0.3); - } +#ifdef _USE_MANIFOLD_CSG + computeCSG_Manifold(op1, op2, operation, result, CARVE_EPSILON, report_callback, entity); + result_meshset_ok = MeshOps::checkMeshSetValidAndClosed(result, infoResult, report_callback, entity.get()); #endif + } if( !result_meshset_ok ) { strs_err << "csg operation failed" << std::endl; #ifdef _DEBUG - if( dumpMeshes ) + if (paramsScaled.debugDump) { - MeshSetInfo infoOp1(report_callback, entity.get()); - MeshSetInfo infoOp2(report_callback, entity.get()); - bool op1_mesh_closed = MeshUtils::checkMeshSetValidAndClosed(op1, infoOp1, CARVE_EPSILON); - bool op2_mesh_closed = MeshUtils::checkMeshSetValidAndClosed(op2, infoOp2, CARVE_EPSILON); - if( !op1_mesh_closed || !op2_mesh_closed ) - { - //normMesh.deNormalizeMesh(op1); - //normMesh.deNormalizeMesh(op2); - GeomDebugDump::moveOffset(0.5); - glm::vec4 color1(0.7, 0.7, 0.7, 0.88); - std::string labelStr = "csg--result--invalid--operands: "; - GeomDebugDump::dumpVertex(GeomDebugDump::labelPos, color1, labelStr); - - glm::vec4 color(0.7, 0.7, 0.7, 0.05); - dumpMeshset(op1, color, false); - color = glm::vec4(0.5, 0.7, 0.5, 1.0); - dumpMeshset(op2, color); - GeomDebugDump::moveOffset(op1); - GeomDebugDump::moveOffset(op2); - } + dumpOperands(op1, op2, result, tag, op1_dumped, op2_dumped, dumpColorSettings, paramsScaled); } #endif } } catch( carve::exception& ce ) { - strs_err << ce.str().c_str(); + strs_err << "csg operation failed" << ce.str().c_str(); } catch( const std::out_of_range& oor ) { - strs_err << oor.what(); + strs_err << "csg operation failed" << oor.what(); } catch( std::exception& e ) { - strs_err << e.what(); + strs_err << "csg operation failed" << e.what(); } catch( ... ) { @@ -472,88 +352,121 @@ namespace CSG_Adapter if( strs_err.tellp() > 0 ) { - -#ifdef _DEBUG - if( dumpMeshes ) - { - glm::vec4 color(0.7, 0.7, 0.7, 0.05); - GeomDebugDump::moveOffset(0.4); - dumpMeshset(op1, color, false); - dumpMeshset(op2, color, true); - - if( result ) - { - GeomDebugDump::moveOffset(op2); - GeomDebugDump::moveOffset(0.3); - dumpMeshset(result, color, true); - } - } -#endif if( !result_meshset_ok ) { - assignResultOnFail(op1, op2, operation, result); - normMesh.deNormalizeMesh(result, "", CARVE_EPSILON); + assignResultOnFail(op1Orig, op2Orig, operation, result); return false; } } +#ifdef _DEBUG + MeshSetInfo infoMesh_beforeDeNormalize(report_callback, entity.get()); + bool result_meshset_ok_beforeDeNormalize = MeshOps::checkMeshSetValidAndClosed(result, infoMesh_beforeDeNormalize, paramsScaled); +#endif + normMesh.deNormalizeMesh(result, "", CARVE_EPSILON); + + +#ifdef _DEBUG + { + // de-normalized: + MeshSetInfo infoMesh1(report_callback, entity.get()); + bool result_valid_2 = MeshOps::checkMeshSetValidAndClosed(result, infoMesh1, paramsUnscaled); + + if (!result_valid_2) + { + std::cout << "!result" << std::endl; + } + } +#endif + return result_meshset_ok; } - inline void computeCSG(shared_ptr >& op1, std::vector > >& operands2, const carve::csg::CSG::OP operation, shared_ptr >& result, - shared_ptr& geom_settings, StatusCallback* report_callback, const shared_ptr& entity) + inline void computeCSG(shared_ptr >& op1, const std::vector > >& operands2, const carve::csg::CSG::OP operation, + shared_ptr& geomSettings, StatusCallback* report_callback, const shared_ptr& entity) { if( !op1 || operands2.size() == 0 ) { - if( operation == carve::csg::CSG::A_MINUS_B ) - { - result = op1; - return; - } - return; } // TODO: scale here, then do all the bool ops, then unscale - - shared_ptr > resultCurrentMesh; bool success = false; std::multimap > > mapVolumeMeshes; - for( shared_ptr >&meshset2 : operands2 ) + for (const shared_ptr >&meshset2 : operands2) { - double volume = MeshUtils::getMeshVolume(meshset2.get()); + double volume = MeshOps::computeMeshsetVolume(meshset2.get()); mapVolumeMeshes.insert({ volume, meshset2 }); } - for( auto it = mapVolumeMeshes.rbegin(); it != mapVolumeMeshes.rend(); ++it ) + size_t ii = 0; + for( auto it = mapVolumeMeshes.rbegin(); it != mapVolumeMeshes.rend(); ++it, ++ii ) { double volume = it->first; shared_ptr >& mesh2 = it->second; +#ifdef _DEBUG + + MeshSetInfo infoMesh1(report_callback, entity.get()); + bool allowFinEdges = false; + GeomProcessingParams params(geomSettings, false); + bool operand1valid = MeshOps::checkMeshSetValidAndClosed(op1, infoMesh1, params); + + if (!operand1valid) + { + std::cout << "!operand1valid" << std::endl; + } +#endif + bool normalizeCoords = true; - success = computeCSG_Carve(op1, mesh2, operation, resultCurrentMesh, geom_settings, report_callback, entity, normalizeCoords); + shared_ptr > result; + success = computeCSG_Carve(op1, mesh2, operation, result, geomSettings, report_callback, entity, normalizeCoords); + if( success ) { - result = resultCurrentMesh; - - if( operation == carve::csg::CSG::A_MINUS_B ) + if( operation == carve::csg::CSG::A_MINUS_B || operation == carve::csg::CSG::UNION ) { - op1 = resultCurrentMesh; + op1 = result; } + +#ifdef _DEBUG + + MeshSetInfo infoMesh1(report_callback, entity.get()); + bool allowFinEdges = false; + GeomProcessingParams params(geomSettings, false); + bool operand1valid_2 = MeshOps::checkMeshSetValidAndClosed(op1, infoMesh1, params); + + if (!operand1valid_2) + { + std::cout << "!operand1valid" << std::endl; + } +#endif continue; } - normalizeCoords = !normalizeCoords; - success = computeCSG_Carve(op1, mesh2, operation, resultCurrentMesh, geom_settings, report_callback, entity, normalizeCoords); + normalizeCoords = false; + success = computeCSG_Carve(op1, mesh2, operation, result, geomSettings, report_callback, entity, normalizeCoords); if( success ) { - result = resultCurrentMesh; - if( operation == carve::csg::CSG::A_MINUS_B ) + if (operation == carve::csg::CSG::A_MINUS_B || operation == carve::csg::CSG::UNION) { - op1 = resultCurrentMesh; + op1 = result; + } + } + +#ifdef _DEBUG + { + MeshSetInfo infoMesh1(report_callback, entity.get()); + bool allowFinEdges = false; + GeomProcessingParams params(geomSettings, false); + bool operand1valid_3 = MeshOps::checkMeshSetValidAndClosed(op1, infoMesh1, params); + + if (!operand1valid_3) + { + std::cout << "!operand1valid" << std::endl; } - continue; } +#endif } } }; diff --git a/IfcPlusPlus/src/ifcpp/geometry/ConverterOSG.h b/IfcPlusPlus/src/ifcpp/geometry/ConverterOSG.h index 69c482225..22186a550 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/ConverterOSG.h +++ b/IfcPlusPlus/src/ifcpp/geometry/ConverterOSG.h @@ -32,6 +32,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #include #include #include +#include #include #include #include @@ -59,11 +60,14 @@ class ConverterOSG : public StatusCallback double m_crease_edges_max_delta_angle = M_PI * 0.05; double m_crease_edges_line_width = 1.5; bool m_render_crease_edges = true; + bool m_draw_bounding_box = false; + size_t m_numConvertedProducts = 0; + size_t m_numProductsInModel = 0; public: - ConverterOSG( shared_ptr& geom_settings ) : m_geom_settings(geom_settings) + ConverterOSG(shared_ptr& geom_settings) : m_geom_settings(geom_settings) { - m_cull_back_off = new osg::CullFace( osg::CullFace::BACK ); + m_cull_back_off = new osg::CullFace(osg::CullFace::BACK); } virtual ~ConverterOSG() {} @@ -81,15 +85,19 @@ class ConverterOSG : public StatusCallback { m_map_entity_guid_to_switch.clear(); m_map_representation_id_to_switch.clear(); + + m_numConvertedProducts = 0; + m_numProductsInModel = 0; + } - static void drawBoundingBox( const carve::geom::aabb<3>& aabb, osg::Geometry* geom ) + static void drawBoundingBox(const carve::geom::aabb<3>& aabb, osg::Geometry* geom) { - osg::ref_ptr vertices = dynamic_cast( geom->getVertexArray() ); - if( !vertices ) + osg::ref_ptr vertices = dynamic_cast(geom->getVertexArray()); + if (!vertices) { vertices = new osg::Vec3Array(); - geom->setVertexArray( vertices ); + geom->setVertexArray(vertices); } const carve::geom::vector<3>& aabb_pos = aabb.pos; const carve::geom::vector<3>& extent = aabb.extent; @@ -98,139 +106,139 @@ class ConverterOSG : public StatusCallback const double dez = extent.z; const int vert_id_offset = vertices->size(); - vertices->push_back( osg::Vec3f( aabb_pos.x - dex, aabb_pos.y - dey, aabb_pos.z - dez ) ); - vertices->push_back( osg::Vec3f( aabb_pos.x + dex, aabb_pos.y - dey, aabb_pos.z - dez ) ); - vertices->push_back( osg::Vec3f( aabb_pos.x + dex, aabb_pos.y + dey, aabb_pos.z - dez ) ); - vertices->push_back( osg::Vec3f( aabb_pos.x - dex, aabb_pos.y + dey, aabb_pos.z - dez ) ); - - vertices->push_back( osg::Vec3f( aabb_pos.x - dex, aabb_pos.y - dey, aabb_pos.z + dez ) ); - vertices->push_back( osg::Vec3f( aabb_pos.x + dex, aabb_pos.y - dey, aabb_pos.z + dez ) ); - vertices->push_back( osg::Vec3f( aabb_pos.x + dex, aabb_pos.y + dey, aabb_pos.z + dez ) ); - vertices->push_back( osg::Vec3f( aabb_pos.x - dex, aabb_pos.y + dey, aabb_pos.z + dez ) ); - - osg::ref_ptr box_lines = new osg::DrawElementsUInt( GL_LINE_STRIP, 0 ); - box_lines->push_back( vert_id_offset + 0 ); - box_lines->push_back( vert_id_offset + 1 ); - box_lines->push_back( vert_id_offset + 2 ); - box_lines->push_back( vert_id_offset + 3 ); - box_lines->push_back( vert_id_offset + 0 ); - box_lines->push_back( vert_id_offset + 4 ); - box_lines->push_back( vert_id_offset + 5 ); - box_lines->push_back( vert_id_offset + 1 ); - box_lines->push_back( vert_id_offset + 5 ); - box_lines->push_back( vert_id_offset + 6 ); - box_lines->push_back( vert_id_offset + 2 ); - box_lines->push_back( vert_id_offset + 6 ); - box_lines->push_back( vert_id_offset + 7 ); - box_lines->push_back( vert_id_offset + 3 ); - box_lines->push_back( vert_id_offset + 7 ); - box_lines->push_back( vert_id_offset + 4 ); - geom->addPrimitiveSet( box_lines ); + vertices->push_back(osg::Vec3f(aabb_pos.x - dex, aabb_pos.y - dey, aabb_pos.z - dez)); + vertices->push_back(osg::Vec3f(aabb_pos.x + dex, aabb_pos.y - dey, aabb_pos.z - dez)); + vertices->push_back(osg::Vec3f(aabb_pos.x + dex, aabb_pos.y + dey, aabb_pos.z - dez)); + vertices->push_back(osg::Vec3f(aabb_pos.x - dex, aabb_pos.y + dey, aabb_pos.z - dez)); + + vertices->push_back(osg::Vec3f(aabb_pos.x - dex, aabb_pos.y - dey, aabb_pos.z + dez)); + vertices->push_back(osg::Vec3f(aabb_pos.x + dex, aabb_pos.y - dey, aabb_pos.z + dez)); + vertices->push_back(osg::Vec3f(aabb_pos.x + dex, aabb_pos.y + dey, aabb_pos.z + dez)); + vertices->push_back(osg::Vec3f(aabb_pos.x - dex, aabb_pos.y + dey, aabb_pos.z + dez)); + + osg::ref_ptr box_lines = new osg::DrawElementsUInt(GL_LINE_STRIP, 0); + box_lines->push_back(vert_id_offset + 0); + box_lines->push_back(vert_id_offset + 1); + box_lines->push_back(vert_id_offset + 2); + box_lines->push_back(vert_id_offset + 3); + box_lines->push_back(vert_id_offset + 0); + box_lines->push_back(vert_id_offset + 4); + box_lines->push_back(vert_id_offset + 5); + box_lines->push_back(vert_id_offset + 1); + box_lines->push_back(vert_id_offset + 5); + box_lines->push_back(vert_id_offset + 6); + box_lines->push_back(vert_id_offset + 2); + box_lines->push_back(vert_id_offset + 6); + box_lines->push_back(vert_id_offset + 7); + box_lines->push_back(vert_id_offset + 3); + box_lines->push_back(vert_id_offset + 7); + box_lines->push_back(vert_id_offset + 4); + geom->addPrimitiveSet(box_lines); osg::ref_ptr mat = new osg::Material(); - osg::Vec4f ambientColor( 1.f, 0.2f, 0.1f, 1.f ); - mat->setAmbient( osg::Material::FRONT, ambientColor ); - mat->setDiffuse( osg::Material::FRONT, ambientColor ); - mat->setSpecular( osg::Material::FRONT, ambientColor ); + osg::Vec4f ambientColor(1.f, 0.2f, 0.1f, 1.f); + mat->setAmbient(osg::Material::FRONT, ambientColor); + mat->setDiffuse(osg::Material::FRONT, ambientColor); + mat->setSpecular(osg::Material::FRONT, ambientColor); //mat->setShininess( osg::Material::FRONT, shininess ); //mat->setColorMode( osg::Material::SPECULAR ); osg::StateSet* stateset = geom->getOrCreateStateSet(); - stateset->setAttribute( mat, osg::StateAttribute::ON ); - stateset->setMode( GL_LIGHTING, osg::StateAttribute::OFF ); + stateset->setAttribute(mat, osg::StateAttribute::ON); + stateset->setMode(GL_LIGHTING, osg::StateAttribute::OFF); } - static void drawFace( const carve::mesh::Face<3>* face, osg::Geode* geode, bool add_color_array = false ) + static void drawFace(const carve::mesh::Face<3>* face, osg::Geode* geode, bool add_color_array = false) { #ifdef _DEBUG std::cout << "not triangulated" << std::endl; #endif std::vector face_vertices; - face_vertices.resize( face->nVertices() ); - carve::mesh::Edge<3> *e = face->edge; + face_vertices.resize(face->nVertices()); + carve::mesh::Edge<3>* e = face->edge; const size_t num_vertices = face->nVertices(); - for( size_t i = 0; i < num_vertices; ++i ) + for (size_t i = 0; i < num_vertices; ++i) { face_vertices[i] = e->v1()->v; e = e->next; } - if( num_vertices < 4 ) + if (num_vertices < 4) { std::cout << "drawFace is meant only for num vertices > 4" << std::endl; } vec3* vertex_vec; - osg::ref_ptr vertices = new osg::Vec3Array( num_vertices ); - osg::ref_ptr triangles = new osg::DrawElementsUInt( osg::PrimitiveSet::POLYGON, num_vertices ); + osg::ref_ptr vertices = new osg::Vec3Array(num_vertices); + osg::ref_ptr triangles = new osg::DrawElementsUInt(osg::PrimitiveSet::POLYGON, num_vertices); - for( size_t i = 0; i < num_vertices; ++i ) + for (size_t i = 0; i < num_vertices; ++i) { vertex_vec = &face_vertices[num_vertices - i - 1]; - ( *vertices )[i].set( vertex_vec->x, vertex_vec->y, vertex_vec->z ); - ( *triangles )[i] = i; + (*vertices)[i].set(vertex_vec->x, vertex_vec->y, vertex_vec->z); + (*triangles)[i] = i; } - osg::Vec3f poly_normal = SceneGraphUtils::computePolygonNormal( vertices ); + osg::Vec3f poly_normal = SceneGraphUtils::computePolygonNormal(vertices); osg::ref_ptr normals = new osg::Vec3Array(); - normals->resize( num_vertices, poly_normal ); + normals->resize(num_vertices, poly_normal); osg::ref_ptr geometry = new osg::Geometry(); - geometry->setVertexArray( vertices ); - geometry->setNormalArray( normals ); - normals->setBinding( osg::Array::BIND_PER_VERTEX ); - geometry->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::POLYGON, 0, vertices->size() ) ); + geometry->setVertexArray(vertices); + geometry->setNormalArray(normals); + normals->setBinding(osg::Array::BIND_PER_VERTEX); + geometry->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POLYGON, 0, vertices->size())); - if( add_color_array ) + if (add_color_array) { osg::ref_ptr colors = new osg::Vec4Array(); - colors->resize( vertices->size(), osg::Vec4f( 0.6f, 0.6f, 0.6f, 0.1f ) ); - colors->setBinding( osg::Array::BIND_PER_VERTEX ); - geometry->setColorArray( colors ); + colors->resize(vertices->size(), osg::Vec4f(0.6f, 0.6f, 0.6f, 0.1f)); + colors->setBinding(osg::Array::BIND_PER_VERTEX); + geometry->setColorArray(colors); } - if( num_vertices > 4 ) + if (num_vertices > 4) { // TODO: check if polygon is convex with Gift wrapping algorithm osg::ref_ptr tesselator = new osgUtil::Tessellator(); - tesselator->setTessellationType( osgUtil::Tessellator::TESS_TYPE_POLYGONS ); + tesselator->setTessellationType(osgUtil::Tessellator::TESS_TYPE_POLYGONS); //tesselator->setWindingType( osgUtil::Tessellator::TESS_WINDING_ODD ); - tesselator->retessellatePolygons( *geometry ); + tesselator->retessellatePolygons(*geometry); } - geode->addDrawable( geometry ); + geode->addDrawable(geometry); #ifdef DEBUG_DRAW_NORMALS osg::ref_ptr vertices_normals = new osg::Vec3Array(); - for( size_t i = 0; i < num_vertices; ++i ) + for (size_t i = 0; i < num_vertices; ++i) { vertex_vec = &face_vertices[num_vertices - i - 1]; - vertices_normals->push_back( osg::Vec3f( vertex_vec->x, vertex_vec->y, vertex_vec->z ) ); - vertices_normals->push_back( osg::Vec3f( vertex_vec->x, vertex_vec->y, vertex_vec->z ) + poly_normal ); + vertices_normals->push_back(osg::Vec3f(vertex_vec->x, vertex_vec->y, vertex_vec->z)); + vertices_normals->push_back(osg::Vec3f(vertex_vec->x, vertex_vec->y, vertex_vec->z) + poly_normal); } osg::ref_ptr colors_normals = new osg::Vec4Array(); - colors_normals->resize( num_vertices * 2, osg::Vec4f( 0.4f, 0.7f, 0.4f, 1.f ) ); + colors_normals->resize(num_vertices * 2, osg::Vec4f(0.4f, 0.7f, 0.4f, 1.f)); osg::ref_ptr geometry_normals = new osg::Geometry(); - geometry_normals->setVertexArray( vertices_normals ); - geometry_normals->setColorArray( colors_normals ); - geometry_normals->setColorBinding( osg::Geometry::BIND_PER_VERTEX ); - geometry_normals->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF ); - - geometry_normals->setNormalBinding( osg::Geometry::BIND_OFF ); - geometry_normals->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::LINES, 0, vertices_normals->size() ) ); - geode->addDrawable( geometry_normals ); + geometry_normals->setVertexArray(vertices_normals); + geometry_normals->setColorArray(colors_normals); + geometry_normals->setColorBinding(osg::Geometry::BIND_PER_VERTEX); + geometry_normals->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF); + + geometry_normals->setNormalBinding(osg::Geometry::BIND_OFF); + geometry_normals->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES, 0, vertices_normals->size())); + geode->addDrawable(geometry_normals); #endif } //#define DEBUG_DRAW_NORMALS - static void drawMeshSet( const shared_ptr >& meshset, osg::Geode* geode, double crease_angle, double min_triangle_area, bool add_color_array = false ) + static void drawMeshSet(const shared_ptr >& meshset, osg::Geode* geode, double crease_angle, double min_triangle_area, bool add_color_array = false) { - if( !meshset ) + if (!meshset) { return; } @@ -244,44 +252,41 @@ class ConverterOSG : public StatusCallback std::map*, double> map_face_area; std::map*, double>::iterator it_face_area; - if( crease_angle > 0 ) + if (crease_angle > 0) { - for( size_t i_mesh = 0; i_mesh < meshset->meshes.size(); ++i_mesh ) + for (size_t i_mesh = 0; i_mesh < meshset->meshes.size(); ++i_mesh) { const carve::mesh::Mesh<3>* mesh = meshset->meshes[i_mesh]; const size_t num_faces = mesh->faces.size(); - for( size_t i_face = 0; i_face != num_faces; ++i_face ) + for (size_t i_face = 0; i_face != num_faces; ++i_face) { carve::mesh::Face<3>* face = mesh->faces[i_face]; - // compute area of projected face: - std::vector projected; - face->getProjectedVertices( projected ); - double face_area = carve::geom2d::signedArea( projected ); - map_face_area[face] = std::abs( face_area ); + double face_area = MeshOps::computeFaceArea(face); + map_face_area[face] = std::abs(face_area); } } } - for( size_t i_mesh = 0; i_mesh < meshset->meshes.size(); ++i_mesh ) + for (size_t i_mesh = 0; i_mesh < meshset->meshes.size(); ++i_mesh) { const carve::mesh::Mesh<3>* mesh = meshset->meshes[i_mesh]; const size_t num_faces = mesh->faces.size(); - for( size_t i_face = 0; i_face != num_faces; ++i_face ) + for (size_t i_face = 0; i_face != num_faces; ++i_face) { carve::mesh::Face<3>* face = mesh->faces[i_face]; const size_t n_vertices = face->nVertices(); - if( n_vertices > 4 ) + if (n_vertices > 4) { - drawFace( face, geode ); + drawFace(face, geode); continue; } const vec3 face_normal = face->plane.N; - if( crease_angle > 0 ) + if (crease_angle > 0) { carve::mesh::Edge<3>* e = face->edge; - for( size_t jj = 0; jj < n_vertices; ++jj ) + for (size_t jj = 0; jj < n_vertices; ++jj) { carve::mesh::Vertex<3>* vertex = e->vert; vec3 intermediate_normal; @@ -299,64 +304,64 @@ class ConverterOSG : public StatusCallback carve::mesh::Edge<3>* e1 = e;// ->rev->next; carve::mesh::Face<3>* f1 = e1->face; #ifdef _DEBUG - if( f1 != face ) + if (f1 != face) { std::cout << "f1 != face" << std::endl; } #endif - for( size_t i3 = 0; i3 < max_num_faces_per_vertex; ++i3 ) + for (size_t i3 = 0; i3 < max_num_faces_per_vertex; ++i3) { - if( !e1->rev ) + if (!e1->rev) { break; } - if( !e1->rev->next ) + if (!e1->rev->next) { break; } vec3 f1_normal = f1->plane.N; - const double cos_angle = dot( f1_normal, face_normal ); - if( cos_angle > 0 ) + const double cos_angle = dot(f1_normal, face_normal); + if (cos_angle > 0) { - const double deviation = std::abs( cos_angle - 1.0 ); - if( deviation < crease_angle ) + const double deviation = std::abs(cos_angle - 1.0); + if (deviation < crease_angle) { double weight = 0.0; - it_face_area = map_face_area.find( f1 ); - if( it_face_area != map_face_area.end() ) + it_face_area = map_face_area.find(f1); + if (it_face_area != map_face_area.end()) { weight = it_face_area->second; } - intermediate_normal += weight*f1_normal; + intermediate_normal += weight * f1_normal; } } - if( !e1->rev ) + if (!e1->rev) { // it's an open mesh break; } e1 = e1->rev->next; - if( !e1 ) + if (!e1) { break; } f1 = e1->face; #ifdef _DEBUG - if( e1->vert != vertex ) + if (e1->vert != vertex) { std::cout << "e1->vert != vertex" << std::endl; } #endif - if( f1 == face ) + if (f1 == face) { break; } } const double intermediate_normal_length = intermediate_normal.length(); - if( intermediate_normal_length < 0.0000000001 ) + if (intermediate_normal_length < 0.0000000001) { intermediate_normal = face_normal; } @@ -367,7 +372,7 @@ class ConverterOSG : public StatusCallback } const vec3& vertex_v = vertex->v; - if( face->n_edges == 3 ) + if (face->n_edges == 3) { const carve::mesh::Edge<3>* edge0 = face->edge; const carve::mesh::Edge<3>* edge1 = edge0->next; @@ -382,20 +387,20 @@ class ConverterOSG : public StatusCallback vec3 v0v1 = vert1 - vert0; vec3 v0v2 = vert2 - vert0; - double area = (carve::geom::cross(v0v1, v0v2).length())*0.5; - if ( std::abs(area) > min_triangle_area) // skip degenerated triangle + double area = (carve::geom::cross(v0v1, v0v2).length()) * 0.5; + if (std::abs(area) > min_triangle_area) // skip degenerated triangle { - + vertices_tri->push_back(osg::Vec3(vertex_v.x, vertex_v.y, vertex_v.z)); normals_tri->push_back(osg::Vec3(intermediate_normal.x, intermediate_normal.y, intermediate_normal.z)); } } - else if( face->n_edges == 4 ) + else if (face->n_edges == 4) { - if( !vertices_quad ) vertices_quad = new osg::Vec3Array(); - vertices_quad->push_back( osg::Vec3( vertex_v.x, vertex_v.y, vertex_v.z ) ); - if( !normals_quad ) normals_quad = new osg::Vec3Array(); - normals_quad->push_back( osg::Vec3( intermediate_normal.x, intermediate_normal.y, intermediate_normal.z ) ); + if (!vertices_quad) vertices_quad = new osg::Vec3Array(); + vertices_quad->push_back(osg::Vec3(vertex_v.x, vertex_v.y, vertex_v.z)); + if (!normals_quad) normals_quad = new osg::Vec3Array(); + normals_quad->push_back(osg::Vec3(intermediate_normal.x, intermediate_normal.y, intermediate_normal.z)); } e = e->next; } @@ -403,12 +408,12 @@ class ConverterOSG : public StatusCallback else { carve::mesh::Edge<3>* e = face->edge; - for( size_t jj = 0; jj < n_vertices; ++jj ) + for (size_t jj = 0; jj < n_vertices; ++jj) { carve::mesh::Vertex<3>* vertex = e->vert; const vec3& vertex_v = vertex->v; - if( face->n_edges == 3 ) + if (face->n_edges == 3) { const carve::mesh::Edge<3>* edge0 = face->edge; const carve::mesh::Edge<3>* edge1 = edge0->next; @@ -423,19 +428,19 @@ class ConverterOSG : public StatusCallback vec3 v0v1 = vert1 - vert0; vec3 v0v2 = vert2 - vert0; - double area = (carve::geom::cross(v0v1, v0v2).length())*0.5; - if ( std::abs(area) > min_triangle_area) // skip degenerated triangle + double area = (carve::geom::cross(v0v1, v0v2).length()) * 0.5; + if (std::abs(area) > min_triangle_area) // skip degenerated triangle { vertices_tri->push_back(osg::Vec3(vertex_v.x, vertex_v.y, vertex_v.z)); normals_tri->push_back(osg::Vec3(face_normal.x, face_normal.y, face_normal.z)); } } - else if( face->n_edges == 4 ) + else if (face->n_edges == 4) { - if( !vertices_quad ) vertices_quad = new osg::Vec3Array(); - vertices_quad->push_back( osg::Vec3( vertex_v.x, vertex_v.y, vertex_v.z ) ); - if( !normals_quad ) normals_quad = new osg::Vec3Array(); - normals_quad->push_back( osg::Vec3( face_normal.x, face_normal.y, face_normal.z ) ); + if (!vertices_quad) vertices_quad = new osg::Vec3Array(); + vertices_quad->push_back(osg::Vec3(vertex_v.x, vertex_v.y, vertex_v.z)); + if (!normals_quad) normals_quad = new osg::Vec3Array(); + normals_quad->push_back(osg::Vec3(face_normal.x, face_normal.y, face_normal.z)); } e = e->next; } @@ -443,83 +448,83 @@ class ConverterOSG : public StatusCallback } } - if( vertices_tri->size() > 0 ) + if (vertices_tri->size() > 0) { osg::ref_ptr geometry = new osg::Geometry(); - geometry->setVertexArray( vertices_tri ); + geometry->setVertexArray(vertices_tri); - geometry->setNormalArray( normals_tri ); - normals_tri->setBinding( osg::Array::BIND_PER_VERTEX ); + geometry->setNormalArray(normals_tri); + normals_tri->setBinding(osg::Array::BIND_PER_VERTEX); - if( add_color_array ) + if (add_color_array) { osg::ref_ptr colors = new osg::Vec4Array(); - colors->resize( vertices_tri->size(), osg::Vec4f( 0.6f, 0.6f, 0.6f, 0.1f ) ); - colors->setBinding( osg::Array::BIND_PER_VERTEX ); - geometry->setColorArray( colors ); + colors->resize(vertices_tri->size(), osg::Vec4f(0.6f, 0.6f, 0.6f, 0.1f)); + colors->setBinding(osg::Array::BIND_PER_VERTEX); + geometry->setColorArray(colors); } - geometry->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::TRIANGLES, 0, vertices_tri->size() ) ); - geode->addDrawable( geometry ); + geometry->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::TRIANGLES, 0, vertices_tri->size())); + geode->addDrawable(geometry); #ifdef DEBUG_DRAW_NORMALS osg::ref_ptr vertices_normals = new osg::Vec3Array(); - for( size_t i = 0; i < vertices_tri->size(); ++i ) + for (size_t i = 0; i < vertices_tri->size(); ++i) { - osg::Vec3f& vertex_vec = vertices_tri->at( i );// [i]; - osg::Vec3f& normal_vec = normals_tri->at( i ); - vertices_normals->push_back( osg::Vec3f( vertex_vec.x(), vertex_vec.y(), vertex_vec.z() ) ); - vertices_normals->push_back( osg::Vec3f( vertex_vec.x(), vertex_vec.y(), vertex_vec.z() ) + normal_vec ); + osg::Vec3f& vertex_vec = vertices_tri->at(i);// [i]; + osg::Vec3f& normal_vec = normals_tri->at(i); + vertices_normals->push_back(osg::Vec3f(vertex_vec.x(), vertex_vec.y(), vertex_vec.z())); + vertices_normals->push_back(osg::Vec3f(vertex_vec.x(), vertex_vec.y(), vertex_vec.z()) + normal_vec); } osg::ref_ptr colors_normals = new osg::Vec4Array(); - colors_normals->resize( vertices_normals->size(), osg::Vec4f( 0.4f, 0.7f, 0.4f, 1.f ) ); + colors_normals->resize(vertices_normals->size(), osg::Vec4f(0.4f, 0.7f, 0.4f, 1.f)); osg::ref_ptr geometry_normals = new osg::Geometry(); - geometry_normals->setVertexArray( vertices_normals ); - geometry_normals->setColorArray( colors_normals ); - geometry_normals->setColorBinding( osg::Geometry::BIND_PER_VERTEX ); - geometry_normals->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF ); - - geometry_normals->setNormalBinding( osg::Geometry::BIND_OFF ); - geometry_normals->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::LINES, 0, vertices_normals->size() ) ); - geode->addDrawable( geometry_normals ); + geometry_normals->setVertexArray(vertices_normals); + geometry_normals->setColorArray(colors_normals); + geometry_normals->setColorBinding(osg::Geometry::BIND_PER_VERTEX); + geometry_normals->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF); + + geometry_normals->setNormalBinding(osg::Geometry::BIND_OFF); + geometry_normals->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES, 0, vertices_normals->size())); + geode->addDrawable(geometry_normals); #endif } - if( vertices_quad ) + if (vertices_quad) { - if( vertices_quad->size() > 0 ) + if (vertices_quad->size() > 0) { osg::ref_ptr geometry = new osg::Geometry(); - geometry->setVertexArray( vertices_quad ); - if( normals_quad ) + geometry->setVertexArray(vertices_quad); + if (normals_quad) { - normals_quad->setBinding( osg::Array::BIND_PER_VERTEX ); - geometry->setNormalArray( normals_quad ); + normals_quad->setBinding(osg::Array::BIND_PER_VERTEX); + geometry->setNormalArray(normals_quad); } - if( add_color_array ) + if (add_color_array) { osg::ref_ptr colors = new osg::Vec4Array(); - colors->resize( vertices_quad->size(), osg::Vec4f( 0.6f, 0.6f, 0.6f, 0.1f ) ); - colors->setBinding( osg::Array::BIND_PER_VERTEX ); - geometry->setColorArray( colors ); + colors->resize(vertices_quad->size(), osg::Vec4f(0.6f, 0.6f, 0.6f, 0.1f)); + colors->setBinding(osg::Array::BIND_PER_VERTEX); + geometry->setColorArray(colors); } - geometry->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::QUADS, 0, vertices_quad->size() ) ); - geode->addDrawable( geometry ); + geometry->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS, 0, vertices_quad->size())); + geode->addDrawable(geometry); } } } - static void drawPolyline( const carve::input::PolylineSetData* polyline_data, osg::Geode* geode, bool add_color_array = false ) + static void drawPolyline(const carve::input::PolylineSetData* polyline_data, osg::Geode* geode, bool add_color_array = false) { if (!polyline_data) { return; } - + if (polyline_data->points.size() < 2) { return; @@ -531,9 +536,9 @@ class ConverterOSG : public StatusCallback } osg::ref_ptr vertices = new osg::Vec3Array(); - carve::line::PolylineSet* polyline_set = polyline_data->create( carve::input::opts() ); + carve::line::PolylineSet* polyline_set = polyline_data->create(carve::input::opts()); - if( polyline_set->vertices.size() < 2 ) + if (polyline_set->vertices.size() < 2) { #ifdef _DEBUG std::cout << __FUNC__ << ": polyline_set->vertices.size() < 2" << std::endl; @@ -541,62 +546,62 @@ class ConverterOSG : public StatusCallback return; } - for( auto it = polyline_set->lines.begin(); it != polyline_set->lines.end(); ++it ) + for (auto it = polyline_set->lines.begin(); it != polyline_set->lines.end(); ++it) { const carve::line::Polyline* pline = *it; size_t vertex_count = pline->vertexCount(); - for( size_t vertex_i = 0; vertex_i < vertex_count; ++vertex_i ) + for (size_t vertex_i = 0; vertex_i < vertex_count; ++vertex_i) { - if( vertex_i >= polyline_set->vertices.size() ) + if (vertex_i >= polyline_set->vertices.size()) { #ifdef _DEBUG std::cout << __FUNC__ << ": vertex_i >= polyline_set->vertices.size()" << std::endl; #endif continue; } - const carve::line::Vertex* v = pline->vertex( vertex_i ); - vertices->push_back( osg::Vec3d( v->v[0], v->v[1], v->v[2] ) ); + const carve::line::Vertex* v = pline->vertex(vertex_i); + vertices->push_back(osg::Vec3d(v->v[0], v->v[1], v->v[2])); } } osg::ref_ptr geometry = new osg::Geometry(); - geometry->setVertexArray( vertices ); - geometry->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::LINE_STRIP, 0, vertices->size() ) ); + geometry->setVertexArray(vertices); + geometry->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINE_STRIP, 0, vertices->size())); - if( add_color_array ) + if (add_color_array) { - osg::Vec4f color( 0.6f, 0.6f, 0.6f, 0.1f ); - osg::ref_ptr colors = new osg::Vec4Array( vertices->size(), &color ); - colors->setBinding( osg::Array::BIND_PER_VERTEX ); - geometry->setColorArray( colors ); + osg::Vec4f color(0.6f, 0.6f, 0.6f, 0.1f); + osg::ref_ptr colors = new osg::Vec4Array(vertices->size(), &color); + colors->setBinding(osg::Array::BIND_PER_VERTEX); + geometry->setColorArray(colors); } - geode->addDrawable( geometry ); + geode->addDrawable(geometry); } - static void computeCreaseEdgesFromMeshset( const shared_ptr >& meshset, std::vector* >& vec_edges_out, const double crease_angle ) + static void computeCreaseEdgesFromMeshset(const shared_ptr >& meshset, std::vector* >& vec_edges_out, const double crease_angle) { - if( !meshset ) + if (!meshset) { return; } - for( size_t i_mesh = 0; i_mesh < meshset->meshes.size(); ++i_mesh ) + for (size_t i_mesh = 0; i_mesh < meshset->meshes.size(); ++i_mesh) { const carve::mesh::Mesh<3>* mesh = meshset->meshes[i_mesh]; const std::vector* >& vec_closed_edges = mesh->closed_edges; - for( size_t i_edge = 0; i_edge < vec_closed_edges.size(); ++i_edge ) + for (size_t i_edge = 0; i_edge < vec_closed_edges.size(); ++i_edge) { carve::mesh::Edge<3>* edge = vec_closed_edges[i_edge]; - if( !edge ) + if (!edge) { continue; } carve::mesh::Edge<3>* edge_reverse = edge->rev; - if( !edge_reverse ) + if (!edge_reverse) { continue; } @@ -605,684 +610,561 @@ class ConverterOSG : public StatusCallback const carve::geom::vector<3>& f1_normal = face->plane.N; const carve::geom::vector<3>& f2_normal = face_reverse->plane.N; - const double cos_angle = dot( f1_normal, f2_normal ); - if( cos_angle > 0 ) + const double cos_angle = dot(f1_normal, f2_normal); + if (cos_angle > 0) { - const double deviation = std::abs( cos_angle - 1.0 ); - if( deviation < crease_angle ) + const double deviation = std::abs(cos_angle - 1.0); + if (deviation < crease_angle) { continue; } } // TODO: if area of face and face_reverse is equal, skip the crease edge. It could be the inside or outside of a cylinder. Check also if > 2 faces in a row have same normal angle differences - vec_edges_out.push_back( edge ); + vec_edges_out.push_back(edge); } } } - static void renderMeshsetCreaseEdges( const shared_ptr >& meshset, osg::Geode* target_geode, const double crease_angle, const float line_width ) + static void renderMeshsetCreaseEdges(const shared_ptr >& meshset, osg::Geode* target_geode, const double crease_angle, const float line_width) { - if( !meshset ) + if (!meshset) { return; } - if( !target_geode ) + if (!target_geode) { return; } std::vector* > vec_crease_edges; - computeCreaseEdgesFromMeshset( meshset, vec_crease_edges, crease_angle ); + computeCreaseEdgesFromMeshset(meshset, vec_crease_edges, crease_angle); - if( vec_crease_edges.size() > 0 ) + if (vec_crease_edges.size() > 0) { osg::ref_ptr vertices = new osg::Vec3Array(); - for( size_t i_edge = 0; i_edge < vec_crease_edges.size(); ++i_edge ) + for (size_t i_edge = 0; i_edge < vec_crease_edges.size(); ++i_edge) { const carve::mesh::Edge<3>* edge = vec_crease_edges[i_edge]; const carve::geom::vector<3>& vertex1 = edge->v1()->v; const carve::geom::vector<3>& vertex2 = edge->v2()->v; - vertices->push_back( osg::Vec3d( vertex1.x, vertex1.y, vertex1.z ) ); - vertices->push_back( osg::Vec3d( vertex2.x, vertex2.y, vertex2.z ) ); + vertices->push_back(osg::Vec3d(vertex1.x, vertex1.y, vertex1.z)); + vertices->push_back(osg::Vec3d(vertex2.x, vertex2.y, vertex2.z)); } osg::ref_ptr geometry = new osg::Geometry(); geometry->setName("creaseEdges"); - geometry->setVertexArray( vertices ); - geometry->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::LINES, 0, vertices->size() ) ); - geometry->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF ); - geometry->getOrCreateStateSet()->setMode( GL_BLEND, osg::StateAttribute::ON ); - geometry->getOrCreateStateSet()->setAttributeAndModes( new osg::LineWidth( line_width ), osg::StateAttribute::ON ); + geometry->setVertexArray(vertices); + geometry->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES, 0, vertices->size())); + geometry->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF); + geometry->getOrCreateStateSet()->setMode(GL_BLEND, osg::StateAttribute::ON); + geometry->getOrCreateStateSet()->setAttributeAndModes(new osg::LineWidth(line_width), osg::StateAttribute::ON); osg::Material* mat = new osg::Material(); mat->setDiffuse(osg::Material::FRONT, osg::Vec4f(0.3f, 0.3f, 0.35f, 0.8f)); geometry->getOrCreateStateSet()->setAttributeAndModes(mat, osg::StateAttribute::ON); - geometry->getOrCreateStateSet()->setMode( GL_LINE_SMOOTH, osg::StateAttribute::ON ); - geometry->getOrCreateStateSet()->setAttributeAndModes( new osg::Hint( GL_LINE_SMOOTH_HINT, GL_NICEST ), osg::StateAttribute::ON ); - geometry->getOrCreateStateSet()->setRenderBinDetails( 10, "RenderBin"); - target_geode->addDrawable( geometry ); + geometry->getOrCreateStateSet()->setMode(GL_LINE_SMOOTH, osg::StateAttribute::ON); + geometry->getOrCreateStateSet()->setAttributeAndModes(new osg::Hint(GL_LINE_SMOOTH_HINT, GL_NICEST), osg::StateAttribute::ON); + geometry->getOrCreateStateSet()->setRenderBinDetails(10, "RenderBin"); + target_geode->addDrawable(geometry); } } - void applyAppearancesToGroup( const std::vector >& vec_product_appearances, osg::Group* grp ) + void applyAppearancesToGroup(const std::vector >& vec_product_appearances, osg::Group* grp) { - for( size_t ii = 0; ii < vec_product_appearances.size(); ++ii ) + for (size_t ii = 0; ii < vec_product_appearances.size(); ++ii) { const shared_ptr& appearance = vec_product_appearances[ii]; - if( !appearance ) + if (!appearance) { continue; } - if( appearance->m_apply_to_geometry_type == AppearanceData::GEOM_TYPE_SURFACE || appearance->m_apply_to_geometry_type == AppearanceData::GEOM_TYPE_ANY ) + if (appearance->m_apply_to_geometry_type == AppearanceData::GEOM_TYPE_SURFACE || appearance->m_apply_to_geometry_type == AppearanceData::GEOM_TYPE_ANY) { osg::ref_ptr item_stateset; - convertToOSGStateSet( appearance, item_stateset ); - if( item_stateset ) + convertToOSGStateSet(appearance, item_stateset); + if (item_stateset) { osg::StateSet* existing_item_stateset = grp->getStateSet(); - if( existing_item_stateset ) + if (existing_item_stateset) { - if( existing_item_stateset != item_stateset ) + if (existing_item_stateset != item_stateset) { - existing_item_stateset->merge( *item_stateset ); + existing_item_stateset->merge(*item_stateset); } } else { - grp->setStateSet( item_stateset ); + grp->setStateSet(item_stateset); } } } - else if( appearance->m_apply_to_geometry_type == AppearanceData::GEOM_TYPE_CURVE ) + else if (appearance->m_apply_to_geometry_type == AppearanceData::GEOM_TYPE_CURVE) { } } } - osg::Matrixd convertMatrixToOSG( const carve::math::Matrix& mat_in ) + osg::Matrixd convertMatrixToOSG(const carve::math::Matrix& mat_in) { - return osg::Matrixd( mat_in.m[0][0], mat_in.m[0][1], mat_in.m[0][2], mat_in.m[0][3], + return osg::Matrixd(mat_in.m[0][0], mat_in.m[0][1], mat_in.m[0][2], mat_in.m[0][3], mat_in.m[1][0], mat_in.m[1][1], mat_in.m[1][2], mat_in.m[1][3], mat_in.m[2][0], mat_in.m[2][1], mat_in.m[2][2], mat_in.m[2][3], - mat_in.m[3][0], mat_in.m[3][1], mat_in.m[3][2], mat_in.m[3][3] ); + mat_in.m[3][0], mat_in.m[3][1], mat_in.m[3][2], mat_in.m[3][3]); } - //\brief method convertProductShapeToOSG: creates geometry objects from an IfcProduct object - // caution: when using OpenMP, this method runs in parallel threads, so every write access to member variables needs a write lock - void convertProductShapeToOSG( shared_ptr& product_shape, std::map >& map_representation_switches ) + void convertMeshSets(std::vector > >& vecMeshSets, osg::Geode* geode, size_t ii_item) { - if( product_shape->m_ifc_object_definition.expired() ) - { - return; - } - - shared_ptr ifc_object_def(product_shape->m_ifc_object_definition); - shared_ptr ifc_product = dynamic_pointer_cast(ifc_object_def); - if( !ifc_product ) - { - return; - } - std::string product_guid; - if (ifc_product->m_GlobalId) - { - product_guid = ifc_product->m_GlobalId->m_value; - } - std::stringstream strs_product_switch_name; - strs_product_switch_name << product_guid << ":" << EntityFactory::getStringForClassID( ifc_product->classID() ) << " group"; - bool draw_bounding_box = false; - double crease_angle = m_faces_crease_angle; double min_triangle_area = m_geom_settings->getMinTriangleArea(); - double eps = m_geom_settings->getEpsilonCoplanarDistance();// m_epsCoplanarDistance; - std::vector > vec_current_switches; - - // create OSG objects - std::vector >& vec_product_representations = product_shape->m_vec_representations; - for( size_t ii_representation = 0; ii_representation < vec_product_representations.size(); ++ii_representation ) + double eps = m_geom_settings->getEpsilonCoplanarDistance(); + double crease_angle = m_faces_crease_angle; + for (size_t ii = 0; ii < vecMeshSets.size(); ++ii) { - const shared_ptr& product_representation_data = vec_product_representations[ii_representation]; - if( product_representation_data->m_ifc_representation.expired() ) + shared_ptr >& item_meshset = vecMeshSets[ii]; + + //static void retriangulateMeshSetSimple(shared_ptr >&meshset, bool ignoreResultOpenEdges, GeomProcessingParams & params, size_t retryCount); + + double epsCoplanarFacesAngle = eps; + double minFaceArea = eps; + bool dumpMeshes = false; + GeomProcessingParams params(eps, epsCoplanarFacesAngle, minFaceArea, dumpMeshes); + MeshOps::retriangulateMeshSetSimple(item_meshset, true, params, 0); + //osg::ref_ptr geode = item_group;//new osg::Geode(); + drawMeshSet(item_meshset, geode, crease_angle, min_triangle_area); + + if (m_render_crease_edges) { - continue; + renderMeshsetCreaseEdges(item_meshset, geode, m_crease_edges_max_delta_angle, m_crease_edges_line_width); } - shared_ptr ifc_representation( product_representation_data->m_ifc_representation ); - const int representation_id = ifc_representation->m_tag; - osg::ref_ptr representation_switch = new osg::Switch(); - -#ifdef _DEBUG - std::stringstream strs_representation_name; - strs_representation_name << strs_product_switch_name.str().c_str() << ", representation " << ii_representation; - representation_switch->setName( strs_representation_name.str().c_str() ); -#endif - const std::vector >& product_items = product_representation_data->m_vec_item_data; - for( size_t i_item = 0; i_item < product_items.size(); ++i_item ) + if (m_draw_bounding_box) { - const shared_ptr& item_shape = product_items[i_item]; - osg::ref_ptr item_group = new osg::MatrixTransform(); - -#ifdef _DEBUG - std::stringstream strs_item_name; - strs_item_name << strs_representation_name.str().c_str() << ", item " << i_item; - item_group->setName( strs_item_name.str().c_str() ); -#endif + carve::geom::aabb<3> bbox = item_meshset->getAABB(); + osg::ref_ptr bbox_geom = new osg::Geometry(); + drawBoundingBox(bbox, bbox_geom); + geode->addDrawable(bbox_geom); + } + } + } - // create shape for open shells - for( size_t ii = 0; ii < item_shape->m_meshsets_open.size(); ++ii ) - { - shared_ptr >& item_meshset = item_shape->m_meshsets_open[ii]; - MeshOps::retriangulateMeshSetSimple( item_meshset, true, eps, 0 ); - osg::ref_ptr geode = new osg::Geode(); - drawMeshSet( item_meshset, geode, crease_angle, min_triangle_area ); + void convertGeometricItem(const shared_ptr& item_data, shared_ptr& ifc_product, size_t ii_representation, size_t ii_item, osg::Group* parentNode, float transparencyOverride) + { - if( m_render_crease_edges ) - { - renderMeshsetCreaseEdges( item_meshset, geode, m_crease_edges_max_delta_angle, m_crease_edges_line_width ); - } + bool includeChildren = false; + if (item_data->hasGeometricRepresentation(includeChildren)) + { + osg::ref_ptr item_geode = new osg::Geode(); - // disable back face culling for open meshes - geode->getOrCreateStateSet()->setAttributeAndModes( m_cull_back_off.get(), osg::StateAttribute::OFF ); - item_group->addChild( geode ); + std::string product_guid; + if (ifc_product->m_GlobalId) + { + product_guid = ifc_product->m_GlobalId->m_value; + } - if( draw_bounding_box ) - { - carve::geom::aabb<3> bbox = item_meshset->getAABB(); - osg::ref_ptr bbox_geom = new osg::Geometry(); - drawBoundingBox( bbox, bbox_geom ); - geode->addDrawable( bbox_geom ); - } + std::stringstream strs_product_switch_name; + strs_product_switch_name << product_guid << ":" << EntityFactory::getStringForClassID(ifc_product->classID()) << " group"; + std::string product_switch_name = strs_product_switch_name.str(); #ifdef _DEBUG - std::stringstream strs_item_meshset_name; - strs_item_meshset_name << strs_item_name.str().c_str() << ", open meshset " << ii; - geode->setName( strs_item_meshset_name.str().c_str() ); + int tag = ifc_product->m_tag; + if (product_guid.compare("3WMG3ehJnBiu4F_L5ltNmO") == 0) + { + int wait = 0; + } #endif - } - - // create shape for meshsets - for( size_t ii = 0; ii < item_shape->m_meshsets.size(); ++ii ) - { - shared_ptr >& item_meshset = item_shape->m_meshsets[ii]; - MeshOps::retriangulateMeshSetSimple( item_meshset, true, eps, 0 ); - osg::ref_ptr geode_meshset = new osg::Geode(); - drawMeshSet( item_meshset, geode_meshset, crease_angle, min_triangle_area); - item_group->addChild( geode_meshset ); - - if( m_render_crease_edges ) - { - renderMeshsetCreaseEdges( item_meshset, geode_meshset, m_crease_edges_max_delta_angle, m_crease_edges_line_width ); - } - if( draw_bounding_box ) - { - carve::geom::aabb<3> bbox = item_meshset->getAABB(); - osg::ref_ptr bbox_geom = new osg::Geometry(); - drawBoundingBox( bbox, bbox_geom ); - geode_meshset->addDrawable( bbox_geom ); - } + // create shape for open shells + if (item_data->m_meshsets_open.size() > 0) + { + osg::ref_ptr geode_open_meshes = new osg::Geode(); + convertMeshSets(item_data->m_meshsets_open, geode_open_meshes, ii_item); + // disable back face culling for open meshes + geode_open_meshes->getOrCreateStateSet()->setAttributeAndModes(m_cull_back_off.get(), osg::StateAttribute::OFF); + item_geode->addChild(geode_open_meshes); + } -#ifdef _DEBUG - std::stringstream strs_item_meshset_name; - strs_item_meshset_name << strs_item_name.str().c_str() << ", meshset " << ii; - geode_meshset->setName( strs_item_meshset_name.str().c_str() ); -#endif - } + convertMeshSets(item_data->m_meshsets, item_geode, ii_item); - // create shape for points - const std::vector >& vertex_points = item_shape->getVertexPoints(); - for( size_t ii = 0; ii < vertex_points.size(); ++ii ) + // create shape for points + const std::vector >& vertex_points = item_data->getVertexPoints(); + for (size_t ii = 0; ii < vertex_points.size(); ++ii) + { + const shared_ptr& pointset_data = vertex_points[ii]; + if (pointset_data) { - const shared_ptr& pointset_data = vertex_points[ii]; - if( pointset_data ) + if (pointset_data->points.size() > 0) { - if( pointset_data->points.size() > 0 ) - { - osg::ref_ptr geode = new osg::Geode(); + osg::ref_ptr geode = new osg::Geode(); - osg::ref_ptr vertices = new osg::Vec3Array(); - for( size_t i_pointset_point = 0; i_pointset_point < pointset_data->points.size(); ++i_pointset_point ) - { - vec3& carve_point = pointset_data->points[i_pointset_point]; - vertices->push_back( osg::Vec3d( carve_point.x, carve_point.y, carve_point.z ) ); - } + osg::ref_ptr vertices = new osg::Vec3Array(); + for (size_t i_pointset_point = 0; i_pointset_point < pointset_data->points.size(); ++i_pointset_point) + { + vec3& carve_point = pointset_data->points[i_pointset_point]; + vertices->push_back(osg::Vec3d(carve_point.x, carve_point.y, carve_point.z)); + } - osg::ref_ptr geometry = new osg::Geometry(); - geometry->setVertexArray( vertices ); - geometry->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::POINTS, 0, vertices->size() ) ); - geode->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF ); - geode->getOrCreateStateSet()->setAttribute( new osg::Point( 3.0f ), osg::StateAttribute::ON ); - geode->addDrawable( geometry ); - geode->setCullingActive( false ); - item_group->addChild( geode ); + osg::ref_ptr geometry = new osg::Geometry(); + geometry->setVertexArray(vertices); + geometry->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POINTS, 0, vertices->size())); + geode->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF); + geode->getOrCreateStateSet()->setAttribute(new osg::Point(3.0f), osg::StateAttribute::ON); + geode->addDrawable(geometry); + geode->setCullingActive(false); + item_geode->addChild(geode); #ifdef _DEBUG - std::stringstream strs_item_meshset_name; - strs_item_meshset_name << strs_item_name.str().c_str() << ", vertex_point " << ii; - geode->setName( strs_item_meshset_name.str().c_str() ); + std::stringstream strs_item_meshset_name; + strs_item_meshset_name << " vertex_point " << ii; + geode->setName(strs_item_meshset_name.str().c_str()); #endif - } } } + } - // create shape for polylines - for( size_t ii = 0; ii < item_shape->m_polylines.size(); ++ii ) - { - shared_ptr& polyline_data = item_shape->m_polylines[ii]; - osg::ref_ptr geode = new osg::Geode(); - geode->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF ); - drawPolyline( polyline_data.get(), geode ); - item_group->addChild( geode ); + // create shape for polylines + for (size_t ii = 0; ii < item_data->m_polylines.size(); ++ii) + { + shared_ptr& polyline_data = item_data->m_polylines[ii]; + osg::ref_ptr geode = new osg::Geode(); + geode->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF); + drawPolyline(polyline_data.get(), geode); + item_geode->addChild(geode); #ifdef _DEBUG - std::stringstream strs_item_meshset_name; - strs_item_meshset_name << strs_item_name.str().c_str() << ", polylines " << ii; - geode->setName( strs_item_meshset_name.str().c_str() ); + std::stringstream strs_item_meshset_name; + strs_item_meshset_name << " polylines " << ii; + geode->setName(strs_item_meshset_name.str().c_str()); #endif - } + } - if( m_geom_settings->isShowTextLiterals() ) + if (m_geom_settings->isShowTextLiterals()) + { + for (size_t ii = 0; ii < item_data->m_vec_text_literals.size(); ++ii) { - for( size_t ii = 0; ii < item_shape->m_vec_text_literals.size(); ++ii ) + shared_ptr& text_data = item_data->m_vec_text_literals[ii]; + if (!text_data) { - shared_ptr& text_data = item_shape->m_vec_text_literals[ii]; - if( !text_data ) - { - continue; - } - carve::math::Matrix& text_pos = text_data->m_text_position; - // TODO: handle rotation - - std::string text_str; - text_str.assign( text_data->m_text.begin(), text_data->m_text.end() ); + continue; + } + carve::math::Matrix& text_pos = text_data->m_text_position; + // TODO: handle rotation - osg::Vec3 pos2( text_pos._41, text_pos._42, text_pos._43 ); + std::string text_str; + text_str.assign(text_data->m_text.begin(), text_data->m_text.end()); - osg::ref_ptr txt = new osgText::Text(); - txt->setFont( "fonts/arial.ttf" ); - txt->setColor( osg::Vec4f( 0, 0, 0, 1 ) ); - txt->setCharacterSize( 0.1f ); - txt->setAutoRotateToScreen( true ); - txt->setPosition( pos2 ); - txt->setText( text_str.c_str() ); - txt->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF ); + osg::Vec3 pos2(text_pos._41, text_pos._42, text_pos._43); - osg::ref_ptr geode = new osg::Geode(); - geode->addDrawable( txt ); - item_group->addChild( geode ); - } - } - - // apply statesets if there are any - if( item_shape->m_vec_item_appearances.size() > 0 ) - { - applyAppearancesToGroup( item_shape->m_vec_item_appearances, item_group ); - } + osg::ref_ptr txt = new osgText::Text(); + txt->setFont("fonts/arial.ttf"); + txt->setColor(osg::Vec4f(0, 0, 0, 1)); + txt->setCharacterSize(0.1f); + txt->setAutoRotateToScreen(true); + txt->setPosition(pos2); + txt->setText(text_str.c_str()); + txt->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF); - // If anything has been created, add it to the representation group - if( item_group->getNumChildren() > 0 ) - { -#ifdef _DEBUG - if( item_group->getNumParents() > 0 ) - { - std::cout << __FUNC__ << ": item_group->getNumParents() > 0" << std::endl; - } -#endif - representation_switch->addChild( item_group ); + osg::ref_ptr geode = new osg::Geode(); + geode->addDrawable(txt); + //representation_switch->addChild(geode); } } // apply statesets if there are any - if( product_representation_data->m_vec_representation_appearances.size() > 0 ) + if (item_data->m_vec_item_appearances.size() > 0) { - applyAppearancesToGroup( product_representation_data->m_vec_representation_appearances, representation_switch ); + applyAppearancesToGroup(item_data->m_vec_item_appearances, item_geode); } // If anything has been created, add it to the product group - if( representation_switch->getNumChildren() > 0 ) + if (item_geode->getNumChildren() > 0) { #ifdef _DEBUG - if( representation_switch->getNumParents() > 0 ) + if (item_geode->getNumParents() > 0) { std::cout << __FUNC__ << ": product_representation_switch->getNumParents() > 0" << std::endl; } #endif - // enable transparency for certain objects - if( dynamic_pointer_cast(ifc_product) ) - { - SceneGraphUtils::setMaterialAlpha(representation_switch, 0.1f, true); - } - else if( dynamic_pointer_cast(ifc_product) || dynamic_pointer_cast(ifc_product) ) - { - SceneGraphUtils::setMaterialAlpha( representation_switch, 0.2f, false ); - } - // check if parent building element is window - if( ifc_product->m_Decomposes_inverse.size() > 0 ) + if (transparencyOverride > 0) { - for( size_t ii_decomposes = 0; ii_decomposes < ifc_product->m_Decomposes_inverse.size(); ++ii_decomposes ) - { - const weak_ptr& decomposes_weak = ifc_product->m_Decomposes_inverse[ii_decomposes]; - if( decomposes_weak.expired() ) - { - continue; - } - shared_ptr decomposes_ptr(decomposes_weak); - shared_ptr& relating_object = decomposes_ptr->m_RelatingObject; - if( relating_object ) - { - if( dynamic_pointer_cast(relating_object) || dynamic_pointer_cast(relating_object) ) - { - SceneGraphUtils::setMaterialAlpha(representation_switch, 0.6f, false); - } - } - } + SceneGraphUtils::setMaterialAlpha(item_geode, transparencyOverride, false); } - map_representation_switches.insert( std::make_pair( representation_id, representation_switch ) ); - vec_current_switches.push_back(representation_switch); + parentNode->addChild(item_geode); } } - // TODO: if no color or material is given, set color 231/219/169 for walls, 140/140/140 for slabs - if (product_shape->m_vec_product_appearances.size() > 0) + for (size_t i_item = 0; i_item < item_data->m_child_items.size(); ++i_item) { - for (auto representation_switch : vec_current_switches) - { - applyAppearancesToGroup(product_shape->m_vec_product_appearances, representation_switch); - } + const shared_ptr& child = item_data->m_child_items[i_item]; + convertGeometricItem(child, ifc_product, ii_representation, i_item, parentNode, transparencyOverride); } - } - /*\brief method convertToOSG: Creates geometry for OpenSceneGraph from given ProductShapeData. - \param[out] parent_group Group to append the geometry. - **/ - void convertToOSG( const std::map >& map_shape_data, osg::ref_ptr parent_group ) - { - progressTextCallback( "Converting geometry to OpenGL format ..." ); - progressValueCallback( 0, "scenegraph" ); - m_map_entity_guid_to_switch.clear(); - m_map_representation_id_to_switch.clear(); - shared_ptr ifc_project_data; - std::vector > vec_products; + } - for( auto it = map_shape_data.begin(); it != map_shape_data.end(); ++it ) + //\brief method convertProductShapeToOSG: creates geometry objects from an IfcProduct object + void convertProductShapeToOSG(shared_ptr& product_shape, osg::Group* parentNode, std::stringstream& errorStream, float transparencyOverride) + { + std::string product_guid = ""; + try { - shared_ptr shape_data = it->second; - if( shape_data ) - { - vec_products.push_back( shape_data ); - } - } + // parentNode + // |-----> product_switch + // |-----> product_transform + // | |-----> geometric_items + // |-----> child_products - // create geometry for for each IfcProduct independently, spatial structure will be resolved later - std::map >* map_entity_guid = &m_map_entity_guid_to_switch; - std::map >* map_representations = &m_map_representation_id_to_switch; - const int num_products = (int)vec_products.size(); + osg::ref_ptr product_transform = new osg::MatrixTransform(); + product_transform->setMatrix(convertMatrixToOSG(product_shape->getTransform())); -#ifdef _OPENMP - Mutex writelock_map; - Mutex writelock_ifc_project; - Mutex writelock_message_callback; + osg::ref_ptr product_switch = new osg::Switch(); + product_switch->addChild(product_transform); + parentNode->addChild(product_switch); -#pragma omp parallel firstprivate(num_products) shared(map_entity_guid, map_representations) - { - // time for one product may vary significantly, so schedule not so many -#pragma omp for schedule(dynamic,40) -#endif - for( int i = 0; i < num_products; ++i ) - { - shared_ptr& shape_data = vec_products[i]; - - weak_ptr& ifc_object_def_weak = shape_data->m_ifc_object_definition; - if( ifc_object_def_weak.expired() ) - { - continue; - } + product_guid = product_shape->m_entity_guid; + auto it_find = m_map_entity_guid_to_switch.find(product_guid); - shared_ptr ifc_object_def(shape_data->m_ifc_object_definition); + if (it_find != m_map_entity_guid_to_switch.end()) + { + m_map_entity_guid_to_switch[product_guid] = product_switch; + } - shared_ptr ifc_project = dynamic_pointer_cast(ifc_object_def); - if (ifc_project) - { -#ifdef _OPENMP - ScopedLock scoped_lock(writelock_ifc_project); -#endif - ifc_project_data = shape_data; - } + product_shape->m_added_to_spatial_structure = true; + std::string entityType = ""; + // create OSG objects + if (!product_shape->m_ifc_object_definition.expired()) + { + shared_ptr ifc_object_def(product_shape->m_ifc_object_definition); shared_ptr ifc_product = dynamic_pointer_cast(ifc_object_def); - if (!ifc_product) - { - continue; - } - - std::stringstream thread_err; - if( dynamic_pointer_cast(ifc_product) ) - { - // geometry will be created in method subtractOpenings - continue; - } - if( !ifc_product->m_Representation ) - { - continue; - } + entityType = EntityFactory::getStringForClassID(ifc_object_def->classID()); - const int product_id = ifc_product->m_tag; - std::string product_guid; - std::map > map_representation_switches; - try - { - convertProductShapeToOSG( shape_data, map_representation_switches ); - } - catch( BuildingException& e ) - { - thread_err << e.what(); - } - catch( carve::exception& e ) + if (ifc_product) { - thread_err << e.str(); - } - catch( std::exception& e ) - { - thread_err << e.what(); - } - catch( ... ) - { - thread_err << "undefined error, product id " << product_id; - } - - if (ifc_product->m_GlobalId) - { - product_guid = ifc_product->m_GlobalId->m_value; - } - - if( map_representation_switches.size() > 0 ) - { - osg::ref_ptr product_switch = new osg::Switch(); - - osg::ref_ptr product_transform = new osg::MatrixTransform(); - product_transform->setMatrix( convertMatrixToOSG( shape_data->getTransform() ) ); - product_switch->addChild( product_transform ); - - std::stringstream strs_product_switch_name; - strs_product_switch_name << product_guid << ":" << EntityFactory::getStringForClassID( ifc_product->classID() ) << " group"; - product_switch->setName( strs_product_switch_name.str().c_str() ); - - for( auto it_map = map_representation_switches.begin(); it_map != map_representation_switches.end(); ++it_map ) + // enable transparency for certain objects + if (dynamic_pointer_cast(ifc_product)) { - osg::ref_ptr& repres_switch = it_map->second; - product_transform->addChild( repres_switch ); + transparencyOverride = 0.1f; } - - // apply statesets if there are any - const std::vector >& vec_product_appearances = shape_data->getAppearances(); - if( vec_product_appearances.size() > 0 ) + else if (dynamic_pointer_cast(ifc_product) || dynamic_pointer_cast(ifc_product)) { - applyAppearancesToGroup( vec_product_appearances, product_switch ); + transparencyOverride = 0.2f; } -#ifdef _OPENMP - ScopedLock scoped_lock( writelock_map ); -#endif - map_entity_guid->insert(std::make_pair(product_guid, product_switch)); - map_representations->insert( map_representation_switches.begin(), map_representation_switches.end() ); - } + // check if parent building element is window + if (ifc_product->m_Decomposes_inverse.size() > 0) + { + for (size_t ii_decomposes = 0; ii_decomposes < ifc_product->m_Decomposes_inverse.size(); ++ii_decomposes) + { + const weak_ptr& decomposes_weak = ifc_product->m_Decomposes_inverse[ii_decomposes]; + if (decomposes_weak.expired()) + { + continue; + } + shared_ptr decomposes_ptr(decomposes_weak); + shared_ptr& relating_object = decomposes_ptr->m_RelatingObject; + if (relating_object) + { + if (dynamic_pointer_cast(relating_object) || dynamic_pointer_cast(relating_object)) + { + transparencyOverride = 0.6f; + } + } + } + } - if( thread_err.tellp() > 0 ) - { -#ifdef _OPENMP - ScopedLock scoped_lock( writelock_message_callback ); +#ifdef _DEBUG + if (product_guid.compare("3WMG3ehJnBiu4F_L5ltNmO") == 0) + { + int wait = 0; + } #endif - messageCallback( thread_err.str().c_str(), StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__ ); - } - // progress callback - double progress = (double)i / (double)num_products; - if( progress - m_recent_progress > 0.02 ) - { -#ifdef _OPENMP - if( omp_get_thread_num() == 0 ) -#endif + for (size_t ii_representation = 0; ii_representation < product_shape->m_geometric_items.size(); ++ii_representation) { - // leave 10% of progress to openscenegraph internals - progressValueCallback( progress*0.9, "scenegraph" ); - m_recent_progress = progress; + const shared_ptr& geom_item = product_shape->m_geometric_items[ii_representation]; + osg::Group* grp = product_transform.get(); + convertGeometricItem(geom_item, ifc_product, ii_representation, 0, grp, transparencyOverride); } } } -#ifdef _OPENMP - } // implicit barrier -#endif - try - { - // now resolve spatial structure - if( ifc_project_data ) + std::stringstream strsName; + strsName << product_guid; + product_switch->setName(strsName.str()); + + for (size_t i_item = 0; i_item < product_shape->m_vec_children.size(); ++i_item) + { + shared_ptr& child = product_shape->m_vec_children[i_item]; + osg::Group* grp = product_switch.get(); + convertProductShapeToOSG(child, grp, errorStream, transparencyOverride); + } + + // TODO: if no color or material is given, set color 231/219/169 for walls, 140/140/140 for slabs + if (product_shape->m_vec_product_appearances.size() > 0) { - resolveProjectStructure( ifc_project_data, parent_group ); + applyAppearancesToGroup(product_shape->m_vec_product_appearances, product_transform); + } + + ++m_numConvertedProducts; + // progress callback + double progress = (double)m_numConvertedProducts / (double)m_numProductsInModel; + if (progress - m_recent_progress > 0.02) + { + // leave 10% of progress to openscenegraph internals + progressValueCallback(progress * 0.9, "scenegraph"); + m_recent_progress = progress; } } - catch( BuildingException& e ) + catch (BuildingException& e) { - messageCallback( e.what(), StatusCallback::MESSAGE_TYPE_ERROR, "" ); + errorStream << e.what(); } - catch( std::exception& e ) + catch (carve::exception& e) { - messageCallback( e.what(), StatusCallback::MESSAGE_TYPE_ERROR, "" ); + errorStream << e.str(); } - catch( ... ) + catch (std::exception& e) { - messageCallback( "undefined error", StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__ ); + errorStream << e.what(); + } + catch (...) + { + errorStream << "undefined error, product id " << product_guid; } - progressValueCallback( 0.9, "scenegraph" ); } - void addNodes( const std::map >& map_shape_data, osg::ref_ptr& target_group ) + + /*\brief method convertToOSG: Creates geometry for OpenSceneGraph from given ProductShapeData. + \param[out] parent_group Group to append the geometry. + **/ + void convertToOSG(const std::map >& map_shape_data, osg::ref_ptr parent_group) { - // check if there are entities that are not in spatial structure - if( !target_group ) - { - target_group = new osg::Switch(); - } + progressTextCallback("Converting geometry to OpenGL format ..."); + progressValueCallback(0, "scenegraph"); - for( auto it_product_shapes = map_shape_data.begin(); it_product_shapes != map_shape_data.end(); ++it_product_shapes ) + clearInputCache(); + + shared_ptr ifc_project_data; + for (auto it = map_shape_data.begin(); it != map_shape_data.end(); ++it) { - std::string product_guid = it_product_shapes->first; - auto it_find = m_map_entity_guid_to_switch.find(product_guid); + shared_ptr shape_data = it->second; + if (!shape_data) + { + continue; + } + + shape_data->m_added_to_spatial_structure = false; - if( it_find != m_map_entity_guid_to_switch.end() ) + weak_ptr& ifc_object_def_weak = shape_data->m_ifc_object_definition; + if (ifc_object_def_weak.expired()) { - osg::ref_ptr& sw = it_find->second; - if( sw ) - { - target_group->addChild( sw ); - } + continue; } - } - } - void resolveProjectStructure( const shared_ptr& product_data, osg::ref_ptr group ) - { - if( !product_data ) - { - return; - } + shared_ptr ifc_object_def(shape_data->m_ifc_object_definition); - if( product_data->m_ifc_object_definition.expired() ) - { - return; + shared_ptr ifc_project = dynamic_pointer_cast(ifc_object_def); + if (ifc_project) + { + ifc_project_data = shape_data; + } } + m_numProductsInModel = map_shape_data.size(); - shared_ptr ifc_object_def(product_data->m_ifc_object_definition); - if (!ifc_object_def) + std::stringstream errorStream; + if (ifc_project_data) { - return; + osg::Group* grp = parent_group.get(); + float transparencyOverride = -1.f; + convertProductShapeToOSG(ifc_project_data, grp, errorStream, transparencyOverride); } - std::string guid; - if (ifc_object_def->m_GlobalId) - { - guid = ifc_object_def->m_GlobalId->m_value; - } + osg::ref_ptr sw_objects_outside_spatial_structure = new osg::Switch(); + sw_objects_outside_spatial_structure->setName("IfcProduct objects outside spatial structure"); - if( SceneGraphUtils::inParentList(guid, group ) ) +#ifdef _DEBUG + auto bs = parent_group->getBound(); + double r = bs.radius(); + if (r > 0) { - messageCallback( "Cycle in project structure detected", StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__, ifc_object_def.get() ); - return; + std::cout << "r: " << r << std::endl; } +#endif - const std::vector >& vec_children = product_data->getChildren(); - for( size_t ii = 0; ii < vec_children.size(); ++ii ) + // in case there are IFC entities that are not in the spatial structure + for (auto it = map_shape_data.begin(); it != map_shape_data.end(); ++it) { - const shared_ptr& child_product_data = vec_children[ii]; - if( !child_product_data ) + shared_ptr shape_data = it->second; + if (!shape_data) { continue; } - osg::ref_ptr group_subparts = new osg::Switch(); - if( !child_product_data->m_ifc_object_definition.expired() ) + if (shape_data->m_added_to_spatial_structure) { - shared_ptr child_obj_def( child_product_data->m_ifc_object_definition ); - std::stringstream group_subparts_name; - group_subparts_name << guid << ":" << EntityFactory::getStringForClassID( ifc_object_def->classID() ); - group_subparts->setName( group_subparts_name.str().c_str() ); + continue; } - group->addChild( group_subparts ); - resolveProjectStructure( child_product_data, group_subparts ); - } + weak_ptr& ifc_object_def_weak = shape_data->m_ifc_object_definition; + if (ifc_object_def_weak.expired()) + { + continue; + } - auto it_product_map = m_map_entity_guid_to_switch.find(guid); - if( it_product_map != m_map_entity_guid_to_switch.end() ) - { - const osg::ref_ptr& product_switch = it_product_map->second; - if( product_switch ) + shared_ptr ifc_object_def(shape_data->m_ifc_object_definition); + + shared_ptr ifc_product = dynamic_pointer_cast(ifc_object_def); + if (!ifc_product) { - group->addChild( product_switch ); + continue; } - } - else - { - if( group->getNumChildren() == 0 ) + + if (dynamic_pointer_cast(ifc_product)) { - osg::ref_ptr product_switch = new osg::Switch(); - group->addChild( product_switch ); + // geometry will be created in method subtractOpenings + continue; + } - std::stringstream switch_name; - switch_name << guid << ":" << EntityFactory::getStringForClassID( ifc_object_def->classID() ); - product_switch->setName( switch_name.str().c_str() ); + if (dynamic_pointer_cast(ifc_product)) + { + // geometry will be created in method subtractOpenings + continue; } - m_map_entity_guid_to_switch[guid] = group; + if (!ifc_product->m_Representation) + { + continue; + } + + osg::ref_ptr product_group = new osg::Geode(); + float transparencyOverride = -1.f; + convertProductShapeToOSG(shape_data, product_group, errorStream, transparencyOverride); + + if (product_group->getNumChildren() > 0) + { + sw_objects_outside_spatial_structure->addChild(product_group); + } } + + if (sw_objects_outside_spatial_structure->getNumChildren() > 0) + { + parent_group->addChild(sw_objects_outside_spatial_structure); + } + + if (errorStream.tellp() > 0) + { + messageCallback(errorStream.str().c_str(), StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__); + } + + progressValueCallback(0.9, "scenegraph"); } - void convertToOSGStateSet( const shared_ptr& appearence, osg::ref_ptr& target_stateset ) + void convertToOSGStateSet(const shared_ptr& appearence, osg::ref_ptr& target_stateset) { - if( !appearence ) + if (!appearence) { return; } @@ -1305,29 +1187,29 @@ class ConverterOSG : public StatusCallback const float color_specular_b = appearence->m_color_specular.b(); const float color_specular_a = appearence->m_color_specular.a(); - osg::Vec4f ambientColor( color_ambient_r, color_ambient_g, color_ambient_b, transparency ); - osg::Vec4f diffuseColor( color_diffuse_r, color_diffuse_g, color_diffuse_b, transparency ); - osg::Vec4f specularColor( color_specular_r, color_specular_g, color_specular_b, transparency ); + osg::Vec4f ambientColor(color_ambient_r, color_ambient_g, color_ambient_b, transparency); + osg::Vec4f diffuseColor(color_diffuse_r, color_diffuse_g, color_diffuse_b, transparency); + osg::Vec4f specularColor(color_specular_r, color_specular_g, color_specular_b, transparency); // TODO: material caching and re-use osg::ref_ptr mat = new osg::Material(); - mat->setAmbient( osg::Material::FRONT, ambientColor ); - mat->setDiffuse( osg::Material::FRONT, diffuseColor ); - mat->setSpecular( osg::Material::FRONT, specularColor ); - mat->setShininess( osg::Material::FRONT, shininess ); - mat->setColorMode( osg::Material::SPECULAR ); + mat->setAmbient(osg::Material::FRONT, ambientColor); + mat->setDiffuse(osg::Material::FRONT, diffuseColor); + mat->setSpecular(osg::Material::FRONT, specularColor); + mat->setShininess(osg::Material::FRONT, shininess); + mat->setColorMode(osg::Material::SPECULAR); target_stateset = new osg::StateSet(); - target_stateset->setAttribute( mat, osg::StateAttribute::ON ); - - if( appearence->m_set_transparent ) + target_stateset->setAttribute(mat, osg::StateAttribute::ON); + + if (appearence->m_set_transparent) { - mat->setTransparency( osg::Material::FRONT, transparency ); - target_stateset->setMode( GL_BLEND, osg::StateAttribute::ON ); - target_stateset->setRenderingHint( osg::StateSet::TRANSPARENT_BIN ); + mat->setTransparency(osg::Material::FRONT, transparency); + target_stateset->setMode(GL_BLEND, osg::StateAttribute::ON); + target_stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN); } - if( appearence->m_specular_exponent != 0.f ) + if (appearence->m_specular_exponent != 0.f) { //osg::ref_ptr spec_highlights = new osgFX::SpecularHighlights(); //spec_highlights->setSpecularExponent( spec->m_value ); diff --git a/IfcPlusPlus/src/ifcpp/geometry/CurveConverter.h b/IfcPlusPlus/src/ifcpp/geometry/CurveConverter.h index 9dd19a4c2..c205f9e0c 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/CurveConverter.h +++ b/IfcPlusPlus/src/ifcpp/geometry/CurveConverter.h @@ -497,7 +497,7 @@ class CurveConverter : public StatusCallback #ifdef _DEBUG if( openingAngle > M_PI*1.01 ) { - glm::dvec4 color(0.2, 0.2, 0.2, 0.8); + glm::vec4 color(0.2, 0.2, 0.2, 0.8); GeomDebugDump::dumpPolyline(target_vec, color, true); } #endif diff --git a/IfcPlusPlus/src/ifcpp/geometry/FaceConverter.h b/IfcPlusPlus/src/ifcpp/geometry/FaceConverter.h index a60f4b2a8..26fd69fb2 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/FaceConverter.h +++ b/IfcPlusPlus/src/ifcpp/geometry/FaceConverter.h @@ -143,7 +143,7 @@ class FaceConverter : public StatusCallback PolyInputCache3D poly_cache(CARVE_EPSILON); bool mergeAlignedEdges = true; GeomProcessingParams params( m_geom_settings, outer_boundary.get(), this ); - MeshUtils::createTriangulated3DFace( face_loops, poly_cache, params ); + createTriangulated3DFace( face_loops, poly_cache, params ); item_data->addOpenPolyhedron( poly_cache.m_poly_data, CARVE_EPSILON ); item_data->applyTransformToItem( curve_bounded_plane_matrix ); } @@ -278,38 +278,40 @@ class FaceConverter : public StatusCallback // ENTITY IfcSweptSurface ABSTRACT SUPERTYPE OF(ONEOF(IfcSurfaceOfLinearExtrusion, IfcSurfaceOfRevolution)) shared_ptr& swept_surface_profile = swept_surface->m_SweptCurve; shared_ptr profileCon = m_profile_cache->getProfileConverter(swept_surface_profile); - const std::vector >& swept_profile = profileCon->getCoordinates(); - - shared_ptr& swept_surface_placement = swept_surface->m_Position; - - shared_ptr swept_surface_transform; - if( swept_surface_placement ) + if (profileCon) { - m_curve_converter->getPlacementConverter()->convertIfcAxis2Placement3D( swept_surface_placement, swept_surface_transform ); - } + const std::vector >& swept_profile = profileCon->getCoordinates(); - shared_ptr linear_extrusion = dynamic_pointer_cast( swept_surface ); - if( linear_extrusion ) - { - shared_ptr& ifc_extrusion_direction = linear_extrusion->m_ExtrudedDirection; - if( ifc_extrusion_direction ) + shared_ptr& swept_surface_placement = swept_surface->m_Position; + + shared_ptr swept_surface_transform; + if (swept_surface_placement) { - vec3 extrusion_direction = carve::geom::VECTOR(ifc_extrusion_direction->m_DirectionRatios[0]->m_value, ifc_extrusion_direction->m_DirectionRatios[1]->m_value, ifc_extrusion_direction->m_DirectionRatios[2]->m_value); + m_curve_converter->getPlacementConverter()->convertIfcAxis2Placement3D(swept_surface_placement, swept_surface_transform); + } - double factor = 1.0; - if( linear_extrusion->m_Depth ) + shared_ptr linear_extrusion = dynamic_pointer_cast(swept_surface); + if (linear_extrusion) + { + shared_ptr& ifc_extrusion_direction = linear_extrusion->m_ExtrudedDirection; + if (ifc_extrusion_direction) { - factor = linear_extrusion->m_Depth->m_value; - extrusion_direction *= factor; + vec3 extrusion_direction = carve::geom::VECTOR(ifc_extrusion_direction->m_DirectionRatios[0]->m_value, ifc_extrusion_direction->m_DirectionRatios[1]->m_value, ifc_extrusion_direction->m_DirectionRatios[2]->m_value); + + double factor = 1.0; + if (linear_extrusion->m_Depth) + { + factor = linear_extrusion->m_Depth->m_value; + extrusion_direction *= factor; + } + + GeomProcessingParams params(m_geom_settings, surface.get(), this); + m_sweeper->extrude(swept_profile, extrusion_direction, item_data, params); } - GeomProcessingParams params(m_geom_settings, surface.get(), this); - m_sweeper->extrude(swept_profile, extrusion_direction, item_data, params); + return; } - - return; } - shared_ptr suface_of_revolution = dynamic_pointer_cast( swept_surface ); if( suface_of_revolution ) { @@ -358,8 +360,6 @@ class FaceConverter : public StatusCallback const std::vector >& vec_bounds = ifc_face->m_Bounds; std::vector > face_loops; params.ifc_entity = ifc_face.get(); - bool mergeAlignedEdges = true; - size_t maxNumIntersectionPoints = 200; for( auto it_bounds = vec_bounds.begin(); it_bounds != vec_bounds.end(); ++it_bounds ) { @@ -417,7 +417,7 @@ class FaceConverter : public StatusCallback GeomUtils::unClosePolygon(loop); } - MeshUtils::createTriangulated3DFace( face_loops, poly_cache, params ); + createTriangulated3DFace( face_loops, poly_cache, params ); #ifdef _DEBUG if( ifc_face->m_tag == 1261069 ) @@ -442,10 +442,11 @@ class FaceConverter : public StatusCallback //if( ii == 34 ) { PolyInputCache3D poly_cache_dump(CARVE_EPSILON); - MeshUtils::createTriangulated3DFace(face_loops, poly_cache_dump, params); + createTriangulated3DFace(face_loops, poly_cache_dump, params); std::map mesh_input_options; shared_ptr > meshset(poly_cache_dump.m_poly_data->createMesh(mesh_input_options, CARVE_EPSILON)); - GeomDebugDump::dumpMeshset(meshset, color, false); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshset, color, drawNormals, false); } GeomDebugDump::moveOffset(0.0001); } @@ -463,7 +464,474 @@ class FaceConverter : public StatusCallback } else if( st == CLOSED_SHELL ) { - item_data->addClosedPolyhedron(poly_cache.m_poly_data, params); + item_data->addClosedPolyhedron(poly_cache.m_poly_data, params, m_geom_settings); + } + } + + static void addTriangleCheckDegenerate(int idxA, int idxB, int idxC, PolyInputCache3D& meshOut, double CARVE_EPSILON) + { + if (idxA == idxB || idxA == idxC || idxB == idxC) + { +#ifdef _DEBUG + std::cout << "skipping degenerate triangle: " << idxA << "/" << idxB << "/" << idxC << std::endl; +#endif + return; + } + + const carve::geom::vector<3>& pointA = meshOut.m_poly_data->getVertex(idxA); + const carve::geom::vector<3>& pointB = meshOut.m_poly_data->getVertex(idxB); + const carve::geom::vector<3>& pointC = meshOut.m_poly_data->getVertex(idxC); + double lengthAB = (pointB - pointA).length2(); + if (lengthAB < CARVE_EPSILON * CARVE_EPSILON * 10) + { +#ifdef _DEBUG + std::cout << "skipping degenerate triangle: " << idxA << "/" << idxB << "/" << idxC << std::endl; +#endif + return; + } + + double lengthAC = (pointC - pointA).length2(); + if (lengthAC < CARVE_EPSILON * CARVE_EPSILON * 10) + { +#ifdef _DEBUG + std::cout << "skipping degenerate triangle: " << idxA << "/" << idxB << "/" << idxC << std::endl; +#endif + return; + } + + double lengthBC = (pointC - pointB).length2(); + if (lengthBC < CARVE_EPSILON * CARVE_EPSILON * 10) + { +#ifdef _DEBUG + std::cout << "skipping degenerate triangle: " << idxA << "/" << idxB << "/" << idxC << std::endl; +#endif + return; + } + + meshOut.m_poly_data->addFace(idxA, idxB, idxC); + } + + static void addFaceCheckIndexes(int idxA, int idxB, int idxC, int idxD, PolyInputCache3D& meshOut, double CARVE_EPSILON) + { + std::set setIndices = { idxA, idxB, idxC, idxD }; + + if (setIndices.size() == 3) + { + auto it = setIndices.begin(); + idxA = *it; + ++it; + idxB = *it; + ++it; + idxC = *it; + meshOut.m_poly_data->addFace(idxA, idxB, idxC); + return; + } + + addTriangleCheckDegenerate(idxA, idxB, idxC, meshOut, CARVE_EPSILON); + addTriangleCheckDegenerate(idxA, idxC, idxD, meshOut, CARVE_EPSILON); + } + + static void addFaceCheckIndexes(const vec3& v0, const vec3& v1, const vec3& v2, PolyInputCache3D& meshOut, double CARVE_EPSILON) + { + int idxA = meshOut.addPoint(v0); + int idxB = meshOut.addPoint(v1); + int idxC = meshOut.addPoint(v2); + addTriangleCheckDegenerate(idxA, idxB, idxC, meshOut, CARVE_EPSILON); + } + + static void addFaceCheckIndexes(const vec3& v0, const vec3& v1, const vec3& v2, const vec3& v3, PolyInputCache3D& meshOut, double CARVE_EPSILON) + { + int idxA = meshOut.addPoint(v0); + int idxB = meshOut.addPoint(v1); + int idxC = meshOut.addPoint(v2); + int idxD = meshOut.addPoint(v3); + + addTriangleCheckDegenerate(idxA, idxB, idxC, meshOut, CARVE_EPSILON); + addTriangleCheckDegenerate(idxA, idxC, idxD, meshOut, CARVE_EPSILON); + } + + ///\brief method createTriangulated3DFace: Creates a triangulated face + ///\param[in] inputBounds3D: Curves as face boundaries. The first input curve is the outer boundary, succeeding curves are inner boundaries + ///\param[in] ifc_entity: Ifc entity that the geometry belongs to, just for error messages. Pass a nullptr if no entity at hand. + ///\param[out] meshOut: Result mesh + static void createTriangulated3DFace(const std::vector >& inputBounds3D, PolyInputCache3D& meshOut, GeomProcessingParams& params) + { + double eps = params.epsMergePoints; + if (inputBounds3D.size() == 1) + { + const std::vector& outerLoop = inputBounds3D[0]; + if (outerLoop.size() < 3) + { + return; + } + if (outerLoop.size() == 3) + { + const vec3& v0 = outerLoop[0]; + const vec3& v1 = outerLoop[1]; + const vec3& v2 = outerLoop[2]; + addFaceCheckIndexes(v0, v1, v2, meshOut, eps); + +#ifdef _DEBUG + if (params.debugDump) + { + glm::vec4 color(0, 1, 1, 1); + PolyInputCache3D poly(eps); + int idxA = poly.addPoint(v0); + int idxB = poly.addPoint(v1); + int idxC = poly.addPoint(v2); + poly.m_poly_data->addFace(idxA, idxB, idxC); + shared_ptr > meshset(poly.m_poly_data->createMesh(carve::input::opts(), eps)); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshset, color, drawNormals, false); + } +#endif + + return; + } + if (outerLoop.size() == 4) + { + const vec3& v0 = outerLoop[0]; + const vec3& v1 = outerLoop[1]; + const vec3& v2 = outerLoop[2]; + const vec3& v3 = outerLoop[3]; + + addFaceCheckIndexes(v0, v1, v2, v3, meshOut, eps); + + + +#ifdef _DEBUG + if (params.debugDump) + { + glm::vec4 color(0, 1, 1, 1); + PolyInputCache3D poly(eps); + int idxA = poly.addPoint(v0); + int idxB = poly.addPoint(v1); + int idxC = poly.addPoint(v2); + int idxD = poly.addPoint(v3); + poly.m_poly_data->addFace(idxA, idxB, idxC, idxD); + shared_ptr > meshset(poly.m_poly_data->createMesh(carve::input::opts(), eps)); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshset, color, drawNormals, false); + } +#endif + + return; + } + } + +#ifdef _DEBUG + PolyInputCache3D poly(eps); +#endif + + std::vector > > polygons2d; + std::vector > polygons3d; + std::vector polygon3DArea; + bool face_loop_reversed = false; + bool warning_small_loop_detected = false; + bool errorOccured = false; + GeomUtils::ProjectionPlane face_plane = GeomUtils::ProjectionPlane::UNDEFINED; + vec3 normal = carve::geom::VECTOR(0, 0, 1); + vec3 normalOuterBound = carve::geom::VECTOR(0, 0, 1); + + for (auto it_bounds = inputBounds3D.begin(); it_bounds != inputBounds3D.end(); ++it_bounds) + { + std::vector loopPoints3Dinput = *it_bounds; + + if (loopPoints3Dinput.size() < 3) + { + if (it_bounds == inputBounds3D.begin()) + { + break; + } + else + { + continue; + } + } + + //bool mergeAlignedEdges = true; + GeomUtils::simplifyPolygon(loopPoints3Dinput, params.epsMergePoints, params.epsMergeAlignedEdgesAngle); + GeomUtils::unClosePolygon(loopPoints3Dinput); + normal = GeomUtils::computePolygonNormal(loopPoints3Dinput); + + if (it_bounds == inputBounds3D.begin()) + { + normalOuterBound = normal; + + // figure out on which plane to project the 3D points + double nx = std::abs(normal.x); + double ny = std::abs(normal.y); + double nz = std::abs(normal.z); + if (nz > nx && nz >= ny) + { + face_plane = GeomUtils::XY_PLANE; + } + else if (nx >= ny && nx >= nz) + { + face_plane = GeomUtils::YZ_PLANE; + } + else if (ny > nx && ny >= nz) + { + face_plane = GeomUtils::XZ_PLANE; + } + else + { + std::stringstream err; + err << "unable to project to plane: nx" << nx << " ny " << ny << " nz " << nz << std::endl; + if (params.callbackFunc) + { + params.callbackFunc->messageCallback(err.str().c_str(), StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, params.ifc_entity); + } + continue; + } + } + + // project face into 2d plane + std::vector > path_loop_2d; + std::vector path_loop_3d; + + for (size_t i = 0; i < loopPoints3Dinput.size(); ++i) + { + const vec3& point = loopPoints3Dinput[i]; + path_loop_3d.push_back(point); + if (face_plane == GeomUtils::XY_PLANE) + { + path_loop_2d.push_back({ point.x, point.y }); + } + else if (face_plane == GeomUtils::YZ_PLANE) + { + path_loop_2d.push_back({ point.y, point.z }); + } + else if (face_plane == GeomUtils::XZ_PLANE) + { + path_loop_2d.push_back({ point.x, point.z }); + } + } + + if (path_loop_2d.size() < 3) + { + //std::cout << __FUNC__ << ": #" << face_id << "=IfcFace: path_loop.size() < 3" << std::endl; + continue; + } + + double loop_area = std::abs(GeomUtils::signedArea(path_loop_2d)); + double min_loop_area = EPS_DEFAULT; + if (loop_area < min_loop_area) + { + warning_small_loop_detected = true; + continue; + } + + if (loopPoints3Dinput.size() == 4 && inputBounds3D.size() == 1) + { + if (GeomUtils::isQuadConvex(path_loop_2d[0], path_loop_2d[1], path_loop_2d[2], path_loop_2d[3])) + { + // add 2 triangles for quad + vec3 v0 = loopPoints3Dinput[0]; + vec3 v1 = loopPoints3Dinput[1]; + vec3 v2 = loopPoints3Dinput[2]; + vec3 v3 = loopPoints3Dinput[3]; + uint32_t idx0 = meshOut.addPoint(v0); + uint32_t idx1 = meshOut.addPoint(v1); + uint32_t idx2 = meshOut.addPoint(v2); + uint32_t idx3 = meshOut.addPoint(v3); + +#ifdef _DEBUG + uint32_t idx0_dbg = poly.addPoint(v0); + uint32_t idx1_dbg = poly.addPoint(v1); + uint32_t idx2_dbg = poly.addPoint(v2); + uint32_t idx3_dbg = poly.addPoint(v3); +#endif + + vec3 normalTriangle0 = GeomUtils::computePolygonNormal({ v0, v1, v2 }); + vec3 normalTriangle1 = GeomUtils::computePolygonNormal({ v2, v3, v0 }); + + if (dot(normalTriangle0, normalOuterBound) > 0) + { + // normalTriangle0 and normalOuterBound should point in the same direction" << std::endl; + meshOut.m_poly_data->addFace(idx0, idx1, idx2); +#ifdef _DEBUG + poly.m_poly_data->addFace(idx0_dbg, idx1_dbg, idx2_dbg); +#endif + } + else + { + // normalTriangle0 and normalOuterBound should point in the same direction" << std::endl; + meshOut.m_poly_data->addFace(idx0, idx2, idx1); +#ifdef _DEBUG + poly.m_poly_data->addFace(idx0_dbg, idx2_dbg, idx1_dbg); +#endif + } + + if (dot(normalTriangle1, normalOuterBound) > 0) + { + //std::cout << "normalTriangle1 and normalOuterBound should point in the same direction" << std::endl; + meshOut.m_poly_data->addFace(idx2, idx3, idx0); +#ifdef _DEBUG + poly.m_poly_data->addFace(idx2_dbg, idx3_dbg, idx0_dbg); +#endif + } + else + { + meshOut.m_poly_data->addFace(idx2, idx0, idx3); +#ifdef _DEBUG + poly.m_poly_data->addFace(idx2_dbg, idx0_dbg, idx3_dbg); +#endif + } + + return; + } + } + + // outer loop (biggest area) needs to come first + bool insertPositionFound = false; + for (size_t iiArea = 0; iiArea < polygon3DArea.size(); ++iiArea) + { + double existingLoopArea = polygon3DArea[iiArea]; + + // existingArea[i] < loop_area < existingArea[i+1] + if (loop_area > existingLoopArea) + { + polygons2d.insert(polygons2d.begin() + iiArea, path_loop_2d); + polygons3d.insert(polygons3d.begin() + iiArea, path_loop_3d); + polygon3DArea.insert(polygon3DArea.begin() + iiArea, loop_area); + insertPositionFound = true; + break; + } + } + + if (!insertPositionFound) + { + polygons2d.push_back(path_loop_2d); + polygons3d.push_back(path_loop_3d); + polygon3DArea.push_back(loop_area); + } + } + +#ifdef _DEBUG + // check descending order + if (polygon3DArea.size() > 0) + { + double previousLoopArea = polygon3DArea[0]; + if (polygon3DArea.size() > 1) + { + for (size_t iiArea = 1; iiArea < polygon3DArea.size(); ++iiArea) + { + double loopArea = polygon3DArea[iiArea]; + if (loopArea > previousLoopArea) + { + std::cout << "polygon3DArea not descending" << std::endl; + } + } + } + } +#endif + if (polygons3d.size() > 0) + { + std::vector& loopOuterBound = polygons3d[0]; + normalOuterBound = GeomUtils::computePolygonNormal(loopOuterBound); + } + + // check winding order in 2D + std::vector > polygons2dFlatVector; + for (size_t ii = 0; ii < polygons2d.size(); ++ii) + { + std::vector >& loop2D = polygons2d[ii]; + std::vector& loop3D = polygons3d[ii]; + + glm::dvec3 normal_2d = GeomUtils::computePolygon2DNormal(loop2D); + if (ii == 0) + { + if (normal_2d.z < 0) + { + std::reverse(loop2D.begin(), loop2D.end()); + std::reverse(loop3D.begin(), loop3D.end()); + face_loop_reversed = true; + } + } + else + { + if (normal_2d.z > 0) + { + std::reverse(loop2D.begin(), loop2D.end()); + std::reverse(loop3D.begin(), loop3D.end()); + } + } + } + + if (warning_small_loop_detected) + { + std::stringstream err; + err << "std::abs( signed_area ) < 1.e-10"; + if (params.callbackFunc) + { + params.callbackFunc->messageCallback(err.str().c_str(), StatusCallback::MESSAGE_TYPE_MINOR_WARNING, __FUNC__, params.ifc_entity); + } + } + + if (polygons2d.size() > 0) + { + std::vector triangulated = mapbox::earcut(polygons2d); + + std::vector polygons3dFlatVector; + GeomUtils::polygons2flatVec(polygons3d, polygons3dFlatVector); + + for (int ii = 0; ii < triangulated.size(); ii += 3) + { + size_t idxA = triangulated[ii + 0]; + size_t idxB = triangulated[ii + 1]; + size_t idxC = triangulated[ii + 2]; + + const vec3& pointA = polygons3dFlatVector[idxA]; + const vec3& pointB = polygons3dFlatVector[idxB]; + const vec3& pointC = polygons3dFlatVector[idxC]; + + idxA = meshOut.addPoint(pointA); + idxB = meshOut.addPoint(pointB); + idxC = meshOut.addPoint(pointC); + +#ifdef _DEBUG + size_t idxA_dbg = poly.addPoint(pointA); + size_t idxB_dbg = poly.addPoint(pointB); + size_t idxC_dbg = poly.addPoint(pointC); +#endif + + vec3 triangleNormal = GeomUtils::computePolygonNormal({ pointA, pointB, pointC }); + if (dot(triangleNormal, normalOuterBound) >= 0) + { + + meshOut.m_poly_data->addFace(idxA, idxB, idxC); +#ifdef _DEBUG + poly.m_poly_data->addFace(idxA_dbg, idxB_dbg, idxC_dbg); +#endif + } + else + { + meshOut.m_poly_data->addFace(idxA, idxC, idxB); +#ifdef _DEBUG + poly.m_poly_data->addFace(idxA_dbg, idxC_dbg, idxB_dbg); +#endif + } + } +#ifdef _DEBUG + if (errorOccured /*|| ifc_entity->m_tag == 64*/) + { + glm::vec4 color(0, 1, 1, 1); + GeomDebugDump::dumpPolyline(polygons2d, color, true); + //shared_ptr > meshset(meshOut.m_poly_data->createMesh(carve::input::opts())); + //GeomDebugDump::dumpMeshset(meshset, color, true, true); + } +#endif } + +#ifdef _DEBUG + if (errorOccured || params.debugDump) + { + glm::vec4 color(0, 1, 1, 1); + shared_ptr > meshset(poly.m_poly_data->createMesh(carve::input::opts(), eps)); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshset, color, drawNormals, true); + } +#endif } }; diff --git a/IfcPlusPlus/src/ifcpp/geometry/GeomDebugDump.h b/IfcPlusPlus/src/ifcpp/geometry/GeomDebugDump.h index bdd1941b8..f10eed860 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/GeomDebugDump.h +++ b/IfcPlusPlus/src/ifcpp/geometry/GeomDebugDump.h @@ -61,17 +61,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #include #include #include "IncludeCarveHeaders.h" +#include "MeshOps.h" using namespace IFC4X3; -namespace MeshUtils -{ - static void checkFaceLoops(const carve::mesh::Face<3>* face); - static double computeFaceArea(const carve::mesh::Face<3>* face); - static void addFaceCheckIndexes(int idxA, int idxB, int idxC, PolyInputCache3D& meshOut); - static void addFaceCheckIndexes(int idxA, int idxB, int idxC, int idxD, PolyInputCache3D& meshOut); -} - namespace GeomDebugDump { static double eps_debug_dump = 1.5*EPS_M8; @@ -147,6 +140,10 @@ namespace GeomDebugDump static void stopBuffering() { --dump_buffering; + if (dump_buffering < 0) + { + dump_buffering = 0; + } if( strs_buffer.str().size() > 0 ) { std::ofstream dump_ofstream("dump_mesh_debug.txt", std::ofstream::app); @@ -382,6 +379,7 @@ namespace GeomDebugDump ++dumpCount; + // vertices of the meshset: size_t vertex_count = 0; size_t face_count = 0; @@ -393,7 +391,7 @@ namespace GeomDebugDump { return; } - + std::stringstream strs_open_edges; strs_out << "Polyhedron{" << std::endl; strs_out << "color{" << color.x << ", " << color.y << ", " << color.z << ", " << color.w << "}" << std::endl; @@ -401,35 +399,7 @@ namespace GeomDebugDump std::stringstream strs_labels; std::stringstream strs_faces; double scale_length_factor = 1.0; - - if( meshset->meshes.size() > 0 ) - { - if( meshset->meshes[0]->faces.size() > 0 ) - { - carve::mesh::Face<3>* f = meshset->meshes[0]->faces[0]; - if( f != nullptr ) - { - if( f->edge != nullptr ) - { - const carve::mesh::Vertex<3>* v1 = f->edge->v1(); - const carve::mesh::Vertex<3>* v2 = f->edge->v2(); - - int v1index = findVertexIndexInVector(vec_vertices, v1); - if( v1index < 0 ) - { - std::cout << "vertex not found\n"; - } - - int v2index = findVertexIndexInVector(vec_vertices, v2); - if( v2index < 0 ) - { - std::cout << "vertex not found\n"; - } - } - } - } - } - + std::vector > vecOpenEdgePolylines; for( size_t iiv = 0; iiv < vec_vertices.size(); ++iiv ) { @@ -457,6 +427,22 @@ namespace GeomDebugDump { continue; } + + for (auto openEdge : mesh->open_edges) + { + if (!openEdge->face) + { + continue; + } + + vec3 v1 = openEdge->v1()->v; + vec3 v2 = openEdge->v2()->v; + vec3 v1n = v1 + openEdge->face->plane.N * 0.01; + vec3 v2n = v2 + openEdge->face->plane.N * 0.01; + + vecOpenEdgePolylines.push_back({ v1, v1n, v2n, v2 }); + } + // faces: const std::vector* >& vec_faces = mesh->faces; for( size_t i_face = 0; i_face < vec_faces.size(); ++i_face ) @@ -570,6 +556,12 @@ namespace GeomDebugDump strs_out << "faces{" << strs_faces.str().c_str() << "}" << std::endl; strs_out << "labels{" << strs_labels.str().c_str() << "}" << std::endl; strs_out << std::endl << "}" << std::endl; // Polyhedron + + if (vecOpenEdgePolylines.size() > 0) + { + glm::vec4 colorRed(0.6, 0.2, 0.2, 1.0); + dumpPolyline(vecOpenEdgePolylines, colorRed, false); + } } static void Mesh2Stream(const carve::mesh::Mesh<3>* mesh, const vec3& offset, const glm::vec4& color, std::stringstream& strs_out, double CARVE_EPSILON, bool trianglesAndQuadsOnly = false) @@ -653,14 +645,14 @@ namespace GeomDebugDump MeshSet2Stream(meshset.get(), offset, color, strs_out, trianglesAndQuadsOnly); } - static void dumpMeshsets( const std::vector* >& vec_meshsets, const vec3& offset, const std::vector& vec_colors ) + static void dumpMeshsets(const std::vector* >& vec_meshsets, const vec3& offset, const std::vector& vec_colors) { std::stringstream strs_out; - for( size_t i = 0; i < vec_meshsets.size(); ++i ) + for (size_t i = 0; i < vec_meshsets.size(); ++i) { carve::mesh::MeshSet<3>* meshset = vec_meshsets[i]; - glm::vec4 color( 0.5, 0.5, 0.5, 1.0 ); - if( i < vec_colors.size() ) + glm::vec4 color(0.5, 0.5, 0.5, 1.0); + if (i < vec_colors.size()) { color = vec_colors[i]; } @@ -670,6 +662,43 @@ namespace GeomDebugDump appendToOutput(strs_out); } + static void dumpMeshsetsNormalVectors(const carve::mesh::MeshSet<3>* meshset, const vec3 & offset, const glm::vec4& color) + { + std::vector< std::vector > vecLines; + //for (size_t i = 0; i < vec_meshsets.size(); ++i) + { + //carve::mesh::MeshSet<3>* meshset = vec_meshsets[i]; + for (size_t i_mesh = 0; i_mesh < meshset->meshes.size(); ++i_mesh) + { + const carve::mesh::Mesh<3>* mesh = meshset->meshes[i_mesh]; + + if (!mesh) + { + continue; + } + // faces: + const std::vector* >& vec_faces = mesh->faces; + for (size_t i_face = 0; i_face < vec_faces.size(); ++i_face) + { + const carve::mesh::Face<3>* face = vec_faces[i_face]; + if (face) + { + vec3 c = face->centroid(); + vec3 normal = face->plane.N; + + std::vector line = { c + normal * 0.001, c + normal * 0.01 }; + vecLines.push_back(line); + } + } + } + } + + //if (vec_colors.size() > 0) + { + dumpPolyline(vecLines, color, false); + } + } + static void dumpMeshset(const carve::mesh::MeshSet<3>* meshset, const vec3& offset, const glm::vec4& color) { std::stringstream strs_out; @@ -694,6 +723,38 @@ namespace GeomDebugDump appendToOutput(strs_out); } + static void moveOffset(double deltaY) + { + if (deltaY > 0.000001) + { + dump_y_pos_geom += deltaY; + } + } + + static void moveOffset(const carve::geom::aabb<3>& bbox) + { + double dy = bbox.extent.y*2.2; + moveOffset(dy); + } + + static void moveOffset(const shared_ptr >& meshset) + { + carve::geom::aabb<3> bbox = meshset->getAABB(); + moveOffset(bbox); + } + + static void moveOffset(const carve::mesh::MeshSet<3>* meshset) + { + carve::geom::aabb<3> bbox = meshset->getAABB(); + moveOffset(bbox); + } + + static void moveOffset(const carve::mesh::Mesh<3>* mesh) + { + carve::geom::aabb<3> bbox = mesh->getAABB(); + moveOffset(bbox); + } + static void dumpMeshset(carve::mesh::MeshSet<3>* meshset, const glm::vec4& color, bool move_offset ) { vec3 offset = carve::geom::VECTOR( 0, dump_y_pos_geom, 0 ); @@ -701,22 +762,31 @@ namespace GeomDebugDump if( move_offset ) { - dump_y_pos_geom += meshset->getAABB().extent.y*2.2; + moveOffset(meshset); } } - static void dumpMeshset( const shared_ptr >& meshset, const glm::vec4& color, bool move_offset = true ) + static void dumpMeshset( const shared_ptr >& meshset, const glm::vec4& color, bool drawNormals, bool move_offset ) { + if (!meshset) + { + return; + } if( meshset->meshes.size() == 0 ) { - //return; + return; } vec3 offset = carve::geom::VECTOR( 0, dump_y_pos_geom, 0 ); dumpMeshset(meshset.get(), offset, color ); + if (drawNormals) + { + dumpMeshsetsNormalVectors(meshset.get(), offset, color); + } + if( move_offset ) { - dump_y_pos_geom += meshset->getAABB().extent.y*2.2; + moveOffset(meshset.get()); } } @@ -742,7 +812,7 @@ namespace GeomDebugDump } if( move_offset ) { - dump_y_pos_geom += bbox.extent.y*2.2; + moveOffset(bbox); } } @@ -761,7 +831,7 @@ namespace GeomDebugDump if( move_offset ) { - dump_y_pos_geom += mesh->getAABB().extent.y*2.2; + moveOffset(mesh); } } @@ -775,7 +845,8 @@ namespace GeomDebugDump } shared_ptr > meshset(poly_cache.m_poly_data->createMesh(carve::input::opts(), eps_debug_dump)); - dumpMeshset(meshset, color, move_offset); + bool drawNormals = false; + dumpMeshset(meshset, color, drawNormals, move_offset); } static void dumpFaces( const std::vector* >& vecFaces, const glm::vec4& color, bool move_offset = true ) @@ -799,7 +870,7 @@ namespace GeomDebugDump std::cout << "face->n_edges > 100000" << std::endl; } - MeshUtils::checkFaceLoops(face); + MeshOps::checkFaceLoops(face); const carve::mesh::Edge<3>* edge = face->edge; size_t countEdges = 0; @@ -839,8 +910,13 @@ namespace GeomDebugDump ++ii; } + if (poly_cache.m_poly_data->points.size() < 3) + { + return; + } shared_ptr > meshset(poly_cache.m_poly_data->createMesh(carve::input::opts(), eps_debug_dump)); - dumpMeshset(meshset, color, move_offset); + bool drawNormals = false; + dumpMeshset(meshset, color, drawNormals, move_offset); } static void dumpFacePolygon(const carve::mesh::Face<3>* face, glm::vec4& color1, bool moveOffset) @@ -903,43 +979,39 @@ namespace GeomDebugDump } } - static void moveOffset(const carve::mesh::Mesh<3>* mesh) + static void dumpEdge(carve::mesh::Edge<3>* e, const glm::vec4& color, bool checkZeroAreaFaces, bool move_offset) { - if( !mesh ) + if (e->vert == nullptr) { return; } - const auto aabb = mesh->getAABB(); - double dy = aabb.extent.y * 2.0; -#ifdef _DEBUG - double dx = aabb.extent.x * 2.0; - double dz = aabb.extent.z * 2.0; - dx = dx; - dz = dz; -#endif - dump_y_pos_geom += dy * 1.1; - } + auto p1 = e->v1()->v; + auto p2 = e->v2()->v; - static void moveOffset(const shared_ptr >& meshset) - { - if( meshset->meshes.size() == 0 ) + double edgeLength = (p2 - p1).length(); + + std::vector line = { carve::geom::VECTOR(p1.x, p1.y, p1.z), carve::geom::VECTOR(p2.x, p2.y, p2.z) }; + + dumpPolyline(line, color, false); + + if (e->face) { - return; + if (checkZeroAreaFaces) + { + double faceArea = MeshOps::computeFaceArea(e->face); + if (std::abs(faceArea) < EPS_M6) + { + std::cout << "faceArea) < EPS_M6 )" << std::endl; + } + } + std::vector* > vecFaces = { e->face }; + dumpFaces(vecFaces, color, false); + } + + if (move_offset) + { + moveOffset(0.00005); } - const auto aabb = meshset->getAABB(); - double dy = aabb.extent.y * 2.0; -#ifdef _DEBUG - double dx = aabb.extent.x * 2.0; - double dz = aabb.extent.z * 2.0; - dx = dx; - dz = dz; -#endif - dump_y_pos_geom += dy * 1.1; - } - - static void moveOffset(double deltaY) - { - dump_y_pos_geom += deltaY; } static void dumpMeshsetOpenEdges(const shared_ptr >& meshset, const glm::vec4& colorInput, bool checkZeroAreaFaces, bool move_offset ) @@ -977,19 +1049,10 @@ namespace GeomDebugDump for( size_t ii = 0; ii < openEdges.size(); ++ii ) { auto e = openEdges[ii]; - if( e->vert == nullptr ) - { - continue; - } - auto p1 = e->v1()->v; - auto p2 = e->v2()->v; - double edgeLength = (p2 - p1).length(); - - std::vector line = { carve::geom::VECTOR(p1.x, p1.y, p1.z), carve::geom::VECTOR(p2.x, p2.y, p2.z) }; - if( ii %2 == 0 ) + if (ii % 2 == 0) { - if( red > 0.5 ) + if (red > 0.5) { color.x = red - 0.3; } @@ -1002,25 +1065,9 @@ namespace GeomDebugDump { color.x = red; } - dumpPolyline(line, color, false); - if( e->face ) - { - if( checkZeroAreaFaces ) - { - double faceArea = MeshUtils::computeFaceArea(e->face); - if( std::abs(faceArea) < EPS_M6 ) - { - std::cout << "faceArea) < EPS_M6 )" << std::endl; - } - } - std::vector* > vecFaces = { e->face }; - dumpFaces(vecFaces, color, false); - } - if( move_offset ) - { - moveOffset(0.00005); - } + dumpEdge(e, color, move_offset, checkZeroAreaFaces); + } } if( numOpenEdges > 0 ) @@ -1140,25 +1187,34 @@ namespace GeomDebugDump static void dumpItemShapeInputData(shared_ptr& item_shape, const glm::vec4& color ) { + bool drawNormals = true; for( auto meshset_open : item_shape->m_meshsets_open ) { - GeomDebugDump::dumpMeshset(meshset_open, color, false); + GeomDebugDump::dumpMeshset(meshset_open, color, drawNormals, false); } - + + drawNormals = false; for( auto meshset_closed : item_shape->m_meshsets ) { - GeomDebugDump::dumpMeshset(meshset_closed, color, false); + GeomDebugDump::dumpMeshset(meshset_closed, color, drawNormals, false); + } + + for (auto item_data : item_shape->m_child_items) + { + dumpItemShapeInputData(item_data, color); } } static void dumpShapeInputData(shared_ptr& product_shape, const glm::vec4& color ) { - for( auto representation_data : product_shape->m_vec_representations ) + for( auto geom_item : product_shape->m_geometric_items ) { - for( auto item_data : representation_data->m_vec_item_data ) - { - dumpItemShapeInputData(item_data, color); - } + dumpItemShapeInputData(geom_item, color); + } + + for (auto child : product_shape->m_vec_children) + { + dumpShapeInputData(child, color); } } diff --git a/IfcPlusPlus/src/ifcpp/geometry/GeomUtils.h b/IfcPlusPlus/src/ifcpp/geometry/GeomUtils.h index 7c587a7fd..5f05dcd9c 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/GeomUtils.h +++ b/IfcPlusPlus/src/ifcpp/geometry/GeomUtils.h @@ -1621,6 +1621,30 @@ namespace GeomUtils } } + inline void removeLastIfEqualToFirst(std::vector& loop) + { + if (loop.size() > 1) + { + for (size_t iiPoint = 0; iiPoint < loop.size(); ++iiPoint) + { + size_t idxFirst = loop.front(); + size_t idxLast = loop.back(); + if (idxFirst == idxLast) + { + loop.pop_back(); + if (loop.size() < 2) + { + break; + } + } + else + { + break; + } + } + } + } + inline void intersectLoopWithPoints(std::vector& loop, std::vector >& vertices, double eps, size_t maxNumPoints ) { for( size_t repeat = 0; repeat < loop.size(); ++repeat ) diff --git a/IfcPlusPlus/src/ifcpp/geometry/GeometryConverter.h b/IfcPlusPlus/src/ifcpp/geometry/GeometryConverter.h index 868adf5c5..53c3a3d0b 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/GeometryConverter.h +++ b/IfcPlusPlus/src/ifcpp/geometry/GeometryConverter.h @@ -973,10 +973,9 @@ class GeometryConverter : public StatusCallback try { - shared_ptr representation_data( new RepresentationData() ); + shared_ptr representation_data( new ItemShapeData() ); m_representation_converter->convertIfcRepresentation( representation, representation_data ); - product_shape->m_vec_representations.push_back( representation_data ); - representation_data->m_parent_product = product_shape; + product_shape->addGeometricItem( representation_data, product_shape ); } catch( BuildingException& e ) { @@ -1072,9 +1071,9 @@ class GeometryConverter : public StatusCallback { continue; } - for( auto rep : existingProductShape->m_vec_representations ) + for( auto item : existingProductShape->m_geometric_items) { - for( auto item : rep->m_vec_item_data ) + for( auto childItem : item->m_child_items ) { //bool itemIsEqual = isEqual(item, geom_item_data); //if( itemIsEqual ) diff --git a/IfcPlusPlus/src/ifcpp/geometry/GeometryInputData.cpp b/IfcPlusPlus/src/ifcpp/geometry/GeometryInputData.cpp new file mode 100644 index 000000000..3987792d9 --- /dev/null +++ b/IfcPlusPlus/src/ifcpp/geometry/GeometryInputData.cpp @@ -0,0 +1,569 @@ +/* -*-c++-*- IfcQuery www.ifcquery.com +* +MIT License + +Copyright (c) 2017 Fabian Gerold + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "IncludeCarveHeaders.h" +#include "MeshOps.h" +#include "GeometryInputData.h" + +using namespace IFC4X3; + +bool checkPolyhedronData( const shared_ptr& poly_data, double minFaceArea, std::string& details ) +{ + if( poly_data ) + { + const std::vector& faceIndices = poly_data->faceIndices; + if( faceIndices.size() > 0 ) + { + size_t iiFace = 0; + for( ; iiFace < faceIndices.size(); ) + { + int numPoints = faceIndices[iiFace]; + int numPointsIdx = iiFace; + +#ifdef _DEBUG + std::vector checkIndexes1; + if( faceIndices.size() < 500 ) + { + auto it = faceIndices.begin() + iiFace; + std::copy(it, faceIndices.end(), std::back_inserter(checkIndexes1)); + } +#endif + + if( iiFace + numPoints >= faceIndices.size() ) + { + return false; + } + + if( numPoints < 3 ) + { +#ifdef _DEBUG + //std::cout << "checkPolyhedronData: face with < 3 points" << std::endl; +#endif + return false; + } + + ++iiFace; + + int idxFirst = faceIndices[iiFace]; + int idxLast = faceIndices[iiFace+numPoints-1]; + if( idxFirst == idxLast ) + { +#ifdef _DEBUG + //std::cout << "checkPolyhedronData: closed polygon of " << numPoints << " points" << std::endl; +#endif + return false; + } + + std::vector facePoints; + for( size_t iiPoint = 0; iiPoint < numPoints; ++iiPoint ) + { + int idx = faceIndices[iiFace + iiPoint]; + if( idx >= poly_data->points.size() ) + { +#ifdef _DEBUG + //std::cout << "checkPolyhedronData: incorrect idx" << std::endl; +#endif + return false; + } + + if( iiPoint < numPoints - 1) + { + int idxNext = faceIndices[iiFace + iiPoint + 1]; + if( idx == idxNext ) + { +#ifdef _DEBUG + //std::cout << "checkPolyhedronData: duplicate point" << std::endl; +#endif + return false; + } + } + + vec3& point = poly_data->points[idx]; + facePoints.push_back(point); + } + + double area = GeomUtils::computePolygonArea(facePoints); + if (std::abs(area) < minFaceArea) + { + details = "face area < eps"; + //TODO: if face is triangle + // if all points dx/dy/dz < eps, remove false + // else if 2 points are close, collapse 2 long edges + // else if there are 3 long edges and 1 point is on longest edge, split longest edge by point, and collapse all 4 edges + + return false; + } + + iiFace = iiFace + numPoints; + } + + if( iiFace != faceIndices.size() ) + { + details = "iiFace != faceIndices.size()"; + return false; + } + } + } + return true; +} + +bool fixPolyhedronData(const shared_ptr& poly_data, double epsMergePoints ) +{ + if( !poly_data ) + { + return false; + } + + std::vector& faceIndices = poly_data->faceIndices; + if( faceIndices.size() == 0 ) + { + return true; + } + + size_t numPointsAll = poly_data->points.size(); + if( numPointsAll < 2 ) + { + return true; + } + bool inputCorrect = true; + size_t maxPointIndex = numPointsAll - 1; + + std::vector polyDataCorrected; + int numFacesCorrected = 0; + + for( size_t iiFace = 0; iiFace < faceIndices.size(); ) + { + int numPoints = faceIndices[iiFace]; + int numPointsIdx = iiFace; + + if( iiFace + numPoints >= faceIndices.size() ) + { + // skip face + break; + } + + std::vector pointIdxCurrentFace; + for( size_t iiPoint = 1; iiPoint <= numPoints; ++iiPoint ) + { + int idx = faceIndices[iiFace + iiPoint]; + if( idx > maxPointIndex ) + { + // incorrect point index, skip current point + continue; + } + + if( pointIdxCurrentFace.size() > 0 ) + { + if( idx == pointIdxCurrentFace.back() ) + { + // duplicate index, skip + continue; + } + } + pointIdxCurrentFace.push_back(idx); + } + + if( pointIdxCurrentFace.size() > 2 ) + { + int firstPointIndex = pointIdxCurrentFace.front(); + int lastPointIndex = pointIdxCurrentFace.back(); + if( firstPointIndex == lastPointIndex ) + { + // duplicate index, remove last point + pointIdxCurrentFace.pop_back(); + } + + if( pointIdxCurrentFace.size() > 2 ) + { + bool allPointsWithinEps = true; + int idx = pointIdxCurrentFace[0]; + vec3 pointPrevious = poly_data->points[idx]; + + for( size_t iiPoint = 1; iiPoint < pointIdxCurrentFace.size(); ++iiPoint ) + { + int idx = pointIdxCurrentFace[iiPoint]; + const vec3& point = poly_data->points[idx]; + + if (std::abs(point.x - pointPrevious.x) > epsMergePoints) + { + allPointsWithinEps = false; + break; + } + + if (std::abs(point.y - pointPrevious.y) > epsMergePoints) + { + allPointsWithinEps = false; + break; + } + + if (std::abs(point.z - pointPrevious.z) > epsMergePoints) + { + allPointsWithinEps = false; + break; + } + pointPrevious = point; + } + + // checking just the face area does not work, since it could be a long face with 0 width. Removing it, would result in open edges + if(allPointsWithinEps) + { + //inputCorrect = false; +#ifdef _DEBUG + int wait = 0; +#endif + } + else + { + // found correct face + ++numFacesCorrected; + int numPointsInFace = pointIdxCurrentFace.size(); + polyDataCorrected.push_back(numPointsInFace); + std::copy(pointIdxCurrentFace.begin(), pointIdxCurrentFace.end(), std::back_inserter(polyDataCorrected)); + } + } + } + + iiFace += numPoints + 1; + + if( iiFace > faceIndices.size() ) + { + inputCorrect = false; + break; + } + if( iiFace == faceIndices.size() ) + { + break; + } + } + + poly_data->faceCount = numFacesCorrected; + faceIndices = polyDataCorrected; + + return inputCorrect; +} + +bool reverseFacesInPolyhedronData(const shared_ptr& poly_data) +{ + if( !poly_data ) + { + return false; + } + + std::vector& faceIndices = poly_data->faceIndices; + if( faceIndices.size() == 0 ) + { + return true; + } + + size_t numPointsAll = poly_data->points.size(); + if( numPointsAll < 2 ) + { + return true; + } + bool inputCorrect = true; + size_t maxPointIndex = numPointsAll - 1; + + std::vector polyDataReversed; + int numFacesCorrected = 0; + + for( size_t iiFace = 0; iiFace < faceIndices.size(); ) + { + int numPoints = faceIndices[iiFace]; + int numPointsIdx = iiFace; + + if( iiFace + numPoints >= faceIndices.size() ) + { + // skip face + break; + } + + std::vector pointIdxCurrentFace; + for( size_t iiPoint = 1; iiPoint <= numPoints; ++iiPoint ) + { + int idx = faceIndices[iiFace + iiPoint]; + pointIdxCurrentFace.push_back(idx); + } + + polyDataReversed.push_back(numPoints); + std::copy(pointIdxCurrentFace.rbegin(), pointIdxCurrentFace.rend(), std::back_inserter(polyDataReversed)); + + iiFace += numPoints + 1; + + if( iiFace > faceIndices.size() ) + { + inputCorrect = false; + break; + } + if( iiFace == faceIndices.size() ) + { + break; + } + } + + faceIndices = polyDataReversed; + + return inputCorrect; +} + +void polyhedronFromMeshSet(const shared_ptr>& meshset, PolyInputCache3D& polyInput) +{ + for (size_t ii = 0; ii < meshset->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; + + for (size_t jj = 0; jj < mesh->faces.size(); ++jj) + { + carve::mesh::Face<3>* face = mesh->faces[jj]; + + carve::mesh::Edge<3>* edge = face->edge; + if (edge) + { + std::vector vecPointIndexes; + size_t maxNumEdges = 1000; + for (size_t kk = 0; kk < face->n_edges; ++kk) + { + vec3& edgeEndPoint = edge->v2()->v; + int idx = polyInput.addPoint(edgeEndPoint); + vecPointIndexes.push_back(idx); + + edge = edge->next; + if (edge == face->edge) + { + break; + } + } + if (vecPointIndexes.size() < 3) + { +#ifdef _DEBUG + std::cout << "face with < 3 edges" << std::endl; +#endif + continue; + } + polyInput.m_poly_data->addFace(vecPointIndexes.begin(), vecPointIndexes.end()); + } + } + } +} + +void polyhedronFromMeshSet(const shared_ptr>& meshset, const std::set* >& setSkipFaces, PolyInputCache3D& polyInput) +{ + for (size_t ii = 0; ii < meshset->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; + + for (size_t jj = 0; jj < mesh->faces.size(); ++jj) + { + carve::mesh::Face<3>* face = mesh->faces[jj]; + + if (setSkipFaces.find(face) != setSkipFaces.end()) + { + continue; + } + + carve::mesh::Edge<3>* edge = face->edge; + if (edge) + { + std::vector vecPointIndexes; + size_t maxNumEdges = 1000; + for (size_t kk = 0; kk < face->n_edges; ++kk) + { + vec3& edgeEndPoint = edge->v2()->v; + int idx = polyInput.addPoint(edgeEndPoint); + vecPointIndexes.push_back(idx); + + edge = edge->next; + if (edge == face->edge) + { + break; + } + } + if (vecPointIndexes.size() < 3) + { +#ifdef _DEBUG + std::cout << "face with < 3 edges" << std::endl; +#endif + continue; + } + + // TODO: fix polyline, detect overlapping edges + + polyInput.m_poly_data->addFace(vecPointIndexes.begin(), vecPointIndexes.end()); + } + } + } +} + +void polyhedronFromMesh(const carve::mesh::Mesh<3>* mesh, PolyInputCache3D& polyInput) +{ + for (size_t jj = 0; jj < mesh->faces.size(); ++jj) + { + carve::mesh::Face<3>* face = mesh->faces[jj]; + carve::mesh::Edge<3>* edge = face->edge; + if (edge) + { + std::vector vecPointIndexes; + size_t maxNumEdges = 1000; + for (size_t kk = 0; kk < face->n_edges; ++kk) + { + vec3& edgeEndPoint = edge->v2()->v; + int idx = polyInput.addPoint(edgeEndPoint); + vecPointIndexes.push_back(idx); + + edge = edge->next; + if (edge == face->edge) + { + break; + } + } + if (vecPointIndexes.size() < 3) + { +#ifdef _DEBUG + std::cout << "face with < 3 edges" << std::endl; +#endif + continue; + } + polyInput.m_poly_data->addFace(vecPointIndexes.begin(), vecPointIndexes.end()); + } + } +} + +bool ItemShapeData::addClosedPolyhedron(const shared_ptr& poly_data, GeomProcessingParams& params, shared_ptr& geom_settings) +{ + if (poly_data->getVertexCount() < 3) + { + return false; + } + + double eps = params.epsMergePoints; + double minFaceArea = params.minFaceArea; + std::map mesh_input_options; + shared_ptr > meshsetUnchanged(poly_data->createMesh(mesh_input_options, eps)); + std::string details; + bool correct = checkPolyhedronData(poly_data, minFaceArea, details); + if (!correct) + { + fixPolyhedronData(poly_data, params.epsMergePoints); + std::string details2; + bool correct2 = checkPolyhedronData(poly_data, minFaceArea, details2); + if (correct2) + { + shared_ptr > meshset(poly_data->createMesh(mesh_input_options, eps)); + + MeshSetInfo infoTriangulated; + bool validMesh = MeshOps::checkMeshSetValidAndClosed(meshset, infoTriangulated, params); + if (validMesh) + { + m_meshsets.push_back(meshset); + return true; + } + } + else + { + shared_ptr > meshset(poly_data->createMesh(mesh_input_options, eps)); + +#ifdef _DEBUG + //std::cout << "failed to correct polyhedron data\n"; + if (params.debugDump) + { + glm::vec4 color(0.3, 0.4, 0.5, 1.0); + GeomDebugDump::dumpMeshsetOpenEdges(meshset, color, false, false); + GeomDebugDump::dumpMeshset(meshset.get(), color, false); + } +#endif + + bool triangulateOperands = false; + bool shouldBeClosedManifold = true; + MeshOps::simplifyMeshSet(meshset, geom_settings, params, triangulateOperands, shouldBeClosedManifold); + } + } + + if (meshsetUnchanged->isClosed()) + { + m_meshsets.push_back(meshsetUnchanged); + return true; + } + +#ifdef _DEBUG + if (params.debugDump) + { + glm::vec4 color(0.3, 0.4, 0.5, 1.0); + GeomDebugDump::dumpMeshsetOpenEdges(meshsetUnchanged, color, false, false); + GeomDebugDump::dumpMeshset(meshsetUnchanged.get(), color, false); + } +#endif + + if (poly_data->faceCount > 10000) + { + // TODO: buld spatial partition tree, and intersect all edges within a box with vertices and edges of that box + m_meshsets_open.push_back(meshsetUnchanged); // still may be useful as open mesh + return false; + } + + // try to fix winding order + reverseFacesInPolyhedronData(poly_data); + + meshsetUnchanged = shared_ptr >(poly_data->createMesh(mesh_input_options, eps)); + if (meshsetUnchanged->isClosed()) + { + m_meshsets.push_back(meshsetUnchanged); + return true; + } + + MeshOps::intersectOpenEdgesWithPoints(meshsetUnchanged, params); + + for (size_t i = 0; i < meshsetUnchanged->meshes.size(); ++i) + { + meshsetUnchanged->meshes[i]->recalc(eps); + } + if (meshsetUnchanged->isClosed()) + { + m_meshsets.push_back(meshsetUnchanged); + return true; + } + + MeshOps::intersectOpenEdgesWithEdges(meshsetUnchanged, params); + + if (meshsetUnchanged->isClosed()) + { + m_meshsets.push_back(meshsetUnchanged); + return true; + } + + { + MeshOps::resolveOpenEdges(meshsetUnchanged, params); + + if (meshsetUnchanged->isClosed()) + { + m_meshsets.push_back(meshsetUnchanged); + return true; + } + + m_meshsets_open.push_back(meshsetUnchanged); // still may be useful as open mesh + } + // Meshset is not closed + return false; +} diff --git a/IfcPlusPlus/src/ifcpp/geometry/GeometryInputData.h b/IfcPlusPlus/src/ifcpp/geometry/GeometryInputData.h index a99894b19..3b8cf63c4 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/GeometryInputData.h +++ b/IfcPlusPlus/src/ifcpp/geometry/GeometryInputData.h @@ -28,11 +28,63 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #include #include "IncludeCarveHeaders.h" #include "GeomUtils.h" -namespace GeomDebugDump + +struct MeshSetInfo { - static void dumpMeshset(carve::mesh::MeshSet<3>* meshset, const glm::vec4& color, bool move_offset = true); - static void dumpMeshsetOpenEdges(const shared_ptr >& meshset, const glm::vec4& colorInput, bool checkZeroAreaFaces, bool move_offset); -} + MeshSetInfo() + { + } + MeshSetInfo(MeshSetInfo& other) + { + numClosedEdges = other.numClosedEdges; + numOpenEdges = other.numOpenEdges; + numFaces = other.numFaces; + zeroAreaFaces = other.zeroAreaFaces; + degenerateEdges = other.degenerateEdges; + finEdges = other.finEdges; + surfaceArea = other.surfaceArea; + allPointersValid = other.allPointersValid; + meshSetValid = other.meshSetValid; + maxNumEdgesExceeded = other.maxNumEdgesExceeded; + details = other.details; + report_callback = other.report_callback; + entity = other.entity; + } + MeshSetInfo(StatusCallback* _report_callback, BuildingEntity* _entity) + { + report_callback = _report_callback; + entity = _entity; + } + + size_t numClosedEdges = 0; + size_t numOpenEdges = 0; + size_t numFaces = 0; + std::set* > zeroAreaFaces; + std::vector* > degenerateEdges; + std::vector* > finEdges; + double surfaceArea = 0; + bool allPointersValid = true; + bool meshSetValid = false; + bool maxNumEdgesExceeded = false; + std::string details; + StatusCallback* report_callback = nullptr; + BuildingEntity* entity = nullptr; + + void resetInfoResult() + { + numClosedEdges = 0; + numOpenEdges = 0; + numFaces = 0; + zeroAreaFaces.clear(); + degenerateEdges.clear(); + finEdges.clear(); + surfaceArea = 0; + allPointersValid = true; + meshSetValid = false; + maxNumEdgesExceeded = false; + details = ""; + } +}; class TextItemData { @@ -46,13 +98,6 @@ inline void premultMatrix( const carve::math::Matrix& matrix_to_append, carve::m target_matrix = matrix_to_append*target_matrix; } class PolyInputCache3D; -namespace MeshUtils -{ - inline void intersectOpenEdges(shared_ptr >& meshset, GeomProcessingParams& params); - static void resolveOpenEdges(shared_ptr>& meshset, double eps, bool dumpPolygons); - inline void polyhedronFromMesh(const carve::mesh::Mesh<3>* mesh, PolyInputCache3D& polyInput); - inline bool addFacesReversed(const PolyInputCache3D& poly_cache_source, PolyInputCache3D& poly_cache_target); -} /** *\brief Class TransformData: holds a matrix of a coordinate system and a pointer to the corresponding IFC placement entity @@ -95,276 +140,9 @@ class TransformData int m_placement_tag = -1; }; -inline bool checkPolyhedronData( const shared_ptr& poly_data, double minFaceArea ) -{ - if( poly_data ) - { - const std::vector& faceIndices = poly_data->faceIndices; - if( faceIndices.size() > 0 ) - { - size_t iiFace = 0; - for( ; iiFace < faceIndices.size(); ) - { - int numPoints = faceIndices[iiFace]; - int numPointsIdx = iiFace; - -#ifdef _DEBUG - std::vector checkIndexes1; - if( faceIndices.size() < 500 ) - { - auto it = faceIndices.begin() + iiFace; - std::copy(it, faceIndices.end(), std::back_inserter(checkIndexes1)); - } -#endif - - if( iiFace + numPoints >= faceIndices.size() ) - { - return false; - } - - if( numPoints < 3 ) - { -#ifdef _DEBUG - //std::cout << "checkPolyhedronData: face with < 3 points" << std::endl; -#endif - return false; - } - - ++iiFace; - - int idxFirst = faceIndices[iiFace]; - int idxLast = faceIndices[iiFace+numPoints-1]; - if( idxFirst == idxLast ) - { -#ifdef _DEBUG - //std::cout << "checkPolyhedronData: closed polygon of " << numPoints << " points" << std::endl; -#endif - return false; - } - - std::vector facePoints; - for( size_t iiPoint = 0; iiPoint < numPoints; ++iiPoint ) - { - int idx = faceIndices[iiFace + iiPoint]; - if( idx >= poly_data->points.size() ) - { -#ifdef _DEBUG - //std::cout << "checkPolyhedronData: incorrect idx" << std::endl; -#endif - return false; - } - - if( iiPoint < numPoints - 1) - { - int idxNext = faceIndices[iiFace + iiPoint + 1]; - if( idx == idxNext ) - { -#ifdef _DEBUG - //std::cout << "checkPolyhedronData: duplicate point" << std::endl; -#endif - return false; - } - } - - vec3& point = poly_data->points[idx]; - facePoints.push_back(point); - } - - double area = GeomUtils::computePolygonArea(facePoints); - if( std::abs(area) < minFaceArea ) - { - return false; - } - iiFace = iiFace + numPoints; - } - - if( iiFace != faceIndices.size() ) - { - return false; - } - } - } - return true; -} - -inline bool fixPolyhedronData(const shared_ptr& poly_data, double minFaceArea ) -{ - if( !poly_data ) - { - return false; - } - - std::vector& faceIndices = poly_data->faceIndices; - if( faceIndices.size() == 0 ) - { - return true; - } - - size_t numPointsAll = poly_data->points.size(); - if( numPointsAll < 2 ) - { - return true; - } - bool inputCorrect = true; - size_t maxPointIndex = numPointsAll - 1; - - std::vector polyDataCorrected; - int numFacesCorrected = 0; - - for( size_t iiFace = 0; iiFace < faceIndices.size(); ) - { - int numPoints = faceIndices[iiFace]; - int numPointsIdx = iiFace; - - if( iiFace + numPoints >= faceIndices.size() ) - { - // skip face - break; - } - - std::vector pointIdxCurrentFace; - for( size_t iiPoint = 1; iiPoint <= numPoints; ++iiPoint ) - { - int idx = faceIndices[iiFace + iiPoint]; - if( idx > maxPointIndex ) - { - // incorrect point index, skip current point - continue; - } - - if( pointIdxCurrentFace.size() > 0 ) - { - if( idx == pointIdxCurrentFace.back() ) - { - // duplicate index, skip - continue; - } - } - pointIdxCurrentFace.push_back(idx); - } - - if( pointIdxCurrentFace.size() > 2 ) - { - int firstPointIndex = pointIdxCurrentFace.front(); - int lastPointIndex = pointIdxCurrentFace.back(); - if( firstPointIndex == lastPointIndex ) - { - // duplicate index, remove last point - pointIdxCurrentFace.pop_back(); - } - - if( pointIdxCurrentFace.size() > 2 ) - { - std::vector facePoints; - for( size_t iiPoint = 0; iiPoint < pointIdxCurrentFace.size(); ++iiPoint ) - { - int idx = pointIdxCurrentFace[iiPoint]; - const vec3& point = poly_data->points[idx]; - facePoints.push_back(point); - } - - double area = GeomUtils::computePolygonArea(facePoints); - if( std::abs(area) < minFaceArea ) - { - //inputCorrect = false; -#ifdef _DEBUG - int wait = 0; -#endif - } - else - { - // found correct face - ++numFacesCorrected; - int numPointsInFace = pointIdxCurrentFace.size(); - polyDataCorrected.push_back(numPointsInFace); - std::copy(pointIdxCurrentFace.begin(), pointIdxCurrentFace.end(), std::back_inserter(polyDataCorrected)); - } - } - } - - - - iiFace += numPoints + 1; - - if( iiFace > faceIndices.size() ) - { - inputCorrect = false; - break; - } - if( iiFace == faceIndices.size() ) - { - break; - } - } - - poly_data->faceCount = numFacesCorrected; - faceIndices = polyDataCorrected; - - return inputCorrect; -} - -inline bool reverseFacesInPolyhedronData(const shared_ptr& poly_data) -{ - if( !poly_data ) - { - return false; - } - - std::vector& faceIndices = poly_data->faceIndices; - if( faceIndices.size() == 0 ) - { - return true; - } - - size_t numPointsAll = poly_data->points.size(); - if( numPointsAll < 2 ) - { - return true; - } - bool inputCorrect = true; - size_t maxPointIndex = numPointsAll - 1; - - std::vector polyDataReversed; - int numFacesCorrected = 0; - - for( size_t iiFace = 0; iiFace < faceIndices.size(); ) - { - int numPoints = faceIndices[iiFace]; - int numPointsIdx = iiFace; - - if( iiFace + numPoints >= faceIndices.size() ) - { - // skip face - break; - } - - std::vector pointIdxCurrentFace; - for( size_t iiPoint = 1; iiPoint <= numPoints; ++iiPoint ) - { - int idx = faceIndices[iiFace + iiPoint]; - pointIdxCurrentFace.push_back(idx); - } - - polyDataReversed.push_back(numPoints); - std::copy(pointIdxCurrentFace.rbegin(), pointIdxCurrentFace.rend(), std::back_inserter(polyDataReversed)); - - iiFace += numPoints + 1; - - if( iiFace > faceIndices.size() ) - { - inputCorrect = false; - break; - } - if( iiFace == faceIndices.size() ) - { - break; - } - } - - faceIndices = polyDataReversed; - - return inputCorrect; -} +bool checkPolyhedronData(const shared_ptr& poly_data, double minFaceArea, std::string& details); +bool fixPolyhedronData(const shared_ptr& poly_data, double epsMergePoints); +bool reverseFacesInPolyhedronData(const shared_ptr& poly_data); class PolyInputCache3D { @@ -623,39 +401,11 @@ class PolyInputCache3D std::map > > m_existing_vertices_coords; }; -static bool checkFaceIndices(PolyInputCache3D& inputData ) -{ - const std::vector& vec_points = inputData.m_poly_data->points; - const std::vector& face_indices = inputData.m_poly_data->faceIndices; - int face_count = 0; - for( size_t ii = 0; ii < face_indices.size(); ++ii ) - { - int num_vertices = face_indices[ii]; - for( int jj = 0; jj < num_vertices; ++jj ) - { - ++ii; - if( ii >= face_indices.size() ) - { - return false; - } - int vertex_index = face_indices[ii]; - if( vertex_index >= (int)vec_points.size() ) - { - return false; - } - } - - ++face_count; - } - - if( face_count != inputData.m_poly_data->faceCount ) - { - return false; - } - return true; -} +void polyhedronFromMeshSet(const shared_ptr>& meshset, PolyInputCache3D& polyInput); +void polyhedronFromMeshSet(const shared_ptr>& meshset, const std::set* >& setSkipFaces, PolyInputCache3D& polyInput); +void polyhedronFromMesh(const carve::mesh::Mesh<3>* mesh, PolyInputCache3D& polyInput); +bool checkFaceIndices(PolyInputCache3D& inputData); -class RepresentationData; class ProductShapeData; /** @@ -678,11 +428,15 @@ class ItemShapeData std::vector > > m_meshsets_open; std::vector > m_vec_item_appearances; std::vector > m_vec_text_literals; - weak_ptr m_parent_representation; // Pointer to representation object that this item belongs to shared_ptr m_ifc_item; std::vector > m_vertex_points; std::set m_usedInRepresentations; + weak_ptr m_parent_product; + weak_ptr m_parent_item; // Pointer to representation object that this item belongs to + std::vector > m_child_items; + weak_ptr m_ifc_representation; + public: bool isEmpty() { @@ -696,7 +450,17 @@ class ItemShapeData return true; } - void addOpenOrClosedPolyhedron( const shared_ptr& poly_data, double CARVE_EPSILON ) + void addChildItem(shared_ptr& item_data, shared_ptr& ptr_self) + { + if( ptr_self.get() != this ) + { + std::cout << __FUNCTION__ << "ptr_self != this" << std::endl; + } + m_child_items.push_back( item_data ); + item_data->m_parent_item = ptr_self; + } + + void addOpenOrClosedPolyhedron( const shared_ptr& poly_data, double eps) { if( !poly_data ) { @@ -709,21 +473,23 @@ class ItemShapeData return; } - double minFaceArea = CARVE_EPSILON * 0.001; - bool correct = checkPolyhedronData(poly_data, minFaceArea); + double minFaceArea = eps * 0.001; + std::string details; + bool correct = checkPolyhedronData(poly_data, minFaceArea, details); if( !correct ) { - fixPolyhedronData(poly_data, minFaceArea); + fixPolyhedronData(poly_data, eps); #ifdef _DEBUG - bool correct2 = checkPolyhedronData(poly_data, minFaceArea); + std::string details2; + bool correct2 = checkPolyhedronData(poly_data, minFaceArea, details2); if( !correct2 ) { - std::cout << "incorrect idx"; + std::cout << "fixPolyhedronData failed: " << details2 << std::endl; } #endif } - shared_ptr > meshset( poly_data->createMesh( carve::input::opts(), CARVE_EPSILON ) ); + shared_ptr > meshset( poly_data->createMesh( carve::input::opts(), eps) ); if( meshset->isClosed() ) { m_meshsets.push_back( meshset ); @@ -734,156 +500,34 @@ class ItemShapeData } } - void addOpenPolyhedron( const shared_ptr& poly_data, double CARVE_EPSILON ) + void addOpenPolyhedron( const shared_ptr& poly_data, double eps) { if( poly_data->getVertexCount() < 3 ) { return; } - double minFaceArea = CARVE_EPSILON * 0.001; - bool correct = checkPolyhedronData(poly_data, minFaceArea); + double minFaceArea = eps * 0.001; + std::string details; + bool correct = checkPolyhedronData(poly_data, minFaceArea, details); if( !correct ) { - fixPolyhedronData(poly_data, minFaceArea); + fixPolyhedronData(poly_data, eps); #ifdef _DEBUG - bool correct2 = checkPolyhedronData(poly_data, minFaceArea); + std::string details2; + bool correct2 = checkPolyhedronData(poly_data, minFaceArea, details2); if( !correct2 ) { - std::cout << "incorrect idx"; + std::cout << "fixPolyhedronData failed: " << details2 << std::endl; } #endif } - shared_ptr > meshset( poly_data->createMesh( carve::input::opts(), CARVE_EPSILON ) ); + shared_ptr > meshset( poly_data->createMesh( carve::input::opts(), eps) ); m_meshsets_open.push_back( meshset ); } - bool addClosedPolyhedron(const shared_ptr& poly_data, GeomProcessingParams& params) - { - if( poly_data->getVertexCount() < 3 ) - { - return false; - } - - double CARVE_EPSILON = params.epsMergePoints; - -#ifdef _DEBUG - shared_ptr poly_data_copy(poly_data); - bool correct1 = checkPolyhedronData(poly_data_copy, params.minFaceArea); - if( !correct1 ) - { - //std::map mesh_input_options; - //shared_ptr > meshset(poly_data->createMesh(mesh_input_options)); - - //glm::vec4 color(0.3, 0.4, 0.5, 1.0); - //GeomDebugDump::dumpMeshset(meshset.get(), color, true); - } -#endif - - std::map mesh_input_options; - shared_ptr > meshsetUnchanged(poly_data->createMesh(mesh_input_options, CARVE_EPSILON)); - bool correct = checkPolyhedronData(poly_data, params.minFaceArea); - if( !correct ) - { - fixPolyhedronData(poly_data, params.minFaceArea); - bool correct2 = checkPolyhedronData(poly_data, params.minFaceArea); - if( !correct2 ) - { - std::cout << "failed to correct polyhedron data\n"; - return false; - } - } - - bool dumpMeshes = false; - shared_ptr > meshset(poly_data->createMesh(mesh_input_options, CARVE_EPSILON)); - if( meshset->isClosed() ) - { - m_meshsets.push_back(meshset); - return true; - } - - if( meshsetUnchanged->isClosed() ) - { - m_meshsets.push_back(meshsetUnchanged); - return true; - } - -#ifdef _DEBUG - if( params.debugDump ) - { - glm::vec4 color(0.3, 0.4, 0.5, 1.0); - GeomDebugDump::dumpMeshsetOpenEdges(meshset, color, false, false); - GeomDebugDump::dumpMeshset(meshset.get(), color, false); - } -#endif - - if( poly_data->faceCount > 10000 ) - { - m_meshsets_open.push_back(meshset); // still may be useful as open mesh - return false; - } - - if( meshset->meshes.size() > 1 ) - { - // try to add faces of mesh[1] reversed into mesh[0] - carve::mesh::Mesh<3>* meshSmall = meshset->meshes[0]; - carve::mesh::Mesh<3>* meshBig = meshset->meshes[1]; - if( meshSmall->faces.size() > meshBig->faces.size() ) - { - std::swap(meshSmall, meshBig); - } - PolyInputCache3D polyhedronSmall; - MeshUtils::polyhedronFromMesh(meshSmall, polyhedronSmall); - - PolyInputCache3D polyhedronBig; - MeshUtils::polyhedronFromMesh(meshBig, polyhedronBig); - MeshUtils::addFacesReversed(polyhedronSmall, polyhedronBig); - meshset = shared_ptr >(polyhedronBig.m_poly_data->createMesh(mesh_input_options, CARVE_EPSILON)); - if( meshset->isClosed() ) - { - m_meshsets.push_back(meshset); - return true; - } - } - - // try to fix winding order - reverseFacesInPolyhedronData(poly_data); - - meshset = shared_ptr >(poly_data->createMesh(mesh_input_options, CARVE_EPSILON)); - if( meshset->isClosed() ) - { - m_meshsets.push_back(meshset); - return true; - } - - double eps = CARVE_EPSILON; - MeshUtils::intersectOpenEdges(meshset, params); - - for( size_t i = 0; i < meshset->meshes.size(); ++i ) - { - meshset->meshes[i]->recalc(CARVE_EPSILON); - } - if( meshset->isClosed() ) - { - m_meshsets.push_back(meshset); - return true; - } - else - { - MeshUtils::resolveOpenEdges(meshset, eps, dumpMeshes); - - if( meshset->isClosed() ) - { - m_meshsets.push_back(meshset); - return true; - } - - m_meshsets_open.push_back(meshset); // still may be useful as open mesh - } - // Meshset is not closed - return false; - } + bool addClosedPolyhedron(const shared_ptr& poly_data, GeomProcessingParams& params, shared_ptr& geom_settings); void addPoint( const vec3& point ) { @@ -962,6 +606,10 @@ class ItemShapeData for( size_t i_meshsets = 0; i_meshsets < m_meshsets_open.size(); ++i_meshsets ) { shared_ptr >& item_meshset = m_meshsets_open[i_meshsets]; + if (!item_meshset) + { + continue; + } for( size_t i = 0; i < item_meshset->vertex_storage.size(); ++i ) { @@ -981,6 +629,10 @@ class ItemShapeData for( size_t i_meshsets = 0; i_meshsets < m_meshsets.size(); ++i_meshsets ) { shared_ptr >& item_meshset = m_meshsets[i_meshsets]; + if (!item_meshset) + { + continue; + } for( size_t i = 0; i < item_meshset->vertex_storage.size(); ++i ) { @@ -1004,6 +656,11 @@ class ItemShapeData shared_ptr& text_literals = m_vec_text_literals[text_i]; text_literals->m_text_position = mat*text_literals->m_text_position; } + + for (auto child : m_child_items) + { + child->applyTransformToItem(mat, CARVE_EPSILON, matrix_identity_checked); + } } shared_ptr getItemShapeDataDeepCopy() @@ -1062,7 +719,7 @@ class ItemShapeData const std::vector >& getVertexPoints() { return m_vertex_points; } - void computeBoundingBox( carve::geom::aabb<3>& bbox ) const + void computeBoundingBox( carve::geom::aabb<3>& bbox, std::set& setVisited ) const { for( size_t ii = 0; ii < m_vertex_points.size(); ++ii ) { @@ -1154,113 +811,64 @@ class ItemShapeData bbox.unionAABB( carve::geom::aabb<3>( text_pos, carve::geom::VECTOR( 0, 0, 0 ) ) ); } } - } -}; -class RepresentationData -{ -public: - RepresentationData() {} - ~RepresentationData(){} - - weak_ptr m_ifc_representation; - std::vector > m_vec_item_data; - std::vector > m_vec_representation_appearances; - std::string m_representation_identifier; - std::string m_representation_type; - weak_ptr m_parent_product; // Pointer to product object that this representation belongs to - - shared_ptr getRepresentationDataDeepCopy() - { - shared_ptr copy_representation( new RepresentationData() ); - copy_representation->m_ifc_representation = m_ifc_representation; - for( size_t ii = 0; ii < m_vec_item_data.size(); ++ii ) - { - shared_ptr& item_data = m_vec_item_data[ii]; - copy_representation->m_vec_item_data.push_back( item_data->getItemShapeDataDeepCopy() ); - } - std::copy( m_vec_representation_appearances.begin(), m_vec_representation_appearances.end(), std::back_inserter( copy_representation->m_vec_representation_appearances ) ); - return copy_representation; - } - - void addChildItem( shared_ptr& item_data, shared_ptr& ptr_self ) - { - if( ptr_self.get() != this ) - { - std::cout << __FUNCTION__ << "ptr_self != this" << std::endl; - } - m_vec_item_data.push_back( item_data ); - item_data->m_parent_representation = ptr_self; - } - - void appendRepresentationData( shared_ptr& other, shared_ptr& ptr_self ) - { - if( ptr_self.get() != this ) + for (auto child : m_child_items) { - std::cout << __FUNCTION__ << "ptr_self != this" << std::endl; - } - for( auto item_data : other->m_vec_item_data ) - { - item_data->m_parent_representation = ptr_self; - m_vec_item_data.push_back( item_data ); - } - // TODO: Check if placement is same - std::copy( other->m_vec_representation_appearances.begin(), other->m_vec_representation_appearances.end(), std::back_inserter( m_vec_representation_appearances ) ); - } + if (setVisited.find(child.get()) != setVisited.end()) + { + continue; + } + setVisited.insert(child.get()); - void addAppearance( shared_ptr& appearance ) - { - if( !appearance ) - { - return; - } - int append_id = appearance->m_step_style_id; - for( size_t ii = 0; ii < m_vec_representation_appearances.size(); ++ii ) - { - shared_ptr& appearance = m_vec_representation_appearances[ii]; - if( appearance->m_step_style_id == append_id ) + carve::geom::aabb<3> meshBBox; + child->computeBoundingBox(meshBBox, setVisited); + if (bbox.isEmpty()) { - return; + bbox = meshBBox; + } + else + { + if (!meshBBox.isEmpty()) + { + bbox.unionAABB(meshBBox); + } } } - m_vec_representation_appearances.push_back( appearance ); } - void clearAppearanceData() + bool hasGeometricRepresentation(bool includeChildren) { - m_vec_representation_appearances.clear(); - } + if (m_meshsets.size() > 0) return true; + if (m_meshsets_open.size() > 0) return true; + if (m_vec_text_literals.size() > 0) return true; + if (m_vertex_points.size() > 0) return true; + if (m_polylines.size() > 0) return true; - void clearAll() - { - m_vec_representation_appearances.clear(); - m_ifc_representation.reset(); - m_vec_item_data.clear(); - m_representation_identifier = ""; - m_representation_type = ""; - } - - void applyTransformToRepresentation( const carve::math::Matrix& matrix, bool matrix_identity_checked = false ) - { - if( !matrix_identity_checked ) + if (includeChildren) { - if( GeomUtils::isMatrixIdentity( matrix ) ) + for (auto child : m_child_items) { - return; + if (child->hasGeometricRepresentation(includeChildren)) + { + return true; + } } } - for( size_t i_item = 0; i_item < m_vec_item_data.size(); ++i_item ) - { - m_vec_item_data[i_item]->applyTransformToItem( matrix, matrix_identity_checked ); - } + return false; } - void computeBoundingBox( carve::geom::aabb<3>& bbox ) const + void clearMeshGeometry() { - for( size_t ii = 0; ii < m_vec_item_data.size(); ++ii ) + m_meshsets.clear(); + m_meshsets_open.clear(); + m_vec_text_literals.clear(); + m_vec_item_appearances.clear(); + m_vertex_points.clear(); + m_polylines.clear(); + + for (auto child : m_child_items) { - const shared_ptr& item_data = m_vec_item_data[ii]; - item_data->computeBoundingBox( bbox ); + child->clearMeshGeometry(); } } }; @@ -1269,14 +877,16 @@ class ProductShapeData { public: std::string m_entity_guid; - weak_ptr m_ifc_object_definition; - weak_ptr m_object_placement; - std::vector > m_vec_representations; - bool m_added_to_spatial_structure = false; - weak_ptr m_parent; - std::vector > m_vec_transforms; - std::vector > m_vec_children; - std::vector > m_vec_product_appearances; + weak_ptr m_ifc_object_definition; + weak_ptr m_object_placement; + bool m_added_to_spatial_structure = false; + weak_ptr m_parent; + std::vector > m_vec_transforms; + std::vector > m_vec_children; + std::vector > m_vec_product_appearances; + + std::vector > m_geometric_items; + weak_ptr m_ifc_representation; ProductShapeData() {} ProductShapeData( std::string entity_guid ) : m_entity_guid(entity_guid) { } @@ -1285,18 +895,18 @@ class ProductShapeData shared_ptr getDeepCopy() { shared_ptr copy_data( new ProductShapeData(m_entity_guid) ); - for( size_t item_i = 0; item_i < m_vec_representations.size(); ++item_i ) + for( size_t item_i = 0; item_i < m_geometric_items.size(); ++item_i ) { - shared_ptr& representation_data = m_vec_representations[item_i]; - shared_ptr representation_data_copy = representation_data->getRepresentationDataDeepCopy(); - copy_data->m_vec_representations.push_back( representation_data_copy ); + shared_ptr& representation_data = m_geometric_items[item_i]; + shared_ptr representation_data_copy = representation_data->getItemShapeDataDeepCopy(); + copy_data->addGeometricItem(representation_data_copy, copy_data); } std::copy( m_vec_product_appearances.begin(), m_vec_product_appearances.end(), std::back_inserter( copy_data->m_vec_product_appearances ) ); for( auto child_product_data : m_vec_children ) { shared_ptr child_copy = child_product_data->getDeepCopy(); - copy_data->m_vec_children.push_back( child_copy ); + copy_data->addChildProduct(child_copy, copy_data); } copy_data->m_parent = m_parent; @@ -1312,6 +922,16 @@ class ProductShapeData return copy_data; } + void addGeometricItem(shared_ptr& item, shared_ptr& ptr_self) + { + if (ptr_self.get() != this) + { + std::cout << __FUNCTION__ << ": ptr_self.get() != this" << std::endl; + } + m_geometric_items.push_back(item); + item->m_parent_product = ptr_self; + } + void addAppearance( shared_ptr& appearance ) { if( !appearance ) @@ -1338,39 +958,24 @@ class ProductShapeData void clearMeshGeometry() { m_vec_product_appearances.clear(); - - //m_ifc_object_definition.reset(); m_object_placement.reset(); - //m_vec_children.clear(); - for( size_t item_i = 0; item_i < m_vec_representations.size(); ++item_i ) + for( size_t item_i = 0; item_i < m_geometric_items.size(); ++item_i ) { - shared_ptr& representation_data = m_vec_representations[item_i]; - - representation_data->m_vec_item_data.clear(); - //std::vector > & items = representation_data->m_vec_item_data; - //for( size_t jj = 0; jj < items.size(); ++jj ) - //{ - // shared_ptr& item = items[item_i]; - // item->m_meshsets.clear(); - // item->m_meshsets.clear(); - //} - + shared_ptr& item_data = m_geometric_items[item_i]; + item_data->clearMeshGeometry(); } - //m_vec_representations.clear(); - - m_added_to_spatial_structure = false; } + void clearAll() { m_vec_product_appearances.clear(); - m_ifc_object_definition.reset(); m_object_placement.reset(); m_vec_children.clear(); - m_vec_representations.clear(); + m_geometric_items.clear(); m_added_to_spatial_structure = false; } @@ -1522,9 +1127,9 @@ class ProductShapeData return; } } - for( size_t i_item = 0; i_item < m_vec_representations.size(); ++i_item ) + for( size_t i_item = 0; i_item < m_geometric_items.size(); ++i_item ) { - m_vec_representations[i_item]->applyTransformToRepresentation( matrix, true ); + m_geometric_items[i_item]->applyTransformToItem( matrix, true ); } if( applyToChildren ) @@ -1539,7 +1144,7 @@ class ProductShapeData bool isEmpty( bool check_also_children ) const { - if( m_vec_representations.size() > 0 ) + if(m_geometric_items.size() > 0 ) { return false; } @@ -1580,11 +1185,16 @@ class ProductShapeData } } - if( m_vec_representations.size() > 0 ) + for (size_t ii = 0; ii < m_geometric_items.size(); ++ii) { - // TODO: check if further check for mesh bounding box is necessary - return true; + const shared_ptr& child = m_geometric_items[ii]; + bool childHasGeom = child->hasGeometricRepresentation(includeChildren); + if (childHasGeom) + { + return true; + } } + return false; } }; @@ -1644,6 +1254,7 @@ inline bool isEqual(const shared_ptr& existingItem, const shared_ return false; } } + for( size_t ii = 0; ii < existingItem->m_meshsets_open.size(); ++ii ) { shared_ptr >& meshset1 = existingItem->m_meshsets_open[ii]; @@ -1659,18 +1270,21 @@ inline bool isEqual(const shared_ptr& existingItem, const shared_ static carve::geom::aabb<3> computeBoundingBoxLocalCoords( const shared_ptr& productData, bool includeChildren ) { carve::geom::aabb<3> bbox; - - for( auto rep : productData->m_vec_representations ) + std::set setVisited; + for( auto item : productData->m_geometric_items) { carve::geom::aabb<3> repBBox; - rep->computeBoundingBox(repBBox); + item->computeBoundingBox(repBBox, setVisited); if( bbox.isEmpty() ) { bbox = repBBox; } else { - bbox.unionAABB(repBBox); + if (!repBBox.isEmpty()) + { + bbox.unionAABB(repBBox); + } } } @@ -1685,7 +1299,10 @@ static carve::geom::aabb<3> computeBoundingBoxLocalCoords( const shared_ptr computeBoundingBox(shared_ptr& pro transform = productData->getTransform(); } - for( auto rep : productData->m_vec_representations ) + std::set setVisited; + for( auto item : productData->m_geometric_items) { carve::geom::aabb<3> repBBox; - rep->computeBoundingBox(repBBox); + item->computeBoundingBox(repBBox, setVisited); if( repBBox.isEmpty() ) { diff --git a/IfcPlusPlus/src/ifcpp/geometry/GeometrySettings.h b/IfcPlusPlus/src/ifcpp/geometry/GeometrySettings.h index d9ff6b5d1..e2348e1be 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/GeometrySettings.h +++ b/IfcPlusPlus/src/ifcpp/geometry/GeometrySettings.h @@ -21,6 +21,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #include #include #include +#include +#include #ifndef M_PI #define M_PI 3.14159265358979323846 @@ -43,6 +45,24 @@ class GeometrySettings { m_render_object_filter.insert(1287392070); // IfcFeatureElementSubtraction } + GeometrySettings(const shared_ptr& other) + { + m_render_object_filter = other->m_render_object_filter; + m_maxNumFaceEdges = other->m_maxNumFaceEdges; + m_num_vertices_per_circle = other->m_num_vertices_per_circle; + m_num_vertices_per_circle_default = other->m_num_vertices_per_circle_default; + m_min_num_vertices_per_arc = other->m_min_num_vertices_per_arc; + m_num_vertices_per_control_point = other->m_num_vertices_per_control_point; + m_num_vertices_per_control_point_default = other->m_num_vertices_per_control_point_default; + m_show_text_literals = other->m_show_text_literals; + m_ignore_profile_radius = other->m_ignore_profile_radius; + m_handle_styled_items = other->m_handle_styled_items; + m_handle_layer_assignments = other->m_handle_layer_assignments; + m_render_bounding_box = other->m_render_bounding_box; + m_min_triangle_area = other->m_min_triangle_area; + m_epsCoplanarDistance = other->m_epsCoplanarDistance; + m_epsCoplanarAngle = other->m_epsCoplanarAngle; + } // Number of discretization points per circle int getNumVerticesPerCircleWithRadius(double radius) { return m_num_vertices_per_circle_given_radius(radius); } @@ -137,30 +157,50 @@ class GeometrySettings struct GeomProcessingParams { - GeomProcessingParams(double epsMergePoints, double epsMergeAlignedEdgesAngle, double minFaceArea) + GeomProcessingParams(double epsMergePoints, double epsMergeAlignedEdgesAngle, double minFaceArea, bool dumpMeshes) { this->epsMergePoints = epsMergePoints; this->epsMergeAlignedEdgesAngle = epsMergeAlignedEdgesAngle; this->minFaceArea = minFaceArea; + this->debugDump = dumpMeshes; } GeomProcessingParams( shared_ptr& generalSettings ) { - epsMergePoints = generalSettings->getEpsilonCoplanarDistance();// m_epsCoplanarDistance; - epsMergeAlignedEdgesAngle = generalSettings->getEpsilonCoplanarAngle();// m_epsCoplanarAngle; - minFaceArea = generalSettings->getEpsilonCoplanarDistance() * 0.01;// m_epsCoplanarDistance * 0.01; + epsMergePoints = generalSettings->getEpsilonCoplanarDistance(); + epsMergeAlignedEdgesAngle = generalSettings->getEpsilonCoplanarAngle(); + minFaceArea = generalSettings->getMinTriangleArea(); + } + GeomProcessingParams(shared_ptr& generalSettings, bool dumpMeshes) + { + epsMergePoints = generalSettings->getEpsilonCoplanarDistance(); + epsMergeAlignedEdgesAngle = generalSettings->getEpsilonCoplanarAngle(); + minFaceArea = generalSettings->getMinTriangleArea(); + this->debugDump = dumpMeshes; } GeomProcessingParams( shared_ptr& generalSettings, BuildingEntity* ifc_entity, StatusCallback* callbackFunc) { - epsMergePoints = generalSettings->getEpsilonCoplanarDistance();// generalSettings->m_epsCoplanarDistance; - epsMergeAlignedEdgesAngle = generalSettings->getEpsilonCoplanarAngle();//generalSettings->m_epsCoplanarAngle; + epsMergePoints = generalSettings->getEpsilonCoplanarDistance(); + epsMergeAlignedEdgesAngle = generalSettings->getEpsilonCoplanarAngle(); this->ifc_entity = ifc_entity; this->callbackFunc = callbackFunc; - minFaceArea = generalSettings->getEpsilonCoplanarDistance() * 0.01;// generalSettings->m_epsCoplanarDistance*0.01; + minFaceArea = generalSettings->getMinTriangleArea(); + } + GeomProcessingParams(const GeomProcessingParams& other) + { + this->debugDump = other.debugDump; + this->epsMergePoints = other.epsMergePoints; + this->epsMergeAlignedEdgesAngle = other.epsMergeAlignedEdgesAngle; + this->minFaceArea = other.minFaceArea; + this->ifc_entity = other.ifc_entity; + this->callbackFunc = other.callbackFunc; } - bool debugDump = false; double epsMergePoints = 1e-9; double epsMergeAlignedEdgesAngle = 1e-10; double minFaceArea = 1e-12; + bool allowFinEdges = false; + bool allowDegenerateEdges = false; + bool debugDump = false; + BuildingEntity* ifc_entity = nullptr; StatusCallback* callbackFunc = nullptr; }; diff --git a/IfcPlusPlus/src/ifcpp/geometry/MeshOps.cpp b/IfcPlusPlus/src/ifcpp/geometry/MeshOps.cpp new file mode 100644 index 000000000..8e26b9705 --- /dev/null +++ b/IfcPlusPlus/src/ifcpp/geometry/MeshOps.cpp @@ -0,0 +1,5394 @@ +/* -*-c++-*- IfcQuery www.ifcquery.com +* +MIT License + +Copyright (c) 2017 Fabian Gerold + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "IncludeCarveHeaders.h" +#include +#include +#include "MeshOps.h" +using namespace IFC4X3; + +void getAdjacentFaces(carve::mesh::Face<3>* fx, std::set* >& adjacentFaces) +{ +#ifdef _DEBUG + bool dumpFaces = false; + if (dumpFaces) + { + GeomDebugDump::moveOffset(0.4); + glm::vec4 color(0.3, 0.2, 0.2, 1); + GeomDebugDump::dumpFaces({ fx }, color, false); + } +#endif + + carve::mesh::Edge<3>* firstEdge = fx->edge; + if (!firstEdge) + { + return; + } + + carve::mesh::Mesh<3>* mesh = fx->mesh; + size_t numFacesInMesh = mesh->faces.size(); + carve::mesh::Edge<3>* firstEdgeRev = firstEdge->rev; + if (!firstEdgeRev) + { + return; + } + carve::mesh::Face<3>* firstAdjacentFace = firstEdgeRev->face; + if (!firstAdjacentFace) + { + return; + } + adjacentFaces.insert(firstAdjacentFace); + + carve::mesh::Edge<3>* edgeRev = firstEdge->rev; + + for (size_t ii = 0; ii < numFacesInMesh; ++ii) + { + carve::mesh::Edge<3>* nextEdgeRev = edgeRev->prev->rev; + if (!nextEdgeRev) + { + return; + } + carve::mesh::Face<3>* nextAdjacentFace = nextEdgeRev->face; + + if (nextAdjacentFace) + { + if (nextAdjacentFace == fx) + { + nextEdgeRev = nextEdgeRev->rev; + nextAdjacentFace = nextEdgeRev->face; + } + + if (nextAdjacentFace == firstAdjacentFace) + { + break; + } + + adjacentFaces.insert(nextAdjacentFace); + } + else + { +#ifdef _DEBUG + std::cout << "nextEdgeRev->face == nullptr" << std::endl; +#endif + } + + edgeRev = nextEdgeRev; + } + +#ifdef _DEBUG + if (dumpFaces) + { + std::vector* > vecFaces; + std::copy(adjacentFaces.begin(), adjacentFaces.end(), std::back_inserter(vecFaces)); + GeomDebugDump::moveOffset(0.4); + glm::vec4 color2(0.3, 0.2, 0.2, 0.8); + GeomDebugDump::dumpFaces(vecFaces, color2, true); + } +#endif +} + +size_t MeshOps::getNumFaces(const carve::mesh::MeshSet<3>* meshset) +{ + size_t num_faces = 0; + for (size_t i = 0; i < meshset->meshes.size(); ++i) + { + num_faces += meshset->meshes[i]->faces.size(); + } + return num_faces; +} + +size_t MeshOps::getNumClosedEdges(const carve::mesh::MeshSet<3>* meshset) +{ + size_t num_edges = 0; + for (size_t i = 0; i < meshset->meshes.size(); ++i) + { + num_edges += meshset->meshes[i]->closed_edges.size(); + } + return num_edges; +} + +void MeshOps::recalcMeshSet(shared_ptr >& meshset, double CARVE_EPSILON) +{ + for (auto mesh : meshset->meshes) + { + mesh->cacheEdges(); + mesh->recalc(CARVE_EPSILON); + } +} + +bool MeshOps::checkMeshSetVolume(const shared_ptr >& mesh_set, StatusCallback* report_callback, BuildingEntity* entity, double CARVE_EPSILON) +{ + if (!mesh_set) + { +#ifdef _DEBUG + if (entity) + { + //std::cout << "MeshSet of entity #" << entity->m_tag << " not valid" << std::endl; + } +#endif + return false; + } + if (mesh_set->meshes.size() == 0) + { +#ifdef _DEBUG + if (entity) + { + //std::cout << "MeshSet of entity #" << entity->m_tag << " has no meshes" << std::endl; + } +#endif + return false; + } + + std::stringstream err; + + // check volume + double meshset_volume = 0; + for (size_t kk = 0; kk < mesh_set->meshes.size(); ++kk) + { + carve::mesh::Mesh<3>* mesh = mesh_set->meshes[kk]; + double mesh_volume = mesh->volume(); + + if (mesh_volume < 0) + { + mesh->invert(); + if (mesh->isNegative()) + { + mesh->recalc(CARVE_EPSILON); + mesh->calcOrientation(); + if (mesh->isNegative()) + { + err << "mesh[" << kk << "]->isNegative() " << std::endl; + } + } + mesh_volume = mesh->volume(); + } + + if (mesh_volume < 0) + { + err << "mesh_volume < 0" << std::endl; + } + + meshset_volume += mesh_volume; + } + + + if (err.tellp() > 0) + { +#ifdef _DEBUG + if (report_callback) + { + report_callback->messageCallback(err.str().c_str(), StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, entity); + } +#endif + return false; + } + return true; +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////// +double MeshOps::computeFaceArea(const carve::mesh::Face<3>* face) +{ + if (face->edge == nullptr) + { + return 0; + } + + double face_area = 0; + if (face->nVertices() == 3) + { + carve::mesh::Edge<3>* edge = face->edge; + if (edge) + { + carve::geom::vector<3>& v1 = edge->v1()->v; + carve::geom::vector<3>& v2 = edge->v2()->v; + if (edge->next) + { + carve::geom::vector<3>& v3 = edge->next->v2()->v; + carve::geom::vector<3> side1 = v2 - v1; + carve::geom::vector<3> side2 = v3 - v2; + carve::geom::vector<3> c = cross(side1, side2); + double len_square = c.length2(); + if (len_square > EPS_M14 * 0.001) + { + double area = sqrt(len_square) * 0.5; + face_area += std::abs(area); + } + } + } + } + else + { + std::vector::vertex_t* > faceVertices; + face->getVertices(faceVertices); + if (faceVertices.size() > 2) + { + size_t n = faceVertices.size(); + + carve::geom::vector<3> normal; + carve::geom::vector<3> a; + carve::geom::vector<3> b = faceVertices[n - 2]->v; + carve::geom::vector<3> c = faceVertices[n - 1]->v; + carve::geom::vector<3> s; + + for (int i = 0; i < n; ++i) + { + a = b; + b = c; + c = faceVertices[i]->v; + + normal.x += b.y * (c.z - a.z); + normal.y += b.z * (c.x - a.x); + normal.z += b.x * (c.y - a.y); + + s += c; + } + + double length = normal.length();// glm::length(normal); + if (std::abs(length) < EPS_M8) + { + return false; + } + + normal /= length; + double area = 0.5 * length; + face_area += area; + } + } + return face_area; +} + +double MeshOps::computeFaceArea(const carve::mesh::Face<3>* face, double& longestEdge) +{ + if (face->edge == nullptr) + { + return 0; + } + + longestEdge = 0; + double face_area = 0; + if (face->nVertices() == 3) + { + carve::mesh::Edge<3>* edge = face->edge; + if (edge) + { + carve::geom::vector<3>& v1 = edge->v1()->v; + carve::geom::vector<3>& v2 = edge->v2()->v; + if (edge->next) + { + carve::geom::vector<3>& v3 = edge->next->v2()->v; + carve::geom::vector<3> side1 = v2 - v1; + carve::geom::vector<3> side2 = v3 - v2; + carve::geom::vector<3> c = cross(side1, side2); + double len_square = c.length2(); + if (len_square > EPS_M14 * 0.001) + { + double area = sqrt(len_square) * 0.5;; + if (len_square > longestEdge * longestEdge) + { + longestEdge = area*2.0; + } + face_area += std::abs(area); + } + } + } + } + else + { + std::vector::vertex_t* > faceVertices; + const carve::mesh::Edge<3>* e = face->edge; + for (size_t ii = 0; ii < face->n_edges; ++ii) + { + faceVertices.push_back(e->vert); + + double length = e->length(); + if (length > longestEdge) + { + longestEdge = length; + } + + e = e->next; + } + + + if (faceVertices.size() > 2) + { + size_t n = faceVertices.size(); + + carve::geom::vector<3> normal; + carve::geom::vector<3> a; + carve::geom::vector<3> b = faceVertices[n - 2]->v; + carve::geom::vector<3> c = faceVertices[n - 1]->v; + carve::geom::vector<3> s; + + for (int i = 0; i < n; ++i) + { + a = b; + b = c; + c = faceVertices[i]->v; + + normal.x += b.y * (c.z - a.z); + normal.y += b.z * (c.x - a.x); + normal.z += b.x * (c.y - a.y); + + s += c; + } + + double length = normal.length(); + if (std::abs(length) < EPS_M8) + { + return 0; + } + + normal /= length; + double area = 0.5 * length; + face_area += area; + } + } + return face_area; +} + + +void getFaceEdges(carve::mesh::Face<3>* f, std::set* >& faceEdges, bool addReverseFaces) +{ + carve::mesh::Edge<3>* edge = f->edge; + if (!edge) + { + return; + } + + for (size_t ii = 0; ii < f->n_edges; ++ii) + { + faceEdges.insert(edge); + + if (addReverseFaces) + { + if (edge->rev) + { + faceEdges.insert(edge->rev); + } + } + edge = edge->next; + if (!edge) + { + break; + } + if (edge == f->edge) + { + break; + } + + } +} + +void getEdgeLenth2(carve::mesh::Face<3>* f, std::multimap* >& mapEdgeLenth2) +{ + carve::mesh::Edge<3>* edge = f->edge; + for (size_t ii = 0; ii < f->n_edges; ++ii) + { + double length2 = edge->length2(); + mapEdgeLenth2.insert({ length2, edge }); + edge = edge->next; + } +} + +size_t replaceVertexPointer(carve::mesh::Vertex<3>* vertexFrom, carve::mesh::Vertex<3>* vertexTo, carve::mesh::Edge<3>* edge) +{ + size_t numChanges = 0; + if (edge->vert == vertexFrom) + { + edge->vert = vertexTo; + ++numChanges; + } + if (edge->rev->vert == vertexFrom) + { + edge->rev->vert = vertexTo; + ++numChanges; + } + return numChanges; +} + +size_t replaceVertexPointer(carve::mesh::Vertex<3>* vertexFrom, carve::mesh::Vertex<3>* vertexTo, std::set* >& faces) +{ + size_t numChanges = 0; + for (auto f : faces) + { + carve::mesh::Edge<3>* edge = f->edge; + + for (size_t ii = 0; ii < f->n_edges; ++ii) + { + numChanges += replaceVertexPointer(vertexFrom, vertexTo, edge); + edge = edge->next; + if (edge == f->edge) + { + break; + } + } + } + return numChanges; +} + +size_t replaceFacePointer(carve::mesh::Face<3>* faceFrom, carve::mesh::Face<3>* faceTo, carve::mesh::Edge<3>* edge) +{ + size_t numChanges = 0; + if (edge) + { + if (edge->face == faceFrom) + { + edge->face = faceTo; + ++numChanges; + } + if (edge->rev) + { + if (edge->rev->face == faceFrom) + { + edge->rev->face = faceTo; + ++numChanges; + } + } + } + return numChanges; +} + +size_t replaceFacePointer(carve::mesh::Face<3>* faceFrom, carve::mesh::Face<3>* faceTo, std::set* >& faces) +{ + size_t numChanges = 0; + for (auto f : faces) + { + if (!f) + { +#ifdef _DEBUG + std::cout << "invalid pointer" << std::endl; +#endif + continue; + } + carve::mesh::Edge<3>* edge = f->edge; + if (!edge) + { + //std::cout << "invalid edge pointer" << std::endl; + continue; + } + + for (size_t ii = 0; ii < f->n_edges; ++ii) + { + numChanges += replaceFacePointer(faceFrom, faceTo, edge); + edge = edge->next; + if (edge == f->edge) + { + break; + } + } + } + return numChanges; +} + +size_t replaceFacePointer(carve::mesh::Face<3>* faceFrom, carve::mesh::Face<3>* faceTo) +{ + size_t numChanges = 0; + carve::mesh::Mesh<3>* mesh = faceFrom->mesh; + std::vector* >& vecFaces = mesh->faces; + for (auto f : vecFaces) + { + carve::mesh::Edge<3>* edge = f->edge; + if (!edge) + { + continue; + } + + for (size_t ii = 0; ii < f->n_edges; ++ii) + { + numChanges += replaceFacePointer(faceFrom, faceTo, edge); + edge = edge->next; + if (edge == f->edge) + { + break; + } + } + } + return numChanges; +} + +size_t countEdges(carve::mesh::Face<3>* face) +{ + if (!face) + { + return 0; + } + size_t numEdges = 0; + carve::mesh::Edge<3>* edge = face->edge; + for (size_t ii = 0; ii < 10000; ++ii) + { + ++numEdges; + edge = edge->next; + if (edge == face->edge) + { + break; + } + } + + face->n_edges = numEdges; + return numEdges; +} + +void setEdgeNullPointers(carve::mesh::Edge<3>* edge) +{ + edge->vert = nullptr; + edge->rev = nullptr; + edge->face = nullptr; + edge->prev = nullptr; + edge->next = nullptr; +} + +size_t removeFaceFromMesh(carve::mesh::Face<3>* fx) +{ + carve::mesh::Mesh<3>* mesh = fx->mesh; + for (auto it = mesh->faces.begin(); it != mesh->faces.end(); ++it) + { + carve::mesh::Face<3>* f = *it; + if (f == fx) + { + mesh->faces.erase(it); + return 1; + } + } + return 0; +} + +bool checkMeshsetTriangulated(const shared_ptr>& meshset) +{ + for (size_t ii = 0; ii < meshset->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; + const std::vector*>& vec_faces = mesh->faces; + + for (size_t i2 = 0; i2 < vec_faces.size(); ++i2) + { + carve::mesh::Face<3>* inputFace = vec_faces[i2]; + if (inputFace->n_edges != 3) + { + return false; + } + } + } + return true; +} + + +void splitIntoSubLoops(const std::vector >& polygonMerged, std::vector > >& polygonLoops, std::map >& mapInOut, double eps, bool dumpPolygon) +{ + // find inner loops and shift them such that there is no self-intersection + std::vector> previousLoop; + + for (size_t ii = 0; ii < polygonMerged.size(); ++ii) + { + const carve::geom::vector<2>& point = polygonMerged[ii]; + + + for (size_t jj = 0; jj < previousLoop.size(); ++jj) + { + const carve::geom::vector<2>& previousPoint = previousLoop[jj]; + double dx = previousPoint[0] - point.x; + if (std::abs(dx) < eps) + { + double dy = previousPoint[1] - point.y; + if (std::abs(dy) < eps) + { + // a loop should have at least 3 points + if (previousLoop.size() < 3) + { + previousLoop.clear(); + break; + } + else + { + if (jj == 1) + { + // connecting edge between outer and inner loop, erase + if (previousLoop.size() > 1) + { + previousLoop.erase(previousLoop.begin()); + } + polygonLoops.push_back(previousLoop); + previousLoop.clear(); + break; + } + // back on point in previous loop. Split here and begin new loop + polygonLoops.push_back(previousLoop); + previousLoop.clear(); + } + break; + } + } + } + + size_t loopIndex = polygonLoops.size(); + size_t pointIndex = previousLoop.size(); + mapInOut[ii] = { loopIndex, pointIndex }; + previousLoop.push_back(point); + } + + if (previousLoop.size() > 2) + { + polygonLoops.push_back(previousLoop); + } + + std::multimap > > mapAreaLoops; + for (size_t ii = 0; ii < polygonLoops.size(); ++ii) + { + std::vector >& loop = polygonLoops[ii]; + double area = std::abs(GeomUtils::signedArea(loop)); + mapAreaLoops.insert({ area, loop }); + } + polygonLoops.clear(); + for (auto it = mapAreaLoops.rbegin(); it != mapAreaLoops.rend(); ++it) + { + polygonLoops.push_back(it->second); + } +} + +void shiftSubLoops(std::vector >& polygonMerged, std::map& mapInOut, double eps, bool dumpPolygon) +{ + // find inner loops and shift them such that there is no self-intersection + std::vector> previousLoop; + std::vector > > polygonLoops; + for (size_t ii = 0; ii < polygonMerged.size(); ++ii) + { + const carve::geom::vector<2>& point = polygonMerged[ii]; + + for (size_t jj = 0; jj < previousLoop.size(); ++jj) + { + const carve::geom::vector<2>& previousPoint = previousLoop[jj]; + double dx = previousPoint[0] - point.x; + if (std::abs(dx) < eps) + { + double dy = previousPoint[1] - point.y; + if (std::abs(dy) < eps) + { + // a loop should have at least 3 points + if (previousLoop.size() < 3) + { + previousLoop.clear(); + break; + } + else + { + if (jj == 1) + { + // connecting edge between outer and inner loop, erase + if (previousLoop.size() > 1) + { + previousLoop.erase(previousLoop.begin()); + } + polygonLoops.push_back(previousLoop); + previousLoop.clear(); + break; + } + // back on point in previous loop. Split here and begin new loop + polygonLoops.push_back(previousLoop); + previousLoop.clear(); + } + break; + } + } + + } + + size_t loopIndex = polygonLoops.size(); + size_t pointIndex = previousLoop.size(); + //mapInOut[ii] = { loopIndex, pointIndex }; + previousLoop.push_back(point); + } + + if (previousLoop.size() > 2) + { + //polygon_earcut_out.push_back(previousLoop); + } + +#ifdef _DEBUG + if (polygonMerged.size() > 5 && dumpPolygon) + { + glm::vec4 color(0.3, 0.33, 0.33, 1.); + GeomDebugDump::dumpLocalCoordinateSystem(); + GeomDebugDump::moveOffset(0.1); + GeomDebugDump::dumpPolyline(polygonMerged, color, true); + GeomDebugDump::moveOffset(0.1); + GeomDebugDump::dumpPolyline(polygonLoops, color, true); + } +#endif +} + +void MeshOps::checkFaceLoops(const carve::mesh::Face<3>* face) +{ + carve::mesh::Edge<3>* e = face->edge; + if (!e) + { + return; + } + size_t closed_edges = 0; + + size_t numEdges = face->n_edges; + if (numEdges == 0) + { + return; + } + + size_t ii = 0; + do { + if (e->rev == nullptr) { + //open_edges.push_back(e); + } + else if (e < e->rev) { + //closed_edges.push_back(e); + ++closed_edges; + } + e = e->next; + + if (ii > numEdges * 3) + { + break; + } + if (ii > 10000) + { + break; + } + ++ii; + + } while (e != face->edge); + + if (ii > numEdges) + { + std::cout << "invalid edge loop " << std::endl; + +#ifdef _DEBUG + bool dumpFaces = true; + if (dumpFaces) + { + GeomDebugDump::moveOffset(0.4); + std::vector* > vecFaces = { face }; + glm::vec4 color2(0.7, 0.2, 0.2, 0.8); + GeomDebugDump::dumpFaces(vecFaces, color2, false); + } +#endif + } +} + +void checkFaceLoops(carve::mesh::Mesh<3>* mesh) +{ + size_t numFaces = mesh->faces.size(); + if (numFaces > 1000) + { + numFaces = 1000; + } + for (size_t i = 0; i < numFaces; ++i) + { + carve::mesh::Face<3>* face = mesh->faces[i]; + MeshOps::checkFaceLoops(face); + } +} + +void checkFaceLoops(carve::mesh::MeshSet<3>* meshset) +{ + for (size_t kk = 0; kk < meshset->meshes.size(); ++kk) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[kk]; + checkFaceLoops(mesh); + } +} + + +void checkEdgeIntegrity(carve::mesh::Edge<3>* e, bool checkForDegenerateEdges, MeshSetInfo& info) +{ + if (!e) + { + info.allPointersValid = false; + info.details = "edge is nullptr"; + return; + } + + if (!e->rev) + { + info.allPointersValid = false; + info.details = "edge->rev is nullptr"; + return; + } + + + if (!e->prev) + { + info.allPointersValid = false; + info.details = "edge->prev is nullptr"; + return; + } + if (!e->next) + { + info.allPointersValid = false; + info.details = "edge->next is nullptr"; + return; + } + if (!e->vert) + { + info.allPointersValid = false; + info.details = "edge->vert is nullptr"; + return; + } + if (!e->face) + { + info.allPointersValid = false; + info.details = "edge->face is nullptr"; + return; + } + + if (checkForDegenerateEdges) + { + if (e->rev->rev != e) + { + info.degenerateEdges.push_back(e); + info.details = "edge->rev->rev != edge"; + } + + if (e->prev == e->next) + { + info.degenerateEdges.push_back(e); + info.details = "e->prev == e->next"; + } + + if (e->prev->vert == e->next->vert) + { +#ifdef _DEBUG + double length2 = e->length2(); + double length2prev = e->prev->length2(); + double length2next = e->next->length2(); + + carve::mesh::Face<3>* f1 = e->face; + carve::mesh::Face<3>* f2 = e->prev->face; + carve::mesh::Face<3>* f3 = e->next->face; + double area1 = MeshOps::computeFaceArea(f1); + double area2 = MeshOps::computeFaceArea(f2); + double area3 = MeshOps::computeFaceArea(f3); + + + + //glm::vec4 color(0.6, 0.6, 0.6, 1.); + //GeomDebugDump::clearMeshsetDump(); + //GeomDebugDump::dumpFacePolygon(e->face, color, true); + +#endif + info.degenerateEdges.push_back(e); + info.details = "e->prev->vert == e->next->vert"; + } + + if (e->next == e->rev) + { + if (e->next->next == e) + { + // 2 edges referencing itself + info.details = "e->next == e->rev"; + info.degenerateEdges.push_back(e); + } + } + } +} + +void checkFaceIntegrity(const carve::mesh::Face<3>* face, bool checkForDegenerateEdges, MeshSetInfo& info) +{ + if (!face) + { + info.allPointersValid = false; + return; + } + + carve::mesh::Edge<3>* e = face->edge; + if (!e) + { + info.allPointersValid = false; + info.details = "face->edge is nullptr"; + return; + } + + const size_t n_edges = face->n_edges; + if (n_edges > 10000) + { + info.maxNumEdgesExceeded = true; +#ifdef _DEBUG + std::cout << "n_edges > 10000" << std::endl; + glm::vec4 color(0.3, 0.3, 0.3, 1.); + GeomDebugDump::dumpFacePolygon(face, color, false); +#endif + return; + } + for (size_t i_edge = 0; i_edge < n_edges; ++i_edge) + { + checkEdgeIntegrity(e, checkForDegenerateEdges, info); + + if (!info.allPointersValid) + { + return; + } + + //if (checkForDegenerateEdges) + //{ + // if (info.numDegenerateEdges > 0) + // { + // return false; + // } + //} + + //if( !checkEdgeIntegrity(e, checkForDegenerateEdges, info) ) + //{ + // info.details = "!checkEdgePointers(e) " + info.details; + // return false; + //} + + checkEdgeIntegrity(e->rev, checkForDegenerateEdges, info); + + if (!info.allPointersValid) + { + return; + } + + // continue + e = e->next; + } + + if (e != face->edge) + { + info.details = "e != face->edge"; + return; + } + + try + { + e->validateLoop(); + } + catch (std::exception& ex) + { +#ifdef _DEBUG + std::cout << ex.what() << std::endl; +#endif + info.allPointersValid = false; + return; + } + catch (std::exception* ex) + { +#ifdef _DEBUG + std::cout << ex->what() << std::endl; +#endif + info.allPointersValid = false; + return; + } + catch (carve::exception& ex) + { +#ifdef _DEBUG + std::cout << ex.str() << std::endl; +#endif + info.allPointersValid = false; + return; + } + catch (...) + { + info.allPointersValid = false; + return; + } +} + +bool isCoplanar(const carve::geom::plane<3>& plane, const carve::mesh::Face<3>* face1, const carve::mesh::Face<3>* face2, shared_ptr& geomSettings) +{ + if (!face2) + { + return false; + } + const vec3& planeNormal = plane.N; + const vec3& face2Normal = face2->plane.N; + const vec3& face2Position = face2->edge->v2()->v; + + double dotProduct = std::abs(dot(planeNormal, face2Normal)); + if (std::abs(dotProduct - 1.0) > geomSettings->getEpsilonCoplanarAngle()) // we can be less strict here, since we test each point separately + { + return false; + } + + //const carve::geom::plane<3>& face1Plane = face1->plane; + vec3 planePosition = planeNormal; + planePosition *= -plane.d; + + +#ifdef _DEBUG + std::vector::vertex_t* > face1Vertices; + face1->getVertices(face1Vertices); + vec3 vertexNormal = GeomUtils::computePolygonNormal(face1Vertices); + double dotProduct1 = std::abs(dot(vertexNormal, planeNormal)); + if (std::abs(dotProduct1 - 1.0) > geomSettings->getEpsilonCoplanarAngle()) + { + std::cout << "std::abs(dotProduct1 - 1.0) > geomSettings->m_epsCoplanarAngle )" << std::endl; + } + + if (face1Vertices.size() > 2) + { + + bool allVerticesInPlane = true; + for (const carve::mesh::Face<3>::vertex_t * vertex : face1Vertices) + { + const carve::geom::vector<3>& facePoint = vertex->v; + + double distanceToPlane = std::abs(dot(planeNormal, facePoint - planePosition)); + + //double distanceToPlane = face1Plane-.m_plane.distancePointPlane(facePoint); + + if (std::abs(distanceToPlane) > geomSettings->getEpsilonCoplanarDistance() * 1.5)// m_epsCoplanarDistance*1.5 ) + { + allVerticesInPlane = false; + break; + } + } + + if (!allVerticesInPlane) + { + std::cout << "!allVerticesInPlane\n"; + } + } + +#endif + //double face_area = MeshOps::computeFaceArea(faceIn); + //if( std::abs(face_area) < carve::eps ) + //{ + // return false; + //} + + std::vector::vertex_t* > faceVertices; + face2->getVertices(faceVertices); + if (faceVertices.size() > 2) + { + bool allVerticesInPlane = true; + for (const carve::mesh::Face<3>::vertex_t * vertex : faceVertices) + { + const carve::geom::vector<3>& facePoint = vertex->v; + + double distanceToPlane = std::abs(dot(planeNormal, facePoint - planePosition)); + + if (std::abs(distanceToPlane) > geomSettings->getEpsilonCoplanarDistance()) + { + allVerticesInPlane = false; + break; + } + } + + if (allVerticesInPlane) + { + return true; + } + } + return false; +} + + +void MeshOps::retriangulateMeshSetSimple(shared_ptr >& meshset, bool ignoreResultOpenEdges, GeomProcessingParams& params, size_t retryCount) +{ + if (!meshset) + { + return; + } + + MeshSetInfo info; + bool validInput = MeshOps::checkMeshSetValidAndClosed(meshset, info, params); + MeshOps::checkMeshSetNonNegativeAndClosed(meshset, params); + + bool already_triagulated = MeshOps::checkMeshsetTriangulated(meshset); + if (already_triagulated && validInput) + { + return; + } + + PolyInputCache3D poly_cache(params.epsMergePoints); // TODO: check to use double + std::vector map_merged_idx; + map_merged_idx.resize(meshset->vertex_storage.size(), 0); + for (size_t ii = 0; ii < meshset->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; + std::vector* >& vec_faces = mesh->faces; + + for (size_t i2 = 0; i2 < vec_faces.size(); ++i2) + { + carve::mesh::Face<3>* face = vec_faces[i2]; + +#ifdef _DEBUG + std::vector face_idx; + //getFaceIndexes(face, meshset->vertex_storage, face_idx); +#endif + + std::vector verts2d; + face->getProjectedVertices(verts2d); + if (verts2d.size() < 3) + { + continue; + } + + // now insert points to polygon, avoiding points with same coordinates + int i_vert = 0; + carve::mesh::Edge<3>* edge = face->edge; + for (size_t i3 = 0; i3 < face->n_edges; ++i3) + { + const vec3& v = edge->vert->v; + edge = edge->next; + int vertex_index = poly_cache.addPoint(v); + if (i_vert >= map_merged_idx.size()) + { + map_merged_idx.resize(i_vert + 1, 0); + } + map_merged_idx[i_vert] = vertex_index; + ++i_vert; + if (edge == face->edge) + { + break; + } + } + + if (retryCount > 0) + { +#ifdef _DEBUG + if (verts2d.size() > 7) + { + glm::vec4 color(0.3, 0.33, 0.33, 1.); + GeomDebugDump::dumpLocalCoordinateSystem(); + GeomDebugDump::moveOffset(0.1); + GeomDebugDump::dumpPolyline(verts2d, color, true); + + std::vector > > polygon_earcut; + std::map > mapFlat2NestedArray; + splitIntoSubLoops(verts2d, polygon_earcut, mapFlat2NestedArray, params.epsMergePoints, false); + + GeomDebugDump::moveOffset(0.1); + GeomDebugDump::dumpPolyline(polygon_earcut, color, true); + } +#endif + + std::map mapFlat2NestedArray; + if (verts2d.size() > 7) + { + shiftSubLoops(verts2d, mapFlat2NestedArray, params.epsMergePoints, false); + } + +#ifdef _DEBUG + if (verts2d.size() > 7) + { + glm::vec4 color(0.3, 0.33, 0.33, 1.); + GeomDebugDump::dumpLocalCoordinateSystem(); + GeomDebugDump::moveOffset(0.1); + GeomDebugDump::dumpPolyline(verts2d, color, true); + + //std::vector > > polygon_earcut; + + //GeomDebugDump::moveOffset(0.1); + //GeomDebugDump::dumpPolyline(polygon_earcut, color, true); + } +#endif + + } + + { + std::vector triangulated; + if (verts2d.size() > 3) + { + try + { + carve::triangulate::triangulate(verts2d, triangulated, params.epsMergePoints); + carve::triangulate::improve(verts2d, triangulated); + } + catch (...) + { +#ifdef _DEBUG + std::cout << __FUNC__ << " carve::triangulate failed " << std::endl; +#endif + continue; + } + } + else + { + triangulated.push_back(carve::triangulate::tri_idx(0, 1, 2)); + } + + + + for (size_t i4 = 0; i4 != triangulated.size(); ++i4) + { + const carve::triangulate::tri_idx& triangle = triangulated[i4]; + int a = triangle.a; + int b = triangle.b; + int c = triangle.c; + + int vertex_id_a = map_merged_idx[a]; + int vertex_id_b = map_merged_idx[b]; + int vertex_id_c = map_merged_idx[c]; + + if (vertex_id_a == vertex_id_b || vertex_id_a == vertex_id_c || vertex_id_b == vertex_id_c) + { + continue; + } + + const carve::poly::Vertex<3>& v_a = poly_cache.m_poly_data->getVertex(vertex_id_a); + const carve::poly::Vertex<3>& v_b = poly_cache.m_poly_data->getVertex(vertex_id_b); + + double dx = v_a.v[0] - v_b.v[0]; + if (std::abs(dx) < 0.0000001) + { + double dy = v_a.v[1] - v_b.v[1]; + if (std::abs(dy) < 0.0000001) + { + double dz = v_a.v[2] - v_b.v[2]; + if (std::abs(dz) < 0.0000001) + { +#ifdef _DEBUG + std::cerr << "degenerated triangle: std::abs(dx) < 0.00001 && std::abs(dy) < 0.00001 && std::abs(dz) < 0.00001\n"; +#endif + continue; + } + } + } + + poly_cache.m_poly_data->addFace(vertex_id_a, vertex_id_b, vertex_id_c); + } + } + } + } + + shared_ptr> meshsetTrinangulated1 = shared_ptr >(poly_cache.m_poly_data->createMesh(carve::input::opts(), params.epsMergePoints)); + + double minFaceArea = params.minFaceArea; + std::string details = ""; + bool correct = checkPolyhedronData(poly_cache.m_poly_data, minFaceArea, details); + if (!correct) + { + fixPolyhedronData(poly_cache.m_poly_data, minFaceArea); +#ifdef _DEBUG + bool correct2 = checkPolyhedronData(poly_cache.m_poly_data, minFaceArea, details); + if (!correct2) + { + std::cout << "fixPolyhedronData failed" << std::endl; + } +#endif + } + + shared_ptr> meshsetTrinangulated = shared_ptr >(poly_cache.m_poly_data->createMesh(carve::input::opts(), params.epsMergePoints)); + MeshSetInfo infoTriangulated; + bool validTriangulatedMesh = MeshOps::checkMeshSetValidAndClosed(meshsetTrinangulated, infoTriangulated, params); + if (!validTriangulatedMesh) + { +#ifdef _DEBUG + bool dumpMesh = false; + if (validInput && dumpMesh) + { + DumpSettingsStruct dumpSet; + dumpSet.triangulateBeforeDump = false; + glm::vec4 color(0.3, 0.33, 0.33, 1.); + GeomDebugDump::dumpLocalCoordinateSystem(); + GeomDebugDump::moveOffset(0.3); + dumpWithLabel("triangulate:input ", meshset, dumpSet, params, false, true, true); + GeomDebugDump::moveOffset(0.3); + dumpWithLabel("triangulate:result", meshsetTrinangulated, dumpSet, params, false, true, true); + } +#endif + bool validTriangulatedMesh1 = MeshOps::checkMeshSetValidAndClosed(meshsetTrinangulated1, infoTriangulated, params); + if (validTriangulatedMesh1) + { + meshset.reset(); + meshset = meshsetTrinangulated1; + return; + } + + if (!ignoreResultOpenEdges) + { + return; + } + } + meshset.reset(); + meshset = meshsetTrinangulated; +} + +void MeshOps::retriangulateMeshSetSimple(std::vector > >& meshsets, bool ignoreResultOpenEdges, GeomProcessingParams& params, size_t retryCount) +{ + for (shared_ptr >&meshset : meshsets) + { + MeshOps::retriangulateMeshSetSimple(meshset, ignoreResultOpenEdges, params, retryCount); + } +} + +void _link(carve::mesh::Edge<3>* a, carve::mesh::Edge<3>* b) +{ + a->next = b; + b->prev = a; +} + +void _setloopface(carve::mesh::Edge<3>* s, carve::mesh::Face<3>* f) +{ + carve::mesh::Edge<3>* e = s; + do + { + e->face = f; + e = e->next; + } while (e != s); +} + +carve::mesh::Edge<3>* checkMergeFaces(carve::mesh::Edge<3>* e, shared_ptr& geomSettings, bool dumpMeshes) +{ + if (e->rev == nullptr) + { + return nullptr; + } + + + carve::mesh::Face<3>* fwdface = e->face; + carve::mesh::Face<3>* revface = e->rev->face; + + if (fwdface == revface) + { + return nullptr; + } + + if (fwdface->n_edges > geomSettings->m_maxNumFaceEdges) + { + return nullptr; + } + if (revface->n_edges > geomSettings->m_maxNumFaceEdges) + { + return nullptr; + } + + +#ifdef _DEBUG + + GeomDebugDump::ScopedDumpBuffering scoped_buffer; + if (dumpMeshes) + { + glm::vec4 color(0.3, 0.3, 0.3, 1.); + std::vector* > vecFaces = { fwdface }; + GeomDebugDump::dumpFaces(vecFaces, color, false); + GeomDebugDump::dumpFacePolygon(revface, color, false); + } +#endif + + size_t n_removed = 0; + + carve::mesh::Edge<3>* splice_beg = e; + for (size_t ii = 0; ii < fwdface->n_edges; ++ii) + { + splice_beg = splice_beg->prev; + ++n_removed; + + if (splice_beg == e) { break; } + if (!splice_beg->rev) { break; } + if (splice_beg->next->rev->prev != splice_beg->rev) { break; } + } + + if (splice_beg == e) + { + // edge loops are completely matched. + return nullptr; + } + + carve::mesh::Edge<3>* splice_end = e; + do { + splice_end = splice_end->next; + ++n_removed; + } while (splice_end->rev && splice_end->prev->rev->next == splice_end->rev); + + --n_removed; + + carve::mesh::Edge<3>* link1_p = splice_beg; + carve::mesh::Edge<3>* link1_n = splice_beg->next->rev->next; + + carve::mesh::Edge<3>* link2_p = splice_end->prev->rev->prev; + carve::mesh::Edge<3>* link2_n = splice_end; + + CARVE_ASSERT(link1_p->face == fwdface); + CARVE_ASSERT(link1_n->face == revface); + + CARVE_ASSERT(link2_p->face == revface); + CARVE_ASSERT(link2_n->face == fwdface); + + carve::mesh::Edge<3>* left_loop = link1_p->next; + + CARVE_ASSERT(left_loop->rev == link1_n->prev); + + _link(link2_n->prev, link1_p->next); + _link(link1_n->prev, link2_p->next); + + _link(link1_p, link1_n); + _link(link2_p, link2_n); + + fwdface->edge = link1_p; + + size_t edgeCount = 0; + for (carve::mesh::Edge<3>*e = link1_n; e != link2_n; e = e->next) + { + CARVE_ASSERT(e->face == revface); + e->face = fwdface; + fwdface->n_edges++; + ++edgeCount; + if (edgeCount > geomSettings->m_maxNumFaceEdges) + { + std::logic_error ex("edgeCount > m_maxNumFaceEdges"); + throw std::exception(ex); + return nullptr; + } + } + edgeCount = 0; + for (carve::mesh::Edge<3>*e = link2_n; e != link1_n; e = e->next) + { + CARVE_ASSERT(e->face == fwdface); + ++edgeCount; + if (edgeCount > geomSettings->m_maxNumFaceEdges) + { + std::logic_error ex("edgeCount > m_maxNumFaceEdges"); + throw std::exception(ex); + return nullptr; + } + } + + fwdface->n_edges -= n_removed; + + revface->n_edges = 0; + revface->edge = nullptr; + + _setloopface(left_loop, nullptr); + _setloopface(left_loop->rev, nullptr); + +#ifdef _DEBUG + GeomDebugDump::clearBuffer(); +#endif + + return left_loop; +} + + + +bool isBetterForBoolOp(const shared_ptr>& meshsetNew, size_t numClosedEdgesBefore, size_t numOpenEdgesBefore) +{ + size_t numOpenEdgesNew = 0; + size_t numClosedEdgesNew = 0; + for (size_t ii = 0; ii < meshsetNew->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshsetNew->meshes[ii]; + numOpenEdgesNew += mesh->open_edges.size(); + numClosedEdgesNew += mesh->closed_edges.size(); + } + + if (numOpenEdgesNew > numOpenEdgesBefore) + { + return false; + } + + // fewer open edges is better + size_t numAllEdgesNew = numOpenEdgesNew + numClosedEdgesNew; + size_t numAllEdgesBefore = numClosedEdgesBefore + numOpenEdgesBefore; + if (numClosedEdgesNew >= numClosedEdgesBefore) + { + return true; + } + return false; +} + +inline void countReferencesToVertex(const carve::mesh::Edge<3>* edge, const carve::mesh::Vertex<3>* vertex, std::set* >& setEdgesReferencing) +{ + if (!edge->face) + { + return; + } + + for (size_t jj = 0; jj < edge->face->mesh->faces.size(); ++jj) + { + carve::mesh::Face<3>* face3 = edge->face->mesh->faces[jj]; + carve::mesh::Edge<3>* e3 = face3->edge; + for (size_t kk = 0; kk < face3->n_edges; ++kk) + { + if (e3) + { + //if( e3 != edge ) + { + if (e3->vert == vertex) + { + setEdgesReferencing.insert(e3); + } + } + } + e3 = e3->next; + } + } +} + + +inline void removeFinEdges(const carve::mesh::Face<3>* face, size_t& numChanges, double eps) +{ + return; + + if (!face) + { + return; + } + + carve::mesh::Mesh<3>* mesh = face->mesh; + if (mesh->open_edges.size() == 0) + { + return; + } + + carve::mesh::Edge<3>* e = face->edge; + if (!e) + { + return; + } + + const size_t n_edges = face->n_edges; + std::set* > setEdgesToRemove; + for (size_t i_edge = 0; i_edge < n_edges; ++i_edge) + { + carve::mesh::Edge<3>* degenerateEdge = nullptr; + + double edgeLength2 = e->length2(); + if (edgeLength2 < eps * eps) + { + degenerateEdge = e; + } + + bool condition1 = e->prev->vert == e->next->vert; + bool condition2 = e->next == e->rev; + if (condition1 || condition2) + { + // check if the vertex is used by other edges + degenerateEdge = e; + std::set* > setEdgesReferencing; + carve::mesh::Vertex<3>* vertex = e->vert; + countReferencesToVertex(e, vertex, setEdgesReferencing); + size_t numReferences = setEdgesReferencing.size(); + + if (numReferences > 1) + { + // other edges referencing current vertex + degenerateEdge = nullptr; + carve::mesh::Edge<3>* reverseEdge = e->rev; + if (reverseEdge != nullptr) + { + carve::mesh::Vertex<3>* vertexReverseEdge = reverseEdge->vert; + std::set* > setEdgesReferencingReferseEdge; + countReferencesToVertex(reverseEdge, vertexReverseEdge, setEdgesReferencingReferseEdge); + size_t numReferencesReverse = setEdgesReferencingReferseEdge.size(); + + if (numReferencesReverse == 1) + { + degenerateEdge = reverseEdge; + } + } + } + } + + if (degenerateEdge != nullptr) + { + carve::mesh::Edge<3>* degenerateEdgeReverse = degenerateEdge->rev; + if (degenerateEdgeReverse != nullptr) + { + auto itFindEdge = setEdgesToRemove.find(degenerateEdgeReverse); + if (itFindEdge == setEdgesToRemove.end()) + { + setEdgesToRemove.insert(degenerateEdge); + } + } + else + { + setEdgesToRemove.insert(degenerateEdge); + } + } + e = e->next; + } + + for (carve::mesh::Edge<3>*edgeRemove : setEdgesToRemove) + { + std::set* > setFacesToReplaceEdgePointer; + if (face->edge == edgeRemove) + { + carve::mesh::Face<3>* faceNonConst = (carve::mesh::Face<3>*)face; + setFacesToReplaceEdgePointer.insert(faceNonConst); + } + + for (auto faceInMesh : face->mesh->faces) + { + if (faceInMesh->edge == edgeRemove) + { + setFacesToReplaceEdgePointer.insert(faceInMesh); + } + } + + carve::mesh::Edge<3>* edgeRemainingNext = edgeRemove->removeEdge(); + for (auto faceReplaceEdgePointer : setFacesToReplaceEdgePointer) + { + if (faceReplaceEdgePointer->edge != edgeRemainingNext) + { + faceReplaceEdgePointer->edge = edgeRemainingNext; + } + } + + ++numChanges; + } +} + +inline void removeFinEdges(carve::mesh::Mesh<3>* mesh, GeomProcessingParams& params) +{ + if (!mesh) + { + return; + } + + const std::vector* >& vec_faces = mesh->faces; + size_t numFaces = vec_faces.size(); + double epsMinFaceArea = params.minFaceArea; + +#ifdef _DEBUG + if (numFaces == 1 && false) + { + glm::vec4 color(0.4, 0.2, 0.2, 1.); + std::vector* > vecFaces; + vecFaces.push_back(vec_faces[0]); + GeomDebugDump::moveOffset(0.3); + GeomDebugDump::stopBuffering(); + GeomDebugDump::dumpFaces(vecFaces, color); + GeomDebugDump::moveOffset(0.3); + GeomDebugDump::dumpFacePolygon(vec_faces[0], color, true); + + //GeomDebugDump::moveOffset(0.01); + //std::vector vecPolyline = { e->v1()->v, e->v2()->v }; + //GeomDebugDump::dumpPolyline(vecPolyline, color, true); + } +#endif + + for (size_t ii = 0; ii < numFaces; ++ii) + { + size_t numChangesAll = 0; + for (size_t jj = 0; jj < vec_faces.size(); ++jj) + { + size_t numChangesCurrentFace = 0; + carve::mesh::Face<3>* face = vec_faces[jj]; + removeFinEdges(face, numChangesCurrentFace, params.epsMergePoints); + numChangesAll += numChangesCurrentFace; + } + + // several fin-edges (where edge->next == edge->reverse) can be concatenated. Repeat until there are no changes + if (numChangesAll > 0) + { + if (mesh->faces.size() < 2) + { + continue; + } + + bool checkForDegenerateEdges = false; + MeshSetInfo minf; + MeshOps::checkMeshPointers(mesh, checkForDegenerateEdges, params, minf); + + if (!minf.allPointersValid) + { + continue; + } + + mesh->cacheEdges(); + mesh->recalc(params.epsMergePoints); + } + + if (numChangesAll == 0) + { + break; + } + } +} + +void removeFinEdges(shared_ptr >& meshset, GeomProcessingParams& params) +{ + for (carve::mesh::Mesh<3>*mesh : meshset->meshes) + { + removeFinEdges(mesh, params); + } +} + +void findFinEdges(const shared_ptr >& meshset, std::set* >& setFinEdges, GeomProcessingParams& params) +{ + for (const carve::mesh::Mesh<3>*mesh : meshset->meshes) + { + for (carve::mesh::Edge<3>*edge : mesh->closed_edges) + { + if (!edge) + { + continue; + } + + carve::mesh::Edge<3>* reverseEdge = edge->rev; + if (!reverseEdge) + { + continue; + } + + carve::mesh::Face<3>* face = edge->face; + if (!face) + { + continue; + } + + carve::mesh::Face<3>* adjacentFace = reverseEdge->face; + if (!adjacentFace) + { + continue; + } + + // compute face normal here. Don't rely on face->plane.N, since the winding order might be changed + const vec3 faceNormal = MeshOps::computeFaceNormal(face); + const vec3 face2Normal = MeshOps::computeFaceNormal(adjacentFace); + + // adjacent faces back-to-back have -1 as normal vector dot product + double dotProduct = dot(faceNormal, face2Normal); + if (std::abs(dotProduct + 1.0) < params.epsMergeAlignedEdgesAngle*10) + { + setFinEdges.insert(edge); + } + +#ifdef _DEBUG + //if (params.debugDump) + //{ + // glm::vec4 color(0.5, 0.5, 0.5, 1); + // GeomDebugDump::stopBuffering(); + // GeomDebugDump::dumpFacePolygon(face, color, false); + // GeomDebugDump::moveOffset(0.0001); + //} +#endif + } + } +} + + +void removeFinFaces(shared_ptr >& meshset, GeomProcessingParams& params) +{ + //return; + + std::set* > setFacesRemove; + for (carve::mesh::Mesh<3>*mesh : meshset->meshes) + { + for (carve::mesh::Edge<3>*edge : mesh->closed_edges) + { + if (!edge) + { + continue; + } + + carve::mesh::Edge<3>* reverseEdge = edge->rev; + if (!reverseEdge) + { + continue; + } + + carve::mesh::Face<3>* face = edge->face; + if (!face) + { + continue; + } + + carve::mesh::Face<3>* adjacentFace = reverseEdge->face; + if (!adjacentFace) + { + continue; + } + + // compute face normal here. Don't rely on face->plane.N, since the winding order might be changed + const vec3 faceNormal = MeshOps::computeFaceNormal(face); + const vec3 face2Normal = MeshOps::computeFaceNormal(adjacentFace); + + // adjacent faces back-to-back have -1 as normal vector dot product + + double dotProduct = dot(faceNormal, face2Normal); + if (std::abs(dotProduct + 1.0) < params.epsMergeAlignedEdgesAngle) + { + setFacesRemove.insert(face); + setFacesRemove.insert(adjacentFace); + } + } + } + + if (setFacesRemove.size() > 0) + { + PolyInputCache3D polyInput(params.epsMergePoints); + polyhedronFromMeshSet(meshset, setFacesRemove, polyInput); + + std::string details; + bool polyCorrect = checkPolyhedronData(polyInput.m_poly_data, params.epsMergePoints, details); + if (!polyCorrect) + { + fixPolyhedronData(polyInput.m_poly_data, params.epsMergePoints); + } + + std::map mesh_input_options; + shared_ptr > resultFromPolyhedron(polyInput.m_poly_data->createMesh(mesh_input_options, params.epsMergePoints)); + MeshSetInfo info; + bool mesh_ok = MeshOps::checkMeshSetValidAndClosed(resultFromPolyhedron, info, params); + + if (mesh_ok) + { +#ifdef _DEBUG + //std::vector* > vecFaces = { face };// , adjacentFace + glm::vec4 color(0.5, 0.5, 0.5, 1); + GeomDebugDump::stopBuffering(); + GeomDebugDump::moveOffset(0.15); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshset, color, drawNormals, true); + GeomDebugDump::moveOffset(0.1); + GeomDebugDump::dumpMeshset(resultFromPolyhedron, color, drawNormals, true); +#endif + + meshset = resultFromPolyhedron; + } + } +} + +void MeshOps::removeDegenerateFacesInMeshSet(shared_ptr >& meshsetInput, GeomProcessingParams& params) +{ + if (!meshsetInput) + { + return; + } + + std::set* > setFacesRemove; + std::map*, std::vector* > > degenerateEdges; // TODO: handle degenerate edges + for (carve::mesh::Mesh<3>*mesh : meshsetInput->meshes) + { + double meshVolume = mesh->volume(); + if (meshVolume < params.epsMergePoints) + { + // remove complete mesh + for (carve::mesh::Face<3>*face : mesh->faces) + { + if (!face) + { + continue; + } + + setFacesRemove.insert(face); + } + continue; + } + + for (carve::mesh::Face<3>*face : mesh->faces) + { + if (!face) + { + continue; + } + + if (face->n_edges < 3) + { + setFacesRemove.insert(face); + continue; + } + + double longestEdge = 0; + double area = MeshOps::computeFaceArea(face, longestEdge); + if (std::abs(area) < params.minFaceArea && longestEdge < params.epsMergePoints) + { + setFacesRemove.insert(face); + continue; + } + +#ifdef _DEBUG + const vec3 faceNormal = MeshOps::computeFaceNormal(face); + vec3 posY = carve::geom::VECTOR(0, 1, 0); + double dotProduct = dot(faceNormal, posY); + bool onMainAxis = false; + if (std::abs(dotProduct - 1.0) < 0.00001) + { + onMainAxis = true; + } + if (std::abs(dotProduct + 1.0) < 0.00001) + { + onMainAxis = true; + } + if (std::abs(dotProduct) < 0.00001) + { + // up/down or pos/neg x + onMainAxis = true; + } + + if( !onMainAxis) + { + std::cout << "dotProduct: " << dotProduct << std::endl; + } +#endif + + MeshSetInfo info; + bool checkForDegenerateEdges = false; + checkFaceIntegrity(face, checkForDegenerateEdges, info); + + if (!info.allPointersValid) + { + setFacesRemove.insert(face); + continue; + } + + if (info.degenerateEdges.size() > 0) + { + degenerateEdges[face] = info.degenerateEdges; + continue; + } + } + } + + if (setFacesRemove.size() > 0) + { + PolyInputCache3D polyInput(params.epsMergePoints); + polyhedronFromMeshSet(meshsetInput, setFacesRemove, polyInput); + + std::string details; + bool polyCorrect = checkPolyhedronData(polyInput.m_poly_data, params.epsMergePoints, details); + if (!polyCorrect) + { + fixPolyhedronData(polyInput.m_poly_data, params.epsMergePoints); + } + + std::map mesh_input_options; + shared_ptr > resultFromPolyhedron(polyInput.m_poly_data->createMesh(mesh_input_options, params.epsMergePoints)); + MeshSetInfo info; + bool mesh_ok = MeshOps::checkMeshSetValidAndClosed(resultFromPolyhedron, info, params); + if (mesh_ok) + { +#ifdef _DEBUG + //std::vector* > vecFaces = { face };// , adjacentFace + glm::vec4 color(0.5, 0.5, 0.5, 1); + GeomDebugDump::stopBuffering(); + GeomDebugDump::moveOffset(0.15); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshsetInput, color, drawNormals, true); + GeomDebugDump::moveOffset(0.1); + GeomDebugDump::dumpMeshset(resultFromPolyhedron, color, drawNormals, true); +#endif + + meshsetInput = resultFromPolyhedron; + } + } +} + +void MeshOps::checkMeshPointers(const carve::mesh::Mesh<3>* mesh, bool checkForDegenerateEdges, GeomProcessingParams& params, MeshSetInfo& info) +{ + if (!mesh) + { + info.allPointersValid = false; + return; + } + const std::vector* >& vec_faces = mesh->faces; + for (size_t j = 0; j < vec_faces.size(); ++j) + { + carve::mesh::Face<3>* face = vec_faces[j]; + checkFaceIntegrity(face, checkForDegenerateEdges, info); + + if (!info.allPointersValid) + { +#ifdef _DEBUG + //if (params.debugDump ) + //{ + // glm::vec4 color(0.4, 0.33, 0.33, 1.); + // carve::geom::aabb<3> bbox = face->getAABB(); + // GeomDebugDump::moveOffset(bbox); + // GeomDebugDump::dumpFacePolygon(face, color, true); + //} +#endif + return; + } + } +} + +inline bool edgeToEdgeIntersect(const carve::mesh::Edge<3>* edge1, const carve::mesh::Edge<3>* edge2, double eps, vec3& intersectionPoint) +{ + const vec3 A = edge1->v1()->v; + const vec3 B = edge1->v2()->v; + const vec3 C = edge2->v1()->v; + const vec3 D = edge2->v2()->v; + + vec3 u = B - A; + vec3 v = D - C; + vec3 w = A - C; + + double a = dot(u, u); // always >= 0 + double b = dot(u, v); + double c = dot(v, v); // always >= 0 + double d = dot(u, w); + double e = dot(v, w); + double sc, sN, sD = a * c - b * b; // sc = sN / sD, sD >= 0 + double tc, tN, tD = a * c - b * b; // tc = tN / tD, tD >= 0 + + // compute the line parameters of the two closest points + if (sD < eps) + { + // the lines are almost parallel + sN = 0.0; // force using point A on segment AB to prevent possible division by 0.0 later + sD = 1.0; + tN = e; + tD = c; + } + else + { + // get the closest points on the infinite lines + sN = (b * e - c * d); + tN = (a * e - b * d); + if (sN < 0.0) + { + // sc < 0 => the s=0 edge is visible + sN = 0.0; // compute shortest connection of A to segment CD + tN = e; + tD = c; + } + else if (sN > sD) // sc > 1 => the s=1 edge is visible + { + sN = sD; // compute shortest connection of B to segment CD + tN = e + b; + tD = c; + } + } + + if (tN < 0.0) + { + // tc < 0 => the t=0 edge is visible + tN = 0.0; + // recompute sc for this edge + if (-d < 0.0) // compute shortest connection of C to segment AB + { + sN = 0.0; + } + else if (-d > a) + { + sN = sD; + } + else + { + sN = -d; + sD = a; + } + } + else if (tN > tD) + { + // tc > 1 => the t=1 edge is visible + tN = tD; + // recompute sc for this edge + if ((-d + b) < 0.0) // compute shortest connection of D to segment AB + { + sN = 0; + } + else if ((-d + b) > a) + { + sN = sD; + } + else + { + sN = (-d + b); + sD = a; + } + } + + sc = fabs(sN) < eps ? 0.0 : sN / sD; + tc = fabs(tN) < eps ? 0.0 : tN / tD; + + vec3 P1 = A + (sc * u); + vec3 P2 = C + (tc * v); + vec3 delt = P2 - P1; + if (delt.length2() < eps * eps) + { + // intersecting + if (sc < eps) + { + // intersection is at edge1->v1() -> split edge2 + + if (tc < eps || fabs(tc - 1.0) < eps) + { + // intersecting at point, not edge + return false; + } + } + else if (fabs(sc - 1.0) < eps) + { + if (tc < eps || fabs(tc - 1.0) < eps) + { + // intersecting at point, not edge + return false; + } + + + // intersection is at edge1->v2() -> split edge2 + } + + // split edge1 + carve::mesh::Face<3>* face = edge1->face; + + if (edge1->rev) + { + carve::mesh::Face<3>* faceRev = edge1->rev->face; + } + + intersectionPoint = P1; + return true; + } + return false; +} + +size_t removeEdgeAndMergeFaces(carve::mesh::Edge<3>* edgeIn, shared_ptr& geomSettings, bool dumpFaces) +{ + double eps = geomSettings->getEpsilonCoplanarDistance(); + carve::mesh::Face<3>* face = edgeIn->face; + double faceArea = MeshOps::computeFaceArea(face); + if (std::abs(faceArea) < eps * 10) + { + return 0; + } + + vec3& facePosition_carve = edgeIn->v2()->v; + size_t numChanges = 0; + size_t numFacesDeleted = 0; + +#ifdef _DEBUG + if (dumpFaces) + { + GeomDebugDump::moveOffset(0.4); + glm::vec4 color2(0.3, 0.2, 0.2, 0.8); + //dumpAdjacentFaces(par.setAdjacentCoplanarFaces, color2); + } +#endif + + //std::set* > setMeshesToFix; + { + carve::mesh::Face<3>* faceOnRverseEdge = edgeIn->rev->face; + carve::mesh::Face<3>* faceOnEdge = edgeIn->face; + if (faceOnEdge == nullptr) + { + return 0; + } + + if (faceOnRverseEdge == nullptr) + { + return 0; + } + + if (faceOnEdge == faceOnRverseEdge) + { + // remaining edge between inner opening of face and outer boundary. Leave it for triangulation + return 0; + } + size_t numFacesBeforeMerge = faceOnRverseEdge->mesh->faces.size(); + + carve::mesh::Edge<3>* edgeErase = edgeIn; + size_t numEdgesFace = countEdges(faceOnEdge); + size_t numEdgesFaceReverse = countEdges(faceOnRverseEdge); + + if (numEdgesFace >= geomSettings->m_maxNumFaceEdges) + { + std::logic_error ex("edgeCount > m_maxNumFaceEdges"); + throw std::exception(ex); + } + if (numEdgesFaceReverse >= geomSettings->m_maxNumFaceEdges) + { + std::logic_error ex("edgeCount > m_maxNumFaceEdges"); + throw std::exception(ex); + } + +#ifdef _DEBUG + if (dumpFaces) + { + GeomDebugDump::moveOffset(0.05); + glm::vec4 color2(0.3, 0.2, 0.2, 0.8); + std::vector > vecEdgePoints = { edgeErase->v1()->v, edgeErase->v2()->v }; + GeomDebugDump::dumpPolyline(vecEdgePoints, color2, false); + } +#endif + + MeshSetInfo info2; + bool checkForDegenerateEdges = false; + checkFaceIntegrity(edgeErase->face, checkForDegenerateEdges, info2); + + MeshSetInfo info3; + checkFaceIntegrity(edgeErase->rev->face, checkForDegenerateEdges, info3); + + if (!info2.allPointersValid) + { + return 0; + } + if (!info3.allPointersValid) + { + return 0; + } + + carve::mesh::Edge<3>* edgeMergeNext = checkMergeFaces(edgeErase, geomSettings, dumpFaces); + if (!edgeMergeNext) + { + return 0; + } + + carve::mesh::Face<3>* faceRemain = nullptr; + carve::mesh::Face<3>* faceRemove = nullptr; + + if (faceOnRverseEdge->edge) + { + faceRemain = faceOnRverseEdge; + size_t numEdgesFaceRemove_afterMerge = countEdges(faceOnRverseEdge); + if (numEdgesFaceRemove_afterMerge > geomSettings->m_maxNumFaceEdges) + { + std::logic_error ex("faceOnRverseEdge->edge count > maxNumFaceEdges"); + throw std::exception(ex); + } + if (numEdgesFaceReverse != numEdgesFaceRemove_afterMerge) + { + ++numChanges; + } + } + else + { + faceRemove = faceOnRverseEdge; + } + + if (faceOnEdge->edge) + { + faceRemain = faceOnEdge; + size_t numEdgesFaceRemain_afterMerge = countEdges(faceOnEdge); + if (numEdgesFaceRemain_afterMerge > geomSettings->m_maxNumFaceEdges) + { + std::logic_error ex("faceOnEdge->edge count > maxNumFaceEdges"); + throw std::exception(ex); + } + if (numEdgesFace != numEdgesFaceRemain_afterMerge) + { + ++numChanges; + } + } + else + { + faceRemove = faceOnEdge; + } + +#ifdef _DEBUG + if (dumpFaces) + { + GeomDebugDump::moveOffset(0.05); + glm::vec4 color2(0.3, 0.2, 0.2, 0.8); + GeomDebugDump::dumpFacePolygon({ faceRemain }, color2, false); + } +#endif + + // replace pointers to faceRemove + carve::mesh::Edge<3>* e = faceRemove->edge; + for (size_t ii = 0; ii < faceRemove->n_edges; ++ii) + { + if (e == nullptr) + { + continue; + } + + if (e->face == faceRemove) + { + e->face = faceRemain; + } + e = e->next; + } + + numChanges += removeFaceFromMesh(faceRemove); + delete faceRemove; + ++numFacesDeleted; + + if (!faceRemain) + { + return numChanges; + } + + auto mesh = faceRemain->mesh; + try + { + faceRemain->edge->validateLoop(); + } + catch (carve::exception& e) + { + std::cout << "validateLoop failed: " << e.str(); + } + + checkFaceLoops(mesh); + + mesh->cacheEdges(); + //mesh->recalc(eps); + ++numChanges; + + // TODO: enforceMergedFacesToCommonPlane() : compute normal vector and centroid of merged face, then move all vertices precisely into that plane + + std::vector* > faceVertices; + faceRemain->getVertices(faceVertices); + if (faceVertices.size() > 3) + { + carve::geom::vector<3> normalVector = GeomUtils::computePolygonNormal(faceVertices); + carve::geom::vector<3> centroid = faceRemain->centroid(); + GeomUtils::Plane plane(glm::dvec3(centroid.x, centroid.y, centroid.z), glm::dvec3(normalVector.x, normalVector.y, normalVector.z)); + bool allVerticesInPlane = true; + for (carve::mesh::Face<3>::vertex_t * vertex : faceVertices) + { + const carve::geom::vector<3>& facePoint_carve = vertex->v; + glm::dvec3 facePoint(facePoint_carve.x, facePoint_carve.y, facePoint_carve.z); + + double distanceToPlane = plane.distancePointPlane(facePoint); + + if (std::abs(distanceToPlane) > geomSettings->getEpsilonCoplanarDistance()) + { + vec3 pointOnPlane = facePoint_carve + normalVector * distanceToPlane; + +#ifdef _DEBUG + glm::dvec3 pointOnPlane_glm(pointOnPlane.x, pointOnPlane.y, pointOnPlane.z); + double distanceToPlaneCheck = plane.distancePointPlane(pointOnPlane_glm); + + double maxAllowedDistance = geomSettings->getEpsilonCoplanarDistance() * 5.0; + if (std::abs(distanceToPlaneCheck) > maxAllowedDistance) + { + std::cout << "distanceToPlaneCheck too big: " << distanceToPlaneCheck << std::endl; + } +#endif + vertex->v = pointOnPlane; + + // TODO: average out current vertices between all faces that are connected + // map> + } + } + + if (allVerticesInPlane) + { + return true; + } + } + +#ifdef _DEBUG + size_t numFacesAfterMerge = mesh->faces.size(); + int numFacesMerged = numFacesBeforeMerge - numFacesAfterMerge; + + double epsMinFaceArea = geomSettings->getMinTriangleArea();//eps; + GeomProcessingParams params(eps, geomSettings->getEpsilonCoplanarAngle(), epsMinFaceArea, dumpFaces); + MeshSetInfo info6; + MeshOps::checkMeshPointers(mesh, checkForDegenerateEdges, params, info6); + if (!info6.allPointersValid) + { + glm::vec4 color(0.2, 0.2, 0.2, 1.); + GeomDebugDump::stopBuffering(); + GeomDebugDump::moveOffset(0.3); + GeomDebugDump::dumpMesh(mesh, color, true); + } +#endif + } + + return numChanges; +} + + +size_t mergeCoplanarFacesInMeshSet(shared_ptr >& meshset, shared_ptr& geomSettings, bool shouldBeClosedManifold, bool dumpMeshes) +{ + shared_ptr > meshset_copy(meshset->clone()); + + double eps = geomSettings->getEpsilonCoplanarDistance(); + double epsCoplanarAngle = geomSettings->getEpsilonCoplanarAngle(); + double epsMinFaceArea = geomSettings->getMinTriangleArea();//geomSettings->getEpsilonCoplanarDistance() * 0.01; + GeomProcessingParams params(eps, epsCoplanarAngle, epsMinFaceArea, dumpMeshes); + params.allowFinEdges = false; + MeshSetInfo infoInput; + bool validMeshsetInput = MeshOps::checkMeshSetValidAndClosed(meshset, infoInput, params); + if (infoInput.finEdges.size() > 0) + { + // if input already has fin edges, allow it also for the result mesh + params.allowFinEdges = true; + } + + size_t numChanges = 0; + double volume = MeshOps::computeMeshsetVolume(meshset.get()); + + for (carve::mesh::Mesh<3>*mesh : meshset->meshes) + { + for (carve::mesh::Edge<3>*edge : mesh->closed_edges) + { + if (!edge) + { + continue; + } + + carve::mesh::Edge<3>* reverseEdge = edge->rev; + if (!reverseEdge) + { + continue; + } + + carve::mesh::Face<3>* face = edge->face; + if (!face) + { + continue; + } + + carve::mesh::Face<3>* adjacentFace = reverseEdge->face; + if (!adjacentFace) + { + continue; + } + + if (adjacentFace == face) + { + // can happen with opening + continue; + } + + // compute face normal here. Don't rely on face->plane.N, since the winding order might be changed + const vec3 faceNormal = MeshOps::computeFaceNormal(face); + const vec3 face2Normal = MeshOps::computeFaceNormal(adjacentFace); + + // adjacent faces have 1 as normal vector dot product + + double dotProduct = dot(faceNormal, face2Normal); + if (std::abs(dotProduct - 1.0) < epsCoplanarAngle) + { + numChanges += removeEdgeAndMergeFaces(edge, geomSettings, dumpMeshes); + } + } + } + + MeshSetInfo infoResult; + bool validMeshsetResult = MeshOps::checkMeshSetValidAndClosed(meshset, infoResult, params); + + double volumeResult = MeshOps::computeMeshsetVolume(meshset.get()); + if (volumeResult < 0.9 * volume) + { + validMeshsetResult = false; + } + + if (!validMeshsetResult) + { + meshset = meshset_copy; + numChanges = 0; + return 0; + } + + int numFacesRemoved = infoInput.numFaces - infoResult.numFaces; + int numClosedEdgesRemoved = infoInput.numClosedEdges - infoResult.numClosedEdges; + + //if (numChanges > 0) + //{ + // size_t retry_count = 0; + // MeshOps::retriangulateMeshSetSimple(meshset, false, eps, epsMinFaceArea, retry_count, dumpMeshes); + + // MeshSetInfo infoRetriangulated; + // validMeshsetResult = MeshOps::checkMeshSetValidAndClosed(meshset, infoRetriangulated, eps, epsMinFaceArea, dumpMeshes); + + // if (validMeshsetResult) + // { + // numFacesRemoved = infoInput.numFaces - infoRetriangulated.numFaces; + // numClosedEdgesRemoved = infoInput.numClosedEdges - infoRetriangulated.numClosedEdges; + // } + //} + +//#ifdef _DEBUG +// if (numFacesRemoved > 0 && numClosedEdgesRemoved > 0) +// { +// +// if (infoInput.numFaces > 10) +// { +// GeomDebugDump::moveOffset(0.4); +// glm::vec4 color2(0.3, 0.2, 0.2, 0.8); +// GeomDebugDump::stopBuffering(); +// GeomDebugDump::dumpMeshset(meshset_copy, color2, true); +// } +// +// GeomDebugDump::moveOffset(0.4); +// glm::vec4 color2(0.3, 0.2, 0.2, 0.8); +// GeomDebugDump::dumpMeshset(meshset, color2, true); +// } +//#endif + return numChanges; +} + +void MeshOps::resolveOpenEdges(shared_ptr>& meshset, GeomProcessingParams& params) +{ + if (!meshset) + { + return; + } + size_t numMeshesInput = meshset->meshes.size(); + size_t numFacesInput = 0; + size_t numOpenEdgesInput = 0; + size_t numClosedEdgesInput = 0; + std::set* > allOpenEdges; + std::set* > allEdges; + for (size_t ii = 0; ii < meshset->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; + numOpenEdgesInput += mesh->open_edges.size(); + numClosedEdgesInput += mesh->closed_edges.size(); + numFacesInput += mesh->faces.size(); + + for (auto edge : mesh->closed_edges) + { + if (edge) + { + allEdges.insert(edge); + } + } + + for (auto edge : mesh->open_edges) + { + if (edge) + { + allEdges.insert(edge); + } + } + + if (mesh->faces.size() >= 6) + { + for (auto edge : mesh->open_edges) + { + if (edge) + { + allOpenEdges.insert(edge); + } + } + } + } + + if (numOpenEdgesInput + numClosedEdgesInput > 10000) + { + return; + } + + if (numOpenEdgesInput == 0) + { + return; + } + + if (numOpenEdgesInput > 100) + { + return; + } + + PolyInputCache3D polyInput(params.epsMergePoints); + size_t maxNumEdges = 1000; + + for (size_t ii = 0; ii < meshset->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; + + for (auto f : mesh->faces) + { + std::vector vecPointIndexes; + std::vector vecFaceLoop; + carve::mesh::Edge<3>* edge = f->edge; + + for (size_t jj = 0; jj < f->n_edges; ++jj) + { + vec3& edgePoint2 = edge->v2()->v; + + auto itFind = allOpenEdges.find(edge); + if (itFind != allOpenEdges.end()) + { + // intersect with all points and edges of MeshSet + + vec3& edgePoint1 = edge->v1()->v; + + const vec3 edgeDelta = edgePoint2 - edgePoint1; + double dotLineSegDelta = dot(edgeDelta, edgeDelta); + + std::map mapIntersectionsOnEdge; + + // check if current edge needs to be split + for (size_t iiVertex = 0; iiVertex < meshset->vertex_storage.size(); ++iiVertex) + { + const carve::mesh::Vertex<3>& vert = meshset->vertex_storage[iiVertex]; + vec3 vertexPoint = vert.v; + + + double t = -1; + bool onSegment = GeomUtils::isPointOnLineSegment(edgePoint1, edgeDelta, dotLineSegDelta, vertexPoint, t, params.epsMergePoints); + + if (onSegment) + { + mapIntersectionsOnEdge.insert({ t, vertexPoint }); + } + } + + // intersect edge-edge + + for (carve::mesh::Edge<3>*edgeToIntersect : allEdges) + { + if (edgeToIntersect == edge) + { + continue; + } + + vec3 intersectionPoint; + // edgeToEdgeIntersect(const carve::mesh::Edge<3>*edge1, const carve::mesh::Edge<3>*edge2, double eps, vec3 & intersectionPoint) + bool intersect = edgeToEdgeIntersect(edgeToIntersect, edge, params.epsMergePoints, intersectionPoint); + if (intersect) + { + double t = -1; + bool onSegment = GeomUtils::isPointOnLineSegment(edgePoint1, edgeDelta, dotLineSegDelta, intersectionPoint, t, params.epsMergePoints); + + if (onSegment) + { + mapIntersectionsOnEdge.insert({ t, intersectionPoint }); + } + } + } + + + for (auto it : mapIntersectionsOnEdge) + { + vec3& vertexPoint = it.second; + int idx = polyInput.addPoint(vertexPoint); + if (vecPointIndexes.size() > 0) + { + size_t lastIndex = vecPointIndexes.back(); + if (lastIndex == idx) + { + continue; + } + } + + vecPointIndexes.push_back(idx); + vecFaceLoop.push_back(vertexPoint); + } + } + + int idx = polyInput.addPoint(edgePoint2); + vecPointIndexes.push_back(idx); + vecFaceLoop.push_back(edgePoint2); + + edge = edge->next; + if (edge == f->edge) + { + break; + } + } + + + if (vecPointIndexes.size() < 3) + { +#ifdef _DEBUG + std::cout << "face with < 3 edges" << std::endl; +#endif + continue; + } + + double area = GeomUtils::computePolygonArea(vecFaceLoop); + if (area < params.minFaceArea) + { + continue; + } + polyInput.m_poly_data->addFace(vecPointIndexes.begin(), vecPointIndexes.end()); + } + } + + std::string details = ""; + bool polyInputCorrect = checkPolyhedronData(polyInput.m_poly_data, params.minFaceArea, details); + if (!polyInputCorrect) + { + fixPolyhedronData(polyInput.m_poly_data, params.minFaceArea); + polyInputCorrect = checkPolyhedronData(polyInput.m_poly_data, params.minFaceArea, details); + } + + if (polyInputCorrect) + { + shared_ptr > meshsetNew(polyInput.m_poly_data->createMesh(carve::input::opts(), params.epsMergePoints)); + + size_t numOpenEdges = 0; + size_t numClosedEdges = 0; + for (size_t ii = 0; ii < meshsetNew->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshsetNew->meshes[ii]; + mesh->recalc(params.epsMergePoints); + numOpenEdges += mesh->open_edges.size(); + numClosedEdges += mesh->closed_edges.size(); + } + +#ifdef _DEBUG + if (params.debugDump) + { + GeomDebugDump::moveOffset(0.4); + GeomDebugDump::moveOffset(meshset->getAABB().extent.y * 1.1); + glm::vec4 color(0, 1, 1, 1); + if (numOpenEdges > 0) + { + glm::vec4 color(1, 0.5, 1, 1); + //GeomDebugDump::dumpMeshsetOpenEdges(meshsetNew, color, false, false); + } + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshsetNew, color, drawNormals, true); + } +#endif + + size_t numMeshes = meshsetNew->meshes.size(); + if (numMeshes <= numMeshesInput) + { + if (numClosedEdges >= numClosedEdgesInput) + { + if (numOpenEdges <= numOpenEdgesInput) + { + meshset = meshsetNew; + } + } + } + } +} + +void getPointerToEdge(carve::mesh::Mesh<3>* mesh, carve::mesh::Edge<3>* edgeFind, std::set* >& setEdges, std::set* >& setFaces) +{ + size_t numEdges = 0; + for (carve::mesh::Face<3>*face : mesh->faces) + { + if (!face) + { + continue; + } + + carve::mesh::Edge<3>* edge = face->edge; + if (edge == edgeFind) + { + setFaces.insert(face); + } + + size_t numEdgesCurrentFace = face->n_edges; + for (size_t ii = 0; ii < numEdgesCurrentFace; ++ii) + { + if (!edge) + { + continue; + } + if (edge->next == edgeFind) + { + setEdges.insert(edge); + } + if (edge->prev == edgeFind) + { + setEdges.insert(edge); + } + if (edge->rev == edgeFind) + { + setEdges.insert(edge); + } + edge = edge->next; + } + } +} + +void getEdgesOnVertex(carve::mesh::Mesh<3>* mesh, carve::mesh::Vertex<3>* vertex, std::set* >& setEdges) +{ + size_t numEdges = 0; + for (carve::mesh::Face<3>*face : mesh->faces) + { + if (!face) + { + continue; + } + + carve::mesh::Edge<3>* edge = face->edge; + size_t numEdgesCurrentFace = face->n_edges; + for (size_t ii = 0; ii < numEdgesCurrentFace; ++ii) + { + if (!edge) + { + continue; + } + if (edge->vert == vertex) + { + setEdges.insert(edge); + } + edge = edge->next; + } + } +} + +size_t removePointerToVertex(carve::mesh::Mesh<3>* mesh, carve::mesh::Vertex<3>* vertRemove, carve::mesh::Vertex<3>* vertReplace) +{ + size_t numChanges = 0; + for (carve::mesh::Face<3>*face : mesh->faces) + { + if (!face) + { + continue; + } + + carve::mesh::Edge<3>* edge = face->edge; + size_t numEdgesCurrentFace = face->n_edges; + for (size_t ii = 0; ii < numEdgesCurrentFace; ++ii) + { + if (!edge) + { + continue; + } + if (edge->vert == vertRemove) + { + edge->vert = vertReplace; + ++numChanges; + } + edge = edge->next; + } + } + return numChanges; +} + +size_t mergeAlignedEdges(shared_ptr >& meshset, GeomProcessingParams& params ) +{ +#ifdef _DEBUG + if (params.debugDump) + { + GeomDebugDump::moveOffset(0.3); + } +#endif + + size_t numEdgesRemoved = 0; + for (carve::mesh::Mesh<3>*mesh : meshset->meshes) + { + for (carve::mesh::Face<3>*face : mesh->faces) + { + if (!face) + { + continue; + } + + if (!face->edge) + { + continue; + } + + bool faceDumped = false; + carve::mesh::Edge<3>* edge = face->edge; + + // check how many edges are connected to end of edge + size_t numEdges = face->n_edges; + for (size_t ii = 0; ii < numEdges; ++ii) + { + if (!edge) + { + continue; + } + if (edge->next) + { + if (edge->next->rev) + { + if (edge->next->rev->next) + { + if (edge->next->rev->next->rev == edge) + { + // only one edge is connected, now check angle + + // edge->rev->next edge->rev edge->next->rev edge->next->next->rev + // <--------------------p1<------------------p2<-------------------------p3<----------------------- + // -------------------> ------------------> -----------------------> ----------------------> + // edge->prev edge edge->next edge->next->next + + carve::mesh::Vertex<3>* vertex1 = edge->v1(); + carve::mesh::Vertex<3>* vertex2 = edge->v2(); + carve::mesh::Vertex<3>* vertex3 = edge->next->v2(); + + std::set* > setEdges; + getEdgesOnVertex(mesh, vertex2, setEdges); + size_t numEdgesOnVertex = setEdges.size(); + + const carve::geom::vector<3>& p1 = vertex1->v; + const carve::geom::vector<3>& p2 = vertex2->v; + const carve::geom::vector<3>& p3 = vertex3->v; + + carve::geom::vector<3> edgeVector = p2 - p1; + carve::geom::vector<3> edgeNextVector = p3 - p2; + edgeVector.normalize(); + edgeNextVector.normalize(); + +#ifdef _DEBUG + glm::vec4 color1(0.4, 0.45, 0.45, 1.); + if (params.debugDump) + { + for (auto edgeOnVertex : setEdges) + { + const carve::geom::vector<3>& p1 = edgeOnVertex->v1()->v; + const carve::geom::vector<3>& p2 = edgeOnVertex->v2()->v; + std::vector > vecLine = { p1, p2 }; + GeomDebugDump::dumpPolyline(vecLine, color1, false); + } + } + + if (face->plane.N.x > 0.9) + { + int wait = 0; + } +#endif + + double dotProduct = dot(edgeVector, edgeNextVector); + if (std::abs(dotProduct - 1.0) < params.epsMergeAlignedEdgesAngle * 1000) + { + carve::mesh::Edge<3>* edgeRemove = edge;// ->next; + +#ifdef _DEBUG + if (params.debugDump) + { + std::vector* > vecAdjacentFaces = { edge->face, edge->rev->face, edgeRemove->face, edgeRemove->rev->face, edge->prev->face, edge->prev->rev->face }; + GeomDebugDump::moveOffset(0.05); + GeomDebugDump::dumpFaces(vecAdjacentFaces, color1, false); + GeomDebugDump::dumpFacePolygons(vecAdjacentFaces, color1, false); + } +#endif + + std::set* > setEdgePointersToRemovedEdge; + std::set* > setFacePointersToRemovedEdge; + getPointerToEdge(mesh, edgeRemove, setEdgePointersToRemovedEdge, setFacePointersToRemovedEdge); + size_t numVertexChanges = removePointerToVertex(mesh, vertex2, vertex1); + edge = edgeRemove->removeEdge(); // returns ->next + carve::geom::vector<3> distanceV1 = edge->v1()->v - p1; + carve::geom::vector<3> distanceV3 = edge->v2()->v - p3; + + double epsMinFaceArea = params.minFaceArea;// *0.001; + //MeshOps::removeZeroAreaFacesInMesh(mesh, epsMinFaceArea, eps, dumpFaces); + + ++numEdgesRemoved; + mesh->cacheEdges(); + mesh->recalc(params.epsMergePoints); + + // edge->rev->next edge->rev edge->next->rev + // <--------------------v1<---------------------------------------------v2<------------------------ + // -------------------> --------------------------------------------> ----------------------> + // edge->prev edge edge->next + +#ifdef _DEBUG + if (params.debugDump) + { + glm::vec4 color(0.4, 0.45, 0.45, 1.); + + std::set* > setEdges1; + getEdgesOnVertex(mesh, vertex1, setEdges1); + + std::set* > setEdges2; + getEdgesOnVertex(mesh, vertex2, setEdges2); + + std::set* > setEdges3; + getEdgesOnVertex(mesh, vertex3, setEdges3); + + + for (auto edgeOnVertex : setEdges1) + { + const carve::geom::vector<3>& p1 = edgeOnVertex->v1()->v; + const carve::geom::vector<3>& p2 = edgeOnVertex->v2()->v; + std::vector > vecLine = { p1, p2 }; + GeomDebugDump::dumpPolyline(vecLine, color1, false); + } + + + for (auto edgeOnVertex : setEdges2) + { + const carve::geom::vector<3>& p1 = edgeOnVertex->v1()->v; + const carve::geom::vector<3>& p2 = edgeOnVertex->v2()->v; + std::vector > vecLine = { p1, p2 }; + GeomDebugDump::dumpPolyline(vecLine, color1, false); + } + + for (auto edgeOnVertex : setEdges3) + { + const carve::geom::vector<3>& p1 = edgeOnVertex->v1()->v; + const carve::geom::vector<3>& p2 = edgeOnVertex->v2()->v; + std::vector > vecLine = { p1, p2 }; + GeomDebugDump::dumpPolyline(vecLine, color1, false); + } + + GeomDebugDump::moveOffset(0.4); + GeomDebugDump::dumpFacePolygons(mesh->faces, color1, false); + + GeomDebugDump::moveOffset(0.05); + std::vector > edgePolygon = { p1,p2,p3 }; + GeomDebugDump::dumpPolyline(edgePolygon, color, false); + + std::vector > edgePolygon2 = { edge->v1()->v, edge->v2()->v }; + GeomDebugDump::moveOffset(0.001); + GeomDebugDump::dumpPolyline(edgePolygon2, color, false); + } + + MeshSetInfo infoMergedFaces; + bool validMeshsetMergedFaces = MeshOps::checkMeshSetValidAndClosed(meshset, infoMergedFaces, params); + + if (params.debugDump) + { + GeomDebugDump::moveOffset(0.3); + DumpSettingsStruct dumpColorSettings; + bool checkZeroAreaFaces = true; + dumpWithLabel("mesh-merged-faces", meshset, dumpColorSettings, params, checkZeroAreaFaces, true, true); + } + + double dx = edgeVector.x - edgeNextVector.x; + double dy = edgeVector.y - edgeNextVector.y; + double dz = edgeVector.z - edgeNextVector.z; + if (std::abs(dx) > EPS_M8) + { + std::cout << "align check" << std::endl; + } + if (std::abs(dy) > EPS_M8) + { + std::cout << "align check" << std::endl; + } + if (std::abs(dz) > EPS_M8) + { + std::cout << "align check" << std::endl; + } +#endif + + continue; + } + } + } + } + edge = edge->next; + } + } +#ifdef _DEBUG + if (params.debugDump) + { + GeomDebugDump::moveOffset(0.002); + glm::vec4 color(0.4, 0.45, 0.45, 1.); + GeomDebugDump::dumpFacePolygon(face, color, false); + } +#endif + + } + } + + if (numEdgesRemoved > 0) + { +#ifdef _DEBUG + if (params.debugDump) + { + GeomDebugDump::moveOffset(0.2); + } +#endif + + for (auto mesh : meshset->meshes) + { + mesh->cacheEdges(); + mesh->recalc(params.epsMergePoints); + +#ifdef _DEBUG + if (params.debugDump) + { + for (carve::mesh::Face<3>*face : mesh->faces) + { + glm::vec4 color(0.4, 0.45, 0.45, 1.); + GeomDebugDump::dumpFacePolygon(face, color, false); + } + } +#endif + } + } + + return numEdgesRemoved; +} + + /// \brief simplifyMeshSet merge coplanar faces and re-triangulate each set of merged faces + /// \param meshset Carve meshset + /// \param report_callback callback function for errors, warnings, notifications, progress + /// \param entity IFC entity that is currently being processed + /// \param ignoreOpenEdgesInResult If true, the result is kept even with open edges (good for visualization). If false, the result will be the input mesh in case open edges occur after triangulation (good for further boolean operations) +void MeshOps::simplifyMeshSet(shared_ptr >& meshset, shared_ptr& geomSettings, GeomProcessingParams& params, bool triangulateResult, bool shouldBeClosedManifold) +{ + if (!meshset) + { + return; + } + StatusCallback* report_callback = params.callbackFunc; + BuildingEntity* entity = params.ifc_entity; + bool dumpPolygon = params.debugDump; + double epsCoplanarDistance = params.epsMergePoints; + double epsCoplanarAngle = params.epsMergeAlignedEdgesAngle; + double epsMinFaceArea = params.minFaceArea; + double eps = epsCoplanarDistance; + MeshSetInfo infoInput(report_callback, entity); + bool validMeshsetInput = MeshOps::checkMeshSetValidAndClosed(meshset, infoInput, params); + + if (meshset->vertex_storage.size() < 9 && infoInput.numOpenEdges == 0) + { + return; + } + + if (infoInput.finEdges.size() > 0) + { + // if input mesh has fin edges, allow that also for the result + params.allowFinEdges = true; + } + + shared_ptr > meshset_copy(meshset->clone()); + + if (infoInput.zeroAreaFaces.size() > 0) + { + if (infoInput.numOpenEdges == 0) + { + if (infoInput.allPointersValid) + { + removeDegenerateFacesInMeshSet(meshset, params); + + //PolyInputCache3D polyInput(eps); + //polyhedronFromMeshSet(meshset, infoInput.zeroAreaFaces, polyInput); + //std::string details; + //checkPolyhedronData(polyInput.m_poly_data, epsMinFaceArea, details); + //std::shared_ptr > meshset2(polyInput.m_poly_data->createMesh(carve::input::opts(), eps)); + + validMeshsetInput = MeshOps::checkMeshSetValidAndClosed(meshset, infoInput, params); + if (!validMeshsetInput) + { + meshset = meshset_copy; + } + } + } + } + + if (!validMeshsetInput) + { + resolveOpenEdges(meshset, params); + validMeshsetInput = MeshOps::checkMeshSetValidAndClosed(meshset, infoInput, params); + + if (!validMeshsetInput) + { + resolveOpenEdges(meshset, params); + validMeshsetInput = MeshOps::checkMeshSetValidAndClosed(meshset, infoInput, params); + } + } + +#ifdef _DEBUG + DumpSettingsStruct dumpColorSettings; + bool checkZeroAreaFaces = false; + if (dumpPolygon) + { + dumpWithLabel("simplify--input", meshset, dumpColorSettings, params, checkZeroAreaFaces, true, true); + } + + if (dumpPolygon) + { + GeomDebugDump::moveOffset(0.2); + + glm::vec4 color1(0.7, 0.7, 0.7, 0.88); + std::string labelStr = "simplify--merged-faces"; + GeomDebugDump::dumpVertex(GeomDebugDump::labelPos, color1, labelStr); + GeomDebugDump::dumpCountLabel(GeomDebugDump::countLabelPos); + } + + if (GeomDebugDump::dumpCount >= 16) + { + int wait = 0; + } + //GeomDebugDump::ScopedDumpBuffering scopedBuffer; + shared_ptr > meshset_copy_input(meshset->clone()); +#endif + + // bool meshShouldBeTriangulated = false; + // if( meshShouldBeTriangulated ) + // { + // bool meshTriangulated = checkMeshsetTriangulated(meshset); + // if( !meshTriangulated ) + // { + // shared_ptr > meshset_copy(meshset->clone()); + // retriangulateMeshSetSimple(meshset, false, epsCoplanarDistance, 0, dumpPolygon); + // meshTriangulated = checkMeshsetTriangulated(meshset); + // if( !meshTriangulated ) + // { + //#ifdef _DEBUG + // retriangulateMeshSetSimple(meshset, false, epsCoplanarDistance, 1, dumpPolygon); + // meshTriangulated = checkMeshsetTriangulated(meshset); + // + // GeomDebugDump::moveOffset(0.2); + // for( auto mesh : meshset->meshes ) + // { + // glm::vec4 color1(0.7, 0.7, 0.7, 0.88); + // + // for( auto face : mesh->faces ) + // { + // if( face->n_edges != 3 ) + // { + // GeomDebugDump::dumpFacePolygon(face, color1, false); + // } + // } + // + // //GeomDebugDump::dumpFacePolygons(mesh->faces, color1, true); + // } + // std::cout << "assuming triangulated meshes" << std::endl; + //#endif + // //return; + // } + // + // bool validMeshsetTriangulated = MeshOps::checkMeshSetValidAndClosed(meshset, infoInput, eps, dumpPolygon); + // if( !validMeshsetTriangulated ) + // { + //#ifdef _DEBUG + // dumpWithLabel("simplify--input", meshset_copy, dumpColorSettings, checkZeroAreaFaces, true, true); + // GeomDebugDump::moveOffset(0.2); + // dumpWithLabel("simplify--triangulated", meshset, dumpColorSettings, checkZeroAreaFaces, true, true); + //#endif + // meshset = meshset_copy; + // } + // } + // } + + + dumpPolygon = false; + + try + { + removeFinEdges(meshset, params); + removeFinFaces(meshset, params); + removeDegenerateFacesInMeshSet(meshset, params); + size_t numChanges = mergeCoplanarFacesInMeshSet(meshset, geomSettings, shouldBeClosedManifold, dumpPolygon); + MeshOps::recalcMeshSet(meshset, eps); + + // TODO: find faces with biggest area, and trim all points to plane + + MeshSetInfo infoMergedFaces(report_callback, entity); + bool validMeshsetMergedFaces = MeshOps::checkMeshSetValidAndClosed(meshset, infoMergedFaces, params); + +#ifdef _DEBUG + shared_ptr > meshset_merged_faces(meshset->clone()); + + if (dumpPolygon)//|| numChanges > 0 ) + { + GeomDebugDump::moveOffset(0.3); + shared_ptr > meshset_dump = shared_ptr >(meshset->clone()); + dumpColorSettings.triangulateBeforeDump = false; + dumpWithLabel("mesh-merged-faces", meshset_dump, dumpColorSettings, params, checkZeroAreaFaces, true, true); + dumpColorSettings.triangulateBeforeDump = true; + + GeomDebugDump::moveOffset(0.3); + glm::vec4 color1(0.7, 0.7, 0.7, 0.88); + for (carve::mesh::Mesh<3>*mesh : meshset_dump->meshes) + { + GeomDebugDump::dumpFacePolygons(mesh->faces, color1, false); + } + } + +#endif + if (!validMeshsetMergedFaces) + { + //shared_ptr > meshset_copy(meshset->clone()); + size_t retry_count = 0; + MeshOps::retriangulateMeshSetSimple(meshset, false, params, retry_count); + + MeshSetInfo infoRetriangulated(report_callback, entity); + validMeshsetMergedFaces = MeshOps::checkMeshSetValidAndClosed(meshset, infoRetriangulated, params); + + } + + if (!validMeshsetMergedFaces) + { + meshset = meshset_copy; + return; + } + + MeshOps::recalcMeshSet(meshset, eps); + + shared_ptr > meshset_next = shared_ptr >(meshset->clone()); + + // run the check again with the new + validMeshsetMergedFaces = MeshOps::checkMeshSetValidAndClosed(meshset_next, infoMergedFaces, params); + + if (!validMeshsetMergedFaces) + { + meshset = meshset_copy; + return; + } + + meshset_copy = meshset_next; + + size_t numEdgesRemoved = mergeAlignedEdges(meshset, params); + if (numEdgesRemoved > 0) + { + MeshSetInfo infoMergedAlignedEdges(report_callback, entity); + bool validMergedAlignedEdges = MeshOps::checkMeshSetValidAndClosed(meshset, infoMergedAlignedEdges, params); + +#ifdef _DEBUG + if (dumpPolygon) + { + GeomDebugDump::moveOffset(0.3); + dumpWithLabel("mesh-simplify-input", meshset_copy_input, dumpColorSettings, params, checkZeroAreaFaces, true, true); + + GeomDebugDump::moveOffset(0.1); + dumpWithLabel("mesh-merged-faces", meshset_merged_faces, dumpColorSettings, params, checkZeroAreaFaces, true, true); + + GeomDebugDump::moveOffset(0.1); + dumpWithLabel("mesh-merged-aligned-edges", meshset, dumpColorSettings, params, checkZeroAreaFaces, true, true); + + GeomDebugDump::moveOffset(0.1); + glm::vec4 color1(0.7, 0.7, 0.7, 0.88); + for (carve::mesh::Mesh<3>*mesh : meshset->meshes) + { + GeomDebugDump::dumpFacePolygons(mesh->faces, color1, false); + } + + GeomDebugDump::moveOffset(0.3); + } +#endif + if (validMergedAlignedEdges) + { + if (triangulateResult) + { + retriangulateMeshSetSimple(meshset, false, params, 0); + MeshSetInfo infoTriangulated(report_callback, entity); + bool validTriangulated = MeshOps::checkMeshSetValidAndClosed(meshset, infoTriangulated, params); + if (!validTriangulated) + { + meshset = meshset_copy; + return; + } + } +#ifdef _DEBUG + GeomDebugDump::clearBuffer(); +#endif + return; + } + } + +#ifdef _DEBUG + GeomDebugDump::clearBuffer(); +#endif + return; + } + catch (std::exception& ex) + { +#ifdef _DEBUG + std::cout << ex.what() << std::endl; +#endif + } + catch (carve::exception& ex) + { + std::cout << ex.str() << std::endl; + } + catch (...) + { + + } + + meshset = meshset_copy; +} + + +void MeshOps::simplifyMeshSet(std::vector> >& meshsets, shared_ptr& geomSettings, GeomProcessingParams& params, bool triangulateResult, bool shouldBeClosedManifold) +{ + for (shared_ptr >&meshset : meshsets) + { + simplifyMeshSet(meshset, geomSettings, params, triangulateResult, shouldBeClosedManifold); + } +} + +double MeshOps::computeMeshSetSurface(const shared_ptr >& meshset) +{ + double surface_area = 0; + const std::vector* >& vec_meshes = meshset->meshes; + for (size_t kk = 0; kk < vec_meshes.size(); ++kk) + { + const carve::mesh::Mesh<3>* mesh = vec_meshes[kk]; + //volume += mesh->volume(); + + const std::vector* >& vec_faces = mesh->faces; + for (size_t mm = 0; mm < vec_faces.size(); ++mm) + { + const carve::mesh::Face<3>* face = vec_faces[mm]; + surface_area += computeFaceArea(face); + } + } + return surface_area; +} + +double MeshOps::computeShapeSurfaceArea(const shared_ptr& item_data) +{ + double surface_area = 0; + double volume = 0; + if (item_data) + { + for (size_t jj = 0; jj < item_data->m_meshsets.size(); ++jj) + { + surface_area += computeMeshSetSurface(item_data->m_meshsets[jj]); + } + + for (size_t jj = 0; jj < item_data->m_meshsets_open.size(); ++jj) + { + surface_area += computeMeshSetSurface(item_data->m_meshsets_open[jj]); + } + + for (size_t ii = 0; ii < item_data->m_child_items.size(); ++ii) + { + const shared_ptr& child_item_data = item_data->m_child_items[ii]; + double childArea = computeShapeSurfaceArea(child_item_data); + surface_area += childArea; + } + } + return surface_area; +} + +double MeshOps::computeShapeSurfaceArea(const shared_ptr& shape_input_data) +{ + double surface_area = 0; + double volume = 0; + if (shape_input_data) + { + for (size_t ii = 0; ii < shape_input_data->m_geometric_items.size(); ++ii) + { + const shared_ptr& item_data = shape_input_data->m_geometric_items[ii]; + double childArea = computeShapeSurfaceArea(item_data); + surface_area += childArea; + } + + for (size_t ii = 0; ii < shape_input_data->m_vec_children.size(); ++ii) + { + const shared_ptr& item_data = shape_input_data->m_vec_children[ii]; + double childArea = computeShapeSurfaceArea(item_data); + surface_area += childArea; + } + } + return surface_area; +} + +double MeshOps::computeMeshsetVolume(const carve::mesh::MeshSet<3>* meshset) +{ + double volume = 0; + for (size_t kk = 0; kk < meshset->meshes.size(); ++kk) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[kk]; + double meshVolume = mesh->volume(); + + if (meshVolume < 0) + { + mesh->invert(); + meshVolume = -meshVolume; + } + volume += meshVolume; + } + return volume; +} + +bool MeshOps::checkMeshsetTriangulated(const shared_ptr>& meshset) +{ + for (size_t ii = 0; ii < meshset->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; + std::vector* >& vec_faces = mesh->faces; + for (size_t i2 = 0; i2 < vec_faces.size(); ++i2) + { + carve::mesh::Face<3>* face = vec_faces[i2]; + if (face->n_edges != 3) + { + return false; + } + } + } + return true; +} + + +std::shared_ptr > MeshOps::createPlaneMesh(vec3& p0, vec3& p1, vec3& p2, double CARVE_EPSILON) +{ + carve::input::PolyhedronData polyhedron_data; + polyhedron_data.addVertex(p0); + polyhedron_data.addVertex(p1); + polyhedron_data.addVertex(p2); + polyhedron_data.addFace(0, 1, 2); + std::shared_ptr > mesh(polyhedron_data.createMesh(carve::input::opts(), CARVE_EPSILON)); + return mesh; +} + +std::shared_ptr > MeshOps::createPlaneMesh(vec3& p0, vec3& p1, vec3& p2, vec3& p3, double CARVE_EPSILON) +{ + carve::input::PolyhedronData polyhedron_data; + polyhedron_data.addVertex(p0); + polyhedron_data.addVertex(p1); + polyhedron_data.addVertex(p2); + polyhedron_data.addVertex(p3); + + polyhedron_data.addFace(0, 1, 2, 3); + //polyhedron_data.addFace(2, 3, 0); + std::shared_ptr > mesh(polyhedron_data.createMesh(carve::input::opts(), CARVE_EPSILON)); + return mesh; +} + +std::shared_ptr > MeshOps::createBoxMesh(vec3& pos, vec3& extent, carve::math::Matrix& transform, double CARVE_EPSILON) +{ + carve::input::PolyhedronData polyhedron_data; + polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(extent.x, extent.y, -extent.z))); + polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(extent.x, -extent.y, -extent.z))); + polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(-extent.x, -extent.y, -extent.z))); + polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(-extent.x, extent.y, -extent.z))); + + polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(extent.x, extent.y, extent.z))); + polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(extent.x, -extent.y, extent.z))); + polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(-extent.x, -extent.y, extent.z))); + polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(-extent.x, extent.y, extent.z))); + + polyhedron_data.addFace(0, 1, 2); + polyhedron_data.addFace(2, 3, 0); + polyhedron_data.addFace(7, 6, 5); + polyhedron_data.addFace(5, 4, 7); + polyhedron_data.addFace(0, 4, 5); + polyhedron_data.addFace(5, 1, 0); + polyhedron_data.addFace(1, 5, 6); + polyhedron_data.addFace(6, 2, 1); + polyhedron_data.addFace(2, 6, 7); + polyhedron_data.addFace(7, 3, 2); + polyhedron_data.addFace(3, 7, 4); + polyhedron_data.addFace(4, 0, 3); + + std::shared_ptr > mesh(polyhedron_data.createMesh(carve::input::opts(), CARVE_EPSILON)); + return mesh; +} + +inline bool addFacesReversed(const PolyInputCache3D& poly_cache_source, PolyInputCache3D& poly_cache_target) +{ + shared_ptr poly_data_source = poly_cache_source.m_poly_data; + + std::vector& faceIndices = poly_data_source->faceIndices; + if (faceIndices.size() == 0) + { + return true; + } + + size_t numPointsAll = poly_data_source->points.size(); + if (numPointsAll < 2) + { + return true; + } + bool inputCorrect = true; + for (size_t iiFace = 0; iiFace < faceIndices.size(); ) + { + int numPoints = faceIndices[iiFace]; + int numPointsIdx = iiFace; + + if (iiFace + numPoints >= faceIndices.size()) + { + // skip face + break; + } + + std::vector pointIdxCurrentFace; + for (size_t iiPoint = 1; iiPoint <= numPoints; ++iiPoint) + { + int idx = faceIndices[iiFace + iiPoint]; + + carve::geom3d::Vector point = poly_data_source->points[idx]; + int idxTarget = poly_cache_target.addPoint(point); + pointIdxCurrentFace.push_back(idxTarget); + } + + poly_cache_target.m_poly_data->addFace(pointIdxCurrentFace.rbegin(), pointIdxCurrentFace.rend()); + + iiFace += numPoints + 1; + + if (iiFace > faceIndices.size()) + { + inputCorrect = false; + break; + } + if (iiFace == faceIndices.size()) + { + break; + } + } + + return inputCorrect; +} + +inline bool checkMeshFins(const shared_ptr >& meshset, double CARVE_EPSILON) +{ + if (!meshset) + { + return false; + } + + for (size_t i = 0; i < meshset->meshes.size(); ++i) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[i]; + + if (!mesh) + { + return false; + } + const std::vector* >& vec_faces = mesh->faces; + for (size_t j = 0; j < vec_faces.size(); ++j) + { + carve::mesh::Face<3>* face = vec_faces[j]; + + const size_t n_edges = face->n_edges; + if (n_edges > 10000) + { +#ifdef _DEBUG + std::cout << "n_edges > 10000" << std::endl; + glm::vec4 color(0.3, 0.3, 0.3, 1.); + GeomDebugDump::dumpFacePolygon(face, color, false); +#endif + return false; + } + + carve::mesh::Edge<3>* e = face->edge; + for (size_t i_edge = 0; i_edge < n_edges; ++i_edge) + { + // check if is a flat part + if (e->face) + { + const carve::geom::vector<3>& normal = e->face->plane.N; + if (e->face->edge) + { + if (e->face->edge->rev) + { + if (e->face->edge->rev->face) + { + const carve::geom::vector<3>& reverserFaceNormal = e->face->edge->rev->face->plane.N; + + double dotProduct = dot(reverserFaceNormal, normal); + if (std::abs(dotProduct + 1.0) < EPS_DEFAULT * 10) + { + double face_area = MeshOps::computeFaceArea(face); + if (std::abs(face_area) > CARVE_EPSILON * 10) + { +#ifdef _DEBUG + //std::cout << "opposite face is coplanar" << std::endl; +#endif + return false; + } + } + } + } + } + } + + // continue + e = e->next; + } + } + } + return true; +} + + +inline bool hasPointer(const carve::mesh::Face<3>* face, const carve::mesh::Edge<3>* edgePtr) +{ + carve::mesh::Edge<3>* e = face->edge; + if (e == nullptr) + { + return false; + } + + const size_t n_edges = face->n_edges; + for (size_t i_edge = 0; i_edge < n_edges; ++i_edge) + { + if (e == edgePtr) return true; + if (e->rev == edgePtr) return true; + if (e->prev == edgePtr) return true; + if (e->next == edgePtr) return true; + if (e->rev->prev == edgePtr) return true; + if (e->rev->next == edgePtr) return true; + + e = e->next; + } + + return false; +} + +double triangleArea(const vec3& A, const vec3& B, const vec3& C) +{ + vec3 AB(B - A); + vec3 AC(C - A); + vec3 crossProduct = cross(AB, AC); + return crossProduct.length() * 0.5; +} + +vec3 MeshOps::computeFaceNormal(carve::mesh::Face<3>* face) +{ + vec3 polygon_normal(carve::geom::VECTOR(0, 0, 0)); + + if (!face) { return polygon_normal; } + carve::mesh::Edge<3>* edge = face->edge; + + //face->recalc() + + const size_t n_edges = face->n_edges; + + if (n_edges == 3) + { + const vec3& A = edge->vert->v; + edge = edge->next; + const vec3& B = edge->vert->v; + edge = edge->next; + const vec3& C = edge->vert->v; + vec3 AB(B - A); + vec3 AC(C - A); + vec3 crossProduct = cross(AB, AC); + crossProduct.normalize(); + return crossProduct; + } + + if (n_edges < 2) + { + return polygon_normal; + } + + // find triangle with largest area + carve::mesh::Edge<3>* longestEdge = nullptr; + double longestEdgeLength = 0; + + double largestArea = 0; + for (size_t i_edge = 0; i_edge < n_edges; ++i_edge) + { + if (!edge) + { + continue; + } + + double length2 = edge->length2(); + if (length2 > longestEdgeLength) + { + longestEdge = edge; + longestEdgeLength = length2; + } + edge = edge->next; + } + + carve::mesh::Edge<3>* edge1 = longestEdge->next; + const vec3& A = longestEdge->v1()->v; // vert + const vec3& B = longestEdge->v2()->v; // next->vert + const vec3 AB(B - A); + + for (size_t i_edge = 0; i_edge < n_edges - 1; ++i_edge) + { + const vec3& C = edge1->v2()->v; + const vec3 AC(C - A); + vec3 crossProduct = cross(AB, AC); + double area = crossProduct.length() * 0.5; + + //double area = triangleArea(A, B, C); + if (std::abs(area) > largestArea) + { + largestArea = area; + + vec3 AB(B - A); + vec3 AC(C - A); + vec3 crossProduct = cross(AB, AC); + crossProduct.normalize(); + polygon_normal = crossProduct; + } + + edge1 = edge1->next; + } + +#ifdef _DEBUG + if (edge != face->edge) + { + std::cout << "edge != face->edge" << std::endl; + } +#endif + + return polygon_normal; +} + + +size_t MeshOps::countFaces(carve::mesh::MeshSet<3>* mesh) +{ + size_t numFaces = 0; + for (auto& mesh : mesh->meshes) + { + numFaces += mesh->faces.size(); + } + return numFaces; +} + +size_t MeshOps::countDegeneratedFaces(carve::mesh::MeshSet<3>* mesh) +{ + size_t numDegenerateFaces = 0; + for (auto& mesh : mesh->meshes) + { + for (auto& f : mesh->faces) + { + if (f->n_edges == 0) + { + ++numDegenerateFaces; + } + } + } + return numDegenerateFaces; +} + +inline double getFaceArea2D(const carve::mesh::Face<3>* face) +{ + std::vector > facePoints; + std::vector > facePointsArray2D; + face->getProjectedVertices(facePoints); + GeomUtils::poly2VecToArray2(facePoints, facePointsArray2D); + double area = GeomUtils::signedArea(facePointsArray2D); + return area; +} + +std::vector getFacePoints(const carve::mesh::Face<3>* face) +{ + std::vector lines; + + std::vector::vertex_t* > verts3d; + face->getVertices(verts3d); + + for (size_t i3 = 0; i3 < verts3d.size(); ++i3) + { + const carve::geom::vector<3>& vertex_point = verts3d[i3]->v; + lines.push_back(vertex_point); + } + return lines; +} + +void addFaceCheckIndexes(int idxA, int idxB, int idxC, PolyInputCache3D& meshOut) +{ + if (idxA == idxB || idxA == idxC || idxB == idxC) + { + return; + } + meshOut.m_poly_data->addFace(idxA, idxB, idxC); +} + + +void getMeshVertexPoints(const shared_ptr >& meshset, std::vector& vecAllPoints) +{ + for (size_t ii = 0; ii < meshset->vertex_storage.size(); ++ii) + { + carve::geom::vector<3>& carvePoint3D = meshset->vertex_storage[ii].v; + vecAllPoints.push_back(glm::dvec3(carvePoint3D.x, carvePoint3D.y, carvePoint3D.z)); + } +} + +void getFacesInMeshSet(shared_ptr >& meshsetInput, std::set* >& mapAllFaces, size_t maxNumFaces) +{ + mapAllFaces.clear(); + + for (carve::mesh::Mesh<3>*mesh : meshsetInput->meshes) + { + for (carve::mesh::Face<3>*face : mesh->faces) + { + if (mapAllFaces.size() >= maxNumFaces) + { + return; + } + mapAllFaces.insert(face); + } + } +} + +bool checkMeshNonNegativeAndClosed(carve::mesh::Mesh<3>* mesh_i, double CARVE_EPSILON) +{ + if (!mesh_i) + { + return false; + } + + bool meshes_closed = true; + + if (mesh_i) + { + if (mesh_i->isNegative()) + { + mesh_i->invert(); + if (mesh_i->isNegative()) + { + mesh_i->recalc(CARVE_EPSILON); + mesh_i->calcOrientation(); + if (mesh_i->isNegative()) + { + std::cout << "could not invert mesh " << std::endl; + } + } + } + + if (!mesh_i->isClosed()) + { + meshes_closed = false; + } + + if (mesh_i->open_edges.size() > 0) + { + meshes_closed = false; + } + } + + return meshes_closed; +} + +bool MeshOps::checkMeshSetNonNegativeAndClosed(const shared_ptr > mesh_set, GeomProcessingParams& params) +{ + bool meshes_closed = true; + if (!mesh_set->isClosed()) + { + //GeomUtils::closeMeshSet(mesh_set.get()); + } + + for (size_t i = 0; i < mesh_set->meshes.size(); ++i) + { + carve::mesh::Mesh<3>* mesh_i = mesh_set->meshes[i]; + if (mesh_i) + { + if (mesh_i->isNegative()) + { + mesh_i->invert(); + if (mesh_i->isNegative()) + { + mesh_i->recalc(params.epsMergePoints); + mesh_i->calcOrientation(); + if (mesh_i->isNegative()) + { + std::cout << "could not invert mesh_set->meshes[" << i << "] " << std::endl; + } + } + } + + if (!mesh_i->isClosed()) + { + meshes_closed = false; + } + + if (mesh_i->open_edges.size() > 0) + { + meshes_closed = false; + } + } + } + return meshes_closed; +} + +void MeshOps::checkMeshSetPointers(const shared_ptr >& meshset, bool checkForDegenerateEdges, GeomProcessingParams& params, MeshSetInfo& info) +{ + for (size_t i = 0; i < meshset->meshes.size(); ++i) + { + carve::mesh::Mesh<3>* mesh_i = meshset->meshes[i]; + MeshOps::checkMeshPointers(mesh_i, checkForDegenerateEdges, params, info); + if (!info.allPointersValid) + { + return; + } + } +} + +bool MeshOps::checkMeshSetValidAndClosed(const shared_ptr>& meshset, MeshSetInfo& info, GeomProcessingParams& params) +{ + bool allowFinEdges = params.allowFinEdges; + info.resetInfoResult(); + if (!meshset) + { +#ifdef _DEBUG + if (info.entity) + { + std::cout << "MeshSet of entity #" << info.entity->m_tag << " not valid" << std::endl; + } +#endif + info.allPointersValid = false; + info.meshSetValid = false; + return false; + } + if (meshset->meshes.size() == 0) + { +#ifdef _DEBUG + if (info.entity) + { + //std::cout << "MeshSet of entity #" << info.entity->m_tag << " has no meshes" << std::endl; + } +#endif + return false; + } + +#ifdef _DEBUG + //checkFaceLoops(meshset.get()); +#endif + + // check open edges first, since it is the easiest and cheapest + info.meshSetValid = true; + + for (size_t kk = 0; kk < meshset->meshes.size(); ++kk) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[kk]; + + if (!mesh) + { + info.allPointersValid = false; + continue; + } + info.numOpenEdges += mesh->open_edges.size(); + info.numClosedEdges += mesh->closed_edges.size(); + info.numFaces += mesh->faces.size(); + + for (size_t jj = 0; jj < mesh->faces.size(); ++jj) + { + carve::mesh::Face<3>* inputFace = mesh->faces[jj]; + double longestEdge = 0; + double face_area = MeshOps::computeFaceArea(inputFace, longestEdge); + if (std::abs(face_area) < params.minFaceArea && longestEdge < params.epsMergePoints ) + { + info.zeroAreaFaces.insert(inputFace); + } + info.surfaceArea += face_area; + } + } + + // check for valid pointers first + bool checkForDegenerateEdges = true; + checkMeshSetPointers(meshset, checkForDegenerateEdges, params, info); + if (!info.allPointersValid) + { + info.meshSetValid = false; + return false; + } + + if (!params.allowDegenerateEdges) + { + if (info.degenerateEdges.size() > 0) + { + return false; + } + } + + // check for fin edges, where a face is back-to-back to face of reverse edge + std::set* > setFinEdges; + findFinEdges(meshset, setFinEdges, params); + + if (setFinEdges.size() > 0) + { + if (!allowFinEdges) + { + info.meshSetValid = false; + } + } + + if (!allowFinEdges) + { + if (!checkMeshFins(meshset, params.epsMergePoints)) + { + info.meshSetValid = false; + return false; + } + } + + if (info.numOpenEdges > 0) + { + info.meshSetValid = false; + return false; + } + + if (info.zeroAreaFaces.size() > 0) + { + info.meshSetValid = false; + return false; + } + + std::stringstream err; + bool meshes_closed = checkMeshSetNonNegativeAndClosed(meshset, params); + if (meshes_closed) + { + // check volume + double meshset_volume = 0; + for (size_t kk = 0; kk < meshset->meshes.size(); ++kk) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[kk]; + double mesh_volume = mesh->volume(); + + if (mesh_volume < 0) + { + mesh->invert(); + if (mesh->isNegative()) + { + mesh->recalc(params.epsMergePoints); + mesh->calcOrientation(); + if (mesh->isNegative()) + { + std::cout << "could not invert negative mesh[" << kk << "] " << std::endl; + } + } + mesh_volume = mesh->volume(); + } + + if (mesh_volume < 0) + { + err << "mesh_volume < 0" << std::endl; + } + + meshset_volume += mesh_volume; + } + } + else + { + err << "mesh_set not closed" << std::endl; + } + + if (err.tellp() > 0) + { +#ifdef _DEBUG + if (info.report_callback) + { + info.report_callback->messageCallback(err.str().c_str(), StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, info.entity); + } +#endif + info.meshSetValid = false; + return false; + } + + return info.meshSetValid; +} + +void fixMeshsetSimple(shared_ptr >& meshset, shared_ptr& geomSettings, bool dumpMeshes) +{ + double eps = geomSettings->getEpsilonCoplanarDistance(); + double epsCoplanarAngle = geomSettings->getEpsilonCoplanarAngle(); + double minFaceArea = geomSettings->getMinTriangleArea(); + GeomProcessingParams params(eps, epsCoplanarAngle, minFaceArea, dumpMeshes); + removeFinEdges(meshset, params); + + for (auto it = meshset->meshes.begin(); it != meshset->meshes.end(); ++it) + { + carve::mesh::Mesh<3>* mesh = *it; + + bool meshChanged = false; + for (auto itFaces = mesh->faces.begin(); itFaces != mesh->faces.end(); ) + { + carve::mesh::Face<3>* face = *itFaces; + if (face == nullptr) + { + itFaces = mesh->faces.erase(itFaces); + delete face; + meshChanged = true; + continue; + } + + if (!face->edge) + { + itFaces = mesh->faces.erase(itFaces); + delete face; + meshChanged = true; + continue; + } + + ++itFaces; + } + + if (meshChanged) + { + mesh->cacheEdges(); + mesh->recalc(params.epsMergePoints); + } + + bool checkForDegenerateEdges = false; + MeshSetInfo minf; + MeshOps::checkMeshPointers(mesh, checkForDegenerateEdges, params, minf); + + bool removeMesh = false; + //if( !valid ) + //{ + // removeMesh = true; + //} + + bool shouldBeClosedManifold = true; + if (shouldBeClosedManifold) + { + if (mesh->faces.size() < 4) + { + removeMesh = true; + } + + if (!mesh->isClosed()) + { + removeMesh = true; + } + } + + if (removeMesh && false) + { + meshset->meshes.erase(it); + delete mesh; + + it = meshset->meshes.begin(); + if (it == meshset->meshes.end()) + { + break; + } + } + } +} + +void MeshOps::fixMeshset(shared_ptr >& meshsetInput, shared_ptr& geomSettings, bool dumpMeshes ) +{ + double eps = geomSettings->getEpsilonCoplanarDistance(); + double epsCoplanarAngle = geomSettings->getEpsilonCoplanarAngle(); + double minFaceArea = geomSettings->getMinTriangleArea(); + GeomProcessingParams params(eps, epsCoplanarAngle, minFaceArea, dumpMeshes); + + MeshSetInfo infoInput; + if (params.allowFinEdges) + { +#ifdef _DEBUG + std::cout << "params.allowFinEdges?" << std::endl; +#endif + } + params.allowFinEdges = false; + bool meshset_ok = MeshOps::checkMeshSetValidAndClosed(meshsetInput, infoInput, params); + if (infoInput.finEdges.size() > 0) + { + params.allowFinEdges = true; + } + + fixMeshsetSimple(meshsetInput, geomSettings, dumpMeshes); + meshset_ok = MeshOps::checkMeshSetValidAndClosed(meshsetInput, infoInput, params); + if (meshset_ok) + { + return; + } + + shared_ptr > result_copy(meshsetInput->clone()); + + double epsMinFaceArea = geomSettings->getMinTriangleArea();//eps; + MeshOps::removeDegenerateFacesInMeshSet(result_copy, params); + MeshSetInfo infoResult; + meshset_ok = MeshOps::checkMeshSetValidAndClosed(result_copy, infoResult, params); + + if (meshset_ok) + { + meshsetInput = result_copy; + return; + } + + if (infoResult.numOpenEdges > 0) + { + MeshOps::resolveOpenEdges(result_copy, params); + + if (MeshOps::checkMeshSetValidAndClosed(result_copy, infoResult, params)) + { + meshsetInput = result_copy; + return; + } + } + + //double eps = EPS_M8; + //double epsCoplanarAngle = eps * 0.1; + //double epsMinFaceArea = eps; + //GeomProcessingParams params(eps, epsCoplanarAngle, epsMinFaceArea, false); + + MeshOps::retriangulateMeshSetSimple(result_copy, true, params, 0); + meshset_ok = MeshOps::checkMeshSetValidAndClosed(result_copy, infoResult, params); + + if (meshset_ok) + { + meshsetInput = result_copy; + return; + } + + bool triangulateOperands = false; + bool shouldBeClosedManifold = true; + MeshOps::simplifyMeshSet(result_copy, geomSettings, params, triangulateOperands, shouldBeClosedManifold); + meshset_ok = MeshOps::checkMeshSetValidAndClosed(result_copy, infoResult, params); + + if (meshset_ok) + { + meshsetInput = result_copy; + return; + } + + PolyInputCache3D polyInput(eps); + polyhedronFromMeshSet(result_copy, polyInput); + + std::map mesh_input_options; + //shared_ptr > meshsetUnchanged(polyInput.m_poly_data->createMesh(mesh_input_options, eps)); + std::string details; + bool correct = checkPolyhedronData(polyInput.m_poly_data, minFaceArea, details); + if (!correct) + { + fixPolyhedronData(polyInput.m_poly_data, params.epsMergePoints); + std::string details2; + correct = checkPolyhedronData(polyInput.m_poly_data, minFaceArea, details2); + } + + if (correct) + { + shared_ptr > meshsetFromPolyhedron(polyInput.m_poly_data->createMesh(mesh_input_options, eps)); + + MeshSetInfo infoTriangulated; + bool allowFinEdges = true; + meshset_ok = MeshOps::checkMeshSetValidAndClosed(meshsetFromPolyhedron, infoTriangulated, params); + if (meshset_ok) + { + meshsetInput = meshsetFromPolyhedron; + return; + } + } + + removeDegenerateFacesInMeshSet(result_copy, params); + if (MeshOps::checkMeshSetValidAndClosed(result_copy, infoResult, params)) + { + meshsetInput = result_copy; + return; + } + + // try to fix winding order + //reverseFacesInPolyhedronData(poly_data); + + MeshOps::intersectOpenEdgesWithPoints(result_copy, params); + + for (size_t i = 0; i < result_copy->meshes.size(); ++i) + { + result_copy->meshes[i]->recalc(eps); + } + + + if (MeshOps::checkMeshSetValidAndClosed(result_copy, infoResult, params)) + { + meshsetInput = result_copy; + return; + } + + + MeshOps::intersectOpenEdgesWithEdges(result_copy, params); + + if (MeshOps::checkMeshSetValidAndClosed(result_copy, infoResult, params)) + { + meshsetInput = result_copy; + return; + } + + + MeshOps::resolveOpenEdges(result_copy, params); + + if (MeshOps::checkMeshSetValidAndClosed(result_copy, infoResult, params)) + { + meshsetInput = result_copy; + return; + } + +} + +bool intersectRayTriangle(const glm::dvec3& rayOrigin, const glm::dvec3& rayDirection, const glm::dvec3& p0, const glm::dvec3& p1, const glm::dvec3& p2) +{ + double t = 0; + glm::dvec2 baryPosition(1, 1); + bool intersects = glm::intersectRayTriangle(rayOrigin, rayDirection, p0, p1, p2, baryPosition, t); + bool edgeIntersected = false; + if (intersects && t >= 0) + { + return true; + } + return false; +} + +void MeshOps::flattenFacePlanes(shared_ptr >& op1, shared_ptr >& op2, GeomProcessingParams& params) +{ + // project face points into coplanar face + double epsAngle = params.epsMergeAlignedEdgesAngle;// eps * 5.0; + double epsDistanceSinglePoints = params.epsMergePoints * 10.0; + double epsDistanceFaceCentroids = params.epsMergePoints * 10.0; + double epsMinDistanceMovePoints2 = params.epsMergePoints * 0.01 * params.epsMergePoints * 0.01; + + // TODO: integrate this into other function. First merge all coplanar faces, then do this: + + for (auto mesh1 : op1->meshes) + { + if (mesh1->faces.size() > 1000) + { + continue; + } + + for (auto face1 : mesh1->faces) + { + vec3 face1Centroid = face1->centroid(); + const vec3 face1Normal = face1->plane.N; + bool face1dumped = false; + + for (auto mesh2 : op2->meshes) + { + if (mesh2->faces.size() > 1000) + { + continue; + } + for (auto face2 : mesh2->faces) + { + const vec3 face2Normal = face2->plane.N; + + double dotProduct = dot(face1Normal, face2Normal); + if (std::abs(dotProduct + 1.0) > epsAngle && std::abs(dotProduct - 1.0) > epsAngle) + { + continue; + } + + // check if faces overlap + carve::geom::aabb<3> bbox1 = face1->getAABB(); + carve::geom::aabb<3> bbox2 = face2->getAABB(); + if (bbox1.extent.x < epsDistanceSinglePoints) { bbox1.extent.x = epsDistanceSinglePoints * 2; bbox1.pos.x -= epsDistanceSinglePoints; } + if (bbox1.extent.y < epsDistanceSinglePoints) { bbox1.extent.y = epsDistanceSinglePoints * 2; bbox1.pos.y -= epsDistanceSinglePoints; } + if (bbox1.extent.z < epsDistanceSinglePoints) { bbox1.extent.z = epsDistanceSinglePoints * 2; bbox1.pos.z -= epsDistanceSinglePoints; } + + if (bbox2.extent.x < epsDistanceSinglePoints) { bbox2.extent.x = epsDistanceSinglePoints * 2; bbox2.pos.x -= epsDistanceSinglePoints; } + if (bbox2.extent.y < epsDistanceSinglePoints) { bbox2.extent.y = epsDistanceSinglePoints * 2; bbox2.pos.y -= epsDistanceSinglePoints; } + if (bbox2.extent.z < epsDistanceSinglePoints) { bbox2.extent.z = epsDistanceSinglePoints * 2; bbox2.pos.z -= epsDistanceSinglePoints; } + + bbox1.extent.x *= 2; + bbox1.extent.y *= 2; + bbox1.extent.z *= 2; + + bbox2.extent.x *= 2; + bbox2.extent.y *= 2; + bbox2.extent.z *= 2; + + if (!bbox1.intersects(bbox2)) + { + continue; + } + + // faces are parallel + vec3 face2Centroid = face2->centroid(); + double distance = GeomUtils::distancePointPlane(face2Centroid, face1Normal, face1Centroid); + if (std::abs(distance) < epsDistanceFaceCentroids) + { +#ifdef _DEBUG + if (params.debugDump) + { + if (!face1dumped) + { + glm::vec4 color(0, 0.4, 0.3, 1); + GeomDebugDump::dumpFacePolygon(face1, color, false); + face1dumped = true; + } + + glm::vec4 color(0, 1, 1, 1); + GeomDebugDump::dumpFacePolygon(face2, color, false); + } + + carve::geom::aabb<3> bbox1test; + carve::geom::aabb<3> bbox2test; + bbox1test.pos = carve::geom::VECTOR(0, 0, 0); + bbox1test.extent = carve::geom::VECTOR(1, 1, 1); + + bbox2test.pos = carve::geom::VECTOR(2 + params.epsMergePoints, 2 + params.epsMergePoints, 2 + params.epsMergePoints); + bbox2test.extent = carve::geom::VECTOR(1, 1, 1); + bool intersects = bbox1test.intersects(bbox2test); +#endif + + // faces are in plane. Now check if all vertices have a similar distance + bool allPointsInPlane = true; + auto edge2 = face2->edge; + for (size_t jjEdge = 0; jjEdge < face2->n_edges; ++jjEdge) + { + carve::mesh::Vertex<3>* vert = edge2->vert; + + double distance = GeomUtils::distancePointPlane(vert->v, face1Normal, face1Centroid); + + edge2 = edge2->next; + + if (std::abs(distance) > epsDistanceSinglePoints) + { + + allPointsInPlane = false; + break; + } + //mapDistances.insert({ distance, { face1, vert } }); + } + + + if (allPointsInPlane) + { + //intersectRayTriangle() + double area1 = MeshOps::computeFaceArea(face1); + double area2 = MeshOps::computeFaceArea(face2); + + carve::mesh::Face<3>* smallerFace = face1; + carve::mesh::Face<3>* biggerFace = face2; + if (area1 > area2) + { + smallerFace = face2; + biggerFace = face1; + } + + std::vector*> vertices; + smallerFace->getVertices(vertices); + for (auto vert : vertices) + { + vec3 v; + double t; + const carve::geom3d::Plane& plane = biggerFace->plane; + const vec3& rayPoint1 = vert->v; + vec3 rayPoint2 = rayPoint1 + plane.N; + // const Plane& p, const Vector& v1, const Vector& v2, Vector& v, double& t, double CARVE_EPSILON) + carve::IntersectionClass intersect = carve::geom3d::rayPlaneIntersection(plane, rayPoint1, rayPoint2, v, t, params.epsMergePoints); + if (intersect > 0) + { + double dx = vert->v.x - v.x; + double dy = vert->v.y - v.y; + double dz = vert->v.z - v.z; + + double distance2 = dx * dx + dy * dy + dz * dz; + if (distance2 > epsMinDistanceMovePoints2 && distance2 < epsDistanceSinglePoints * epsDistanceSinglePoints) + { + vert->v = v; + } + } + } + } + } + } + } + +#ifdef _DEBUG + carve::geom::aabb<3> bbox1 = op1->getAABB(); + carve::geom::aabb<3> bbox2 = op2->getAABB(); + bbox1.unionAABB(bbox2); + //GeomDebugDump::moveOffset(bbox1.extent.y + 0.2); +#endif + } + } +} + + +///\brief method intersectOpenEdges: Intersect open edges of MeshSet with closed edges, and split the open edges in case of intersection +///\param[in/out] meshset: MeshSet with open edges. If fix is found, a new MeshSet is assigned to the smart pointer +///\param[in] eps: tolerance to find edge-edge intersections +///\param[in] dumpMeshes: write meshes to dump file for debugging +void MeshOps::intersectOpenEdgesWithPoints(shared_ptr >& meshset, GeomProcessingParams& params) +{ + if (!meshset) + { + return; + } + + size_t maxNumFaces = 2000; + size_t maxNumEdges = 2000; + size_t maxNumOpenEdges = 100; + double eps = params.epsMergePoints * 1.2; + +#ifdef _DEBUG + glm::vec4 color(0.5, 0.6, 0.7, 1.0); + if (params.debugDump) + { + GeomDebugDump::moveOffset(0.8); + //GeomDebugDump::dumpMeshset(meshset, color, true); + double dy = meshset->getAABB().extent.y; + GeomDebugDump::moveOffset(dy * 2.2); + GeomDebugDump::dumpMeshsetOpenEdges(meshset, color, false, false); + GeomDebugDump::moveOffset(dy * 2.2); + } +#endif + + for (size_t round = 0; round < 5; ++round) + { + size_t numClosedEdgesBefore = 0; + std::vector* > allOpenEdges; + std::vector* > allFaces; + + for (size_t ii = 0; ii < meshset->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; + numClosedEdgesBefore += mesh->closed_edges.size(); + std::copy(mesh->open_edges.begin(), mesh->open_edges.end(), std::back_inserter(allOpenEdges)); + std::copy(mesh->faces.begin(), mesh->faces.end(), std::back_inserter(allFaces)); + } + + std::set* > setOpenEdgesAdjacentFaces; + for (size_t ii = 0; ii < allOpenEdges.size(); ++ii) + { + carve::mesh::Edge<3>* openEdge = allOpenEdges[ii]; + carve::mesh::Face<3>* adjacentFace = openEdge->face; + setOpenEdgesAdjacentFaces.insert(adjacentFace); + } + + PolyInputCache3D polyInput(params.epsMergePoints); + + // intersect with closed edges + size_t numSplitEdges = 0; + for (size_t iiFace = 0; iiFace < allFaces.size(); ++iiFace) + { + if (iiFace > maxNumFaces) + { + return; + } + carve::mesh::Face<3>* face = allFaces[iiFace]; + + const size_t n_edges = face->n_edges; + if (n_edges > maxNumEdges) + { +#ifdef _DEBUG + if (params.debugDump) + { + std::cout << "n_edges=" << n_edges << " > max (" << maxNumEdges << ")" << std::endl; + glm::vec4 color(0.3, 0.3, 0.3, 1.); + GeomDebugDump::dumpFacePolygon(face, color, false); + } +#endif + return; + } + + std::vector faceLoop; + carve::mesh::Edge<3>* edge = face->edge; + faceLoop.push_back(edge->v1()->v); + + bool addFaceDirectly = true; + bool tryIntersect = false; + auto itFind = setOpenEdgesAdjacentFaces.find(face); + if (itFind != setOpenEdgesAdjacentFaces.end()) + { + tryIntersect = true; + } + + // face is adjacent to an open edge, so try to intersect with points + for (size_t i_edge = 0; i_edge < n_edges; ++i_edge) + { + carve::mesh::Vertex<3>* vertex1 = edge->v1(); + carve::mesh::Vertex<3>* vertex2 = edge->v2(); + const vec3& edgePoint1 = vertex1->v; + const vec3& edgePoint2 = vertex2->v; + + if (tryIntersect) + { + const vec3 edgeDelta = edgePoint2 - edgePoint1; + double dotLineSegDelta = dot(edgeDelta, edgeDelta); + + std::map mapIntersections; + + // check if current edge needs to be split + for (size_t iiVertex = 0; iiVertex < meshset->vertex_storage.size(); ++iiVertex) + { + const carve::mesh::Vertex<3>& vert = meshset->vertex_storage[iiVertex]; + vec3 vertexPoint = vert.v; + + double t = -1; + bool onSegment = GeomUtils::isPointOnLineSegment(edgePoint1, edgeDelta, dotLineSegDelta, vertexPoint, t, eps); + + if (onSegment) + { + mapIntersections.insert({ t, vertexPoint }); + ++numSplitEdges; + } + } + + for (auto itIntersections = mapIntersections.begin(); itIntersections != mapIntersections.end(); ++itIntersections) + { + const vec3& vertexPoint = itIntersections->second; + +#ifdef _DEBUG + if (params.debugDump && false) + { + glm::vec4 color(0.3, 0.3, 0.3, 1.); + if (itIntersections == mapIntersections.begin()) + { + GeomDebugDump::dumpFacePolygon(face, color, false); + } + GeomDebugDump::dumpPolyline(faceLoop, color, false); + } +#endif + + faceLoop.push_back(vertexPoint); + } + } + faceLoop.push_back(edgePoint2); + + edge = edge->next; + + if (edge == face->edge) + { + break; + } + } + + if (addFaceDirectly) + { + std::vector faceIndexes; + for (size_t iiPoint = 0; iiPoint < faceLoop.size(); ++iiPoint) + { + const vec3& v0 = faceLoop[iiPoint]; + int idxA = polyInput.addPoint(v0); + if (faceIndexes.size() > 0) + { + int previousIndex = faceIndexes.back(); + if (idxA == previousIndex) + { + continue; + } + } + faceIndexes.push_back(idxA); + } + + GeomUtils::removeLastIfEqualToFirst(faceIndexes); + + if (faceIndexes.size() > 2 && faceIndexes.size() < 500) + { + size_t n = std::distance(faceIndexes.begin(), faceIndexes.end()); + + size_t numFaceIndices = polyInput.m_poly_data->faceIndices.size(); + if (numFaceIndices > 10000) + { +#ifdef _DEBUG + std::cout << "numFaceIndices > 10000" << std::endl; +#endif + } + polyInput.m_poly_data->addFace(faceIndexes.begin(), faceIndexes.end()); + } + } + else + { + std::vector > faceLoops = { faceLoop }; + bool mergeAlignedEdges = false; + bool dumpPolygon = true; + + GeomProcessingParams paramsTriangulate(params); + paramsTriangulate.epsMergeAlignedEdgesAngle = 0.0; + FaceConverter::createTriangulated3DFace(faceLoops, polyInput, paramsTriangulate); + } + } + + if (numSplitEdges > 0) + { + std::string details = ""; + bool correct = checkPolyhedronData(polyInput.m_poly_data, params.minFaceArea, details); + if (!correct) + { + bool correct2 = fixPolyhedronData(polyInput.m_poly_data, params.minFaceArea); +#ifdef _DEBUG + if (!correct2) + { + std::cout << "fixPolyhedronData failed" << std::endl; + } +#endif + return; + } + + shared_ptr > meshsetNew(polyInput.m_poly_data->createMesh(carve::input::opts(), eps)); + if (meshsetNew->isClosed()) + { + meshset = meshsetNew; + return; + } + else + { + if (isBetterForBoolOp(meshsetNew, numClosedEdgesBefore, maxNumOpenEdges)) + { + meshset = meshsetNew; + } + + //size_t numOpenEdgesNew = 0; + //size_t numClosedEdgesNew = 0; + //for (size_t ii = 0; ii < meshsetNew->meshes.size(); ++ii) + //{ + // carve::mesh::Mesh<3>* mesh = meshsetNew->meshes[ii]; + // numOpenEdgesNew += mesh->open_edges.size(); + // numClosedEdgesNew += mesh->closed_edges.size(); + //} + + //if (numOpenEdgesNew < allOpenEdges.size()) + //{ + // size_t numAllEdgesNew = numOpenEdgesNew + numClosedEdgesNew; + // size_t numAllEdgesBefore = numClosedEdgesBefore + allOpenEdges.size(); + // if (numClosedEdgesNew >= numClosedEdgesBefore) + // { + // meshset = meshsetNew; + // } + //} + +#ifdef _DEBUG + if (params.debugDump) + { + glm::vec4 color(0.3, 0.3, 0.3, 1.); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshsetNew, color, drawNormals, false); + + double dy = meshsetNew->getAABB().extent.y; + GeomDebugDump::moveOffset(dy * 2.2); + GeomDebugDump::dumpMeshsetOpenEdges(meshsetNew, color, false, false); + GeomDebugDump::moveOffset(dy * 3.2); + } +#endif + } + } + } +} + +///\brief method intersectOpenEdges: Intersect open edges of MeshSet with closed edges, and split the open edges in case of intersection +///\param[in/out] meshset: MeshSet with open edges. If fix is found, a new MeshSet is assigned to the smart pointer +///\param[in] eps: tolerance to find edge-edge intersections +///\param[in] dumpMeshes: write meshes to dump file for debugging +void MeshOps::intersectOpenEdgesWithEdges(shared_ptr >& meshset, GeomProcessingParams& params) +{ + if (!meshset) + { + return; + } + + size_t maxNumFaces = 600; + size_t maxNumEdges = 600; + size_t maxNumOpenEdges = 100; + double CARVE_EPSILON = params.epsMergePoints; + +#ifdef _DEBUG + glm::vec4 color(0.5, 0.6, 0.7, 1.0); + if (params.debugDump) + { + GeomDebugDump::moveOffset(0.8); + //GeomDebugDump::dumpMeshset(meshset, color, true); + double dy = meshset->getAABB().extent.y; + GeomDebugDump::moveOffset(dy * 2.2); + GeomDebugDump::dumpMeshsetOpenEdges(meshset, color, false, false); + GeomDebugDump::moveOffset(1.2); + } +#endif + + for (size_t round = 0; round < 5; ++round) + { + size_t numClosedEdgesBefore = 0; + std::vector* > allOpenEdges; + std::vector* > allFaces; + + for (size_t ii = 0; ii < meshset->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; + numClosedEdgesBefore += mesh->closed_edges.size(); + std::copy(mesh->open_edges.begin(), mesh->open_edges.end(), std::back_inserter(allOpenEdges)); + std::copy(mesh->faces.begin(), mesh->faces.end(), std::back_inserter(allFaces)); + } + + PolyInputCache3D polyInput(params.epsMergePoints); + + // intersect with closed edges + size_t numSplitEdges = 0; + for (size_t iiFace = 0; iiFace < allFaces.size(); ++iiFace) + { + if (iiFace > maxNumFaces) + { + return; + } + carve::mesh::Face<3>* face = allFaces[iiFace]; + + const size_t n_edges = face->n_edges; + if (n_edges > maxNumEdges) + { +#ifdef _DEBUG + if (params.debugDump) + { + std::cout << "n_edges=" << n_edges << " > max (" << maxNumEdges << ")" << std::endl; + glm::vec4 color(0.3, 0.3, 0.3, 1.); + GeomDebugDump::dumpFacePolygon(face, color, false); + } +#endif + return; + } + + std::vector faceLoop; + carve::mesh::Edge<3>* edge = face->edge; + faceLoop.push_back(edge->v1()->v); + + for (size_t i_edge = 0; i_edge < n_edges; ++i_edge) + { + // check if current edge needs to be split + for (size_t iiOpenEdge = 0; iiOpenEdge < allOpenEdges.size(); ++iiOpenEdge) + { + if (iiOpenEdge > maxNumOpenEdges) + { + return; + } + const carve::mesh::Edge<3>* openEdge = allOpenEdges[iiOpenEdge]; + vec3 openEdgeStart = openEdge->v1()->v; + vec3 openEdgeEnd = openEdge->v2()->v; + + vec3 intersectionPoint; + bool intersect = edgeToEdgeIntersect(openEdge, edge, params.epsMergePoints, intersectionPoint); + + if (intersect) + { + faceLoop.push_back(intersectionPoint); + ++numSplitEdges; + + // handle only first split. TODO: sort split points and add to faceLoop, sorted + break; + } + } + faceLoop.push_back(edge->v2()->v); + + edge = edge->next; + + if (edge == face->edge) + { + break; + } + } + + bool addFaceDirectly = true; + if (addFaceDirectly) + { + std::vector faceIndexes; + for (size_t iiPoint = 0; iiPoint < faceLoop.size(); ++iiPoint) + { + const vec3& v0 = faceLoop[iiPoint]; + int idxA = polyInput.addPoint(v0); + if (faceIndexes.size() > 0) + { + int previousIndex = faceIndexes.back(); + if (idxA == previousIndex) + { + continue; + } + } + faceIndexes.push_back(idxA); + } + + if (faceIndexes.size() > 1) + { + for (size_t iiPoint = 0; iiPoint < faceIndexes.size(); ++iiPoint) + { + size_t idxFirst = faceIndexes.front(); + size_t idxLast = faceIndexes.back(); + if (idxFirst == idxLast) + { + faceIndexes.pop_back(); + if (faceIndexes.size() < 2) + { + break; + } + } + else + { + break; + } + } + } + + if (faceIndexes.size() > 2 && faceIndexes.size() < 500) + { + size_t n = std::distance(faceIndexes.begin(), faceIndexes.end()); + + size_t numFaceIndices = polyInput.m_poly_data->faceIndices.size(); + if (numFaceIndices > 1000) + { + //std::cout << numFaceIndices << " "; + } + polyInput.m_poly_data->addFace(faceIndexes.begin(), faceIndexes.end()); + } + } + else + { + std::vector > faceLoops = { faceLoop }; + bool mergeAlignedEdges = false; + bool dumpPolygon = true; + FaceConverter::createTriangulated3DFace(faceLoops, polyInput, params); + } + } + + if (numSplitEdges > 0) + { + std::string details = ""; + bool correct = checkPolyhedronData(polyInput.m_poly_data, params.minFaceArea, details); + if (!correct) + { + bool correct2 = fixPolyhedronData(polyInput.m_poly_data, params.minFaceArea); +#ifdef _DEBUG + if (!correct2) + { + std::cout << "fixPolyhedronData failed" << std::endl; + } +#endif + return; + } + + shared_ptr > meshsetNew(polyInput.m_poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); + if (meshsetNew->isClosed()) + { + meshset = meshsetNew; + return; + } + else + { + size_t numOpenEdgesNew = 0; + size_t numClosedEdgesNew = 0; + for (size_t ii = 0; ii < meshsetNew->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshsetNew->meshes[ii]; + numOpenEdgesNew += mesh->open_edges.size(); + numClosedEdgesNew += mesh->closed_edges.size(); + } + + if (numOpenEdgesNew < allOpenEdges.size()) + { + size_t numAllEdgesNew = numOpenEdgesNew + numClosedEdgesNew; + size_t numAllEdgesBefore = numClosedEdgesBefore + allOpenEdges.size(); + if (numClosedEdgesNew >= numClosedEdgesBefore) + { + meshset = meshsetNew; + } + } + +#ifdef _DEBUG + if (params.debugDump) + { + glm::vec4 color(0.3, 0.3, 0.3, 1.); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshsetNew, color, drawNormals, false); + + double dy = meshsetNew->getAABB().extent.y; + GeomDebugDump::moveOffset(dy * 2.2); + GeomDebugDump::dumpMeshsetOpenEdges(meshsetNew, color, false, false); + GeomDebugDump::moveOffset(dy * 3.2); + } +#endif + } + } + } +} + +bool findEdgeLoop(carve::mesh::Edge<3>* startEdge, const std::set* >& vecEdgesInput, std::set* >& usedEdges, std::vector* >& vecResultLoop, double eps, bool dumpPolygon) +{ + if (!startEdge) + { + return false; + } + + if (vecEdgesInput.size() > 1000) + { + return false; + } + + vec3 startPoint = startEdge->v1()->v; + vec3 currentEndPoint = startEdge->v2()->v; + vecResultLoop.push_back(startEdge->v1()); + vecResultLoop.push_back(startEdge->v2()); + usedEdges.clear(); + usedEdges.insert(startEdge); + +#ifdef _DEBUG + bool blue = true; + glm::vec4 color1(1.0, 0.1, 1, 1); + glm::vec4 colorBlue(0, 0.8, 0.5, 1); + if (dumpPolygon) + { + GeomDebugDump::moveOffset(0.5); + std::vector poly = { startPoint, currentEndPoint }; + GeomDebugDump::dumpPolyline(poly, color1, false); + } +#endif + + std::set* > vecEdges = vecEdgesInput; + + for (size_t ii = 0; ii < vecEdges.size(); ++ii) + { + bool connectionFound = false; + for (carve::mesh::Edge<3>*edge : vecEdges) + { + if (edge == startEdge) + { + continue; + } + + auto itFind = usedEdges.find(edge); + if (itFind != usedEdges.end()) + { + continue; + } + + vec3& edgeP0 = edge->v1()->v; + + vec3 delt0 = edgeP0 - currentEndPoint; + if (delt0.length2() < eps * eps) + { + // edge start point is same as loop end point -> connected in forward order + vecResultLoop.push_back(edge->v2()); + currentEndPoint = edge->v2()->v; + usedEdges.insert(edge); + connectionFound = true; + +#ifdef _DEBUG + if (dumpPolygon) + { + glm::vec4 color = blue ? colorBlue : color1; + blue = !blue; + std::vector poly = { edge->v1()->v, edge->v2()->v }; + GeomDebugDump::dumpPolyline(poly, color, false); + } +#endif + + break; + } + + vec3& edgeP1 = edge->v2()->v; + + vec3 delt1 = edgeP1 - currentEndPoint; + if (delt1.length2() < eps * eps) + { + // connected in reverse order + vecResultLoop.push_back(edge->v1()); + currentEndPoint = edge->v1()->v; + usedEdges.insert(edge); + connectionFound = true; + +#ifdef _DEBUG + if (dumpPolygon) + { + glm::vec4 color = blue ? colorBlue : color1; + blue = !blue; + std::vector poly = { edge->v2()->v, edge->v1()->v }; + GeomDebugDump::dumpPolyline(poly, color, false); + } +#endif + + break; + } + } + + if (!connectionFound) + { + break; + } + + // check if loop is closed yet + if (vecResultLoop.size() == 2) + { +#ifdef _DEBUG + std::cout << "loop of two open edges -> set one as reverse edge of other" << std::endl; +#endif + } + + if (vecResultLoop.size() > 2) + { + vec3 delt0 = startPoint - currentEndPoint; + if (delt0.length2() < eps * eps) + { + // closed loop + return true; + } + } + + if (usedEdges.size() == vecEdges.size()) + { + return false; + } + } + + return false; +} + + +void resolveOpenEdges_dep(shared_ptr>& meshset, double CARVE_EPSILON, bool dumpPolygons) +{ + if (!meshset) + { + return; + } + size_t numMeshesInput = meshset->meshes.size(); + size_t numFacesInput = 0; + size_t numOpenEdgesInput = 0; + size_t numClosedEdgesInput = 0; + std::set* > allOpenEdges; + for (size_t ii = 0; ii < meshset->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; + numOpenEdgesInput += mesh->open_edges.size(); + numClosedEdgesInput += mesh->closed_edges.size(); + numFacesInput += mesh->faces.size(); + if (mesh->faces.size() >= 6) + { + for (auto edge : mesh->open_edges) + { + allOpenEdges.insert(edge); + } + } + } + + if (numOpenEdgesInput == 0) + { + return; + } + + size_t maxNumFaces = 5000; + if (numFacesInput > maxNumFaces) + { + return; + } + + size_t maxNumOpenEdges = 1000; + if (allOpenEdges.size() > maxNumOpenEdges) + { + return; + } + + PolyInputCache3D polyInput(CARVE_EPSILON); + polyhedronFromMeshSet(meshset, polyInput); + bool meshsetChanged = false; + + + for (size_t ii = 0; ii < allOpenEdges.size(); ++ii) + { + if (allOpenEdges.size() == 0) + { + break; + } + + if (ii > maxNumOpenEdges) + { + break; + } + + auto itBegin = allOpenEdges.begin(); + carve::mesh::Edge<3>* openEdge = *(itBegin); + + std::set* > usedEdges; + std::vector* > vecResultVertexLoop; + bool closedLoop = findEdgeLoop(openEdge, allOpenEdges, usedEdges, vecResultVertexLoop, CARVE_EPSILON, dumpPolygons); + + if (!closedLoop) + { + allOpenEdges.erase(itBegin); + continue; + } + + std::vector > vecResultPointLoop; + for (size_t jj = 0; jj < vecResultVertexLoop.size(); ++jj) + { + vecResultPointLoop.push_back(vecResultVertexLoop[jj]->v); + } + +#ifdef _DEBUG + if (dumpPolygons) + { + GeomDebugDump::moveOffset(meshset->getAABB().extent.y * 1.1); + glm::vec4 color(0, 0.5, 1, 1); + GeomDebugDump::dumpPolyline(vecResultPointLoop, color, true); + } +#endif + + vec3 pos = GeomUtils::computePolygonCentroid(vecResultPointLoop); + vec3 normal = GeomUtils::computePolygonNormal(vecResultPointLoop); + if (std::abs(normal.length2() - 1.0) > 0.01) + { + allOpenEdges.erase(itBegin); + continue; + } + + GeomUtils::Plane facePlane(glm::dvec3(pos.x, pos.y, pos.z), glm::dvec3(normal.x, normal.y, normal.z)); + std::vector pointIndicesInPlane; + std::vector* > vecLoopInPlane; + + // reverse, because the new edges need to be the reverse edges of the open edges + std::reverse(vecResultVertexLoop.begin(), vecResultVertexLoop.end()); + + if (vecResultVertexLoop.size() > 2) + { + vec3 first = vecResultVertexLoop.front()->v; + vec3 last = vecResultVertexLoop.back()->v; + vec3 delt = last - first; + if (delt.length2() < CARVE_EPSILON * CARVE_EPSILON * 10.0) + { + vecResultVertexLoop.pop_back(); + } + } + + for (size_t jj = 0; jj < vecResultVertexLoop.size(); ++jj) + { + carve::mesh::Vertex<3>* vertex = vecResultVertexLoop[jj]; + vec3& edgeEndPoint = vertex->v; + + // distance point to plane + double dist = facePlane.distancePointPlane(glm::dvec3(edgeEndPoint.x, edgeEndPoint.y, edgeEndPoint.z)); + if (dist < CARVE_EPSILON * 10) + { + int idx = polyInput.addPoint(edgeEndPoint); + pointIndicesInPlane.push_back(idx); + vecLoopInPlane.push_back(vertex); + } + } + + if (pointIndicesInPlane.size() == vecResultVertexLoop.size()) + { + polyInput.m_poly_data->addFace(pointIndicesInPlane.begin(), pointIndicesInPlane.end()); + meshsetChanged = true; + + for (auto edgeInLoop : usedEdges) + { + auto itFind = allOpenEdges.find(edgeInLoop); + if (itFind != allOpenEdges.end()) + { + allOpenEdges.erase(itFind); + } + } + } + } + + if (meshsetChanged) + { + GeomProcessingParams params(CARVE_EPSILON, CARVE_EPSILON * 0.1, CARVE_EPSILON * 0.01, dumpPolygons); + std::string details = ""; + bool polyInputCorrect = checkPolyhedronData(polyInput.m_poly_data, params.minFaceArea, details); + if (!polyInputCorrect) + { + fixPolyhedronData(polyInput.m_poly_data, params.minFaceArea); + polyInputCorrect = checkPolyhedronData(polyInput.m_poly_data, params.minFaceArea, details); + } + + if (polyInputCorrect) + { + shared_ptr > meshsetNew(polyInput.m_poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); + + size_t numOpenEdges = 0; + size_t numClosedEdges = 0; + for (size_t ii = 0; ii < meshsetNew->meshes.size(); ++ii) + { + carve::mesh::Mesh<3>* mesh = meshsetNew->meshes[ii]; + mesh->recalc(CARVE_EPSILON); + numOpenEdges += mesh->open_edges.size(); + numClosedEdges += mesh->closed_edges.size(); + } + +#ifdef _DEBUG + if (dumpPolygons) + { + GeomDebugDump::moveOffset(0.4); + GeomDebugDump::moveOffset(meshset->getAABB().extent.y * 1.1); + glm::vec4 color(0, 1, 1, 1); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshsetNew, color, drawNormals, true); + } +#endif + + size_t numMeshes = meshsetNew->meshes.size(); + if (numMeshes <= numMeshesInput) + { + if (numClosedEdges >= numClosedEdgesInput) + { + if (numOpenEdges < numOpenEdgesInput) + { + meshset = meshsetNew; + } + } + } + } + } +} + +void MeshOps::boundingBox2Mesh(carve::geom::aabb<3>& bbox, shared_ptr >& meshset, double CARVE_EPSILON) +{ + double minX = bbox.pos.x - bbox.extent.x; + double maxX = bbox.pos.x + bbox.extent.x; + double minY = bbox.pos.y - bbox.extent.y; + double maxY = bbox.pos.y + bbox.extent.y; + double minZ = bbox.pos.z - bbox.extent.z; + double maxZ = bbox.pos.z + bbox.extent.z; + + shared_ptr polyhedron_data(new carve::input::PolyhedronData()); + polyhedron_data->addVertex(carve::geom::VECTOR(maxX, maxY, maxZ)); + polyhedron_data->addVertex(carve::geom::VECTOR(minX, maxY, maxZ)); + polyhedron_data->addVertex(carve::geom::VECTOR(minX, minY, maxZ)); + polyhedron_data->addVertex(carve::geom::VECTOR(maxX, minY, maxZ)); + + polyhedron_data->addVertex(carve::geom::VECTOR(maxX, maxY, minZ)); + polyhedron_data->addVertex(carve::geom::VECTOR(minX, maxY, minZ)); + polyhedron_data->addVertex(carve::geom::VECTOR(minX, minY, minZ)); + polyhedron_data->addVertex(carve::geom::VECTOR(maxX, minY, minZ)); + + polyhedron_data->addFace(0, 1, 2); + polyhedron_data->addFace(2, 3, 0); + + polyhedron_data->addFace(7, 6, 5); + polyhedron_data->addFace(5, 4, 7); + + polyhedron_data->addFace(0, 4, 5); + polyhedron_data->addFace(5, 1, 0); + polyhedron_data->addFace(1, 5, 6); + polyhedron_data->addFace(6, 2, 1); + polyhedron_data->addFace(2, 6, 7); + polyhedron_data->addFace(7, 3, 2); + polyhedron_data->addFace(3, 7, 4); + polyhedron_data->addFace(4, 0, 3); + + meshset = shared_ptr >(polyhedron_data->createMesh(carve::input::opts(), CARVE_EPSILON)); +} diff --git a/IfcPlusPlus/src/ifcpp/geometry/MeshOps.h b/IfcPlusPlus/src/ifcpp/geometry/MeshOps.h index 35e5caff7..0ee708f5d 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/MeshOps.h +++ b/IfcPlusPlus/src/ifcpp/geometry/MeshOps.h @@ -17,391 +17,34 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #pragma once -#include -#include -#include #include -#include +#include "GeomUtils.h" #include - -#include "IncludeCarveHeaders.h" -#include "MeshUtils.h" #include "GeometryInputData.h" -#include "PointProjector.h" - -#include "MeshOpsDebug.h" - -struct AdjacentFacePair -{ - AdjacentFacePair( carve::mesh::Face<3>* _faceOnEdge, carve::mesh::Face<3>* _faceOnReverseEdge, carve::mesh::Edge<3>* _edge ) - : faceOnEdge(_faceOnEdge), faceOnReverseEdge(_faceOnReverseEdge), edge( _edge) - { - - } - bool edgeDeleted = false; - carve::mesh::Face<3>* faceOnEdge; - carve::mesh::Face<3>* faceOnReverseEdge; - carve::mesh::Edge<3>* edge; -}; - -class CoplanarFaceContainer -{ -public: - CoplanarFaceContainer() {} - - PointProjector m_pointProjector; - carve::mesh::Face<3>* m_face = nullptr; - - double distancePointPlane(const glm::dvec3& point) const - { - return m_pointProjector.m_plane.distancePointPlane(point); - } - double distancePointPlane(const carve::geom::vector<3>& point) const - { - glm::dvec3 point_glm(point.x, point.y, point.z); - return m_pointProjector.m_plane.distancePointPlane(point_glm); - } -}; - -namespace MeshOps -{ - - -//\brief getAdjacentFaces: get all faces that are adjacent to fx, by sharing an edge, or by sharing a vertex -static void getAdjacentFaces(carve::mesh::Face<3>* fx, std::set* >& adjacentFaces) -{ -#ifdef _DEBUG - bool dumpFaces = false; - if( dumpFaces ) - { - GeomDebugDump::moveOffset(0.4); - glm::vec4 color(0.3, 0.2, 0.2, 1); - GeomDebugDump::dumpFaces({ fx }, color, false); - } -#endif - - carve::mesh::Edge<3>* firstEdge = fx->edge; - if( !firstEdge ) - { - return; - } - - carve::mesh::Mesh<3>* mesh = fx->mesh; - size_t numFacesInMesh = mesh->faces.size(); - carve::mesh::Edge<3>* firstEdgeRev = firstEdge->rev; - if( !firstEdgeRev ) - { - return; - } - carve::mesh::Face<3>* firstAdjacentFace = firstEdgeRev->face; - if( !firstAdjacentFace ) - { - return; - } - adjacentFaces.insert(firstAdjacentFace); - - carve::mesh::Edge<3>* edgeRev = firstEdge->rev; - - for( size_t ii = 0; ii < numFacesInMesh; ++ii ) - { - carve::mesh::Edge<3>* nextEdgeRev = edgeRev->prev->rev; - if( !nextEdgeRev ) - { - return; - } - carve::mesh::Face<3>* nextAdjacentFace = nextEdgeRev->face; - - if( nextAdjacentFace ) - { - if( nextAdjacentFace == fx ) - { - nextEdgeRev = nextEdgeRev->rev; - nextAdjacentFace = nextEdgeRev->face; - } - - if( nextAdjacentFace == firstAdjacentFace ) - { - break; - } - - adjacentFaces.insert(nextAdjacentFace); - } - else - { -#ifdef _DEBUG - std::cout << "nextEdgeRev->face == nullptr" << std::endl; -#endif - } - - edgeRev = nextEdgeRev; - } - -#ifdef _DEBUG - if( dumpFaces ) - { - std::vector* > vecFaces; - std::copy(adjacentFaces.begin(), adjacentFaces.end(), std::back_inserter(vecFaces)); - GeomDebugDump::moveOffset(0.4); - glm::vec4 color2(0.3, 0.2, 0.2, 0.8); - GeomDebugDump::dumpFaces(vecFaces, color2, true); - } -#endif -} - -static void getFaceEdges(carve::mesh::Face<3>* f, std::set* >& faceEdges, bool addReverseFaces ) -{ - carve::mesh::Edge<3>* edge = f->edge; - if( !edge ) - { - return; - } - - for( size_t ii = 0; ii < f->n_edges; ++ii ) - { - faceEdges.insert(edge); - - if( addReverseFaces ) - { - if( edge->rev ) - { - faceEdges.insert(edge->rev); - } - } - edge = edge->next; - if( !edge ) - { - break; - } - if( edge == f->edge ) - { - break; - } - - } -} - -static void getEdgeLenth2( carve::mesh::Face<3>* f, std::multimap* >& mapEdgeLenth2) -{ - carve::mesh::Edge<3>* edge = f->edge; - for( size_t ii = 0; ii < f->n_edges; ++ii ) - { - double length2 = edge->length2(); - mapEdgeLenth2.insert({ length2, edge }); - edge = edge->next; - } -} - -static size_t replaceVertexPointer(carve::mesh::Vertex<3>* vertexFrom, carve::mesh::Vertex<3>* vertexTo, carve::mesh::Edge<3>* edge) -{ - size_t numChanges = 0; - if( edge->vert == vertexFrom ) - { - edge->vert = vertexTo; - ++numChanges; - } - if( edge->rev->vert == vertexFrom ) - { - edge->rev->vert = vertexTo; - ++numChanges; - } - return numChanges; -} - -static size_t replaceVertexPointer( carve::mesh::Vertex<3>* vertexFrom, carve::mesh::Vertex<3>* vertexTo, std::set* >& faces) -{ - size_t numChanges = 0; - for( auto f : faces ) - { - carve::mesh::Edge<3>* edge = f->edge; - - for( size_t ii = 0; ii < f->n_edges; ++ii ) - { - numChanges += replaceVertexPointer(vertexFrom, vertexTo, edge); - edge = edge->next; - if( edge == f->edge ) - { - break; - } - } - } - return numChanges; -} - -static size_t replaceFacePointer(carve::mesh::Face<3>* faceFrom, carve::mesh::Face<3>* faceTo, carve::mesh::Edge<3>* edge) -{ - size_t numChanges = 0; - if( edge ) - { - if( edge->face == faceFrom ) - { - edge->face = faceTo; - ++numChanges; - } - if( edge->rev ) - { - if( edge->rev->face == faceFrom ) - { - edge->rev->face = faceTo; - ++numChanges; - } - } - } - return numChanges; -} - -static size_t replaceFacePointer( carve::mesh::Face<3>* faceFrom, carve::mesh::Face<3>* faceTo, std::set* >& faces) -{ - size_t numChanges = 0; - for( auto f : faces ) - { - if( !f ) - { -#ifdef _DEBUG - std::cout << "invalid pointer" << std::endl; -#endif - continue; - } - carve::mesh::Edge<3>* edge = f->edge; - if( !edge ) - { - //std::cout << "invalid edge pointer" << std::endl; - continue; - } - - for( size_t ii = 0; ii < f->n_edges; ++ii ) - { - numChanges += replaceFacePointer(faceFrom, faceTo, edge); - edge = edge->next; - if( edge == f->edge ) - { - break; - } - } - } - return numChanges; -} - -static size_t replaceFacePointer( carve::mesh::Face<3>* faceFrom, carve::mesh::Face<3>* faceTo) -{ - size_t numChanges = 0; - carve::mesh::Mesh<3>* mesh = faceFrom->mesh; - std::vector* >& vecFaces = mesh->faces; - for( auto f : vecFaces ) - { - carve::mesh::Edge<3>* edge = f->edge; - if( !edge ) - { - continue; - } - - for( size_t ii = 0; ii < f->n_edges; ++ii ) - { - numChanges += replaceFacePointer(faceFrom, faceTo, edge); - edge = edge->next; - if( edge == f->edge ) - { - break; - } - } - } - return numChanges; -} - -static size_t countEdges(carve::mesh::Face<3>* face) -{ - if( !face ) - { - return 0; - } - size_t numEdges = 0; - carve::mesh::Edge<3>* edge = face->edge; - for( size_t ii = 0; ii < 10000; ++ii ) - { - ++numEdges; - edge = edge->next; - if( edge == face->edge ) - { - break; - } - } - - face->n_edges = numEdges; - return numEdges; -} - -static void setEdgeNullPointers(carve::mesh::Edge<3>* edge) -{ - edge->vert = nullptr; - edge->rev = nullptr; - edge->face = nullptr; - edge->prev = nullptr; - edge->next = nullptr; -} - -static size_t removeFaceFromMesh(carve::mesh::Face<3>* fx) -{ - carve::mesh::Mesh<3>* mesh = fx->mesh; - for( auto it = mesh->faces.begin(); it != mesh->faces.end(); ++it ) - { - carve::mesh::Face<3>* f = *it; - if( f == fx ) - { - mesh->faces.erase(it); - return 1; - } - } - return 0; -} -static size_t getNumFaces(const shared_ptr >& meshset ) +struct CarveMeshNormalizer { - size_t numFaces = 0; - for( auto mesh: meshset->meshes) + CarveMeshNormalizer(bool normalizeCoordsInsteadOfEpsilon) { - numFaces += mesh->faces.size(); + m_normalizeCoordsInsteadOfEpsilon = normalizeCoordsInsteadOfEpsilon; } - return numFaces; -} -static bool checkMeshsetTriangulated(const shared_ptr>&meshset) -{ - for( size_t ii = 0; ii < meshset->meshes.size(); ++ii ) + CarveMeshNormalizer(const CarveMeshNormalizer* other) { - carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; - const std::vector*>& vec_faces = mesh->faces; - - for( size_t i2 = 0; i2 < vec_faces.size(); ++i2 ) - { - carve::mesh::Face<3>* inputFace = vec_faces[i2]; - if( inputFace->n_edges != 3 ) - { - return false; - } - } + this->m_disableNormalizeAll = other->m_disableNormalizeAll; + this->m_scale = other->m_scale; + this->m_normalizeCenter = other->m_normalizeCenter; + this->m_normalizedMeshes = other->m_normalizedMeshes; + this->m_normalizeCoordsInsteadOfEpsilon = other->m_normalizeCoordsInsteadOfEpsilon; } - return true; -} -struct CarveMeshNormalizer -{ - CarveMeshNormalizer( bool normalizeCoordsInsteadOfEpsilon ) - { - m_normalizeCoordsInsteadOfEpsilon = normalizeCoordsInsteadOfEpsilon; - } - CarveMeshNormalizer(const shared_ptr>& mesh1, const shared_ptr >& mesh2, bool normalizeCoordsInsteadOfEpsilon) + CarveMeshNormalizer(const carve::geom::aabb<3>& bbox1, const carve::geom::aabb<3>& bbox2, bool normalizeCoordsInsteadOfEpsilon) { m_normalizeCoordsInsteadOfEpsilon = normalizeCoordsInsteadOfEpsilon; - if( !mesh1 ) - { - return; - } - - carve::geom::aabb<3> bbox1 = mesh1->getAABB(); vec3 center1 = bbox1.pos; vec3 extents1 = bbox1.extent; - carve::geom::aabb<3> bbox2 = mesh2->getAABB(); - if( bbox2.isEmpty() ) + if (bbox2.isEmpty()) { return; } @@ -414,23 +57,23 @@ struct CarveMeshNormalizer double maxExtent = std::max(extent1, extent2); double scale = 1.0; - if( maxExtent > EPS_M5 ) + if (maxExtent > EPS_M5) { scale = 1.0 / maxExtent; } - m_scale = scale; + m_scale = scale*0.8; // conversative approach: 80% vec3 center = (center1 + center2) * 0.5; m_normalizeCenter = center; - if( std::abs(m_scale) > 0.5 && std::abs(m_scale) < 2.0 ) + if (std::abs(m_scale) > 0.5 && std::abs(m_scale) < 2.0) { // if scale is close to 1, scaling does not make a big difference. // Negative effects like small inaccuracies after multiplication and time to multiply overweigh m_scale = 1.0; } } - + double getScale() const { return m_scale; } void setToZero() { @@ -438,21 +81,21 @@ struct CarveMeshNormalizer m_normalizeCenter.setZero(); } - void normalizeMesh(shared_ptr >& meshset, std::string tag, double CARVE_EPSILON) + void normalizeMesh(shared_ptr >& meshset, std::string tag, double eps) { - if( disableNormalizeAll ) + if (m_disableNormalizeAll) { return; } double centerLength2 = m_normalizeCenter.length2(); - if( m_scale == 1.0 && centerLength2 < 2.0 ) + if (m_scale == 1.0 && centerLength2 < 2.0) { return; } - if( tag.size() > 0 ) + if (tag.size() > 0) { - if( m_normalizedMeshes.find(tag) != m_normalizedMeshes.end() ) + if (m_normalizedMeshes.find(tag) != m_normalizedMeshes.end()) { // already normalized return; @@ -462,12 +105,12 @@ struct CarveMeshNormalizer std::vector >& vertex_storage = meshset->vertex_storage; const size_t num_vertices = vertex_storage.size(); - for( size_t i = 0; i < num_vertices; ++i ) + for (size_t i = 0; i < num_vertices; ++i) { carve::mesh::Vertex<3>& vertex = vertex_storage[i]; vec3& point = vertex.v; - if( m_scale != 1.0 && m_normalizeCoordsInsteadOfEpsilon ) + if (m_scale != 1.0 && m_normalizeCoordsInsteadOfEpsilon) { point = (point - m_normalizeCenter) * m_scale; } @@ -477,31 +120,31 @@ struct CarveMeshNormalizer } } - for( size_t kk = 0; kk < meshset->meshes.size(); ++kk ) + for (size_t kk = 0; kk < meshset->meshes.size(); ++kk) { carve::mesh::Mesh<3>* mesh = meshset->meshes[kk]; - mesh->recalc(CARVE_EPSILON); + mesh->recalc(eps); } m_normalizedMeshes.insert({ tag, meshset.get() }); } - void deNormalizeMesh(shared_ptr >& meshset, std::string tag, double CARVE_EPSILON) + void deNormalizeMesh(shared_ptr >& meshset, std::string tag, double eps) { - if( disableNormalizeAll ) + if (m_disableNormalizeAll) { return; } double centerLength2 = m_normalizeCenter.length2(); - if( m_scale == 1.0 && centerLength2 < 2.0 ) + if (m_scale == 1.0 && centerLength2 < 2.0) { return; } - if( tag.size() > 0 ) + if (tag.size() > 0) { auto it = m_normalizedMeshes.find(tag); - if( it == m_normalizedMeshes.end() ) + if (it == m_normalizedMeshes.end()) { // already denormalized, or not normalized before return; @@ -513,11 +156,11 @@ struct CarveMeshNormalizer std::vector >& vertex_storage = meshset->vertex_storage; const size_t num_vertices = vertex_storage.size(); - for( size_t i = 0; i < num_vertices; ++i ) + for (size_t i = 0; i < num_vertices; ++i) { carve::mesh::Vertex<3>& vertex = vertex_storage[i]; vec3& point = vertex.v; - if( m_scale != 1.0 && m_normalizeCoordsInsteadOfEpsilon ) + if (m_scale != 1.0 && m_normalizeCoordsInsteadOfEpsilon) { point = point * unScaleFactor + m_normalizeCenter; } @@ -526,1879 +169,79 @@ struct CarveMeshNormalizer point = point + m_normalizeCenter; } } - for( size_t kk = 0; kk < meshset->meshes.size(); ++kk ) + for (size_t kk = 0; kk < meshset->meshes.size(); ++kk) { carve::mesh::Mesh<3>* mesh = meshset->meshes[kk]; - mesh->recalc(CARVE_EPSILON); + mesh->recalc(eps); } } - bool disableNormalizeAll = false; + bool m_disableNormalizeAll = false; + bool m_normalizeCoordsInsteadOfEpsilon = false; + private: double m_scale = 1.0; vec3 m_normalizeCenter; std::map* > m_normalizedMeshes; - bool m_normalizeCoordsInsteadOfEpsilon = false; }; -static void splitIntoSubLoops(const std::vector >& polygonMerged, std::vector > >& polygonLoops, std::map >& mapInOut, double eps, bool dumpPolygon ) -{ - // find inner loops and shift them such that there is no self-intersection - std::vector> previousLoop; - - for( size_t ii = 0; ii < polygonMerged.size(); ++ii ) - { - const carve::geom::vector<2>& point = polygonMerged[ii]; - - - for( size_t jj = 0; jj < previousLoop.size(); ++jj ) - { - const carve::geom::vector<2>& previousPoint = previousLoop[jj]; - double dx = previousPoint[0] - point.x; - if( std::abs(dx) < eps ) - { - double dy = previousPoint[1] - point.y; - if( std::abs(dy) < eps ) - { - // a loop should have at least 3 points - if( previousLoop.size() < 3 ) - { - previousLoop.clear(); - break; - } - else - { - if( jj == 1 ) - { - // connecting edge between outer and inner loop, erase - if( previousLoop.size() > 1 ) - { - previousLoop.erase(previousLoop.begin()); - } - polygonLoops.push_back(previousLoop); - previousLoop.clear(); - break; - } - // back on point in previous loop. Split here and begin new loop - polygonLoops.push_back(previousLoop); - previousLoop.clear(); - } - break; - } - } - } - - size_t loopIndex = polygonLoops.size(); - size_t pointIndex = previousLoop.size(); - mapInOut[ii] = { loopIndex, pointIndex }; - previousLoop.push_back( point ); - } - - if( previousLoop.size() > 2 ) - { - polygonLoops.push_back(previousLoop); - } - - std::multimap > > mapAreaLoops; - for( size_t ii = 0; ii < polygonLoops.size(); ++ii ) - { - std::vector >& loop = polygonLoops[ii]; - double area = std::abs( GeomUtils::signedArea(loop) ); - mapAreaLoops.insert({ area, loop }); - } - polygonLoops.clear(); - for( auto it = mapAreaLoops.rbegin(); it != mapAreaLoops.rend(); ++it ) - { - polygonLoops.push_back(it->second); - } -} - -static void shiftSubLoops(std::vector >& polygonMerged, std::map& mapInOut, double eps, bool dumpPolygon ) -{ - // find inner loops and shift them such that there is no self-intersection - std::vector> previousLoop; - std::vector > > polygonLoops; - for( size_t ii = 0; ii < polygonMerged.size(); ++ii ) - { - const carve::geom::vector<2>& point = polygonMerged[ii]; - - for( size_t jj = 0; jj < previousLoop.size(); ++jj ) - { - const carve::geom::vector<2>& previousPoint = previousLoop[jj]; - double dx = previousPoint[0] - point.x; - if( std::abs(dx) < eps ) - { - double dy = previousPoint[1] - point.y; - if( std::abs(dy) < eps ) - { - // a loop should have at least 3 points - if( previousLoop.size() < 3 ) - { - previousLoop.clear(); - break; - } - else - { - if( jj == 1 ) - { - // connecting edge between outer and inner loop, erase - if( previousLoop.size() > 1 ) - { - previousLoop.erase(previousLoop.begin()); - } - polygonLoops.push_back(previousLoop); - previousLoop.clear(); - break; - } - // back on point in previous loop. Split here and begin new loop - polygonLoops.push_back(previousLoop); - previousLoop.clear(); - } - break; - } - } - - } - - size_t loopIndex = polygonLoops.size(); - size_t pointIndex = previousLoop.size(); - //mapInOut[ii] = { loopIndex, pointIndex }; - previousLoop.push_back( point ); - } - - if( previousLoop.size() > 2 ) - { - //polygon_earcut_out.push_back(previousLoop); - } - -#ifdef _DEBUG - if( polygonMerged.size() > 5 && dumpPolygon ) - { - glm::vec4 color(0.3, 0.33, 0.33, 1.); - GeomDebugDump::dumpLocalCoordinateSystem(); - GeomDebugDump::moveOffset(0.1); - GeomDebugDump::dumpPolyline(polygonMerged, color, true); - GeomDebugDump::moveOffset(0.1); - GeomDebugDump::dumpPolyline(polygonLoops, color, true); - } -#endif -} - -static void retriangulateMeshSetSimple( shared_ptr >& meshset, bool ignoreResultOpenEdges, double CARVE_EPSILON, size_t retryCount ) +class MeshOps { - if( !meshset ) - { - return; - } - - MeshSetInfo info; - bool validInput = MeshUtils::checkMeshSetValidAndClosed(meshset, info, CARVE_EPSILON); - MeshUtils::checkMeshSetNonNegativeAndClosed( meshset, CARVE_EPSILON ); - - bool already_triagulated = MeshUtils::checkMeshsetTriangulated(meshset); - if( already_triagulated ) - { - return; - } - - PolyInputCache3D poly_cache( CARVE_EPSILON ); // TODO: check to use double - std::vector map_merged_idx; - map_merged_idx.resize( meshset->vertex_storage.size(), 0 ); - for( size_t ii = 0; ii < meshset->meshes.size(); ++ii ) - { - carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; - std::vector* >& vec_faces = mesh->faces; - - for( size_t i2 = 0; i2 < vec_faces.size(); ++i2 ) - { - carve::mesh::Face<3>* face = vec_faces[i2]; - -#ifdef _DEBUG - std::vector face_idx; - getFaceIndexes(face, meshset->vertex_storage, face_idx); -#endif - - std::vector verts2d; - face->getProjectedVertices( verts2d ); - if( verts2d.size() < 3 ) - { - continue; - } - - // now insert points to polygon, avoiding points with same coordinates - int i_vert = 0; - carve::mesh::Edge<3>* edge = face->edge; - for( size_t i3 = 0; i3 < face->n_edges; ++i3 ) - { - const vec3& v = edge->vert->v; - edge = edge->next; - int vertex_index = poly_cache.addPoint(v); - if( i_vert >= map_merged_idx.size() ) - { - map_merged_idx.resize(i_vert + 1, 0); - } - map_merged_idx[i_vert] = vertex_index; - ++i_vert; - if( edge == face->edge ) - { - break; - } - } - - if( retryCount > 0 ) - { -#ifdef _DEBUG - if( verts2d.size() > 7 ) - { - glm::vec4 color(0.3, 0.33, 0.33, 1.); - GeomDebugDump::dumpLocalCoordinateSystem(); - GeomDebugDump::moveOffset(0.1); - GeomDebugDump::dumpPolyline(verts2d, color, true); - - std::vector > > polygon_earcut; - std::map > mapFlat2NestedArray; - splitIntoSubLoops(verts2d, polygon_earcut, mapFlat2NestedArray, CARVE_EPSILON, false); - - GeomDebugDump::moveOffset(0.1); - GeomDebugDump::dumpPolyline(polygon_earcut, color, true); - } -#endif - - std::map mapFlat2NestedArray; - if( verts2d.size() > 7 ) - { - shiftSubLoops(verts2d, mapFlat2NestedArray, CARVE_EPSILON, false); - } - -#ifdef _DEBUG - if( verts2d.size() > 7 ) - { - glm::vec4 color(0.3, 0.33, 0.33, 1.); - GeomDebugDump::dumpLocalCoordinateSystem(); - GeomDebugDump::moveOffset(0.1); - GeomDebugDump::dumpPolyline(verts2d, color, true); - - //std::vector > > polygon_earcut; - - //GeomDebugDump::moveOffset(0.1); - //GeomDebugDump::dumpPolyline(polygon_earcut, color, true); - } -#endif - - } - - { - std::vector triangulated; - if( verts2d.size() > 3 ) - { - try - { - carve::triangulate::triangulate(verts2d, triangulated, CARVE_EPSILON); - carve::triangulate::improve(verts2d, triangulated); - } - catch( ... ) - { -#ifdef _DEBUG - std::cout << __FUNC__ << " carve::triangulate failed " << std::endl; -#endif - continue; - } - } - else - { - triangulated.push_back(carve::triangulate::tri_idx(0, 1, 2)); - } - - - - for( size_t i4 = 0; i4 != triangulated.size(); ++i4 ) - { - const carve::triangulate::tri_idx& triangle = triangulated[i4]; - int a = triangle.a; - int b = triangle.b; - int c = triangle.c; - - int vertex_id_a = map_merged_idx[a]; - int vertex_id_b = map_merged_idx[b]; - int vertex_id_c = map_merged_idx[c]; +public: + static double computeFaceArea(const carve::mesh::Face<3>* face); + static double computeFaceArea(const carve::mesh::Face<3>* face, double& longestEdge); + static size_t getNumFaces(const carve::mesh::MeshSet<3>* meshset); + static size_t getNumClosedEdges(const carve::mesh::MeshSet<3>* meshset); + static void recalcMeshSet(shared_ptr >& meshset, double CARVE_EPSILON); + static bool checkMeshSetVolume(const shared_ptr >& mesh_set, StatusCallback* report_callback, BuildingEntity* entity, double CARVE_EPSILON); + static void checkFaceLoops(const carve::mesh::Face<3>* face); + static size_t countFaces(carve::mesh::MeshSet<3>* mesh); + static size_t countDegeneratedFaces(carve::mesh::MeshSet<3>* mesh); + static bool checkMeshsetTriangulated(const shared_ptr>& meshset); + + /// \brief simplifyMeshSet merge coplanar faces and re-triangulate each set of merged faces + /// \param meshset Carve meshset + /// \param report_callback callback function for errors, warnings, notifications, progress + /// \param entity IFC entity that is currently being processed + /// \param ignoreOpenEdgesInResult If true, the result is kept even with open edges (good for visualization). If false, the result will be the input mesh in case open edges occur after triangulation (good for further boolean operations) + static void simplifyMeshSet(shared_ptr >& meshset, shared_ptr& geomSettings, GeomProcessingParams& params, bool triangulateResult, bool shouldBeClosedManifold); + static void simplifyMeshSet(std::vector> >& meshsets, shared_ptr& geomSettings, GeomProcessingParams& params, bool triangulateResult, bool shouldBeClosedManifold); - if( vertex_id_a == vertex_id_b || vertex_id_a == vertex_id_c || vertex_id_b == vertex_id_c ) - { - continue; - } + + static void retriangulateMeshSetSimple(shared_ptr >& meshset, bool ignoreResultOpenEdges, GeomProcessingParams& params, size_t retryCount); - const carve::poly::Vertex<3>& v_a = poly_cache.m_poly_data->getVertex(vertex_id_a); - const carve::poly::Vertex<3>& v_b = poly_cache.m_poly_data->getVertex(vertex_id_b); + static void retriangulateMeshSetSimple(std::vector > >& meshsets, bool ignoreResultOpenEdges, GeomProcessingParams& params, size_t retryCount); - double dx = v_a.v[0] - v_b.v[0]; - if( std::abs(dx) < 0.0000001 ) - { - double dy = v_a.v[1] - v_b.v[1]; - if( std::abs(dy) < 0.0000001 ) - { - double dz = v_a.v[2] - v_b.v[2]; - if( std::abs(dz) < 0.0000001 ) - { -#ifdef _DEBUG - std::cerr << "degenerated triangle: std::abs(dx) < 0.00001 && std::abs(dy) < 0.00001 && std::abs(dz) < 0.00001\n"; -#endif - continue; - } - } - } + static void intersectOpenEdgesWithPoints(shared_ptr >& meshset, GeomProcessingParams& params); - poly_cache.m_poly_data->addFace(vertex_id_a, vertex_id_b, vertex_id_c); - } - } - } - } + static void intersectOpenEdgesWithEdges(shared_ptr >& meshset, GeomProcessingParams& params); - shared_ptr> meshsetTrinangulated1 = shared_ptr >( poly_cache.m_poly_data->createMesh( carve::input::opts(), CARVE_EPSILON ) ); + static bool checkMeshSetValidAndClosed(const shared_ptr>& meshset, MeshSetInfo& info, GeomProcessingParams& params ); - double minFaceArea = CARVE_EPSILON * 0.01; - bool correct = checkPolyhedronData(poly_cache.m_poly_data, minFaceArea); - if( !correct ) - { - fixPolyhedronData(poly_cache.m_poly_data, minFaceArea); -#ifdef _DEBUG - bool correct2 = checkPolyhedronData(poly_cache.m_poly_data, minFaceArea); - if( !correct2 ) - { - std::cout << "incorrect idx"; - } -#endif - } + static bool checkMeshSetNonNegativeAndClosed(const shared_ptr> mesh_set, GeomProcessingParams& params); - shared_ptr> meshsetTrinangulated = shared_ptr >( poly_cache.m_poly_data->createMesh( carve::input::opts(), CARVE_EPSILON ) ); - MeshSetInfo infoTriangulated; - bool validTriangulatedMesh = MeshUtils::checkMeshSetValidAndClosed(meshsetTrinangulated, infoTriangulated, CARVE_EPSILON); - if( !validTriangulatedMesh ) - { -#ifdef _DEBUG - bool dumpMesh = false; - if( validInput && dumpMesh ) - { - DumpSettingsStruct dumpSet; - dumpSet.triangulateBeforeDump = false; - glm::vec4 color(0.3, 0.33, 0.33, 1.); - GeomDebugDump::dumpLocalCoordinateSystem(); - GeomDebugDump::moveOffset(0.3); - dumpWithLabel("triangulate:input ", meshset, dumpSet, false, true, true); - GeomDebugDump::moveOffset(0.3); - dumpWithLabel("triangulate:result", meshsetTrinangulated, dumpSet, false, true, true); - } -#endif - bool validTriangulatedMesh1 = MeshUtils::checkMeshSetValidAndClosed(meshsetTrinangulated1, infoTriangulated, CARVE_EPSILON); - if( validTriangulatedMesh1 ) - { - meshset.reset(); - meshset = meshsetTrinangulated1; - return; - } + static void checkMeshPointers(const carve::mesh::Mesh<3>* mesh, bool checkForDegenerateEdges, GeomProcessingParams& params, MeshSetInfo& info); - if( !ignoreResultOpenEdges ) - { - return; - } - } - meshset.reset(); - meshset = meshsetTrinangulated; -} + static void checkMeshSetPointers(const shared_ptr >& meshset, bool checkForDegenerateEdges, GeomProcessingParams& params, MeshSetInfo& info); -static void retriangulateMeshSetSimple( std::vector > >& meshsets, bool ignoreResultOpenEdges, double eps, size_t retryCount ) -{ - for( shared_ptr >& meshset : meshsets ) - { - retriangulateMeshSetSimple(meshset, ignoreResultOpenEdges, eps, retryCount); - } -} + static void fixMeshset(shared_ptr >& meshset, shared_ptr& geomSettings, bool dumpMeshes); -static bool isCoplanar(const shared_ptr& coplanar, const carve::mesh::Face<3>* faceIn, shared_ptr& geomSettings) -{ - const vec3& faceNormal_carve = faceIn->plane.N; - const vec3& facePosition_carve = faceIn->edge->v2()->v; + static void resolveOpenEdges(shared_ptr>& meshset, GeomProcessingParams& params); - glm::dvec3 faceNormal(faceNormal_carve.x, faceNormal_carve.y, faceNormal_carve.z); - glm::dvec3 facePosition(facePosition_carve.x, facePosition_carve.y, facePosition_carve.z); + static void flattenFacePlanes(shared_ptr >& op1, shared_ptr >& op2, GeomProcessingParams& params); - PointProjector& pointPro = coplanar->m_pointProjector; - const glm::dvec3& coplanarNormal = pointPro.m_plane.getNormal(); - const glm::dvec3& coplanarPosition = pointPro.m_plane.getPosition(); + static void removeDegenerateFacesInMeshSet(shared_ptr >& meshsetInput, GeomProcessingParams& params); - double dotProduct = std::abs(dot(faceNormal, coplanarNormal)); - if( std::abs(dotProduct - 1.0) > geomSettings->getEpsilonCoplanarAngle() )// m_epsCoplanarAngle ) // we can be less strict here, since we test each point separately - { - return false; - } + static vec3 computeFaceNormal(carve::mesh::Face<3>* face); - //double face_area = MeshUtils::computeFaceArea(faceIn); - //if( std::abs(face_area) < carve::CARVE_EPSILON ) - //{ - // return false; - //} + static double computeMeshsetVolume(const carve::mesh::MeshSet<3>* meshset); + static double computeMeshSetSurface(const shared_ptr >& meshset); - std::vector::vertex_t* > faceVertices; - faceIn->getVertices(faceVertices); - if( faceVertices.size() > 2 ) - { - bool allVerticesInPlane = true; - for( const carve::mesh::Face<3>::vertex_t * vertex : faceVertices ) - { - const carve::geom::vector<3>& facePoint_carve = vertex->v; - glm::dvec3 facePoint(facePoint_carve.x, facePoint_carve.y, facePoint_carve.z); - double distanceToPlane = pointPro.m_plane.distancePointPlane(facePoint); + static double computeShapeSurfaceArea(const shared_ptr& shape_input_data); + static double computeShapeSurfaceArea(const shared_ptr& item_data); - if( std::abs(distanceToPlane) > geomSettings->getEpsilonCoplanarDistance() )// m_epsCoplanarDistance ) - { - allVerticesInPlane = false; - break; - } - } - - if( allVerticesInPlane ) - { - return true; - } - } - return false; -} - -static bool isCoplanar(const carve::geom::plane<3>& plane, const carve::mesh::Face<3>* face1, const carve::mesh::Face<3>* face2, shared_ptr& geomSettings) -{ - if( !face2 ) - { - return false; - } - const vec3& planeNormal = plane.N; - const vec3& face2Normal = face2->plane.N; - const vec3& face2Position = face2->edge->v2()->v; - - double dotProduct = std::abs(dot(planeNormal, face2Normal)); - if( std::abs(dotProduct - 1.0) > geomSettings->getEpsilonCoplanarAngle() )// m_epsCoplanarAngle ) // we can be less strict here, since we test each point separately - { - return false; - } - - //const carve::geom::plane<3>& face1Plane = face1->plane; - vec3 planePosition = planeNormal; - planePosition *= -plane.d; - - -#ifdef _DEBUG - std::vector::vertex_t* > face1Vertices; - face1->getVertices(face1Vertices); - vec3 vertexNormal = GeomUtils::computePolygonNormal(face1Vertices); - double dotProduct1 = std::abs(dot(vertexNormal, planeNormal)); - if( std::abs(dotProduct1 - 1.0) > geomSettings->getEpsilonCoplanarAngle() )// m_epsCoplanarAngle ) - { - std::cout << "std::abs(dotProduct1 - 1.0) > geomSettings->m_epsCoplanarAngle )" << std::endl; - } - - if( face1Vertices.size() > 2 ) - { - - bool allVerticesInPlane = true; - for( const carve::mesh::Face<3>::vertex_t * vertex : face1Vertices ) - { - const carve::geom::vector<3>& facePoint = vertex->v; - - double distanceToPlane = std::abs(dot(planeNormal, facePoint - planePosition)); - - //double distanceToPlane = face1Plane-.m_plane.distancePointPlane(facePoint); - - if( std::abs(distanceToPlane) > geomSettings->getEpsilonCoplanarDistance()*1.5 )// m_epsCoplanarDistance*1.5 ) - { - allVerticesInPlane = false; - break; - } - } - - if( !allVerticesInPlane ) - { - std::cout << "!allVerticesInPlane\n"; - } - } - -#endif - //double face_area = MeshUtils::computeFaceArea(faceIn); - //if( std::abs(face_area) < carve::CARVE_EPSILON ) - //{ - // return false; - //} - - std::vector::vertex_t* > faceVertices; - face2->getVertices(faceVertices); - if( faceVertices.size() > 2 ) - { - bool allVerticesInPlane = true; - for( const carve::mesh::Face<3>::vertex_t * vertex : faceVertices ) - { - const carve::geom::vector<3>& facePoint = vertex->v; - - double distanceToPlane = std::abs(dot(planeNormal, facePoint - planePosition)); - - if( std::abs(distanceToPlane) > geomSettings->getEpsilonCoplanarDistance() )// m_epsCoplanarDistance ) - { - allVerticesInPlane = false; - break; - } - } - - if( allVerticesInPlane ) - { - return true; - } - } - return false; -} - -static void getAdjacentCoplanarFaces(const carve::geom::plane<3>& plane, carve::mesh::Face<3>* faceIn, std::set >& setAdjacentFaces, shared_ptr& geomSettings, bool recursive) -{ -#ifdef _DEBUG - std::vector::vertex_t* > face1Vertices; - faceIn->getVertices(face1Vertices); - vec3 vertexNormal = GeomUtils::computePolygonNormal(face1Vertices); - double dotProduct1 = std::abs(dot(vertexNormal, plane.N)); - if( std::abs(dotProduct1 - 1.0) > geomSettings->getEpsilonCoplanarAngle() )// m_epsCoplanarAngle ) - { - std::cout << "std::abs(dotProduct1 - 1.0) > 0 )" << std::endl; - - std::vector face1Points; - for( size_t i = 0; i < face1Vertices.size(); ++i ) - { - vec3 point = face1Vertices[i]->v; - face1Points.push_back(point); - } - glm::vec4 color(0.6, 0.65, 0.4, 1); - GeomDebugDump::stopBuffering(); - GeomDebugDump::dumpPolyline(face1Points, color, true); - - if (face1Vertices.size() > 3) - { - std::cerr << "N-gon with " << face1Vertices.size() << " vertices: fitted distance:"; - for (size_t i = 0; i < face1Vertices.size(); ++i) - { - vec3 point = face1Vertices[i]->v; - double distanceFromPlane = distance(faceIn->plane, point); - if( std::abs(distanceFromPlane) > EPS_DEFAULT ) - { - std::cerr << " {" << face1Vertices[i] << "} " << distanceFromPlane << std::endl; - } - } - - carve::geom::plane<3> planeFit; - carve::mesh::Face<3>::vector_mapping vecMap; - bool fitPlaneSuccess = carve::geom3d::fitPlane(faceIn->begin(), faceIn->end(), vecMap, planeFit, EPS_DEFAULT); - if( fitPlaneSuccess ) - { - vec3 fitPlaneNormal = planeFit.N; - double dotProduct1 = std::abs(dot(vertexNormal, fitPlaneNormal)); - if( std::abs(dotProduct1 - 1.0) > geomSettings->getEpsilonCoplanarAngle() )// m_epsCoplanarAngle ) - { - std::cout << "std::abs(dotProduct1 - 1.0) > 0 )" << std::endl; - } - } - - - } - - vec3 faceNormal1 = faceIn->plane.N; - faceIn->recalc(EPS_DEFAULT); - vec3 faceNormal2 = faceIn->plane.N; - return; - } -#endif - - carve::mesh::Edge<3>* edge = faceIn->edge; - if( !edge ) - { -#ifdef _DEBUG - std::cout << "!faceIn->edge" << std::endl; -#endif - return; - } - - size_t numEdges = faceIn->nEdges(); - if( numEdges > geomSettings->m_maxNumFaceEdges ) - { -#ifdef _DEBUG - std::cout << "num edges: " << numEdges << std::endl; -#endif - return; - } - - for( size_t ii = 0; ii < numEdges; ++ii ) - { - if( edge->rev ) - { - carve::mesh::Face<3>* adjacentFace = edge->rev->face; - - bool alreadyHandled = false; - for( auto existingFacePair : setAdjacentFaces ) - { - if( existingFacePair->faceOnEdge == adjacentFace || existingFacePair->faceOnReverseEdge == adjacentFace ) - { - alreadyHandled = true; - break; - } - } - - if( faceIn == adjacentFace) - { - alreadyHandled = true; - } - - if( !alreadyHandled ) - { - if( isCoplanar(plane, faceIn, adjacentFace, geomSettings) ) - { - shared_ptr facePair(new AdjacentFacePair(faceIn, adjacentFace, edge)); - setAdjacentFaces.insert(facePair); - - if( recursive ) - { - getAdjacentCoplanarFaces(plane, adjacentFace, setAdjacentFaces, geomSettings, recursive); - } - } - } - } - - edge = edge->next; - if( edge == faceIn->edge ) - { - break; - } - } - -#ifdef _DEBUG - if( edge != faceIn->edge ) - { - std::cout << "edge != faceIn->edge " << std::endl; - } -#endif -} - -#ifdef _DEBUG -static void dumpAdjacentFaces(std::set >& setAdjacentFaces, glm::vec4& color) -{ - std::set* > setFaces; - for( auto it1 = setAdjacentFaces.begin(); it1 != setAdjacentFaces.end(); ++it1 ) - { - shared_ptr facePair = *it1; - carve::mesh::Face<3>* faceKeep = facePair->faceOnReverseEdge; - carve::mesh::Face<3>* faceDelete = facePair->faceOnEdge; - - if( faceKeep ) - { - if( faceKeep->n_edges > 100000 ) - { - continue; - } - - if( faceKeep->edge ) - { - setFaces.insert(faceKeep); - } - } - if( faceDelete ) - { - if( faceDelete->n_edges > 100000 ) - { - continue; - } - - if( faceDelete->edge ) - { - setFaces.insert(faceDelete); - } - } - } - - std::vector* > vecFaces; - std::copy(setFaces.begin(), setFaces.end(), std::back_inserter(vecFaces)); - GeomDebugDump::moveOffset(0.4); - GeomDebugDump::dumpFaces(vecFaces, color, false); -} -#endif - -static void _link(carve::mesh::Edge<3>* a, carve::mesh::Edge<3>* b) -{ - a->next = b; - b->prev = a; -} -static void _setloopface(carve::mesh::Edge<3>* s, carve::mesh::Face<3>* f) -{ - carve::mesh::Edge<3>* e = s; - do - { - e->face = f; - e = e->next; - } while (e != s); -} - -static carve::mesh::Edge<3>* checkMergeFaces(carve::mesh::Edge<3>* e, shared_ptr& geomSettings, bool dumpMeshes) -{ - if (e->rev == nullptr) - { - return nullptr; - } - - - carve::mesh::Face<3>* fwdface = e->face; - carve::mesh::Face<3>* revface = e->rev->face; - - if( fwdface == revface ) - { - return nullptr; - } - - if( fwdface->n_edges > geomSettings->m_maxNumFaceEdges ) - { - return nullptr; - } - if( revface->n_edges > geomSettings->m_maxNumFaceEdges ) - { - return nullptr; - } - - -#ifdef _DEBUG - - GeomDebugDump::ScopedDumpBuffering scoped_buffer; - if( dumpMeshes ) - { - glm::vec4 color(0.3, 0.3, 0.3, 1.); - std::vector* > vecFaces = { fwdface }; - GeomDebugDump::dumpFaces(vecFaces, color, false); - GeomDebugDump::dumpFacePolygon(revface, color, false); - } -#endif - - size_t n_removed = 0; - - carve::mesh::Edge<3>* splice_beg = e; - for( size_t ii = 0; ii < fwdface->n_edges; ++ii ) - { - splice_beg = splice_beg->prev; - ++n_removed; - - if( splice_beg == e) { break; } - if( !splice_beg->rev ) { break; } - if( splice_beg->next->rev->prev != splice_beg->rev ) { break; } - } - - if (splice_beg == e) - { - // edge loops are completely matched. - return nullptr; - } - - carve::mesh::Edge<3>* splice_end = e; - do { - splice_end = splice_end->next; - ++n_removed; - } while (splice_end->rev && splice_end->prev->rev->next == splice_end->rev); - - --n_removed; - - carve::mesh::Edge<3>* link1_p = splice_beg; - carve::mesh::Edge<3>* link1_n = splice_beg->next->rev->next; - - carve::mesh::Edge<3>* link2_p = splice_end->prev->rev->prev; - carve::mesh::Edge<3>* link2_n = splice_end; - - CARVE_ASSERT(link1_p->face == fwdface); - CARVE_ASSERT(link1_n->face == revface); - - CARVE_ASSERT(link2_p->face == revface); - CARVE_ASSERT(link2_n->face == fwdface); - - carve::mesh::Edge<3>* left_loop = link1_p->next; - - CARVE_ASSERT(left_loop->rev == link1_n->prev); - - _link(link2_n->prev, link1_p->next); - _link(link1_n->prev, link2_p->next); - - _link(link1_p, link1_n); - _link(link2_p, link2_n); - - fwdface->edge = link1_p; - - size_t edgeCount = 0; - for (carve::mesh::Edge<3>* e = link1_n; e != link2_n; e = e->next) - { - CARVE_ASSERT(e->face == revface); - e->face = fwdface; - fwdface->n_edges++; - ++edgeCount; - if( edgeCount > geomSettings->m_maxNumFaceEdges ) - { - std::logic_error ex("edgeCount > m_maxNumFaceEdges"); - throw std::exception(ex); - return nullptr; - } - } - edgeCount = 0; - for (carve::mesh::Edge<3>* e = link2_n; e != link1_n; e = e->next) - { - CARVE_ASSERT(e->face == fwdface); - ++edgeCount; - if( edgeCount > geomSettings->m_maxNumFaceEdges ) - { - std::logic_error ex("edgeCount > m_maxNumFaceEdges"); - throw std::exception(ex); - return nullptr; - } - } - - fwdface->n_edges -= n_removed; - - revface->n_edges = 0; - revface->edge = nullptr; - - _setloopface(left_loop, nullptr); - _setloopface(left_loop->rev, nullptr); - -#ifdef _DEBUG - GeomDebugDump::clearBuffer(); -#endif - - return left_loop; -} - -static size_t findAndMergeCoplanarFaces( carve::mesh::Face<3>* faceIn, std::set*>& setAllFaces, shared_ptr coplanar, shared_ptr& geomSettings, bool dumpFaces, double CARVE_EPSILON) -{ - double faceArea = MeshUtils::computeFaceArea(faceIn); - if( std::abs(faceArea) < CARVE_EPSILON*10 ) - { - return 0; - } - - carve::mesh::Edge<3>* edge = faceIn->edge; - vec3& facePosition_carve = edge->v2()->v; - - const carve::geom::plane<3>& plane = faceIn->plane; - const vec3& faceNormal_carve = faceIn->plane.N; - glm::dvec3 faceNormal(faceNormal_carve.x, faceNormal_carve.y, faceNormal_carve.z); - glm::dvec3 facePosition(facePosition_carve.x, facePosition_carve.y, facePosition_carve.z); - - std::set > setAdjacentCoplanarFaces; - bool recursive = true; - - getAdjacentCoplanarFaces(plane, faceIn, setAdjacentCoplanarFaces, geomSettings, recursive); - - size_t numChanges = 0; - size_t numFacesDeleted = 0; - size_t numFacesInSetAllFaces = setAllFaces.size(); - -#ifdef _DEBUG - if( dumpFaces ) - { - GeomDebugDump::moveOffset(0.4); - glm::vec4 color2(0.3, 0.2, 0.2, 0.8); - dumpAdjacentFaces(setAdjacentCoplanarFaces, color2); - } -#endif - - std::set* > setMeshesToFix; - coplanar->m_face = faceIn; - for( auto it1 = setAdjacentCoplanarFaces.begin(); it1 != setAdjacentCoplanarFaces.end(); ++it1 ) - { - shared_ptr facePair = *it1; - carve::mesh::Face<3>* faceOnRverseEdge = facePair->faceOnReverseEdge; - carve::mesh::Face<3>* faceOnEdge = facePair->faceOnEdge; - if( faceOnEdge == nullptr ) - { - continue; - } - - if( faceOnRverseEdge == nullptr ) - { - continue; - } - - if( facePair->edge == nullptr ) - { - continue; - } - - if( faceOnEdge == faceOnRverseEdge ) - { - // remaining edge between inner opening of face and outer boundary. Leave it for triangulation - //continue; - } - size_t numFacesBeforeMerge = faceOnRverseEdge->mesh->faces.size(); - -#ifdef _DEBUG - if( faceNormal.x < -0.9 ) - { - int wait = 0; - //dumpFaces = true; - } - if( faceNormal.y < 0.1 ) - { - int wait = 0; - } - - if( !facePair->edge ) - { - std::cout << "facePair->edge == nullptr" << std::endl; - } - - if( !facePair->edge->vert ) - { - std::cout << "facePair->edge->vert == nullptr" << std::endl; - } - - if( !facePair->edge->rev ) - { - std::cout << "facePair->edge->rev == nullptr" << std::endl; - } - - bool check1 = facePair->edge->face == faceOnRverseEdge; - bool check2 = facePair->edge->rev->face == faceOnEdge; - - if( dumpFaces ) - { - std::vector* > vecFaces = {faceOnRverseEdge, faceOnEdge}; - glm::vec4 color2(0.7, 0.2, 0.2, 0.8); - GeomDebugDump::dumpFaces(vecFaces, color2, false); - } -#endif - - carve::mesh::Edge<3>* edgeErase = facePair->edge; - size_t numEdgesFace = countEdges(faceOnEdge); - size_t numEdgesFaceReverse = countEdges(faceOnRverseEdge); - - if( numEdgesFace >= geomSettings->m_maxNumFaceEdges ) - { - std::logic_error ex("edgeCount > m_maxNumFaceEdges"); - throw std::exception(ex); - } - if( numEdgesFaceReverse >= geomSettings->m_maxNumFaceEdges ) - { - std::logic_error ex("edgeCount > m_maxNumFaceEdges"); - throw std::exception(ex); - } - -#ifdef _DEBUG - if( dumpFaces ) - { - GeomDebugDump::moveOffset(0.05); - glm::vec4 color2(0.3, 0.2, 0.2, 0.8); - std::vector > vecEdgePoints = {edgeErase->v1()->v, edgeErase->v2()->v}; - GeomDebugDump::dumpPolyline( vecEdgePoints, color2, false); - } -#endif - - MeshSetInfo info2; - bool checkForDegenerateEdges = true; - bool valid2 = MeshUtils::checkFaceIntegrity(edgeErase->face, checkForDegenerateEdges, info2); - - MeshSetInfo info3; - bool valid3 = MeshUtils::checkFaceIntegrity(edgeErase->rev->face, checkForDegenerateEdges, info3); - - if( !valid2 ) - { - continue; - } - if( !valid3 ) - { - continue; - } - - std::set* > adjacentFaces; - getAdjacentFaces(faceOnEdge, adjacentFaces); - - carve::mesh::Edge<3>* edgeMergeNext = MeshOps::checkMergeFaces(edgeErase, geomSettings, dumpFaces); - - if( !edgeMergeNext ) - { - continue; - } - - carve::mesh::Face<3>* faceRemain = nullptr; - carve::mesh::Face<3>* faceRemove = nullptr; - - if( faceOnRverseEdge->edge ) - { - faceRemain = faceOnRverseEdge; - size_t numEdgesFaceRemove_afterMerge = countEdges(faceOnRverseEdge); - if( numEdgesFaceRemove_afterMerge > geomSettings->m_maxNumFaceEdges ) - { - std::logic_error ex("faceOnRverseEdge->edge count > maxNumFaceEdges"); - throw std::exception(ex); - continue; - } - if( numEdgesFaceReverse != numEdgesFaceRemove_afterMerge ) - { - ++numChanges; - } - } - else - { - faceRemove = faceOnRverseEdge; - } - - if( faceOnEdge->edge ) - { - faceRemain = faceOnEdge; - size_t numEdgesFaceRemain_afterMerge = countEdges(faceOnEdge); - if( numEdgesFaceRemain_afterMerge > geomSettings->m_maxNumFaceEdges ) - { - std::logic_error ex("faceOnEdge->edge count > maxNumFaceEdges"); - throw std::exception(ex); - continue; - } - if( numEdgesFace != numEdgesFaceRemain_afterMerge ) - { - ++numChanges; - } - } - else - { - faceRemove = faceOnEdge; - } - -#ifdef _DEBUG - if( dumpFaces ) - { - GeomDebugDump::moveOffset(0.05); - glm::vec4 color2(0.3, 0.2, 0.2, 0.8); - GeomDebugDump::dumpFacePolygon({ faceRemain }, color2, false); - } -#endif - - // replace pointers to faceRemove - for( auto it2 = setAdjacentCoplanarFaces.begin(); it2 != setAdjacentCoplanarFaces.end(); ++it2 ) - { - shared_ptr facePair2 = *it2; - if( facePair == facePair2 ) - { - continue; - } - if( facePair2->faceOnEdge == faceRemove ) - { - facePair2->faceOnEdge = faceRemain; - } - if( facePair2->faceOnReverseEdge == faceRemove ) - { - facePair2->faceOnReverseEdge = faceRemain; - } - } - - auto itFindFace = setAllFaces.find(faceRemove); - if( itFindFace != setAllFaces.end() ) - { - setAllFaces.erase(itFindFace); - } - else - { -#ifdef _DEBUG - std::cout << "faceOnEdge not found in setAllFaces" << std::endl; -#endif - } - - size_t numPointersToFaceDelete = replaceFacePointer(faceRemove, faceRemain, adjacentFaces); - if( numPointersToFaceDelete > 0) - { - std::cout << "numPointersToFaceDelete > 0" << std::endl; - } - numChanges += removeFaceFromMesh(faceRemove); - delete faceRemove; - ++numFacesDeleted; - - facePair->faceOnReverseEdge = nullptr; - facePair->faceOnEdge = nullptr; - facePair->edge = nullptr; - facePair->edgeDeleted = true; - - if( !faceRemain ) - { - continue; - } - - auto mesh = faceRemain->mesh; - try - { - faceRemain->edge->validateLoop(); - } - catch( carve::exception& e ) - { - std::cout << "validateLoop failed: " << e.str(); - } - - MeshUtils::checkFaceLoops(mesh); - - mesh->cacheEdges(); - mesh->recalc(CARVE_EPSILON); - setMeshesToFix.insert(mesh); - - ++numChanges; - - // TODO: enforceMergedFacesToCommonPlane() : compute normal vector and centroid of merged face, then move all vertices precisely into that plane - - std::vector* > faceVertices; - faceRemain->getVertices(faceVertices); - if( faceVertices.size() > 3 ) - { - carve::geom::vector<3> normalVector = GeomUtils::computePolygonNormal(faceVertices); - carve::geom::vector<3> centroid = faceRemain->centroid(); - GeomUtils::Plane plane( glm::dvec3(centroid.x, centroid.y, centroid.z), glm::dvec3(normalVector.x, normalVector.y, normalVector.z) ); - bool allVerticesInPlane = true; - for( carve::mesh::Face<3>::vertex_t * vertex : faceVertices ) - { - const carve::geom::vector<3>& facePoint_carve = vertex->v; - glm::dvec3 facePoint(facePoint_carve.x, facePoint_carve.y, facePoint_carve.z); - - double distanceToPlane = plane.distancePointPlane(facePoint); - - if( std::abs(distanceToPlane) > geomSettings->getEpsilonCoplanarDistance() )// m_epsCoplanarDistance ) - { - vec3 pointOnPlane = facePoint_carve + normalVector * distanceToPlane; - -#ifdef _DEBUG - glm::dvec3 pointOnPlane_glm(pointOnPlane.x, pointOnPlane.y, pointOnPlane.z); - double distanceToPlaneCheck = plane.distancePointPlane(pointOnPlane_glm); - - if( std::abs(distanceToPlaneCheck) > geomSettings->getEpsilonCoplanarDistance() )// m_epsCoplanarDistance ) - { - std::cout << "distanceToPlaneCheck too big" << std::endl; - - } -#endif - vertex->v = pointOnPlane; - - } - } - - if( allVerticesInPlane ) - { - return true; - } - } - - - -#ifdef _DEBUG - size_t numFacesAfterMerge = mesh->faces.size(); - int numFacesMerged = numFacesBeforeMerge - numFacesAfterMerge; - - MeshSetInfo info6; - bool mesh_correct6 = MeshUtils::checkMeshPointers(mesh, checkForDegenerateEdges, info6); - if( !mesh_correct6 ) - { -#ifdef _DEBUG - glm::vec4 color(0.2, 0.2, 0.2, 1.); - GeomDebugDump::stopBuffering(); - GeomDebugDump::moveOffset(0.3); - GeomDebugDump::dumpMesh(mesh, color, true); -#endif - - bool mesh_correct6 = MeshUtils::checkMeshPointers(mesh, checkForDegenerateEdges, info6); - if( !mesh_correct6 ) - { - info6.allPointersValid = false; - } - //std::cout << "!mesh_correct\n"; - } -#endif - } - - size_t numFacesInSetAllFaces1 = setAllFaces.size(); - if( numFacesDeleted != numFacesInSetAllFaces - numFacesInSetAllFaces1) - { - std::cout << "numFacesDeleted != numFacesInSetAllFaces - numFacesInSetAllFaces1" << std::endl; - } - - return numChanges; -} - -static size_t mergeCoplanarFacesInMeshSet( shared_ptr >& meshset, shared_ptr& geomSettings, bool shouldBeClosedManifold, bool dumpFaces, double CARVE_EPSILON) -{ - shared_ptr > meshset_copy(meshset->clone()); - - std::set* > setFacesBegin; - MeshUtils::getFacesInMeshSet(meshset, setFacesBegin); - size_t numFacesAll = setFacesBegin.size(); - size_t numChanges = 0; - - size_t maxNumFacesToMerge = 600; - if( numFacesAll > maxNumFacesToMerge ) - { - numFacesAll = maxNumFacesToMerge; -#ifdef _DEBUG - //std::cout << "TODO: optimize for numFacesAll > 500\n"; -#endif - } - - std::set* > setMasterFaces; // remaining faces - for( size_t ii = 0; ii < numFacesAll; ++ii ) - { - std::set* > setFaces; - MeshUtils::getFacesInMeshSet(meshset, setFaces); - if( setFaces.size() == setMasterFaces.size() ) - { - break; - } - - size_t numChangesCurrentLoop = 0; - size_t jj = 0; - for( auto it = setFaces.begin(); it != setFaces.end(); ++it ) - { - carve::mesh::Face<3>* face = *it; - if( !face ) - { - continue; - } - - if( jj > maxNumFacesToMerge ) - { - break; - } - ++jj; - - auto itFindInMaster = setMasterFaces.find(face); - if( itFindInMaster != setMasterFaces.end() ) - { - continue; - } - - carve::mesh::Edge<3>* edge = face->edge; - if( !edge ) - { - continue; - } - - double faceArea = MeshUtils::computeFaceArea(face); - if( std::abs(faceArea) < CARVE_EPSILON*10 ) - { - continue; - } - - vec3& facePosition_carve = edge->v2()->v; - - const vec3& faceNormal_carve = face->plane.N; - glm::dvec3 faceNormal(faceNormal_carve.x, faceNormal_carve.y, faceNormal_carve.z); - glm::dvec3 facePosition(facePosition_carve.x, facePosition_carve.y, facePosition_carve.z); - shared_ptr coplanar(new CoplanarFaceContainer()); - coplanar->m_pointProjector.m_plane.setNormal(faceNormal); - coplanar->m_pointProjector.m_plane.setPlane(facePosition, faceNormal); - - size_t numFaces = setFaces.size(); - size_t numChangesMergedFaces = findAndMergeCoplanarFaces(face, setFaces, coplanar, geomSettings, dumpFaces, CARVE_EPSILON); - numChanges += numChangesMergedFaces; - numChangesCurrentLoop += numChangesMergedFaces; - - setMasterFaces.insert(face); - } - } - - MeshUtils::fixMeshset(meshset.get(), CARVE_EPSILON, shouldBeClosedManifold, dumpFaces); - - for( auto mesh : meshset->meshes ) - { - mesh->cacheEdges(); - mesh->recalc(CARVE_EPSILON); - } - - MeshSetInfo infoResult; - bool validMeshsetResult = MeshUtils::checkMeshSetValidAndClosed(meshset, infoResult, CARVE_EPSILON); - - if( !validMeshsetResult ) - { - meshset = meshset_copy; - numChanges = 0; - } - - return numChanges; -} - -static void getPointerToEdge(carve::mesh::Mesh<3>* mesh, carve::mesh::Edge<3>* edgeFind, std::set* >& setEdges, std::set* >& setFaces) -{ - size_t numEdges = 0; - for( carve::mesh::Face<3>* face : mesh->faces ) - { - if( !face ) - { - continue; - } - - carve::mesh::Edge<3>* edge = face->edge; - if( edge == edgeFind ) - { - setFaces.insert(face); - } - - size_t numEdgesCurrentFace = face->n_edges; - for( size_t ii = 0; ii < numEdgesCurrentFace; ++ii ) - { - if( !edge ) - { - continue; - } - if( edge->next == edgeFind ) - { - setEdges.insert(edge); - } - if( edge->prev == edgeFind ) - { - setEdges.insert(edge); - } - if( edge->rev == edgeFind ) - { - setEdges.insert(edge); - } - edge = edge->next; - } - } -} - -static void getEdgesOnVertex(carve::mesh::Mesh<3>* mesh, carve::mesh::Vertex<3>* vertex, std::set* >& setEdges) -{ - size_t numEdges = 0; - for( carve::mesh::Face<3>* face : mesh->faces ) - { - if( !face ) - { - continue; - } - - carve::mesh::Edge<3>* edge = face->edge; - size_t numEdgesCurrentFace = face->n_edges; - for( size_t ii = 0; ii < numEdgesCurrentFace; ++ii ) - { - if( !edge ) - { - continue; - } - if( edge->vert == vertex ) - { - setEdges.insert(edge); - } - edge = edge->next; - } - } -} - -static size_t removePointerToVertex(carve::mesh::Mesh<3>* mesh, carve::mesh::Vertex<3>* vertRemove, carve::mesh::Vertex<3>* vertReplace) -{ - size_t numChanges = 0; - for( carve::mesh::Face<3>* face : mesh->faces ) - { - if( !face ) - { - continue; - } - - carve::mesh::Edge<3>* edge = face->edge; - size_t numEdgesCurrentFace = face->n_edges; - for( size_t ii = 0; ii < numEdgesCurrentFace; ++ii ) - { - if( !edge ) - { - continue; - } - if( edge->vert == vertRemove ) - { - edge->vert = vertReplace; - ++numChanges; - } - edge = edge->next; - } - } - return numChanges; -} - -static size_t mergeAlignedEdges(shared_ptr >& meshset, double epsAlignmentAngle, bool dumpFaces, double CARVE_EPSILON) -{ -#ifdef _DEBUG - if( dumpFaces ) - { - GeomDebugDump::moveOffset(0.3); - } -#endif - - size_t numEdgesRemoved = 0; - for( carve::mesh::Mesh<3>* mesh : meshset->meshes ) - { - for( carve::mesh::Face<3>*face : mesh->faces ) - { - if( !face ) - { - continue; - } - - if( !face->edge ) - { - continue; - } - - bool faceDumped = false; - carve::mesh::Edge<3>* edge = face->edge; - - // check how many edges are connected to end of edge - size_t numEdges = face->n_edges; - for( size_t ii = 0; ii < numEdges; ++ii ) - { - if( !edge ) - { - continue; - } - if( edge->next ) - { - if( edge->next->rev ) - { - if( edge->next->rev->next ) - { - if( edge->next->rev->next->rev == edge ) - { - // only one edge is connected, now check angle - - // edge->rev->next edge->rev edge->next->rev edge->next->next->rev - // <--------------------p1<------------------p2<-------------------------p3<----------------------- - // -------------------> ------------------> -----------------------> ----------------------> - // edge->prev edge edge->next edge->next->next - - carve::mesh::Vertex<3>* vertex1 = edge->v1(); - carve::mesh::Vertex<3>* vertex2 = edge->v2(); - carve::mesh::Vertex<3>* vertex3 = edge->next->v2(); - - std::set* > setEdges; - getEdgesOnVertex(mesh, vertex2, setEdges); - size_t numEdgesOnVertex = setEdges.size(); - - const carve::geom::vector<3>& p1 = vertex1->v; - const carve::geom::vector<3>& p2 = vertex2->v; - const carve::geom::vector<3>& p3 = vertex3->v; - - carve::geom::vector<3> edgeVector = p2 - p1; - carve::geom::vector<3> edgeNextVector = p3 - p2; - edgeVector.normalize(); - edgeNextVector.normalize(); - -#ifdef _DEBUG - glm::vec4 color1(0.4, 0.45, 0.45, 1.); - if( dumpFaces ) - { - for( auto edgeOnVertex : setEdges ) - { - const carve::geom::vector<3>& p1 = edgeOnVertex->v1()->v; - const carve::geom::vector<3>& p2 = edgeOnVertex->v2()->v; - std::vector > vecLine = { p1, p2 }; - GeomDebugDump::dumpPolyline(vecLine, color1, false); - } - } - - if( face->plane.N.x > 0.9 ) - { - int wait = 0; - } -#endif - - double dotProduct = dot(edgeVector, edgeNextVector); - if( std::abs(dotProduct - 1.0) < epsAlignmentAngle*1000 ) - { - carve::mesh::Edge<3>* edgeRemove = edge;// ->next; - -#ifdef _DEBUG - if( dumpFaces ) - { - std::vector* > vecAdjacentFaces = { edge->face, edge->rev->face, edgeRemove->face, edgeRemove->rev->face, edge->prev->face, edge->prev->rev->face }; - GeomDebugDump::moveOffset(0.05); - GeomDebugDump::dumpFaces(vecAdjacentFaces, color1, false); - GeomDebugDump::dumpFacePolygons(vecAdjacentFaces, color1, false); - } -#endif - - std::set* > setEdgePointersToRemovedEdge; - std::set* > setFacePointersToRemovedEdge; - getPointerToEdge(mesh, edgeRemove, setEdgePointersToRemovedEdge, setFacePointersToRemovedEdge); - size_t numVertexChanges = removePointerToVertex(mesh, vertex2, vertex1); - edge = edgeRemove->removeEdge(); // returns ->next - carve::geom::vector<3> distanceV1 = edge->v1()->v - p1; - carve::geom::vector<3> distanceV3 = edge->v2()->v - p3; - - double epsMinFaceArea = CARVE_EPSILON * 0.001; - MeshUtils::removeZeroAreaFacesInMesh(mesh, epsMinFaceArea, CARVE_EPSILON); - - ++numEdgesRemoved; - mesh->cacheEdges(); - mesh->recalc(CARVE_EPSILON); - - // edge->rev->next edge->rev edge->next->rev - // <--------------------v1<---------------------------------------------v2<------------------------ - // -------------------> --------------------------------------------> ----------------------> - // edge->prev edge edge->next - -#ifdef _DEBUG - if( dumpFaces ) - { - glm::vec4 color(0.4, 0.45, 0.45, 1.); - - std::set* > setEdges1; - getEdgesOnVertex(mesh, vertex1, setEdges1); - - std::set* > setEdges2; - getEdgesOnVertex(mesh, vertex2, setEdges2); - - std::set* > setEdges3; - getEdgesOnVertex(mesh, vertex3, setEdges3); - - - for( auto edgeOnVertex : setEdges1 ) - { - const carve::geom::vector<3>& p1 = edgeOnVertex->v1()->v; - const carve::geom::vector<3>& p2 = edgeOnVertex->v2()->v; - std::vector > vecLine = { p1, p2 }; - GeomDebugDump::dumpPolyline(vecLine, color1, false); - } - - - for( auto edgeOnVertex : setEdges2 ) - { - const carve::geom::vector<3>& p1 = edgeOnVertex->v1()->v; - const carve::geom::vector<3>& p2 = edgeOnVertex->v2()->v; - std::vector > vecLine = { p1, p2 }; - GeomDebugDump::dumpPolyline(vecLine, color1, false); - } - - for( auto edgeOnVertex : setEdges3 ) - { - const carve::geom::vector<3>& p1 = edgeOnVertex->v1()->v; - const carve::geom::vector<3>& p2 = edgeOnVertex->v2()->v; - std::vector > vecLine = { p1, p2 }; - GeomDebugDump::dumpPolyline(vecLine, color1, false); - } - - GeomDebugDump::moveOffset(0.4); - GeomDebugDump::dumpFacePolygons(mesh->faces, color1, false); - - GeomDebugDump::moveOffset(0.05); - std::vector > edgePolygon = { p1,p2,p3 }; - GeomDebugDump::dumpPolyline(edgePolygon, color, false); - - std::vector > edgePolygon2 = { edge->v1()->v, edge->v2()->v }; - GeomDebugDump::moveOffset(0.001); - GeomDebugDump::dumpPolyline(edgePolygon2, color, false); - } - - MeshSetInfo infoMergedFaces; - bool validMeshsetMergedFaces= MeshUtils::checkMeshSetValidAndClosed(meshset, infoMergedFaces, CARVE_EPSILON); - - if( dumpFaces ) - { - GeomDebugDump::moveOffset(0.3); - DumpSettingsStruct dumpColorSettings; - bool checkZeroAreaFaces = true; - dumpWithLabel("mesh-merged-faces", meshset, dumpColorSettings, checkZeroAreaFaces, true, true); - } - - double dx = edgeVector.x - edgeNextVector.x; - double dy = edgeVector.y - edgeNextVector.y; - double dz = edgeVector.z - edgeNextVector.z; - if( std::abs(dx) > EPS_M8 ) - { - std::cout << "align check" << std::endl; - } - if( std::abs(dy) > EPS_M8 ) - { - std::cout << "align check" << std::endl; - } - if( std::abs(dz) > EPS_M8 ) - { - std::cout << "align check" << std::endl; - } -#endif - - continue; - } - } - } - } - edge = edge->next; - } - } -#ifdef _DEBUG - if( dumpFaces ) - { - GeomDebugDump::moveOffset(0.002); - glm::vec4 color(0.4, 0.45, 0.45, 1.); - GeomDebugDump::dumpFacePolygon(face, color, false); - } -#endif - - } - } - - if( numEdgesRemoved > 0 ) - { -#ifdef _DEBUG - if( dumpFaces ) - { - GeomDebugDump::moveOffset(0.2); - } -#endif - - for( auto mesh : meshset->meshes ) - { - mesh->cacheEdges(); - mesh->recalc(CARVE_EPSILON); - -#ifdef _DEBUG - if( dumpFaces ) - { - for( carve::mesh::Face<3>*face : mesh->faces ) - { - glm::vec4 color(0.4, 0.45, 0.45, 1.); - GeomDebugDump::dumpFacePolygon(face, color, false); - } - } -#endif - } - } - - return numEdgesRemoved; -} - -/// \brief simplifyMeshSet merge coplanar faces and re-triangulate each set of merged faces -/// \param meshset Carve meshset -/// \param report_callback callback function for errors, warnings, notifications, progress -/// \param entity IFC entity that is currently being processed -/// \param ignoreOpenEdgesInResult If true, the result is kept even with open edges (good for visualization). If false, the result will be the input mesh in case open edges occur after triangulation (good for further boolean operations) -static void simplifyMeshSet( shared_ptr >& meshset, shared_ptr& geomSettings, StatusCallback* report_callback, BuildingEntity* entity, - bool triangulateResult, bool shouldBeClosedManifold, bool dumpPolygon, double CARVE_EPSILON) -{ - if( !meshset ) - { - return; - } - double epsCoplanarDistance = geomSettings->getEpsilonCoplanarDistance();// m_epsCoplanarDistance; - double epsCoplanarAngle = geomSettings->getEpsilonCoplanarAngle();// m_epsCoplanarAngle; - double epsMinFaceArea = geomSettings->getEpsilonCoplanarDistance() * 0.01;// m_epsCoplanarDistance * 0.001; - MeshSetInfo infoInput(report_callback, entity); - bool validMeshsetInput = MeshUtils::checkMeshSetValidAndClosed(meshset, infoInput, CARVE_EPSILON); - - if( meshset->vertex_storage.size() < 9 && infoInput.numOpenEdges == 0 ) - { - return; - } - - if( !validMeshsetInput ) - { - MeshUtils::resolveOpenEdges(meshset, epsCoplanarDistance, dumpPolygon); - validMeshsetInput = MeshUtils::checkMeshSetValidAndClosed(meshset, infoInput, CARVE_EPSILON); - -#ifdef _DEBUG - if(dumpPolygon) - { - GeomDebugDump::moveOffset(0.2); - DumpSettingsStruct dumpColorSettings; - bool checkZeroAreaFaces = false; - dumpWithLabel("simplify--open-edges-resolve", meshset, dumpColorSettings, checkZeroAreaFaces, true, true); - } -#endif - } - -#ifdef _DEBUG - DumpSettingsStruct dumpColorSettings; - bool checkZeroAreaFaces = false; - if( dumpPolygon ) - { - dumpWithLabel("simplify--input", meshset, dumpColorSettings, checkZeroAreaFaces, true, true); - } - - if( dumpPolygon ) - { - GeomDebugDump::moveOffset(0.2); - - glm::vec4 color1(0.7, 0.7, 0.7, 0.88); - std::string labelStr = "simplify--merged-faces"; - GeomDebugDump::dumpVertex( GeomDebugDump::labelPos, color1, labelStr); - GeomDebugDump::dumpCountLabel(GeomDebugDump::countLabelPos); - } - - if( GeomDebugDump::dumpCount >= 16 ) - { - int wait = 0; - } - GeomDebugDump::ScopedDumpBuffering scopedBuffer; -#endif - - bool meshShouldBeTriangulated = false; - if( meshShouldBeTriangulated ) - { - bool meshTriangulated = checkMeshsetTriangulated(meshset); - if( !meshTriangulated ) - { - shared_ptr > meshset_copy(meshset->clone()); - retriangulateMeshSetSimple(meshset, false, epsCoplanarDistance, 0); - meshTriangulated = checkMeshsetTriangulated(meshset); - if( !meshTriangulated ) - { -#ifdef _DEBUG - retriangulateMeshSetSimple(meshset, false, epsCoplanarDistance, 1); - meshTriangulated = checkMeshsetTriangulated(meshset); - - GeomDebugDump::moveOffset(0.2); - for( auto mesh : meshset->meshes ) - { - glm::vec4 color1(0.7, 0.7, 0.7, 0.88); - - for( auto face : mesh->faces ) - { - if( face->n_edges != 3 ) - { - GeomDebugDump::dumpFacePolygon(face, color1, false); - } - } - - //GeomDebugDump::dumpFacePolygons(mesh->faces, color1, true); - } - std::cout << "assuming triangulated meshes" << std::endl; -#endif - //return; - } - - bool validMeshsetTriangulated = MeshUtils::checkMeshSetValidAndClosed(meshset, infoInput, CARVE_EPSILON); - if( !validMeshsetTriangulated ) - { -#ifdef _DEBUG - dumpWithLabel("simplify--input", meshset_copy, dumpColorSettings, checkZeroAreaFaces, true, true); - GeomDebugDump::moveOffset(0.2); - dumpWithLabel("simplify--triangulated", meshset, dumpColorSettings, checkZeroAreaFaces, true, true); -#endif - meshset = meshset_copy; - } - } - } - - shared_ptr > meshset_copy(meshset->clone()); - dumpPolygon = false; - - try - { - MeshUtils::removeZeroAreaFacesInMeshSet(meshset, epsMinFaceArea, CARVE_EPSILON); - size_t numChanges = mergeCoplanarFacesInMeshSet(meshset, geomSettings, shouldBeClosedManifold, dumpPolygon, CARVE_EPSILON); - MeshUtils::recalcMeshSet(meshset, CARVE_EPSILON); - - // TODO: find faces with biggest area, and trim all points to plane - - MeshSetInfo infoMergedFaces(report_callback, entity); - bool validMeshsetMergedFaces = MeshUtils::checkMeshSetValidAndClosed(meshset, infoMergedFaces, CARVE_EPSILON); - -#ifdef _DEBUG - - if( dumpPolygon )//|| numChanges > 0 ) - { - GeomDebugDump::moveOffset(0.3); - shared_ptr > meshset_dump = shared_ptr >(meshset->clone()); - dumpColorSettings.triangulateBeforeDump = false; - dumpWithLabel("mesh-merged-faces", meshset_dump, dumpColorSettings, checkZeroAreaFaces, true, true); - dumpColorSettings.triangulateBeforeDump = true; - - GeomDebugDump::moveOffset(0.3); - glm::vec4 color1(0.7, 0.7, 0.7, 0.88); - for( carve::mesh::Mesh<3>*mesh : meshset_dump->meshes ) - { - GeomDebugDump::dumpFacePolygons(mesh->faces, color1, false); - } - } - -#endif - - if( !validMeshsetMergedFaces ) - { - meshset = meshset_copy; - return; - } - - MeshUtils::recalcMeshSet(meshset, CARVE_EPSILON); - - shared_ptr > meshset_next = shared_ptr >(meshset->clone()); - - // run the check again with the new - validMeshsetMergedFaces = MeshUtils::checkMeshSetValidAndClosed(meshset_next, infoMergedFaces, CARVE_EPSILON); - - if( !validMeshsetMergedFaces ) - { - meshset = meshset_copy; - return; - } - - meshset_copy = meshset_next; - - size_t numEdgesRemoved = mergeAlignedEdges(meshset, epsCoplanarAngle, false, CARVE_EPSILON); - if( numEdgesRemoved > 0 ) - { - MeshSetInfo infoMergedAlignedEdges( report_callback, entity ); - bool validMergedAlignedEdges = MeshUtils::checkMeshSetValidAndClosed(meshset, infoMergedAlignedEdges, CARVE_EPSILON); - -#ifdef _DEBUG - if( dumpPolygon ) - { - GeomDebugDump::moveOffset(0.3); - dumpWithLabel("mesh-merged-aligned-edges", meshset, dumpColorSettings, checkZeroAreaFaces, true, true); - - GeomDebugDump::moveOffset(0.3); - glm::vec4 color1(0.7, 0.7, 0.7, 0.88); - for( carve::mesh::Mesh<3>*mesh : meshset->meshes ) - { - GeomDebugDump::dumpFacePolygons(mesh->faces, color1, false); - } - - GeomDebugDump::moveOffset(0.3); - } -#endif - if( validMergedAlignedEdges ) - { - if( triangulateResult ) - { - retriangulateMeshSetSimple(meshset, false, epsCoplanarDistance, 0); - MeshSetInfo infoTriangulated( report_callback, entity ); - bool validTriangulated = MeshUtils::checkMeshSetValidAndClosed(meshset, infoTriangulated, CARVE_EPSILON); - if( !validTriangulated ) - { - meshset = meshset_copy; - return; - } - } -#ifdef _DEBUG - GeomDebugDump::clearBuffer(); -#endif - return; - } - } - -#ifdef _DEBUG - GeomDebugDump::clearBuffer(); -#endif - return; - } - catch(std::exception& ex) - { -#ifdef _DEBUG - std::cout << ex.what() << std::endl; -#endif - } - catch( carve::exception& ex ) - { - std::cout << ex.str() << std::endl; - } - catch( ... ) - { - - } - - meshset = meshset_copy; -} -static void simplifyMeshSet(std::vector> >& meshsets, shared_ptr& geomSettings, StatusCallback* report_callback, - BuildingEntity* entity, bool triangulateResult, bool shouldBeClosedManifold, bool dumpPolygon, double CARVE_EPSILON) -{ - for( shared_ptr >&meshset : meshsets ) - { - simplifyMeshSet(meshset, geomSettings, report_callback, entity, triangulateResult, shouldBeClosedManifold, dumpPolygon, CARVE_EPSILON); - } -} + static std::shared_ptr > createPlaneMesh(vec3& p0, vec3& p1, vec3& p2, double CARVE_EPSILON); + static std::shared_ptr > createPlaneMesh(vec3& p0, vec3& p1, vec3& p2, vec3& p3, double CARVE_EPSILON); + static std::shared_ptr > createBoxMesh(vec3& pos, vec3& extent, carve::math::Matrix& transform, double CARVE_EPSILON); + static void boundingBox2Mesh(carve::geom::aabb<3>& bbox, shared_ptr >& meshset, double CARVE_EPSILON); }; diff --git a/IfcPlusPlus/src/ifcpp/geometry/MeshOpsDebug.h b/IfcPlusPlus/src/ifcpp/geometry/MeshOpsDebug.h index dde0597a3..53b1fc162 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/MeshOpsDebug.h +++ b/IfcPlusPlus/src/ifcpp/geometry/MeshOpsDebug.h @@ -16,9 +16,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU */ #pragma once -#include "MeshUtils.h" #ifdef _DEBUG +#include "MeshOps.h" static size_t numM6 = 0; static size_t dumpFaceCount = 0; static int mergedFacesDumpCount = 0; @@ -31,10 +31,12 @@ struct DumpSettingsStruct } glm::vec4 colorLabel = glm::vec4(0.3, 0.33, 0.33, 1.); - glm::vec4 colorMesh = glm::vec4(0.4, 0.5, 0.4, 0.4); + glm::vec4 colorMesh = glm::vec4(0.4, 0.5, 0.7, 0.4); glm::vec4 colorOpenEdges = glm::vec4(0.99, 0.2, 0.2, 0.4); glm::vec4 colorValidMesh = glm::vec4(0.3, 0.8, 0.3, 0.4); bool triangulateBeforeDump = true; + CarveMeshNormalizer* normalizer = nullptr; + double eps = 1.0; }; static void getFaceIndexes(const carve::mesh::Face<3>* face, const std::vector >& vec_vertices, std::vector& result) @@ -124,12 +126,6 @@ static bool GetPolygonNormalAndArea( const std::vector& polygon, glm return true; } -static int debug_poly_dump_count = 0; -namespace MeshOps -{ - static void retriangulateMeshSetSimple(shared_ptr >& meshset, bool ignoreResultOpenEdges, double eps, size_t retryCount); -}; - inline void dumpMeshset(const shared_ptr >& meshset, const glm::vec4& color, bool move_offset = true) { if( meshset->meshes.size() == 0 ) @@ -137,9 +133,13 @@ inline void dumpMeshset(const shared_ptr >& meshset, con return; } - bool checkForDegenerateEdges = false; + bool allowDegenerateEdges = true; MeshSetInfo info; - MeshUtils::checkMeshSetPointers(meshset, checkForDegenerateEdges, info); + double eps = EPS_M8; + double epsCoplanarAngle = eps * 0.1; + double epsMinFaceArea = eps; + GeomProcessingParams params(eps, epsCoplanarAngle, epsMinFaceArea, false); + MeshOps::checkMeshSetPointers(meshset, allowDegenerateEdges, params, info); if( !info.allPointersValid ) { return; @@ -147,8 +147,8 @@ inline void dumpMeshset(const shared_ptr >& meshset, con vec3 offset = carve::geom::VECTOR(0, GeomDebugDump::dump_y_pos_geom, 0); shared_ptr > meshset_copy(meshset->clone()); - double eps = EPS_M8; - MeshOps::retriangulateMeshSetSimple(meshset_copy, true, eps, 0); + + MeshOps::retriangulateMeshSetSimple(meshset_copy, true, params, 0); GeomDebugDump::dumpMeshset(meshset_copy.get(), offset, color); if( move_offset ) @@ -157,40 +157,51 @@ inline void dumpMeshset(const shared_ptr >& meshset, con } } -static void dumpWithLabel(std::string labelStr, shared_ptr >& meshset, const DumpSettingsStruct& colorSettings, bool checkZeroAreaFaces, bool moveOffsetBefore, bool moveOffsetAfter) +static void dumpWithLabel(std::string labelStr, shared_ptr >& meshset, const DumpSettingsStruct& colorSettings, GeomProcessingParams& params, + bool checkZeroAreaFaces, bool moveOffsetBefore, bool moveOffsetAfter) { if( !meshset ) { return; } + + shared_ptr > meshset_copy( meshset ); + { + meshset_copy = shared_ptr > (meshset->clone()); + + if (colorSettings.normalizer != nullptr) + { + CarveMeshNormalizer normalizerCopy(colorSettings.normalizer); + normalizerCopy.m_normalizeCoordsInsteadOfEpsilon = true; + normalizerCopy.normalizeMesh(meshset_copy, "dump-mesh", colorSettings.eps); + } + + MeshOps::retriangulateMeshSetSimple(meshset_copy, true, params, 0); + } auto aabb = meshset->getAABB(); - if( !aabb.isEmpty() ) + if (!aabb.isEmpty()) { double minX = aabb.pos.x - aabb.extent.x - 0.08; double maxX = aabb.pos.x + aabb.extent.x; double minZ = aabb.pos.z - aabb.extent.z; - if( minX < GeomDebugDump::labelPos.x ) + if (minX < GeomDebugDump::labelPos.x) { GeomDebugDump::labelPos = carve::geom::VECTOR(minX, 0, minZ); GeomDebugDump::countLabelPos = carve::geom::VECTOR(maxX + 0.3, 0, minZ); } } - if( moveOffsetBefore ) + if (moveOffsetBefore) { GeomDebugDump::moveOffset(0.4); } - - shared_ptr > meshset_copy( meshset ); - if( colorSettings.triangulateBeforeDump ) - { - //meshset_copy = shared_ptr > (meshset->clone()); - //MeshOps::retriangulateMeshSetSimple(meshset_copy, true, EPS_DEFAULT, 0); - } MeshSetInfo infoMeshset; - bool meshset_ok = MeshUtils::checkMeshSetValidAndClosed(meshset, infoMeshset, EPS_DEFAULT); + //double epsMinFaceArea = EPS_DEFAULT * 0.01; + //double epsAngle = EPS_DEFAULT * 0.1; + //GeomProcessingParams params(EPS_DEFAULT, epsAngle, epsMinFaceArea, false); + bool meshset_ok = MeshOps::checkMeshSetValidAndClosed(meshset_copy, infoMeshset, params); glm::vec4 colorCurrentLabel = colorSettings.colorLabel; if( infoMeshset.meshSetValid ) @@ -200,8 +211,26 @@ static void dumpWithLabel(std::string labelStr, shared_ptrmeshes.size() > 0) + { + colorCurrentLabel = colorSettings.colorOpenEdges; + labelStr += ", valid: no, "; + if (infoMeshset.numOpenEdges > 0) + { + labelStr += std::to_string(infoMeshset.numOpenEdges) + "_open_edges"; + } + + if (infoMeshset.degenerateEdges.size() > 0) + { + labelStr += std::to_string(infoMeshset.degenerateEdges.size()) + "_degenerate_edges"; + } + + } + else + { + colorCurrentLabel = colorSettings.colorOpenEdges; + labelStr += ", 0 meshes"; + } if( infoMeshset.numOpenEdges == 4 ) { @@ -218,14 +247,48 @@ static void dumpWithLabel(std::string labelStr, shared_ptrgetAABB().extent.y; + GeomDebugDump::moveOffset(dy*2 + 0.2); moveOffset = true; } - GeomDebugDump::dumpMeshsetOpenEdges(meshset_copy, colorSettings.colorOpenEdges, checkZeroAreaFaces, moveOffset); + //GeomDebugDump::dumpMeshsetOpenEdges(meshset_copy, colorSettings.colorOpenEdges, checkZeroAreaFaces, moveOffset); + + if (infoMeshset.degenerateEdges.size() > 0) + { + for (auto e : infoMeshset.degenerateEdges) + { + GeomDebugDump::dumpEdge(e, colorSettings.colorOpenEdges, checkZeroAreaFaces, moveOffset); + } + } +} + + + +inline void dumpOperands(shared_ptr >& op1, shared_ptr >& op2, shared_ptr >& result, + int tag, bool& op1_dumped, bool& op2_dumped, DumpSettingsStruct& dumpColorSettings, GeomProcessingParams& params) +{ + bool checkZeroAreaFaces = false; + GeomDebugDump::moveOffset(0.2); + GeomDebugDump::dumpLocalCoordinateSystem(); + + if (!op1_dumped) + { + op1_dumped = true; + dumpWithLabel("computeCSG::op1", op1, dumpColorSettings, params, checkZeroAreaFaces, true, false); + } + + if (!op2_dumped) + { + op2_dumped = true; + dumpWithLabel("computeCSG::op2", op2, dumpColorSettings, params, checkZeroAreaFaces, false, false); + } + + dumpWithLabel("computeCSG::result", result, dumpColorSettings, params, checkZeroAreaFaces, true, true); } #endif diff --git a/IfcPlusPlus/src/ifcpp/geometry/MeshUtils.h b/IfcPlusPlus/src/ifcpp/geometry/MeshUtils.h deleted file mode 100644 index a8b42af6a..000000000 --- a/IfcPlusPlus/src/ifcpp/geometry/MeshUtils.h +++ /dev/null @@ -1,2888 +0,0 @@ -/* -*-c++-*- IfcQuery www.ifcquery.com -* -MIT License - -Copyright (c) 2017 Fabian Gerold - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#pragma once - -#include "IncludeCarveHeaders.h" -#include "GeomUtils.h" -#include "GeometryInputData.h" -#include "GeomDebugDump.h" -#include -#include -#include -#include - -struct MeshSetInfo -{ - MeshSetInfo() - { - } - MeshSetInfo( MeshSetInfo& other ) - { - numClosedEdges = other.numClosedEdges; - numOpenEdges = other.numOpenEdges; - numZeroAreaFaces = other.numZeroAreaFaces; - numFaces = other.numFaces; - surfaceArea = other.surfaceArea; - allPointersValid = other.allPointersValid; - meshSetValid = other.meshSetValid; - } - MeshSetInfo(StatusCallback* _report_callback, BuildingEntity* _entity ) - { - report_callback = _report_callback; - entity = _entity; - } - - size_t numClosedEdges = 0; - size_t numOpenEdges = 0; - size_t numZeroAreaFaces = 0; - size_t numFaces = 0; - double surfaceArea = 0; - bool allPointersValid = true; - bool meshSetValid = false; - std::string details; - StatusCallback* report_callback = nullptr; - BuildingEntity* entity = nullptr; - - void resetInfoResult() - { - allPointersValid = true; - numClosedEdges = 0; - numOpenEdges = 0; - numZeroAreaFaces = 0; - numFaces = 0; - surfaceArea = 0; - meshSetValid = false; - details = ""; - } -}; - -namespace MeshUtils -{ - inline size_t getNumFaces( const carve::mesh::MeshSet<3>* meshset ) - { - size_t num_faces = 0; - for( size_t i = 0; i < meshset->meshes.size(); ++i ) - { - num_faces += meshset->meshes[i]->faces.size(); - } - return num_faces; - } - inline size_t getNumClosedEdges( const carve::mesh::MeshSet<3>* meshset ) - { - size_t num_edges = 0; - for( size_t i = 0; i < meshset->meshes.size(); ++i ) - { - num_edges += meshset->meshes[i]->closed_edges.size(); - } - return num_edges; - } - inline double getMeshVolume( const carve::mesh::MeshSet<3>* meshset ) - { - double volume = 0; - for( size_t kk = 0; kk < meshset->meshes.size(); ++kk ) - { - carve::mesh::Mesh<3>* mesh = meshset->meshes[kk]; - double meshVolume = mesh->volume(); - - if( meshVolume < 0 ) - { - mesh->invert(); - meshVolume = -meshVolume; - } - volume += meshVolume; - } - return volume; - } - - inline void roundVertices( carve::mesh::MeshSet<3>* meshset ) - { - std::vector >& vertex_storage = meshset->vertex_storage; - const size_t num_vertices = vertex_storage.size(); - for( size_t i = 0; i < num_vertices; ++i ) - { - carve::mesh::Vertex<3>& vertex = vertex_storage[i]; - vertex.v.x = round( vertex.v.x*1000000.0 ) * 0.000001; - vertex.v.y = round( vertex.v.y*1000000.0 ) * 0.000001; - vertex.v.z = round( vertex.v.z*1000000.0 ) * 0.000001; - } - } - - inline void recalcMeshSet(shared_ptr >& meshset, double CARVE_EPSILON) - { - for( auto mesh : meshset->meshes ) - { - mesh->cacheEdges(); - mesh->recalc(CARVE_EPSILON); - } - } - - inline bool checkMeshSetVolume( const shared_ptr >& mesh_set, StatusCallback* report_callback, BuildingEntity* entity, double CARVE_EPSILON ) - { - if( !mesh_set ) - { -#ifdef _DEBUG - if( entity ) - { - //std::cout << "MeshSet of entity #" << entity->m_tag << " not valid" << std::endl; - } -#endif - return false; - } - if( mesh_set->meshes.size() == 0 ) - { -#ifdef _DEBUG - if( entity ) - { - //std::cout << "MeshSet of entity #" << entity->m_tag << " has no meshes" << std::endl; - } -#endif - return false; - } - - std::stringstream err; - - // check volume - double meshset_volume = 0; - for( size_t kk = 0; kk < mesh_set->meshes.size(); ++kk ) - { - carve::mesh::Mesh<3>* mesh = mesh_set->meshes[kk]; - double mesh_volume = mesh->volume(); - - if( mesh_volume < 0 ) - { - mesh->invert(); - if( mesh->isNegative() ) - { - mesh->recalc(CARVE_EPSILON); - mesh->calcOrientation(); - if( mesh->isNegative() ) - { - err << "mesh[" << kk << "]->isNegative() " << std::endl; - } - } - mesh_volume = mesh->volume(); - } - - if( mesh_volume < 0 ) - { - err << "mesh_volume < 0" << std::endl; - } - - meshset_volume += mesh_volume; - } - - - if( err.tellp() > 0 ) - { -#ifdef _DEBUG - if( report_callback ) - { - report_callback->messageCallback( err.str().c_str(), StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, entity ); - } -#endif - return false; - } - return true; - } - - /////////////////////////////////////////////////////////////////////////////////////////////////////////////// - static double computeFaceArea(const carve::mesh::Face<3>* face) - { - if( face->edge == nullptr ) - { - return 0; - } - - double face_area = 0; - if( face->nVertices() == 3 ) - { - carve::mesh::Edge<3>* edge = face->edge; - if( edge ) - { - carve::geom::vector<3>& v1 = edge->v1()->v; - carve::geom::vector<3>& v2 = edge->v2()->v; - if( edge->next ) - { - carve::geom::vector<3>& v3 = edge->next->v2()->v; - carve::geom::vector<3> side1 = v2 - v1; - carve::geom::vector<3> side2 = v3 - v2; - carve::geom::vector<3> c = cross(side1, side2); - double len_square = c.length2(); - if( len_square > EPS_M14*0.001 ) - { - double area = sqrt(len_square) * 0.5; - face_area += std::abs(area); - } - } - } - } - else - { - std::vector::vertex_t* > faceVertices; - face->getVertices(faceVertices); - if( faceVertices.size() > 2 ) - { - size_t n = faceVertices.size(); - - carve::geom::vector<3> normal; - carve::geom::vector<3> a; - carve::geom::vector<3> b = faceVertices[n - 2]->v; - carve::geom::vector<3> c = faceVertices[n - 1]->v; - carve::geom::vector<3> s; - - for( int i = 0; i < n; ++i ) - { - a = b; - b = c; - c = faceVertices[i]->v; - - normal.x += b.y * (c.z - a.z); - normal.y += b.z * (c.x - a.x); - normal.z += b.x * (c.y - a.y); - - s += c; - } - - double length = normal.length();// glm::length(normal); - if( std::abs(length) < EPS_M8 ) - { - return false; - } - - normal /= length; - double area = 0.5 * length; - face_area += area; - } - } - return face_area; - } - - static double computeMeshSetSurface(const shared_ptr >& meshset) - { - double surface_area = 0; - const std::vector* >& vec_meshes = meshset->meshes; - for( size_t kk = 0; kk < vec_meshes.size(); ++kk ) - { - const carve::mesh::Mesh<3>* mesh = vec_meshes[kk]; - //volume += mesh->volume(); - - const std::vector* >& vec_faces = mesh->faces; - for( size_t mm = 0; mm < vec_faces.size(); ++mm ) - { - const carve::mesh::Face<3>* face = vec_faces[mm]; - surface_area += computeFaceArea(face); - } - } - return surface_area; - } - - static double computeShapeSurfaceArea(const shared_ptr& shape_input_data) - { - double surface_area = 0; - double volume = 0; - if( shape_input_data ) - { - std::vector >& vec_representations = shape_input_data->m_vec_representations; - for( auto& representation : vec_representations ) - { - std::vector >& vec_items = representation->m_vec_item_data; - for( size_t ii = 0; ii < vec_items.size(); ++ii ) - { - shared_ptr& item_data = vec_items[ii]; - std::vector > >& vec_meshsets = item_data->m_meshsets; - for( size_t jj = 0; jj < vec_meshsets.size(); ++jj ) - { - surface_area += computeMeshSetSurface(vec_meshsets[jj]); - } - } - } - } - return surface_area; - } - - static bool checkMeshsetTriangulated(const shared_ptr>& meshset) - { - for( size_t ii = 0; ii < meshset->meshes.size(); ++ii ) - { - carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; - std::vector* >& vec_faces = mesh->faces; - for( size_t i2 = 0; i2 < vec_faces.size(); ++i2 ) - { - carve::mesh::Face<3>* face = vec_faces[i2]; - if( face->n_edges != 3 ) - { - return false; - } - } - } - return true; - } - - inline bool checkEdgePointers(carve::mesh::Edge<3>* e, bool checkForDegenerateEdges, MeshSetInfo& info) - { - if( !e ) - { - info.details = "edge is nullptr"; - return false; - } - - if( !e->rev ) - { - info.details = "edge->rev is nullptr"; - return false; - } - - - if( !e->prev ) - { - info.details = "edge->prev is nullptr"; - return false; - } - if( !e->next ) - { - info.details = "edge->next is nullptr"; - return false; - } - if( !e->vert ) - { - info.details = "edge->vert is nullptr"; - return false; - } - if( !e->face ) - { - info.details = "edge->face is nullptr"; - return false; - } - - if( checkForDegenerateEdges ) - { - if( e->rev->rev != e ) - { - info.details = "edge->rev->rev != edge"; - return false; - } - - if( e->prev->vert == e->next->vert ) - { - info.details = "e->prev->vert == e->next->vert"; - return false; - } - - if( e->next == e->rev ) - { - if( e->next->next == e ) - { - // 2 edges referencing itself - info.details = "e->next == e->rev"; - return false; - } - return false; - } - } - - return true; - } - - inline bool checkMeshFins(const shared_ptr >& meshset, double CARVE_EPSILON) - { - if( !meshset ) - { - return false; - } - - for( size_t i = 0; i < meshset->meshes.size(); ++i ) - { - carve::mesh::Mesh<3>* mesh = meshset->meshes[i]; - - if( !mesh ) - { - return false; - } - const std::vector* >& vec_faces = mesh->faces; - for( size_t j = 0; j < vec_faces.size(); ++j ) - { - carve::mesh::Face<3>* face = vec_faces[j]; - - const size_t n_edges = face->n_edges; - if( n_edges > 10000 ) - { -#ifdef _DEBUG - std::cout << "n_edges > 10000" << std::endl; - glm::vec4 color(0.3, 0.3, 0.3, 1.); - GeomDebugDump::dumpFacePolygon(face, color, false); -#endif - return false; - } - - carve::mesh::Edge<3>* e = face->edge; - for( size_t i_edge = 0; i_edge < n_edges; ++i_edge ) - { - // check if is a flat part - if( e->face ) - { - const carve::geom::vector<3>& normal = e->face->plane.N; - if( e->face->edge ) - { - if( e->face->edge->rev ) - { - if( e->face->edge->rev->face ) - { - const carve::geom::vector<3>& reverserFaceNormal = e->face->edge->rev->face->plane.N; - - double dotProduct = dot(reverserFaceNormal, normal); - if( std::abs(dotProduct + 1.0) < EPS_DEFAULT * 10 ) - { - double face_area = MeshUtils::computeFaceArea(face); - if( std::abs(face_area) > CARVE_EPSILON * 10 ) - { -#ifdef _DEBUG - //std::cout << "opposite face is coplanar" << std::endl; -#endif - return false; - } - } - } - } - } - } - - // continue - e = e->next; - } - } - } - return true; - } - - inline bool checkFaceIntegrity(const carve::mesh::Face<3>* face, bool checkForDegenerateEdges, MeshSetInfo& info) - { - if( !face ) - { - info.allPointersValid = false; - return false; - } - carve::mesh::Edge<3>* e = face->edge; - if( !e ) - { - info.allPointersValid = false; - info.details = "face->edge is nullptr"; - return false; - } - - const size_t n_edges = face->n_edges; - if( n_edges > 10000 ) - { -#ifdef _DEBUG - std::cout << "n_edges > 10000" << std::endl; - glm::vec4 color(0.3, 0.3, 0.3, 1.); - GeomDebugDump::dumpFacePolygon(face, color, false); -#endif - return false; - } - for( size_t i_edge = 0; i_edge < n_edges; ++i_edge ) - { - if( !checkEdgePointers(e, checkForDegenerateEdges, info) ) - { - info.details = "!checkEdgePointers(e) " + info.details; - return false; - } - - if( !checkEdgePointers(e->rev, checkForDegenerateEdges, info) ) - { - info.details = "!checkEdgePointers(e->rev) " + info.details; - return false; - } - - // continue - e = e->next; - } - if( e != face->edge ) - { - info.details = "e != face->edge"; - return false; - } - - try - { - e->validateLoop(); - } - catch( std::exception& ex ) - { -#ifdef _DEBUG - std::cout << ex.what() << std::endl; -#endif - return false; - } - catch( std::exception* ex ) - { -#ifdef _DEBUG - std::cout << ex->what() << std::endl; -#endif - return false; - } - catch( carve::exception& ex ) - { -#ifdef _DEBUG - std::cout << ex.str() << std::endl; -#endif - return false; - } - catch( ... ) - { - return false; - } - - return true; - } - - inline bool hasPointer(const carve::mesh::Face<3>* face, const carve::mesh::Edge<3>* edgePtr) - { - carve::mesh::Edge<3>* e = face->edge; - if( e == nullptr ) - { - return false; - } - - const size_t n_edges = face->n_edges; - for( size_t i_edge = 0; i_edge < n_edges; ++i_edge ) - { - if( e == edgePtr ) return true; - if( e->rev == edgePtr ) return true; - if( e->prev == edgePtr ) return true; - if( e->next == edgePtr ) return true; - if( e->rev->prev == edgePtr ) return true; - if( e->rev->next == edgePtr ) return true; - - e = e->next; - } - - return false; - } - - inline void countReferencesToVertex(const carve::mesh::Edge<3>* edge, const carve::mesh::Vertex<3>* vertex, std::set* >& setEdgesReferencing) - { - if( !edge->face ) - { - return; - } - - for( size_t jj = 0; jj < edge->face->mesh->faces.size(); ++jj ) - { - carve::mesh::Face<3>* face3 = edge->face->mesh->faces[jj]; - carve::mesh::Edge<3>* e3 = face3->edge; - for( size_t kk = 0; kk < face3->n_edges; ++kk ) - { - if( e3 ) - { - //if( e3 != edge ) - { - if( e3->vert == vertex ) - { - setEdgesReferencing.insert(e3); - } - } - } - e3 = e3->next; - } - } - } - - inline bool checkMeshPointers(const carve::mesh::Mesh<3>* mesh, bool checkForDegenerateEdges, MeshSetInfo& info) - { - if( !mesh ) - { - return false; - } - const std::vector* >& vec_faces = mesh->faces; - for( size_t j = 0; j < vec_faces.size(); ++j ) - { - carve::mesh::Face<3>* face = vec_faces[j]; - bool face_valid = checkFaceIntegrity(face, checkForDegenerateEdges, info); - - if( !face_valid ) - { - return false; - } - } - - return true; - } - - inline bool checkMeshSetPointers(const shared_ptr >& meshset, bool checkForDegenerateEdges, MeshSetInfo& info) - { - for( size_t i = 0; i < meshset->meshes.size(); ++i ) - { - carve::mesh::Mesh<3>* mesh_i = meshset->meshes[i]; - bool mesh_correct = checkMeshPointers(mesh_i, checkForDegenerateEdges, info); - if( !mesh_correct ) - { - info.allPointersValid = false; - return false; - } - } - return true; - } - - inline void removeFinEdges(const carve::mesh::Face<3>* face, size_t& numChanges, double eps) - { - if( !face ) - { - return; - } - - carve::mesh::Mesh<3>* mesh = face->mesh; - if( mesh->open_edges.size() == 0 ) - { - return; - } - - carve::mesh::Edge<3>* e = face->edge; - if( !e ) - { - return; - } - - const size_t n_edges = face->n_edges; - std::set* > setEdgesToRemove; - for( size_t i_edge = 0; i_edge < n_edges; ++i_edge ) - { - carve::mesh::Edge<3>* degenerateEdge = nullptr; - - double edgeLength2 = e->length2(); - if( edgeLength2 < eps*eps ) - { - degenerateEdge = e; - } - - bool condition1 = e->prev->vert == e->next->vert; - bool condition2 = e->next == e->rev; - if( condition1 || condition2 ) - { - // check if the vertex is used by other edges - degenerateEdge = e; - std::set* > setEdgesReferencing; - carve::mesh::Vertex<3>* vertex = e->vert; - countReferencesToVertex(e, vertex, setEdgesReferencing); - size_t numReferences = setEdgesReferencing.size(); - - if( numReferences > 1 ) - { - // other edges referencing current vertex - degenerateEdge = nullptr; - carve::mesh::Edge<3>* reverseEdge = e->rev; - if( reverseEdge != nullptr ) - { - carve::mesh::Vertex<3>* vertexReverseEdge = reverseEdge->vert; - std::set* > setEdgesReferencingReferseEdge; - countReferencesToVertex(reverseEdge, vertexReverseEdge, setEdgesReferencingReferseEdge); - size_t numReferencesReverse = setEdgesReferencingReferseEdge.size(); - - if( numReferencesReverse == 1 ) - { - degenerateEdge = reverseEdge; - } - } - } - } - - if( degenerateEdge != nullptr ) - { - carve::mesh::Edge<3>* degenerateEdgeReverse = degenerateEdge->rev; - if( degenerateEdgeReverse != nullptr ) - { - auto itFindEdge = setEdgesToRemove.find(degenerateEdgeReverse); - if( itFindEdge == setEdgesToRemove.end() ) - { - setEdgesToRemove.insert(degenerateEdge); - } - } - else - { - setEdgesToRemove.insert(degenerateEdge); - } - } - e = e->next; - } - - for( carve::mesh::Edge<3>* edgeRemove : setEdgesToRemove ) - { - std::set* > setFacesToReplaceEdgePointer; - if( face->edge == edgeRemove ) - { - carve::mesh::Face<3>* faceNonConst = (carve::mesh::Face<3>*)face; - setFacesToReplaceEdgePointer.insert(faceNonConst); - } - - for( auto faceInMesh : face->mesh->faces ) - { - if( faceInMesh->edge == edgeRemove ) - { - setFacesToReplaceEdgePointer.insert(faceInMesh); - } - } - - carve::mesh::Edge<3>* edgeRemainingNext = edgeRemove->removeEdge(); - for( auto faceReplaceEdgePointer : setFacesToReplaceEdgePointer ) - { - if( faceReplaceEdgePointer->edge != edgeRemainingNext ) - { - faceReplaceEdgePointer->edge = edgeRemainingNext; - } - } - - ++numChanges; - } - } - - inline void removeFinEdges(carve::mesh::Mesh<3>* mesh, double CARVE_EPSILON) - { - if( !mesh ) - { - return; - } - - if( mesh->open_edges.size() == 0 ) - { - //return; - } - - const std::vector* >& vec_faces = mesh->faces; - size_t numFaces = vec_faces.size(); - -#ifdef _DEBUG - if( numFaces == 1 ) - { - glm::vec4 color(0.4, 0.2, 0.2, 1.); - std::vector* > vecFaces; - vecFaces.push_back(vec_faces[0]); - GeomDebugDump::moveOffset(0.3); - GeomDebugDump::stopBuffering(); - GeomDebugDump::dumpFaces(vecFaces, color); - GeomDebugDump::moveOffset(0.3); - GeomDebugDump::dumpFacePolygon(vec_faces[0], color, true); - - //GeomDebugDump::moveOffset(0.01); - //std::vector vecPolyline = { e->v1()->v, e->v2()->v }; - //GeomDebugDump::dumpPolyline(vecPolyline, color, true); - } -#endif - - for( size_t ii = 0; ii < numFaces; ++ii ) - { - size_t numChangesAll = 0; - for( size_t jj = 0; jj < vec_faces.size(); ++jj ) - { - size_t numChangesCurrentFace = 0; - carve::mesh::Face<3>* face = vec_faces[jj]; - removeFinEdges(face, numChangesCurrentFace, CARVE_EPSILON); - numChangesAll += numChangesCurrentFace; - } - - // several fin-edges (where edge->next == edge->reverse) can be concatenated. Repeat until there are no changes - if( numChangesAll > 0 ) - { - if( mesh->faces.size() < 2 ) - { - continue; - } - - bool checkForDegenerateEdges = false; - MeshSetInfo minf; - bool valid = checkMeshPointers(mesh, checkForDegenerateEdges, minf ); - - if( !valid ) - { - continue; - } - - mesh->cacheEdges(); - mesh->recalc(CARVE_EPSILON); - } - - if( numChangesAll == 0 ) - { - break; - } - } - } - - inline double getFaceArea2D(const carve::mesh::Face<3>* face ) - { - std::vector > facePoints; - std::vector > facePointsArray2D; - face->getProjectedVertices(facePoints); - GeomUtils::poly2VecToArray2(facePoints, facePointsArray2D); - double area = GeomUtils::signedArea(facePointsArray2D); - return area; - } - - static std::vector getFacePoints(const carve::mesh::Face<3>* face) - { - std::vector lines; - - std::vector::vertex_t* > verts3d; - face->getVertices(verts3d); - - for( size_t i3 = 0; i3 < verts3d.size(); ++i3 ) - { - const carve::geom::vector<3>& vertex_point = verts3d[i3]->v; - lines.push_back(vertex_point); - } - return lines; - } - - static void addFaceCheckIndexes(int idxA, int idxB, int idxC, PolyInputCache3D& meshOut) - { - if( idxA == idxB || idxA == idxC || idxB == idxC ) - { - return; - } - meshOut.m_poly_data->addFace(idxA, idxB, idxC); - } - - static void addTriangleCheckDegenerate(int idxA, int idxB, int idxC, PolyInputCache3D& meshOut, double CARVE_EPSILON) - { - if( idxA == idxB || idxA == idxC || idxB == idxC ) - { -#ifdef _DEBUG - std::cout << "skipping degenerate triangle: " << idxA << "/" << idxB << "/" << idxC << std::endl; -#endif - return; - } - - const carve::geom::vector<3>& pointA = meshOut.m_poly_data->getVertex(idxA); - const carve::geom::vector<3>& pointB = meshOut.m_poly_data->getVertex(idxB); - const carve::geom::vector<3>& pointC = meshOut.m_poly_data->getVertex(idxC); - double lengthAB = (pointB - pointA).length2(); - if( lengthAB < CARVE_EPSILON*CARVE_EPSILON * 10 ) - { -#ifdef _DEBUG - std::cout << "skipping degenerate triangle: " << idxA << "/" << idxB << "/" << idxC << std::endl; -#endif - return; - } - - double lengthAC = (pointC - pointA).length2(); - if( lengthAC < CARVE_EPSILON*CARVE_EPSILON * 10 ) - { -#ifdef _DEBUG - std::cout << "skipping degenerate triangle: " << idxA << "/" << idxB << "/" << idxC << std::endl; -#endif - return; - } - - double lengthBC = (pointC - pointB).length2(); - if( lengthBC < CARVE_EPSILON*CARVE_EPSILON * 10 ) - { -#ifdef _DEBUG - std::cout << "skipping degenerate triangle: " << idxA << "/" << idxB << "/" << idxC << std::endl; -#endif - return; - } - - meshOut.m_poly_data->addFace(idxA, idxB, idxC); - } - - static void addFaceCheckIndexes(int idxA, int idxB, int idxC, int idxD, PolyInputCache3D& meshOut, double CARVE_EPSILON) - { - std::set setIndices = { idxA, idxB, idxC, idxD }; - - if( setIndices.size() == 3 ) - { - auto it = setIndices.begin(); - idxA = *it; - ++it; - idxB = *it; - ++it; - idxC = *it; - meshOut.m_poly_data->addFace(idxA, idxB, idxC); - return; - } - - addTriangleCheckDegenerate(idxA, idxB, idxC, meshOut, CARVE_EPSILON); - addTriangleCheckDegenerate(idxA, idxC, idxD, meshOut, CARVE_EPSILON); - } - - static void addFaceCheckIndexes(const vec3& v0, const vec3& v1, const vec3& v2, PolyInputCache3D& meshOut, double CARVE_EPSILON) - { - int idxA = meshOut.addPoint(v0); - int idxB = meshOut.addPoint(v1); - int idxC = meshOut.addPoint(v2); - addTriangleCheckDegenerate(idxA, idxB, idxC, meshOut, CARVE_EPSILON); - } - - static void addFaceCheckIndexes(const vec3& v0, const vec3& v1, const vec3& v2, const vec3& v3, PolyInputCache3D& meshOut, double CARVE_EPSILON) - { - int idxA = meshOut.addPoint(v0); - int idxB = meshOut.addPoint(v1); - int idxC = meshOut.addPoint(v2); - int idxD = meshOut.addPoint(v3); - - addTriangleCheckDegenerate(idxA, idxB, idxC, meshOut, CARVE_EPSILON); - addTriangleCheckDegenerate(idxA, idxC, idxD, meshOut, CARVE_EPSILON); - } - - static void getMeshVertexPoints(const shared_ptr >& meshset, std::vector& vecAllPoints) - { - for( size_t ii = 0; ii < meshset->vertex_storage.size(); ++ii ) - { - carve::geom::vector<3>& carvePoint3D = meshset->vertex_storage[ii].v; - vecAllPoints.push_back(glm::dvec3(carvePoint3D.x, carvePoint3D.y, carvePoint3D.z)); - } - } - - static void getFacesInMeshSet(shared_ptr >& meshsetInput, std::set* >& mapAllFaces) - { - mapAllFaces.clear(); - - for( carve::mesh::Mesh<3>*mesh : meshsetInput->meshes ) - { - for( carve::mesh::Face<3>* face : mesh->faces ) - { - mapAllFaces.insert( face ); - } - } - } - - static void getAreaAndFacesMapInMeshSet(shared_ptr >& meshsetInput, std::multimap* >& mapAllFaces) - { - mapAllFaces.clear(); - - std::set* > setAllFaces; - getFacesInMeshSet(meshsetInput, setAllFaces); - - for( carve::mesh::Face<3>* face : setAllFaces ) - { - double area = MeshUtils::computeFaceArea(face); - mapAllFaces.insert({ area, face }); - } - } - - static void removeZeroAreaFacesInMesh(carve::mesh::Mesh<3>* mesh, double epsMinFaceArea, double CARVE_EPSILON) - { - size_t numFacesRemoved = 0; - for( auto it = mesh->faces.begin(); it != mesh->faces.end(); ++it ) - { - carve::mesh::Face<3>* face = *it; - double area = MeshUtils::computeFaceArea(face); - if( area < epsMinFaceArea ) - { - it = mesh->faces.erase(it); - ++numFacesRemoved; - if( it == mesh->faces.end() ) - { - break; - } - } - } - if( numFacesRemoved > 0 ) - { - mesh->cacheEdges(); - mesh->recalc(CARVE_EPSILON); - } - } - - static void removeZeroAreaFacesInMeshSet(shared_ptr >& meshsetInput, double epsMinFaceArea, double CARVE_EPSILON) - { - for( carve::mesh::Mesh<3>*mesh : meshsetInput->meshes ) - { - removeZeroAreaFacesInMesh(mesh, epsMinFaceArea, CARVE_EPSILON); - } - } - - static bool checkMeshNonNegativeAndClosed( carve::mesh::Mesh<3>* mesh_i, double CARVE_EPSILON) - { - if( !mesh_i ) - { - return false; - } - - bool meshes_closed = true; - - if( mesh_i ) - { - if( mesh_i->isNegative() ) - { - mesh_i->invert(); - if( mesh_i->isNegative() ) - { - mesh_i->recalc(CARVE_EPSILON); - mesh_i->calcOrientation(); - if( mesh_i->isNegative() ) - { - std::cout << "could not invert mesh " << std::endl; - } - } - } - - if( !mesh_i->isClosed() ) - { - meshes_closed = false; - } - - if( mesh_i->open_edges.size() > 0 ) - { - meshes_closed = false; - } - } - - return meshes_closed; - } - - static bool checkMeshSetNonNegativeAndClosed(const shared_ptr> mesh_set, double CARVE_EPSILON) - { - bool meshes_closed = true; - if( !mesh_set->isClosed() ) - { - //GeomUtils::closeMeshSet(mesh_set.get()); - } - - for( size_t i = 0; i < mesh_set->meshes.size(); ++i ) - { - carve::mesh::Mesh<3>* mesh_i = mesh_set->meshes[i]; - if( mesh_i ) - { - if( mesh_i->isNegative() ) - { - mesh_i->invert(); - if( mesh_i->isNegative() ) - { - mesh_i->recalc(CARVE_EPSILON); - mesh_i->calcOrientation(); - if( mesh_i->isNegative() ) - { - std::cout << "could not invert mesh_set->meshes[" << i << "] " << std::endl; - } - } - } - - if( !mesh_i->isClosed() ) - { - meshes_closed = false; - } - - if( mesh_i->open_edges.size() > 0 ) - { - meshes_closed = false; - } - } - } - return meshes_closed; - } - - inline void checkFaceLoops(const carve::mesh::Face<3>* face) - { - carve::mesh::Edge<3>* e = face->edge; - if( !e ) - { - return; - } - size_t closed_edges = 0; - - size_t numEdges = face->n_edges; - if( numEdges == 0 ) - { - return; - } - - size_t ii = 0; - do { - if( e->rev == nullptr ) { - //open_edges.push_back(e); - } - else if( e < e->rev ) { - //closed_edges.push_back(e); - ++closed_edges; - } - e = e->next; - - if( ii > numEdges * 3 ) - { - break; - } - if( ii > 10000 ) - { - break; - } - ++ii; - - } while( e != face->edge ); - - if( ii > numEdges ) - { - std::cout << "invalid edge loop " << std::endl; - -#ifdef _DEBUG - bool dumpFaces = true; - if( dumpFaces ) - { - GeomDebugDump::moveOffset(0.4); - std::vector* > vecFaces = { face }; - glm::vec4 color2(0.7, 0.2, 0.2, 0.8); - GeomDebugDump::dumpFaces(vecFaces, color2, false); - } -#endif - } - } - - static void checkFaceLoops( carve::mesh::Mesh<3>* mesh) - { - for (size_t i = 0; i < mesh->faces.size(); ++i) - { - carve::mesh::Face<3>* face = mesh->faces[i]; - checkFaceLoops(face); - } - } - - static void checkFaceLoops(carve::mesh::MeshSet<3>* meshset) - { - for( size_t kk = 0; kk < meshset->meshes.size(); ++kk ) - { - carve::mesh::Mesh<3>* mesh = meshset->meshes[kk]; - checkFaceLoops(mesh); - } - } - - static bool checkMeshSetValidAndClosed(const shared_ptr>& meshset, MeshSetInfo& info, double CARVE_EPSILON ) - { - info.resetInfoResult(); - if( !meshset ) - { -#ifdef _DEBUG - if( info.entity ) - { - std::cout << "MeshSet of entity #" << info.entity->m_tag << " not valid" << std::endl; - } -#endif - info.allPointersValid = false; - info.meshSetValid = false; - return false; - } - if( meshset->meshes.size() == 0 ) - { -#ifdef _DEBUG - if( info.entity ) - { - //std::cout << "MeshSet of entity #" << info.entity->m_tag << " has no meshes" << std::endl; - } -#endif - return false; - } - -#ifdef _DEBUG - checkFaceLoops(meshset.get()); -#endif - - // check open edges first, since it is the easiest and cheapest - info.numOpenEdges = 0; - info.numZeroAreaFaces = 0; - for( size_t kk = 0; kk < meshset->meshes.size(); ++kk ) - { - carve::mesh::Mesh<3>* mesh = meshset->meshes[kk]; - info.numOpenEdges += mesh->open_edges.size(); - info.numClosedEdges += mesh->closed_edges.size(); - info.numFaces += mesh->faces.size(); - - for( size_t jj = 0; jj < mesh->faces.size(); ++jj ) - { - const carve::mesh::Face<3>* inputFace = mesh->faces[jj]; - double face_area = MeshUtils::computeFaceArea(inputFace); - if( std::abs(face_area) < CARVE_EPSILON ) - { - ++info.numZeroAreaFaces; - } - info.surfaceArea += face_area; - } - } - - // check for valid pointers first - bool checkForDegenerateEdges = true; - if( !checkMeshSetPointers(meshset, checkForDegenerateEdges, info) ) - { - return false; - } - - if( !checkMeshFins(meshset, CARVE_EPSILON) ) - { - info.meshSetValid = false; - return false; - } - - if( info.numOpenEdges > 0 ) - { - info.meshSetValid = false; - return false; - } - - std::stringstream err; - bool meshes_closed = checkMeshSetNonNegativeAndClosed(meshset, CARVE_EPSILON); - if( meshes_closed ) - { - // check volume - double meshset_volume = 0; - for( size_t kk = 0; kk < meshset->meshes.size(); ++kk ) - { - carve::mesh::Mesh<3>* mesh = meshset->meshes[kk]; - double mesh_volume = mesh->volume(); - - if( mesh_volume < 0 ) - { - mesh->invert(); - if( mesh->isNegative() ) - { - mesh->recalc(CARVE_EPSILON); - mesh->calcOrientation(); - if( mesh->isNegative() ) - { - std::cout << "could not invert negative mesh[" << kk << "] " << std::endl; - } - } - mesh_volume = mesh->volume(); - } - - if( mesh_volume < 0 ) - { - err << "mesh_volume < 0" << std::endl; - } - - meshset_volume += mesh_volume; - } - } - else - { - err << "mesh_set not closed" << std::endl; - } - - if( err.tellp() > 0 ) - { -#ifdef _DEBUG - if( info.report_callback ) - { - info.report_callback->messageCallback(err.str().c_str(), StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, info.entity); - } -#endif - info.meshSetValid = false; - return false; - } - - info.meshSetValid = true; - return true; - } - - inline void fixMeshset(carve::mesh::MeshSet<3>* meshset, double CARVE_EPSILON, bool shouldBeClosedManifold, bool dumpMeshes) - { - for( carve::mesh::Mesh<3>* mesh : meshset->meshes ) - { - removeFinEdges(mesh, CARVE_EPSILON); - } - - for( auto it = meshset->meshes.begin(); it != meshset->meshes.end(); ++it ) - { - carve::mesh::Mesh<3>* mesh = *it; - - bool meshChanged = false; - for( auto itFaces = mesh->faces.begin(); itFaces != mesh->faces.end(); ) - { - carve::mesh::Face<3>* face = *itFaces; - if( face == nullptr ) - { - itFaces = mesh->faces.erase(itFaces); - delete face; - meshChanged = true; - continue; - } - - if( !face->edge ) - { - itFaces = mesh->faces.erase(itFaces); - delete face; - meshChanged = true; - continue; - } - - ++itFaces; - } - - if( meshChanged ) - { - mesh->cacheEdges(); - mesh->recalc(CARVE_EPSILON); - } - - bool checkForDegenerateEdges = false; - MeshSetInfo minf; - bool valid = checkMeshPointers(mesh, checkForDegenerateEdges, minf ); - - bool removeMesh = false; - if( !valid ) - { - removeMesh = true; - } - - if( shouldBeClosedManifold ) - { - if( mesh->faces.size() < 4 ) - { - removeMesh = true; - } - - if( !mesh->isClosed() ) - { - removeMesh = true; - } - } - - if( removeMesh ) - { - meshset->meshes.erase(it); - delete mesh; - - it = meshset->meshes.begin(); - if( it == meshset->meshes.end() ) - { - break; - } - } - } - } - - static bool checkMeshSetValidAndClosed(const shared_ptr>& meshset, MeshSetInfo& info, double eps, bool tryToFixIfNotValid, bool dumpMeshes) - { - bool mesh_ok = checkMeshSetValidAndClosed(meshset, info, eps); - if( tryToFixIfNotValid ) - { - MeshUtils::fixMeshset(meshset.get(), eps, true, dumpMeshes); - mesh_ok = checkMeshSetValidAndClosed(meshset, info, eps); - } - return mesh_ok; - } - - inline bool edgeToEdgeIntersect(const carve::mesh::Edge<3>* edge1, const carve::mesh::Edge<3>* edge2, double eps, vec3& intersectionPoint) - { - const vec3 A = edge1->v1()->v; - const vec3 B = edge1->v2()->v; - const vec3 C = edge2->v1()->v; - const vec3 D = edge2->v2()->v; - - vec3 u = B - A; - vec3 v = D - C; - vec3 w = A - C; - - double a = dot(u,u); // always >= 0 - double b = dot(u,v); - double c = dot(v,v); // always >= 0 - double d = dot(u,w); - double e = dot(v,w); - double sc, sN, sD = a*c - b*b; // sc = sN / sD, sD >= 0 - double tc, tN, tD = a*c - b*b; // tc = tN / tD, tD >= 0 - - // compute the line parameters of the two closest points - if (sD < eps) - { - // the lines are almost parallel - sN = 0.0; // force using point A on segment AB to prevent possible division by 0.0 later - sD = 1.0; - tN = e; - tD = c; - } - else - { - // get the closest points on the infinite lines - sN = (b*e - c*d); - tN = (a*e - b*d); - if (sN < 0.0) - { - // sc < 0 => the s=0 edge is visible - sN = 0.0; // compute shortest connection of A to segment CD - tN = e; - tD = c; - } - else if (sN > sD) // sc > 1 => the s=1 edge is visible - { - sN = sD; // compute shortest connection of B to segment CD - tN = e + b; - tD = c; - } - } - - if (tN < 0.0) - { - // tc < 0 => the t=0 edge is visible - tN = 0.0; - // recompute sc for this edge - if( -d < 0.0 ) // compute shortest connection of C to segment AB - { - sN = 0.0; - } - else if( -d > a ) - { - sN = sD; - } - else - { - sN = -d; - sD = a; - } - } - else if (tN > tD) - { - // tc > 1 => the t=1 edge is visible - tN = tD; - // recompute sc for this edge - if( (-d + b) < 0.0 ) // compute shortest connection of D to segment AB - { - sN = 0; - } - else if( (-d + b) > a ) - { - sN = sD; - } - else - { - sN = (-d + b); - sD = a; - } - } - - sc = fabs(sN) < eps ? 0.0 : sN / sD; - tc = fabs(tN) < eps ? 0.0 : tN / tD; - - vec3 P1 = A + (sc * u); - vec3 P2 = C + (tc * v); - vec3 delt = P2 - P1; - if( delt.length2() < eps*eps ) - { - // intersecting - if( sc < eps ) - { - // intersection is at edge1->v1() -> split edge2 - - if( tc < eps || fabs(tc - 1.0) < eps ) - { - // intersecting at point, not edge - return false; - } - } - else if( fabs(sc-1.0) < eps ) - { - if( tc < eps || fabs(tc - 1.0) < eps ) - { - // intersecting at point, not edge - return false; - } - - - // intersection is at edge1->v2() -> split edge2 - } - - // split edge1 - carve::mesh::Face<3>* face = edge1->face; - - if( edge1->rev ) - { - carve::mesh::Face<3>* faceRev = edge1->rev->face; - } - - intersectionPoint = P1; - return true; - } - return false; - } - - ///\brief method createTriangulated3DFace: Creates a triangulated face - ///\param[in] inputBounds3D: Curves as face boundaries. The first input curve is the outer boundary, succeeding curves are inner boundaries - ///\param[in] ifc_entity: Ifc entity that the geometry belongs to, just for error messages. Pass a nullptr if no entity at hand. - ///\param[out] meshOut: Result mesh - static void createTriangulated3DFace(const std::vector >& inputBounds3D, PolyInputCache3D& meshOut, GeomProcessingParams& params ) - { - double CARVE_EPSILON = params.epsMergePoints; - if( inputBounds3D.size() == 1 ) - { - const std::vector& outerLoop = inputBounds3D[0]; - if( outerLoop.size() < 3 ) - { - return; - } - if( outerLoop.size() == 3 ) - { - const vec3& v0 = outerLoop[0]; - const vec3& v1 = outerLoop[1]; - const vec3& v2 = outerLoop[2]; - addFaceCheckIndexes(v0, v1, v2, meshOut, CARVE_EPSILON); - -#ifdef _DEBUG - if( params.debugDump ) - { - glm::vec4 color(0, 1, 1, 1); - PolyInputCache3D poly( CARVE_EPSILON ); - int idxA = poly.addPoint(v0); - int idxB = poly.addPoint(v1); - int idxC = poly.addPoint(v2); - poly.m_poly_data->addFace(idxA, idxB, idxC); - shared_ptr > meshset(poly.m_poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); - GeomDebugDump::dumpMeshset(meshset, color, false); - } -#endif - - return; - } - if( outerLoop.size() == 4 ) - { - const vec3& v0 = outerLoop[0]; - const vec3& v1 = outerLoop[1]; - const vec3& v2 = outerLoop[2]; - const vec3& v3 = outerLoop[3]; - - addFaceCheckIndexes(v0, v1, v2, v3, meshOut, CARVE_EPSILON); - - - -#ifdef _DEBUG - if( params.debugDump ) - { - glm::vec4 color(0, 1, 1, 1); - PolyInputCache3D poly( CARVE_EPSILON ); - int idxA = poly.addPoint(v0); - int idxB = poly.addPoint(v1); - int idxC = poly.addPoint(v2); - int idxD = poly.addPoint(v3); - poly.m_poly_data->addFace(idxA, idxB, idxC, idxD); - shared_ptr > meshset(poly.m_poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); - GeomDebugDump::dumpMeshset(meshset, color, false); - } -#endif - - return; - } - } - -#ifdef _DEBUG - PolyInputCache3D poly(CARVE_EPSILON); -#endif - - std::vector > > polygons2d; - std::vector > polygons3d; - std::vector polygon3DArea; - bool face_loop_reversed = false; - bool warning_small_loop_detected = false; - bool errorOccured = false; - GeomUtils::ProjectionPlane face_plane = GeomUtils::ProjectionPlane::UNDEFINED; - vec3 normal = carve::geom::VECTOR(0, 0, 1); - vec3 normalOuterBound = carve::geom::VECTOR(0, 0, 1); - - for( auto it_bounds = inputBounds3D.begin(); it_bounds != inputBounds3D.end(); ++it_bounds ) - { - std::vector loopPoints3Dinput = *it_bounds; - - if( loopPoints3Dinput.size() < 3 ) - { - if( it_bounds == inputBounds3D.begin() ) - { - break; - } - else - { - continue; - } - } - - //bool mergeAlignedEdges = true; - GeomUtils::simplifyPolygon(loopPoints3Dinput, params.epsMergePoints, params.epsMergeAlignedEdgesAngle); - GeomUtils::unClosePolygon(loopPoints3Dinput); - normal = GeomUtils::computePolygonNormal(loopPoints3Dinput); - - if( it_bounds == inputBounds3D.begin() ) - { - normalOuterBound = normal; - - // figure out on which plane to project the 3D points - double nx = std::abs(normal.x); - double ny = std::abs(normal.y); - double nz = std::abs(normal.z); - if( nz > nx && nz >= ny ) - { - face_plane = GeomUtils::XY_PLANE; - } - else if( nx >= ny && nx >= nz ) - { - face_plane = GeomUtils::YZ_PLANE; - } - else if( ny > nx && ny >= nz ) - { - face_plane = GeomUtils::XZ_PLANE; - } - else - { - std::stringstream err; - err << "unable to project to plane: nx" << nx << " ny " << ny << " nz " << nz << std::endl; - if( params.callbackFunc ) - { - params.callbackFunc->messageCallback(err.str().c_str(), StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, params.ifc_entity); - } - continue; - } - } - - // project face into 2d plane - std::vector > path_loop_2d; - std::vector path_loop_3d; - - for( size_t i = 0; i < loopPoints3Dinput.size(); ++i ) - { - const vec3& point = loopPoints3Dinput[i]; - path_loop_3d.push_back(point); - if( face_plane == GeomUtils::XY_PLANE ) - { - path_loop_2d.push_back({ point.x, point.y }); - } - else if( face_plane == GeomUtils::YZ_PLANE ) - { - path_loop_2d.push_back({ point.y, point.z }); - } - else if( face_plane == GeomUtils::XZ_PLANE ) - { - path_loop_2d.push_back({ point.x, point.z }); - } - } - - if( path_loop_2d.size() < 3 ) - { - //std::cout << __FUNC__ << ": #" << face_id << "=IfcFace: path_loop.size() < 3" << std::endl; - continue; - } - - double loop_area = std::abs(GeomUtils::signedArea(path_loop_2d)); - double min_loop_area = EPS_DEFAULT; - if( loop_area < min_loop_area ) - { - warning_small_loop_detected = true; - continue; - } - - if( loopPoints3Dinput.size() == 4 && inputBounds3D.size() == 1 ) - { - if( GeomUtils::isQuadConvex(path_loop_2d[0], path_loop_2d[1], path_loop_2d[2], path_loop_2d[3]) ) - { - // add 2 triangles for quad - vec3 v0 = loopPoints3Dinput[0]; - vec3 v1 = loopPoints3Dinput[1]; - vec3 v2 = loopPoints3Dinput[2]; - vec3 v3 = loopPoints3Dinput[3]; - uint32_t idx0 = meshOut.addPoint(v0); - uint32_t idx1 = meshOut.addPoint(v1); - uint32_t idx2 = meshOut.addPoint(v2); - uint32_t idx3 = meshOut.addPoint(v3); - -#ifdef _DEBUG - uint32_t idx0_dbg = poly.addPoint(v0); - uint32_t idx1_dbg = poly.addPoint(v1); - uint32_t idx2_dbg = poly.addPoint(v2); - uint32_t idx3_dbg = poly.addPoint(v3); -#endif - - vec3 normalTriangle0 = GeomUtils::computePolygonNormal({ v0, v1, v2 }); - vec3 normalTriangle1 = GeomUtils::computePolygonNormal({ v2, v3, v0 }); - - if( dot(normalTriangle0, normalOuterBound) > 0 ) - { - // normalTriangle0 and normalOuterBound should point in the same direction" << std::endl; - meshOut.m_poly_data->addFace(idx0, idx1, idx2); -#ifdef _DEBUG - poly.m_poly_data->addFace(idx0_dbg, idx1_dbg, idx2_dbg); -#endif - } - else - { - // normalTriangle0 and normalOuterBound should point in the same direction" << std::endl; - meshOut.m_poly_data->addFace(idx0, idx2, idx1); -#ifdef _DEBUG - poly.m_poly_data->addFace(idx0_dbg, idx2_dbg, idx1_dbg); -#endif - } - - if( dot(normalTriangle1, normalOuterBound) > 0 ) - { - //std::cout << "normalTriangle1 and normalOuterBound should point in the same direction" << std::endl; - meshOut.m_poly_data->addFace(idx2, idx3, idx0); -#ifdef _DEBUG - poly.m_poly_data->addFace(idx2_dbg, idx3_dbg, idx0_dbg); -#endif - } - else - { - meshOut.m_poly_data->addFace(idx2, idx0, idx3); -#ifdef _DEBUG - poly.m_poly_data->addFace(idx2_dbg, idx0_dbg, idx3_dbg); -#endif - } - - return; - } - } - - // outer loop (biggest area) needs to come first - bool insertPositionFound = false; - for( size_t iiArea = 0; iiArea < polygon3DArea.size(); ++iiArea ) - { - double existingLoopArea = polygon3DArea[iiArea]; - - // existingArea[i] < loop_area < existingArea[i+1] - if( loop_area > existingLoopArea ) - { - polygons2d.insert(polygons2d.begin() + iiArea, path_loop_2d); - polygons3d.insert(polygons3d.begin() + iiArea, path_loop_3d); - polygon3DArea.insert(polygon3DArea.begin() + iiArea, loop_area); - insertPositionFound = true; - break; - } - } - - if( !insertPositionFound ) - { - polygons2d.push_back(path_loop_2d); - polygons3d.push_back(path_loop_3d); - polygon3DArea.push_back(loop_area); - } - } - -#ifdef _DEBUG - // check descending order - if( polygon3DArea.size() > 0 ) - { - double previousLoopArea = polygon3DArea[0]; - if( polygon3DArea.size() > 1 ) - { - for( size_t iiArea = 1; iiArea < polygon3DArea.size(); ++iiArea ) - { - double loopArea = polygon3DArea[iiArea]; - if( loopArea > previousLoopArea ) - { - std::cout << "polygon3DArea not descending" << std::endl; - } - } - } - } -#endif - if( polygons3d.size() > 0 ) - { - std::vector& loopOuterBound = polygons3d[0]; - normalOuterBound = GeomUtils::computePolygonNormal(loopOuterBound); - } - - // check winding order in 2D - std::vector > polygons2dFlatVector; - for( size_t ii = 0; ii < polygons2d.size(); ++ii ) - { - std::vector >& loop2D = polygons2d[ii]; - std::vector& loop3D = polygons3d[ii]; - - glm::dvec3 normal_2d = GeomUtils::computePolygon2DNormal(loop2D); - if( ii == 0 ) - { - if( normal_2d.z < 0 ) - { - std::reverse(loop2D.begin(), loop2D.end()); - std::reverse(loop3D.begin(), loop3D.end()); - face_loop_reversed = true; - } - } - else - { - if( normal_2d.z > 0 ) - { - std::reverse(loop2D.begin(), loop2D.end()); - std::reverse(loop3D.begin(), loop3D.end()); - } - } - } - - if( warning_small_loop_detected ) - { - std::stringstream err; - err << "std::abs( signed_area ) < 1.e-10"; - if( params.callbackFunc ) - { - params.callbackFunc->messageCallback(err.str().c_str(), StatusCallback::MESSAGE_TYPE_MINOR_WARNING, __FUNC__, params.ifc_entity); - } - } - - if( polygons2d.size() > 0 ) - { - std::vector triangulated = mapbox::earcut(polygons2d); - - std::vector polygons3dFlatVector; - GeomUtils::polygons2flatVec(polygons3d, polygons3dFlatVector); - - for( int ii = 0; ii < triangulated.size(); ii += 3 ) - { - size_t idxA = triangulated[ii + 0]; - size_t idxB = triangulated[ii + 1]; - size_t idxC = triangulated[ii + 2]; - - const vec3& pointA = polygons3dFlatVector[idxA]; - const vec3& pointB = polygons3dFlatVector[idxB]; - const vec3& pointC = polygons3dFlatVector[idxC]; - - idxA = meshOut.addPoint(pointA); - idxB = meshOut.addPoint(pointB); - idxC = meshOut.addPoint(pointC); - -#ifdef _DEBUG - size_t idxA_dbg = poly.addPoint(pointA); - size_t idxB_dbg = poly.addPoint(pointB); - size_t idxC_dbg = poly.addPoint(pointC); -#endif - - vec3 triangleNormal = GeomUtils::computePolygonNormal({ pointA, pointB, pointC }); - if( dot(triangleNormal, normalOuterBound) >= 0 ) - { - - meshOut.m_poly_data->addFace(idxA, idxB, idxC); -#ifdef _DEBUG - poly.m_poly_data->addFace(idxA_dbg, idxB_dbg, idxC_dbg); -#endif - } - else - { - meshOut.m_poly_data->addFace(idxA, idxC, idxB); -#ifdef _DEBUG - poly.m_poly_data->addFace(idxA_dbg, idxC_dbg, idxB_dbg); -#endif - } - } -#ifdef _DEBUG - if( errorOccured /*|| ifc_entity->m_tag == 64*/ ) - { - glm::vec4 color(0, 1, 1, 1); - GeomDebugDump::dumpPolyline(polygons2d, color, true); - //shared_ptr > meshset(meshOut.m_poly_data->createMesh(carve::input::opts())); - //GeomDebugDump::dumpMeshset(meshset, color, true, true); - } -#endif - } - -#ifdef _DEBUG - if( errorOccured || params.debugDump) - { - glm::vec4 color(0, 1, 1, 1); - shared_ptr > meshset(poly.m_poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); - GeomDebugDump::dumpMeshset(meshset, color, false); - } -#endif - } - - ///\brief method intersectOpenEdges: Intersect open edges of MeshSet with closed edges, and split the open edges in case of intersection - ///\param[in/out] meshset: MeshSet with open edges. If fix is found, a new MeshSet is assigned to the smart pointer - ///\param[in] eps: tolerance to find edge-edge intersections - ///\param[in] dumpMeshes: write meshes to dump file for debugging - inline void intersectOpenEdges(shared_ptr >& meshset, GeomProcessingParams& params) - { - if( !meshset ) - { - return; - } - - size_t maxNumFaces = 600; - size_t maxNumEdges = 600; - size_t maxNumOpenEdges = 100; - double CARVE_EPSILON = params.epsMergePoints; - -#ifdef _DEBUG - glm::vec4 color(0.5, 0.6, 0.7, 1.0); - if( params.debugDump ) - { - GeomDebugDump::moveOffset(0.8); - GeomDebugDump::dumpMeshset(meshset, color, true); - double dy = meshset->getAABB().extent.y; - GeomDebugDump::moveOffset(dy*2.2); - GeomDebugDump::dumpMeshsetOpenEdges(meshset, color, false, false); - GeomDebugDump::moveOffset(1.2); - } -#endif - - for( size_t round = 0; round < 5; ++round ) - { - size_t numClosedEdgesBefore = 0; - std::vector* > allOpenEdges; - std::vector* > allFaces; - - for( size_t ii = 0; ii < meshset->meshes.size(); ++ii ) - { - carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; - numClosedEdgesBefore += mesh->closed_edges.size(); - std::copy(mesh->open_edges.begin(), mesh->open_edges.end(), std::back_inserter(allOpenEdges)); - std::copy(mesh->faces.begin(), mesh->faces.end(), std::back_inserter(allFaces)); - } - - PolyInputCache3D polyInput(params.epsMergePoints); - - // intersect with closed edges - size_t numSplitEdges = 0; - for( size_t iiFace = 0; iiFace < allFaces.size(); ++iiFace ) - { - if( iiFace > maxNumFaces ) - { - return; - } - carve::mesh::Face<3>* face = allFaces[iiFace]; - - const size_t n_edges = face->n_edges; - if( n_edges > maxNumEdges ) - { -#ifdef _DEBUG - if( params.debugDump ) - { - std::cout << "n_edges > maxNumEdges" << std::endl; - glm::vec4 color(0.3, 0.3, 0.3, 1.); - GeomDebugDump::dumpFacePolygon(face, color, false); - } -#endif - return; - } - - std::vector faceLoop; - carve::mesh::Edge<3>* edge = face->edge; - faceLoop.push_back(edge->v1()->v); - - for( size_t i_edge = 0; i_edge < n_edges; ++i_edge ) - { - // check if current edge needs to be split - for( size_t iiOpenEdge = 0; iiOpenEdge < allOpenEdges.size(); ++iiOpenEdge ) - { - if( iiOpenEdge > maxNumOpenEdges ) - { - return; - } - const carve::mesh::Edge<3>* openEdge = allOpenEdges[iiOpenEdge]; - vec3 openEdgeStart = openEdge->v1()->v; - vec3 openEdgeEnd = openEdge->v2()->v; - - vec3 intersectionPoint; - bool intersect = edgeToEdgeIntersect(openEdge, edge, params.epsMergePoints, intersectionPoint); - - if( intersect ) - { - faceLoop.push_back(intersectionPoint); - ++numSplitEdges; - - // handle only first split. TODO: sort split points and add to faceLoop, sorted - break; - } - } - faceLoop.push_back(edge->v2()->v); - - edge = edge->next; - - if( edge == face->edge ) - { - break; - } - } - - bool addFaceDirectly = true; - if( addFaceDirectly ) - { - std::vector faceIndexes; - for( size_t iiPoint = 0; iiPoint < faceLoop.size(); ++iiPoint ) - { - const vec3& v0 = faceLoop[iiPoint]; - int idxA = polyInput.addPoint(v0); - if( faceIndexes.size() > 0 ) - { - int previousIndex = faceIndexes.back(); - if( idxA == previousIndex ) - { - continue; - } - } - faceIndexes.push_back(idxA); - } - - if( faceIndexes.size() > 1 ) - { - for( size_t iiPoint = 0; iiPoint < faceIndexes.size(); ++iiPoint ) - { - size_t idxFirst = faceIndexes.front(); - size_t idxLast = faceIndexes.back(); - if( idxFirst == idxLast ) - { - faceIndexes.pop_back(); - if( faceIndexes.size() < 2 ) - { - break; - } - } - else - { - break; - } - } - } - - if( faceIndexes.size() > 2 && faceIndexes.size() < 500 ) - { - size_t n = std::distance(faceIndexes.begin(), faceIndexes.end()); - - size_t numFaceIndices = polyInput.m_poly_data->faceIndices.size(); - if( numFaceIndices > 1000 ) - { - //std::cout << numFaceIndices << " "; - } - polyInput.m_poly_data->addFace(faceIndexes.begin(), faceIndexes.end()); - } - } - else - { - std::vector > faceLoops = { faceLoop }; - bool mergeAlignedEdges = false; - bool dumpPolygon = true; - createTriangulated3DFace(faceLoops, polyInput, params ); - } - } - - if( numSplitEdges > 0 ) - { - bool correct = checkPolyhedronData(polyInput.m_poly_data, params.minFaceArea); - if( !correct ) - { - bool correct = fixPolyhedronData(polyInput.m_poly_data, params.minFaceArea); -#ifdef _DEBUG - std::cout << "incorrect idx"; -#endif - return; - } - - shared_ptr > meshsetNew(polyInput.m_poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); - if( meshsetNew->isClosed() ) - { - meshset = meshsetNew; - return; - } - else - { - size_t numOpenEdgesNew = 0; - size_t numClosedEdgesNew = 0; - for( size_t ii = 0; ii < meshsetNew->meshes.size(); ++ii ) - { - carve::mesh::Mesh<3>* mesh = meshsetNew->meshes[ii]; - numOpenEdgesNew += mesh->open_edges.size(); - numClosedEdgesNew += mesh->closed_edges.size(); - } - - if( numOpenEdgesNew < allOpenEdges.size() ) - { - size_t numAllEdgesNew = numOpenEdgesNew + numClosedEdgesNew; - size_t numAllEdgesBefore = numClosedEdgesBefore + allOpenEdges.size(); - if( numClosedEdgesNew >= numClosedEdgesBefore ) - { - meshset = meshsetNew; - } - } - -#ifdef _DEBUG - if( params.debugDump ) - { - glm::vec4 color(0.3, 0.3, 0.3, 1.); - GeomDebugDump::dumpMeshset(meshsetNew, color, false); - - double dy = meshsetNew->getAABB().extent.y; - GeomDebugDump::moveOffset(dy * 2.2); - GeomDebugDump::dumpMeshsetOpenEdges(meshsetNew, color, false, false); - GeomDebugDump::moveOffset(dy * 3.2); - } -#endif - } - } - } - } - - static std::shared_ptr > createPlaneMesh(vec3& p0, vec3& p1, vec3& p2, double CARVE_EPSILON) - { - carve::input::PolyhedronData polyhedron_data; - polyhedron_data.addVertex(p0); - polyhedron_data.addVertex(p1); - polyhedron_data.addVertex(p2); - polyhedron_data.addFace(0, 1, 2); - std::shared_ptr > mesh(polyhedron_data.createMesh(carve::input::opts(), CARVE_EPSILON)); - return mesh; - } - - static std::shared_ptr > createPlaneMesh(vec3& p0, vec3& p1, vec3& p2, vec3& p3, double CARVE_EPSILON) - { - carve::input::PolyhedronData polyhedron_data; - polyhedron_data.addVertex(p0); - polyhedron_data.addVertex(p1); - polyhedron_data.addVertex(p2); - polyhedron_data.addVertex(p3); - - polyhedron_data.addFace(0, 1, 2, 3); - //polyhedron_data.addFace(2, 3, 0); - std::shared_ptr > mesh(polyhedron_data.createMesh(carve::input::opts(), CARVE_EPSILON)); - return mesh; - } - - static std::shared_ptr > createBoxMesh(vec3& pos, vec3& extent, carve::math::Matrix& transform, double CARVE_EPSILON) - { - carve::input::PolyhedronData polyhedron_data; - polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(extent.x, extent.y, -extent.z))); - polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(extent.x, -extent.y, -extent.z))); - polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(-extent.x, -extent.y, -extent.z))); - polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(-extent.x, extent.y, -extent.z))); - - polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(extent.x, extent.y, extent.z))); - polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(extent.x, -extent.y, extent.z))); - polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(-extent.x, -extent.y, extent.z))); - polyhedron_data.addVertex(transform * (pos + carve::geom::VECTOR(-extent.x, extent.y, extent.z))); - - polyhedron_data.addFace(0, 1, 2); - polyhedron_data.addFace(2, 3, 0); - polyhedron_data.addFace(7, 6, 5); - polyhedron_data.addFace(5, 4, 7); - polyhedron_data.addFace(0, 4, 5); - polyhedron_data.addFace(5, 1, 0); - polyhedron_data.addFace(1, 5, 6); - polyhedron_data.addFace(6, 2, 1); - polyhedron_data.addFace(2, 6, 7); - polyhedron_data.addFace(7, 3, 2); - polyhedron_data.addFace(3, 7, 4); - polyhedron_data.addFace(4, 0, 3); - - std::shared_ptr > mesh(polyhedron_data.createMesh(carve::input::opts(), CARVE_EPSILON)); - return mesh; - } - - inline void mesh2MeshSet(const carve::mesh::Mesh<3>* mesh, shared_ptr >& meshsetResult, double CARVE_EPSILON) - { - if( !mesh ) - { - return; - } - - size_t maxNumFaces = 600; - size_t maxNumEdges = 600; - size_t maxNumOpenEdges = 100; - - size_t numClosedEdgesBefore = mesh->closed_edges.size(); - - - - PolyInputCache3D polyInput(CARVE_EPSILON); - - // intersect with closed edges - size_t numSplitEdges = 0; - for( size_t iiFace = 0; iiFace < mesh->faces.size(); ++iiFace ) - { - if( iiFace > maxNumFaces ) - { - continue; - } - carve::mesh::Face<3>* face = mesh->faces[iiFace]; - - std::vector* > faceVertices; - - face->getVertices(faceVertices); - - std::vector vecIndexes; - size_t n = faceVertices.size(); - carve::mesh::Vertex<3>* vertexFirst = faceVertices[0]; - - for( int i = 0; i < n; ++i ) - { - carve::mesh::Vertex<3>* v0 = faceVertices[i]; - - vec3 point = v0->v; - int idx = polyInput.addPoint(point); - vecIndexes.push_back(idx); - } - - polyInput.m_poly_data->addFace(vecIndexes.begin(), vecIndexes.end()); - - - } - shared_ptr > meshsetNew(polyInput.m_poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); - meshsetResult = meshsetNew; - } - - static bool findEdgeLoop(carve::mesh::Edge<3>* startEdge, const std::set* >& vecEdgesInput, std::set* >& usedEdges, std::vector* >& vecResultLoop, double eps, bool dumpPolygon) - { - if( !startEdge ) - { - return false; - } - - if( vecEdgesInput.size() > 1000 ) - { - return false; - } - - vec3 startPoint = startEdge->v1()->v; - vec3 currentEndPoint = startEdge->v2()->v; - vecResultLoop.push_back(startEdge->v1()); - vecResultLoop.push_back(startEdge->v2()); - usedEdges.clear(); - usedEdges.insert(startEdge); - -#ifdef _DEBUG - bool blue = true; - glm::vec4 color1(1.0, 0.1, 1, 1); - glm::vec4 colorBlue(0, 0.8, 0.5, 1); - if( dumpPolygon ) - { - GeomDebugDump::moveOffset(0.5); - std::vector poly = { startPoint, currentEndPoint }; - GeomDebugDump::dumpPolyline(poly, color1, false); - } -#endif - - std::set* > vecEdges = vecEdgesInput; - - for( size_t ii = 0; ii < vecEdges.size(); ++ii ) - { - bool connectionFound = false; - for( carve::mesh::Edge<3>*edge : vecEdges ) - { - if( edge == startEdge ) - { - continue; - } - - auto itFind = usedEdges.find(edge); - if( itFind != usedEdges.end() ) - { - continue; - } - - vec3& edgeP0 = edge->v1()->v; - - vec3 delt0 = edgeP0 - currentEndPoint; - if( delt0.length2() < eps * eps ) - { - // edge start point is same as loop end point -> connected in forward order - vecResultLoop.push_back(edge->v2()); - currentEndPoint = edge->v2()->v; - usedEdges.insert(edge); - connectionFound = true; - -#ifdef _DEBUG - if( dumpPolygon ) - { - glm::vec4 color = blue ? colorBlue : color1; - blue = !blue; - std::vector poly = { edge->v1()->v, edge->v2()->v }; - GeomDebugDump::dumpPolyline( poly, color, false ); - } -#endif - - break; - } - - vec3& edgeP1 = edge->v2()->v; - - vec3 delt1 = edgeP1 - currentEndPoint; - if( delt1.length2() < eps * eps ) - { - // connected in reverse order - vecResultLoop.push_back(edge->v1()); - currentEndPoint = edge->v1()->v; - usedEdges.insert(edge); - connectionFound = true; - -#ifdef _DEBUG - if( dumpPolygon ) - { - glm::vec4 color = blue ? colorBlue : color1; - blue = !blue; - std::vector poly = { edge->v2()->v, edge->v1()->v }; - GeomDebugDump::dumpPolyline( poly, color, false ); - } -#endif - - break; - } - } - - if( !connectionFound ) - { - break; - } - - // check if loop is closed yet - if( vecResultLoop.size() == 2 ) - { -#ifdef _DEBUG - std::cout << "loop of two open edges -> set one as reverse edge of other" << std::endl; -#endif - } - - if( vecResultLoop.size() > 2 ) - { - vec3 delt0 = startPoint - currentEndPoint; - if( delt0.length2() < eps * eps ) - { - // closed loop - return true; - } - } - - if( usedEdges.size() == vecEdges.size() ) - { - return false; - } - } - - return false; - } - - inline void polyhedronFromMeshSet(const shared_ptr>& meshset, PolyInputCache3D& polyInput) - { - for( size_t ii = 0; ii < meshset->meshes.size(); ++ii ) - { - carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; - - for( size_t jj = 0; jj < mesh->faces.size(); ++jj ) - { - carve::mesh::Face<3>* face = mesh->faces[jj]; - - carve::mesh::Edge<3>* edge = face->edge; - if( edge ) - { - std::vector vecPointIndexes; - size_t maxNumEdges = 1000; - for( size_t kk = 0; kk < face->n_edges; ++kk ) - { - vec3& edgeEndPoint = edge->v2()->v; - int idx = polyInput.addPoint(edgeEndPoint); - vecPointIndexes.push_back(idx); - - edge = edge->next; - if( edge == face->edge ) - { - break; - } - } - if( vecPointIndexes.size() < 3 ) - { -#ifdef _DEBUG - std::cout << "face with < 3 edges" << std::endl; -#endif - continue; - } - polyInput.m_poly_data->addFace(vecPointIndexes.begin(), vecPointIndexes.end()); - } - } - } - } - - inline void polyhedronFromMesh(const carve::mesh::Mesh<3>* mesh, PolyInputCache3D& polyInput) - { - for( size_t jj = 0; jj < mesh->faces.size(); ++jj ) - { - carve::mesh::Face<3>* face = mesh->faces[jj]; - carve::mesh::Edge<3>* edge = face->edge; - if( edge ) - { - std::vector vecPointIndexes; - size_t maxNumEdges = 1000; - for( size_t kk = 0; kk < face->n_edges; ++kk ) - { - vec3& edgeEndPoint = edge->v2()->v; - int idx = polyInput.addPoint(edgeEndPoint); - vecPointIndexes.push_back(idx); - - edge = edge->next; - if( edge == face->edge ) - { - break; - } - } - if( vecPointIndexes.size() < 3 ) - { -#ifdef _DEBUG - std::cout << "face with < 3 edges" << std::endl; -#endif - continue; - } - polyInput.m_poly_data->addFace(vecPointIndexes.begin(), vecPointIndexes.end()); - } - } - } - - inline bool addFacesReversed(const PolyInputCache3D& poly_cache_source, PolyInputCache3D& poly_cache_target) - { - shared_ptr poly_data_source = poly_cache_source.m_poly_data; - - std::vector& faceIndices = poly_data_source->faceIndices; - if( faceIndices.size() == 0 ) - { - return true; - } - - size_t numPointsAll = poly_data_source->points.size(); - if( numPointsAll < 2 ) - { - return true; - } - bool inputCorrect = true; - for( size_t iiFace = 0; iiFace < faceIndices.size(); ) - { - int numPoints = faceIndices[iiFace]; - int numPointsIdx = iiFace; - - if( iiFace + numPoints >= faceIndices.size() ) - { - // skip face - break; - } - - std::vector pointIdxCurrentFace; - for( size_t iiPoint = 1; iiPoint <= numPoints; ++iiPoint ) - { - int idx = faceIndices[iiFace + iiPoint]; - - carve::geom3d::Vector point = poly_data_source->points[idx]; - int idxTarget = poly_cache_target.addPoint(point); - pointIdxCurrentFace.push_back(idxTarget); - } - - poly_cache_target.m_poly_data->addFace(pointIdxCurrentFace.rbegin(), pointIdxCurrentFace.rend()); - - iiFace += numPoints + 1; - - if( iiFace > faceIndices.size() ) - { - inputCorrect = false; - break; - } - if( iiFace == faceIndices.size() ) - { - break; - } - } - - return inputCorrect; - } - - static void resolveOpenEdges(shared_ptr>& meshset, double CARVE_EPSILON, bool dumpPolygons) - { - if( !meshset ) - { - return; - } - size_t numMeshesInput = meshset->meshes.size(); - size_t numFacesInput = 0; - size_t numOpenEdgesInput = 0; - size_t numClosedEdgesInput = 0; - std::set* > allOpenEdges; - for( size_t ii = 0; ii < meshset->meshes.size(); ++ii ) - { - carve::mesh::Mesh<3>* mesh = meshset->meshes[ii]; - numOpenEdgesInput += mesh->open_edges.size(); - numClosedEdgesInput += mesh->closed_edges.size(); - numFacesInput += mesh->faces.size(); - if( mesh->faces.size() >= 6 ) - { - for( auto edge : mesh->open_edges ) - { - allOpenEdges.insert(edge); - } - } - } - - if( numOpenEdgesInput == 0 ) - { - return; - } - - size_t maxNumFaces = 5000; - if( numFacesInput > maxNumFaces ) - { - return; - } - - size_t maxNumOpenEdges = 1000; - if( allOpenEdges.size() > maxNumOpenEdges ) - { - return; - } - - PolyInputCache3D polyInput( CARVE_EPSILON ); - polyhedronFromMeshSet(meshset, polyInput); - bool meshsetChanged = false; - - - for( size_t ii = 0; ii < allOpenEdges.size(); ++ii ) - { - if( allOpenEdges.size() == 0 ) - { - break; - } - - if( ii > maxNumOpenEdges ) - { - break; - } - - auto itBegin = allOpenEdges.begin(); - carve::mesh::Edge<3>* openEdge = *(itBegin); - - std::set* > usedEdges; - std::vector* > vecResultVertexLoop; - bool closedLoop = findEdgeLoop(openEdge, allOpenEdges, usedEdges, vecResultVertexLoop, CARVE_EPSILON, dumpPolygons ); - - if( !closedLoop ) - { - allOpenEdges.erase(itBegin); - continue; - } - - std::vector > vecResultPointLoop; - for( size_t jj = 0; jj < vecResultVertexLoop.size(); ++jj ) - { - vecResultPointLoop.push_back(vecResultVertexLoop[jj]->v); - } - -#ifdef _DEBUG - if( dumpPolygons ) - { - GeomDebugDump::moveOffset(meshset->getAABB().extent.y * 1.1); - glm::vec4 color(0, 0.5, 1, 1); - GeomDebugDump::dumpPolyline(vecResultPointLoop, color, true); - } -#endif - - vec3 pos = GeomUtils::computePolygonCentroid(vecResultPointLoop); - vec3 normal = GeomUtils::computePolygonNormal(vecResultPointLoop); - if( std::abs(normal.length2() - 1.0) > 0.01 ) - { - allOpenEdges.erase(itBegin); - continue; - } - - GeomUtils::Plane facePlane(glm::dvec3(pos.x, pos.y, pos.z), glm::dvec3(normal.x, normal.y, normal.z)); - std::vector pointIndicesInPlane; - std::vector* > vecLoopInPlane; - - // reverse, because the new edges need to be the reverse edges of the open edges - std::reverse(vecResultVertexLoop.begin(), vecResultVertexLoop.end()); - - if( vecResultVertexLoop.size() > 2 ) - { - vec3 first = vecResultVertexLoop.front()->v; - vec3 last = vecResultVertexLoop.back()->v; - vec3 delt = last - first; - if( delt.length2() < CARVE_EPSILON * CARVE_EPSILON * 10.0 ) - { - vecResultVertexLoop.pop_back(); - } - } - - for( size_t jj = 0; jj < vecResultVertexLoop.size(); ++jj ) - { - carve::mesh::Vertex<3>* vertex = vecResultVertexLoop[jj]; - vec3& edgeEndPoint = vertex->v; - - // distance point to plane - double dist = facePlane.distancePointPlane(glm::dvec3(edgeEndPoint.x, edgeEndPoint.y, edgeEndPoint.z)); - if( dist < CARVE_EPSILON * 10 ) - { - int idx = polyInput.addPoint(edgeEndPoint); - pointIndicesInPlane.push_back(idx); - vecLoopInPlane.push_back(vertex); - } - } - - if( pointIndicesInPlane.size() == vecResultVertexLoop.size() ) - { - polyInput.m_poly_data->addFace(pointIndicesInPlane.begin(), pointIndicesInPlane.end()); - meshsetChanged = true; - - for( auto edgeInLoop : usedEdges ) - { - auto itFind = allOpenEdges.find(edgeInLoop); - if( itFind != allOpenEdges.end() ) - { - allOpenEdges.erase(itFind); - } - } - } - } - - if( meshsetChanged ) - { - GeomProcessingParams params(CARVE_EPSILON, CARVE_EPSILON*0.1, CARVE_EPSILON * 0.01); - bool polyInputCorrect = checkPolyhedronData(polyInput.m_poly_data, params.minFaceArea); - if( !polyInputCorrect ) - { - fixPolyhedronData(polyInput.m_poly_data, params.minFaceArea); - polyInputCorrect = checkPolyhedronData(polyInput.m_poly_data, params.minFaceArea); - } - - if( polyInputCorrect ) - { - shared_ptr > meshsetNew(polyInput.m_poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); - - size_t numOpenEdges = 0; - size_t numClosedEdges = 0; - for( size_t ii = 0; ii < meshsetNew->meshes.size(); ++ii ) - { - carve::mesh::Mesh<3>* mesh = meshsetNew->meshes[ii]; - mesh->recalc(CARVE_EPSILON); - numOpenEdges += mesh->open_edges.size(); - numClosedEdges += mesh->closed_edges.size(); - } - -#ifdef _DEBUG - if( dumpPolygons ) - { - GeomDebugDump::moveOffset(0.4); - GeomDebugDump::moveOffset(meshset->getAABB().extent.y * 1.1); - glm::vec4 color(0, 1, 1, 1); - GeomDebugDump::dumpMeshset(meshsetNew, color, true); - } -#endif - - size_t numMeshes = meshsetNew->meshes.size(); - if( numMeshes <= numMeshesInput ) - { - if( numClosedEdges >= numClosedEdgesInput ) - { - if( numOpenEdges < numOpenEdgesInput ) - { - meshset = meshsetNew; - } - } - } - } - } - } - - static void getLargestClosedMesh(const shared_ptr >& meshsetInput, shared_ptr >& meshsetResult, double CARVE_EPSILON ) - { - std::map* > mapClosedMeshes; - if( meshsetInput ) - { - for( auto mesh : meshsetInput->meshes ) - { - if( mesh->isClosed() ) - { - int numFaces = mesh->faces.size(); - mapClosedMeshes.insert({ numFaces, mesh }); - } - - } - } - if( mapClosedMeshes.size() > 0 ) - { - carve::mesh::Mesh<3>* mesh = mapClosedMeshes.rbegin()->second; - - MeshUtils::mesh2MeshSet(mesh, meshsetResult, CARVE_EPSILON); - } - } - - static void carve2Manifold( shared_ptr >& meshsetInput, shared_ptr& manimesh, double eps) - { - PolyInputCache3D polyhedron(eps); - size_t pointCount = 0; - - for( size_t ii = 0; ii < meshsetInput->meshes.size(); ++ii ) - { - carve::mesh::Mesh<3>* mesh = meshsetInput->meshes[ii]; - const std::vector* >& vec_faces = mesh->faces; - for( size_t jj = 0; jj < vec_faces.size(); ++jj ) - { - carve::mesh::Face<3>* face = vec_faces[jj]; - - const size_t n_edges = face->n_edges; - if( n_edges < 3 ) - { - continue; - } - - if( n_edges == 3 ) - { - carve::mesh::Edge<3>* e = face->edge; - vec3& v0 = e->vert->v; - e = e->next; - vec3& v1 = e->vert->v; - e = e->next; - vec3& v2 = e->vert->v; - - if( GeomUtils::length2(v1,v0) < eps ) - { - // skip current face, and merge point0 and point 1 - v0 = v1; - continue; - } - - if( GeomUtils::length2(v1,v2) < eps ) - { - // skip current face, and merge point0 and point 1 - v2 = v1; - continue; - } - - if( GeomUtils::length2(v2,v0) < eps ) - { - // skip current face, and merge point0 and point 1 - v0 = v2; - continue; - } - - MeshUtils::addFaceCheckIndexes(v0, v1, v2, polyhedron, eps); - continue; - } - - if( n_edges >= 4 ) - { - std::cout << "MeshSet not triangulated: " << n_edges << " edges" << std::endl; - } - } - } - - double minFaceArea = eps * 0.001; - bool polyhedron_ok = checkPolyhedronData(polyhedron.m_poly_data, minFaceArea); - if( !polyhedron_ok ) - { - fixPolyhedronData(polyhedron.m_poly_data, minFaceArea); - } - - if( !manimesh ) - { - manimesh = shared_ptr(new manifold::Mesh()); - } - - for( int ii = 0; ii < polyhedron.m_poly_data->points.size(); ++ii ) - { - const vec3& v0 = polyhedron.m_poly_data->points[ii]; - manimesh->vertPos.emplace_back(v0.x, v0.y, v0.z); - } - - for( int ii = 0; ii < polyhedron.m_poly_data->faceIndices.size(); ++ii ) - { - size_t numPointsInFace = polyhedron.m_poly_data->faceIndices[ii]; - if( numPointsInFace == 3 ) - { - if( polyhedron.m_poly_data->faceIndices.size() > ii + 3 ) - { - size_t idx0 = polyhedron.m_poly_data->faceIndices[ii + 1]; - size_t idx1 = polyhedron.m_poly_data->faceIndices[ii + 2]; - size_t idx2 = polyhedron.m_poly_data->faceIndices[ii + 3]; - - if( idx0 == idx1 ) - { - continue; - } - if( idx1 == idx2 ) - { - continue; - } - if( idx2 == idx0 ) - { - continue; - } - manimesh->triVerts.emplace_back(idx0, idx1, idx2); - ii += 3; - continue; - } - } - -#ifdef _DEBUG - std::cout << "check polyhedron.m_poly_data[" << ii << "]" << std::endl; -#endif - } - } - - static void manifold2carve( const shared_ptr& manifoldInput, shared_ptr >& result, double CARVE_EPSILON) - { - if( !manifoldInput ) - { - return; - } - PolyInputCache3D poly( CARVE_EPSILON ); - manifold::Mesh resultMesh = manifoldInput->GetMesh(); - - for (int i = 0, n = resultMesh.triVerts.size(); i < n; i++) - { - int triIdx0 = resultMesh.triVerts[i][0]; - int triIdx1 = resultMesh.triVerts[i][1]; - int triIdx2 = resultMesh.triVerts[i][2]; - - if( triIdx0 > resultMesh.vertPos.size() ) - { - continue; - } - - if( triIdx1 > resultMesh.vertPos.size() ) - { - continue; - } - - if( triIdx2 > resultMesh.vertPos.size() ) - { - continue; - } - glm::vec3 p0 = resultMesh.vertPos[triIdx0]; - glm::vec3 p1 = resultMesh.vertPos[triIdx1]; - glm::vec3 p2 = resultMesh.vertPos[triIdx2]; - carve::geom::vector<3> v0 = carve::geom::VECTOR(p0.x, p0.y, p0.z); - carve::geom::vector<3> v1 = carve::geom::VECTOR(p1.x, p1.y, p1.z); - carve::geom::vector<3> v2 = carve::geom::VECTOR(p2.x, p2.y, p2.z); - - MeshUtils::addFaceCheckIndexes(v0, v1, v2, poly, CARVE_EPSILON); - } - result = shared_ptr >(poly.m_poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); - } - - static void boundingBox2Mesh(carve::geom::aabb<3>& bbox, shared_ptr >& meshset, double CARVE_EPSILON) - { - double minX = bbox.pos.x - bbox.extent.x; - double maxX = bbox.pos.x + bbox.extent.x; - double minY = bbox.pos.y - bbox.extent.y; - double maxY = bbox.pos.y + bbox.extent.y; - double minZ = bbox.pos.z - bbox.extent.z; - double maxZ = bbox.pos.z + bbox.extent.z; - - shared_ptr polyhedron_data( new carve::input::PolyhedronData() ); - polyhedron_data->addVertex( carve::geom::VECTOR( maxX, maxY, maxZ ) ); - polyhedron_data->addVertex( carve::geom::VECTOR( minX, maxY, maxZ ) ); - polyhedron_data->addVertex( carve::geom::VECTOR( minX, minY, maxZ ) ); - polyhedron_data->addVertex( carve::geom::VECTOR( maxX, minY, maxZ ) ); - - polyhedron_data->addVertex( carve::geom::VECTOR( maxX, maxY, minZ ) ); - polyhedron_data->addVertex( carve::geom::VECTOR( minX, maxY, minZ ) ); - polyhedron_data->addVertex( carve::geom::VECTOR( minX, minY, minZ ) ); - polyhedron_data->addVertex( carve::geom::VECTOR( maxX, minY, minZ ) ); - - polyhedron_data->addFace( 0, 1, 2 ); - polyhedron_data->addFace( 2, 3, 0 ); - - polyhedron_data->addFace( 7, 6, 5 ); - polyhedron_data->addFace( 5, 4, 7 ); - - polyhedron_data->addFace( 0, 4, 5 ); - polyhedron_data->addFace( 5, 1, 0 ); - polyhedron_data->addFace( 1, 5, 6 ); - polyhedron_data->addFace( 6, 2, 1 ); - polyhedron_data->addFace( 2, 6, 7 ); - polyhedron_data->addFace( 7, 3, 2 ); - polyhedron_data->addFace( 3, 7, 4 ); - polyhedron_data->addFace( 4, 0, 3 ); - - meshset = shared_ptr >(polyhedron_data->createMesh(carve::input::opts(), CARVE_EPSILON)); - } -} diff --git a/IfcPlusPlus/src/ifcpp/geometry/PointConverter.h b/IfcPlusPlus/src/ifcpp/geometry/PointConverter.h index d1ecbfd2f..d140beb9d 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/PointConverter.h +++ b/IfcPlusPlus/src/ifcpp/geometry/PointConverter.h @@ -23,6 +23,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #include #include #include +#include #include #include #include @@ -31,9 +32,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #include #include #include - +#include "GeomUtils.h" #include "IncludeCarveHeaders.h" +using namespace IFC4X3; + //\brief class to convert IFC point representations into carve input geometry class PointConverter : public StatusCallback { diff --git a/IfcPlusPlus/src/ifcpp/geometry/RepresentationConverter.h b/IfcPlusPlus/src/ifcpp/geometry/RepresentationConverter.h index d14698f01..d41612296 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/RepresentationConverter.h +++ b/IfcPlusPlus/src/ifcpp/geometry/RepresentationConverter.h @@ -152,18 +152,8 @@ class RepresentationConverter : public StatusCallback } } - void convertIfcRepresentation( const shared_ptr& ifc_representation, shared_ptr& representation_data ) + void convertIfcRepresentation( const shared_ptr& ifc_representation, shared_ptr& representation_data ) { - if( ifc_representation->m_RepresentationIdentifier ) - { - representation_data->m_representation_identifier = ifc_representation->m_RepresentationIdentifier->m_value; - } - - if( ifc_representation->m_RepresentationType ) - { - representation_data->m_representation_type = ifc_representation->m_RepresentationType->m_value; - } - representation_data->m_ifc_representation = ifc_representation; for( const shared_ptr& representation_item : ifc_representation->m_Items ) @@ -173,8 +163,7 @@ class RepresentationConverter : public StatusCallback if( geom_item ) { shared_ptr geom_item_data( new ItemShapeData() ); - representation_data->m_vec_item_data.push_back( geom_item_data ); - geom_item_data->m_parent_representation = representation_data; + representation_data->addChildItem( geom_item_data, representation_data ); geom_item_data->m_ifc_item = geom_item; try @@ -232,7 +221,8 @@ class RepresentationConverter : public StatusCallback } } - shared_ptr mapped_input_data( new RepresentationData() ); + shared_ptr mapped_input_data( new ItemShapeData() ); + mapped_input_data->m_ifc_representation = mapped_representation; try { @@ -254,19 +244,12 @@ class RepresentationConverter : public StatusCallback if( vec_appearance_data.size() > 0 ) { - // overwrite item appearances with parent appearance - for( size_t i_mapped_item = 0; i_mapped_item < mapped_input_data->m_vec_item_data.size(); ++i_mapped_item ) + for( size_t jj_appearance = 0; jj_appearance < vec_appearance_data.size(); ++jj_appearance ) { - shared_ptr& mapped_item_data = mapped_input_data->m_vec_item_data[i_mapped_item]; - mapped_item_data->m_vec_item_appearances.clear(); - - for( size_t jj_appearance = 0; jj_appearance < vec_appearance_data.size(); ++jj_appearance ) + shared_ptr& data = vec_appearance_data[jj_appearance]; + if( data ) { - shared_ptr& data = vec_appearance_data[jj_appearance]; - if( data ) - { - mapped_item_data->m_vec_item_appearances.push_back( data ); - } + mapped_input_data->m_vec_item_appearances.push_back( data ); } } } @@ -275,9 +258,10 @@ class RepresentationConverter : public StatusCallback if( map_matrix_origin && map_matrix_target ) { carve::math::Matrix mapped_pos(map_matrix_target->m_matrix*map_matrix_origin->m_matrix); - mapped_input_data->applyTransformToRepresentation(mapped_pos); + double CARVE_EPSILON = m_geom_settings->getEpsilonCoplanarDistance(); + mapped_input_data->applyTransformToItem(mapped_pos, CARVE_EPSILON); } - representation_data->appendRepresentationData( mapped_input_data, representation_data ); + representation_data->addChildItem( mapped_input_data, representation_data ); continue; } @@ -291,8 +275,7 @@ class RepresentationConverter : public StatusCallback if( topo_item ) { shared_ptr topological_item_data( new ItemShapeData() ); - representation_data->m_vec_item_data.push_back( topological_item_data ); - topological_item_data->m_parent_representation = representation_data; + representation_data->addChildItem( topological_item_data, representation_data ); topological_item_data->m_ifc_item = topo_item; convertTopologicalRepresentationItem(topo_item, topological_item_data); continue; @@ -334,7 +317,7 @@ class RepresentationConverter : public StatusCallback m_styles_converter->convertIfcPresentationStyle( presentation_style, appearance_data ); if( appearance_data ) { - representation_data->addAppearance( appearance_data ); + representation_data->m_vec_item_appearances.push_back( appearance_data ); } } } @@ -394,10 +377,10 @@ class RepresentationConverter : public StatusCallback bool mergeAlignedEdges = true; GeomProcessingParams params( m_geom_settings, polygonalFace.get(), this ); - MeshUtils::createTriangulated3DFace(face_loops, poly_cache, params); + FaceConverter::createTriangulated3DFace(face_loops, poly_cache, params); #ifdef _DEBUG - //glm::dvec4 color(0.3, 0.4, 0.5, 1.0); + //glm::vec4 color(0.3, 0.4, 0.5, 1.0); //GeomDebugDump::dumpPolyline(face_loops, color, true); #endif } @@ -542,7 +525,7 @@ class RepresentationConverter : public StatusCallback if( polygonalFaceSet->m_Closed->m_value == true ) { GeomProcessingParams params( m_geom_settings, polygonalFaceSet.get(), this ); - item_data->addClosedPolyhedron(polyCache.m_poly_data, params); + item_data->addClosedPolyhedron(polyCache.m_poly_data, params, m_geom_settings); } else { @@ -619,7 +602,7 @@ class RepresentationConverter : public StatusCallback } GeomProcessingParams params( m_geom_settings, polygonalFace.get(), this ); - MeshUtils::createTriangulated3DFace(face_loops, polyCache, params ); + FaceConverter::createTriangulated3DFace(face_loops, polyCache, params ); } if( triangulatedFaceSet->m_Closed ) @@ -627,7 +610,7 @@ class RepresentationConverter : public StatusCallback if( triangulatedFaceSet->m_Closed->m_value == true ) { GeomProcessingParams params( m_geom_settings, triangulatedFaceSet.get(), this ); - item_data->addClosedPolyhedron(polyCache.m_poly_data, params); + item_data->addClosedPolyhedron(polyCache.m_poly_data, params, m_geom_settings); } else { @@ -809,7 +792,7 @@ class RepresentationConverter : public StatusCallback GeomProcessingParams params( m_geom_settings, outer_boundary.get(), this ); PolyInputCache3D poly_cache(params.epsMergePoints); - MeshUtils::createTriangulated3DFace( face_loops, poly_cache, params); + FaceConverter::createTriangulated3DFace( face_loops, poly_cache, params); item_data->addOpenPolyhedron( poly_cache.m_poly_data, CARVE_EPSILON ); return; } @@ -942,7 +925,7 @@ class RepresentationConverter : public StatusCallback } GeomProcessingParams params( m_geom_settings, topo_face.get(), this ); - MeshUtils::createTriangulated3DFace( face_loops, poly_cache_top_face, params ); + FaceConverter::createTriangulated3DFace( face_loops, poly_cache_top_face, params ); } } if( poly_cache_top_face.m_poly_data ) @@ -977,7 +960,7 @@ class RepresentationConverter : public StatusCallback GeomProcessingParams params( m_geom_settings, topo_face.get(), this ); PolyInputCache3D poly_cache_top_face( params.epsMergePoints); - MeshUtils::createTriangulated3DFace( face_loops, poly_cache_top_face, params ); + FaceConverter::createTriangulated3DFace( face_loops, poly_cache_top_face, params ); if( poly_cache_top_face.m_poly_data ) { @@ -1028,154 +1011,171 @@ class RepresentationConverter : public StatusCallback messageCallback( "Unhandled IFC Representation", StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, topological_item.get() ); } + void collectMeshes(shared_ptr geom_item, std::vector > >& vec_meshes) + { + double eps = m_geom_settings->getEpsilonCoplanarDistance(); + std::copy(geom_item->m_meshsets.begin(), geom_item->m_meshsets.end(), std::back_inserter(vec_meshes)); + std::copy(geom_item->m_meshsets_open.begin(), geom_item->m_meshsets_open.end(), std::back_inserter(vec_meshes)); + + for (auto opening_item_data : geom_item->m_child_items) + { + collectMeshes(opening_item_data, vec_meshes); + } + } + + void subtractOpeningFromProductShape(shared_ptr& productShapeItem, std::vector > >& vec_opening_meshes, const shared_ptr& ifc_element) + { + for (size_t i_product_meshset = 0; i_product_meshset < productShapeItem->m_meshsets.size(); ++i_product_meshset) + { + // go through all meshsets of the item + shared_ptr >& product_meshset = productShapeItem->m_meshsets[i_product_meshset]; + + // do the subtraction + CSG_Adapter::computeCSG(product_meshset, vec_opening_meshes, carve::csg::CSG::A_MINUS_B, m_geom_settings, this, ifc_element); + } + + for (shared_ptr& product_item_data : productShapeItem->m_child_items) + { + if (!product_item_data) + { + continue; + } + + subtractOpeningFromProductShape(product_item_data, vec_opening_meshes, ifc_element); + } + } + void subtractOpenings(const shared_ptr& ifc_element, shared_ptr& product_shape) { std::vector > vec_rel_voids(ifc_element->m_HasOpenings_inverse); - if( vec_rel_voids.size() == 0 ) + if (vec_rel_voids.size() == 0) { return; } // convert opening representation bool allOpeningsRelativeToProduct = true; - std::vector > vec_opening_shapes; - for( auto& rel_voids_weak : vec_rel_voids ) + carve::math::Matrix product_transform = product_shape->getTransform(); + int tag = ifc_element->m_tag; + + // for all items of the product shape, subtract all items of all related openings + for (shared_ptr& productShapeItem : product_shape->m_geometric_items) { - if( rel_voids_weak.expired() ) - { - continue; - } - shared_ptr rel_voids( rel_voids_weak ); - shared_ptr opening = rel_voids->m_RelatedOpeningElement; - if( !opening ) + if (!productShapeItem) { continue; } - if( !opening->m_Representation ) + + std::vector > > productShapeMeshes; + collectMeshes(productShapeItem, productShapeMeshes); + if (productShapeMeshes.size() == 0) { continue; } - // opening can have its own relative placement - shared_ptr opening_placement = opening->m_ObjectPlacement; - shared_ptr product_shape_opening( new ProductShapeData() ); - if (opening->m_GlobalId) - { - product_shape_opening->m_entity_guid = opening->m_GlobalId->m_value; - } - if( opening_placement ) - { - std::unordered_set opening_placements_applied; - m_placement_converter->convertIfcObjectPlacement( opening_placement, product_shape_opening, opening_placements_applied, false ); - } + std::vector > vec_opening_shapes; - for( shared_ptr ifc_opening_representation : opening->m_Representation->m_Representations ) + for (auto& rel_voids_weak : vec_rel_voids) { - shared_ptr opening_representation_data(new RepresentationData()); - - try + if (rel_voids_weak.expired()) { - convertIfcRepresentation(ifc_opening_representation, opening_representation_data); + continue; } - catch( BuildingException& e ) + shared_ptr rel_voids(rel_voids_weak); + shared_ptr opening = rel_voids->m_RelatedOpeningElement; + if (!opening) { - messageCallback(e.what(), StatusCallback::MESSAGE_TYPE_ERROR, "", ifc_element.get()); + continue; } - catch( std::exception& e ) + if (!opening->m_Representation) { - messageCallback(e.what(), StatusCallback::MESSAGE_TYPE_ERROR, "", ifc_element.get()); + continue; } - product_shape_opening->m_vec_representations.push_back(opening_representation_data); - } - - // bring opening meshes to global position - carve::math::Matrix product_transform_relative = product_shape->getRelativeTransform(product_shape_opening); - if( !GeomUtils::isMatrixIdentity(product_transform_relative) ) - { - allOpeningsRelativeToProduct = false; - } + // opening can have its own relative placement - vec_opening_shapes.push_back(product_shape_opening); - } + shared_ptr opening_placement = opening->m_ObjectPlacement; + shared_ptr product_shape_opening(new ProductShapeData()); + if (opening->m_GlobalId) + { + product_shape_opening->m_entity_guid = opening->m_GlobalId->m_value; + } + if (opening_placement) + { + std::unordered_set opening_placements_applied; + m_placement_converter->convertIfcObjectPlacement(opening_placement, product_shape_opening, opening_placements_applied, false); + } - std::vector > > vec_opening_meshes; - carve::math::Matrix product_transform = product_shape->getTransform(); + for (shared_ptr ifc_opening_representation : opening->m_Representation->m_Representations) + { + shared_ptr opening_item(new ItemShapeData()); - if( !allOpeningsRelativeToProduct ) - { - product_shape->applyTransformToProduct(product_transform, false, false); - } + try + { + convertIfcRepresentation(ifc_opening_representation, opening_item); + } + catch (BuildingException& e) + { + messageCallback(e.what(), StatusCallback::MESSAGE_TYPE_ERROR, "", ifc_element.get()); + } + catch (std::exception& e) + { + messageCallback(e.what(), StatusCallback::MESSAGE_TYPE_ERROR, "", ifc_element.get()); + } - for( auto& product_shape_opening : vec_opening_shapes ) - { - if( allOpeningsRelativeToProduct ) - { - carve::math::Matrix opening_transform_relative = product_shape_opening->getRelativeTransform(product_shape); - product_shape_opening->applyTransformToProduct(opening_transform_relative, false, false); - } - else - { - carve::math::Matrix opening_transform = product_shape_opening->getTransform(); - product_shape_opening->applyTransformToProduct(opening_transform, false, false); - } + product_shape_opening->addGeometricItem(opening_item, product_shape_opening); + } - for( auto opening_representation_data : product_shape_opening->m_vec_representations ) - { - for( auto opening_item_data : opening_representation_data->m_vec_item_data ) + // bring opening meshes to global position + carve::math::Matrix product_transform_relative = product_shape->getRelativeTransform(product_shape_opening); + if (!GeomUtils::isMatrixIdentity(product_transform_relative)) { - std::copy(opening_item_data->m_meshsets.begin(), opening_item_data->m_meshsets.end(), std::back_inserter(vec_opening_meshes)); + allOpeningsRelativeToProduct = false; } + + vec_opening_shapes.push_back(product_shape_opening); } - } - // for all items of the product shape, subtract all items of all related openings - for( auto& product_representation : product_shape->m_vec_representations ) - { - if( !product_representation ) + std::vector > > vec_opening_meshes; + if (!allOpeningsRelativeToProduct) { - continue; + product_shape->applyTransformToProduct(product_transform, false, false); } - std::vector >& vec_product_items = product_representation->m_vec_item_data; - for( auto& product_item_data : vec_product_items ) + for (shared_ptr& product_shape_opening : vec_opening_shapes) { - if( !product_item_data ) + if (allOpeningsRelativeToProduct) { - continue; + carve::math::Matrix opening_transform_relative = product_shape_opening->getRelativeTransform(product_shape); + product_shape_opening->applyTransformToProduct(opening_transform_relative, false, false); } - - if( product_item_data->m_meshsets.size() == 0 ) + else { - continue; + carve::math::Matrix opening_transform = product_shape_opening->getTransform(); + product_shape_opening->applyTransformToProduct(opening_transform, false, false); } - // now go through all meshsets of the item - for( size_t i_product_meshset = 0; i_product_meshset < product_item_data->m_meshsets.size(); ++i_product_meshset ) + for (auto opening_item_data : product_shape_opening->m_geometric_items) { - shared_ptr >& product_meshset = product_item_data->m_meshsets[i_product_meshset]; - std::stringstream strs_meshset_err; - - // do the subtraction - shared_ptr > result; - CSG_Adapter::computeCSG( product_meshset, vec_opening_meshes, carve::csg::CSG::A_MINUS_B, result, m_geom_settings, this, ifc_element ); - product_meshset = result; + collectMeshes(opening_item_data, vec_opening_meshes); } } - } - if( !allOpeningsRelativeToProduct ) - { - carve::math::Matrix product_matrix_inverse; - try - { - GeomUtils::computeInverse(product_transform, product_matrix_inverse, 0.01 / m_unit_converter->getCustomLengthFactor()); - } - catch (std::exception& e) + subtractOpeningFromProductShape(productShapeItem, vec_opening_meshes, ifc_element); + + if (!allOpeningsRelativeToProduct) { - messageCallback(e.what(), StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__, ifc_element.get()); + carve::math::Matrix product_matrix_inverse; + try + { + GeomUtils::computeInverse(product_transform, product_matrix_inverse, 0.01 / m_unit_converter->getCustomLengthFactor()); + } + catch (std::exception& e) + { + messageCallback(e.what(), StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__, ifc_element.get()); + } + product_shape->applyTransformToProduct(product_matrix_inverse, false, false); } - product_shape->applyTransformToProduct(product_matrix_inverse, false, false); } } }; diff --git a/IfcPlusPlus/src/ifcpp/geometry/SolidModelConverter.h b/IfcPlusPlus/src/ifcpp/geometry/SolidModelConverter.h index e46ec64e1..6541ed657 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/SolidModelConverter.h +++ b/IfcPlusPlus/src/ifcpp/geometry/SolidModelConverter.h @@ -49,7 +49,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #include "GeomDebugDump.h" #include "GeometryInputData.h" -#include "GeomUtils.h" +#include "MeshOps.h" #include "PointConverter.h" #include "ProfileCache.h" #include "FaceConverter.h" @@ -120,78 +120,81 @@ class SolidModelConverter : public StatusCallback } shared_ptr profile_converter = m_profile_cache->getProfileConverter( swept_area ); - const std::vector >& profile_paths = profile_converter->getCoordinates(); - - shared_ptr fixed_reference_swept_area_solid = dynamic_pointer_cast( swept_area_solid ); - if( fixed_reference_swept_area_solid ) + if (profile_converter) { - //Directrix : OPTIONAL IfcCurve; - //StartParam : OPTIONAL IfcParameterValue; - //EndParam : OPTIONAL IfcParameterValue; - //FixedReference : IfcDirection; - - shared_ptr& ifc_directrix_curve = fixed_reference_swept_area_solid->m_Directrix; - //shared_ptr& ifc_start_param = fixed_reference_swept_area_solid->m_StartParam; //optional - //shared_ptr& ifc_end_param = fixed_reference_swept_area_solid->m_EndParam; //optional - //shared_ptr& ifc_fixed_reference = fixed_reference_swept_area_solid->m_FixedReference; // TODO: apply fixed reference - messageCallback( "IfcFixedReferenceSweptAreaSolid: Fixed reference not implemented", StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, fixed_reference_swept_area_solid.get() ); - - std::vector segment_start_points; - std::vector basis_curve_points; - m_curve_converter->convertIfcCurve( ifc_directrix_curve, basis_curve_points, segment_start_points, true ); - - GeomProcessingParams params( m_geom_settings, fixed_reference_swept_area_solid.get(), this ); - m_sweeper->sweepArea( basis_curve_points, profile_paths, item_data_solid, params ); - item_data->addItemData( item_data_solid ); - item_data->applyTransformToItem( swept_area_pos ); - - return; - } + const std::vector >& profile_paths = profile_converter->getCoordinates(); - shared_ptr revolved_area_solid = dynamic_pointer_cast( swept_area_solid ); - if( revolved_area_solid ) - { - convertIfcRevolvedAreaSolid( revolved_area_solid, item_data_solid ); - item_data->addItemData( item_data_solid ); - item_data->applyTransformToItem( swept_area_pos ); - return; - } + shared_ptr fixed_reference_swept_area_solid = dynamic_pointer_cast(swept_area_solid); + if (fixed_reference_swept_area_solid) + { + //Directrix : OPTIONAL IfcCurve; + //StartParam : OPTIONAL IfcParameterValue; + //EndParam : OPTIONAL IfcParameterValue; + //FixedReference : IfcDirection; + + shared_ptr& ifc_directrix_curve = fixed_reference_swept_area_solid->m_Directrix; + //shared_ptr& ifc_start_param = fixed_reference_swept_area_solid->m_StartParam; //optional + //shared_ptr& ifc_end_param = fixed_reference_swept_area_solid->m_EndParam; //optional + //shared_ptr& ifc_fixed_reference = fixed_reference_swept_area_solid->m_FixedReference; // TODO: apply fixed reference + messageCallback("IfcFixedReferenceSweptAreaSolid: Fixed reference not implemented", StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, fixed_reference_swept_area_solid.get()); + + std::vector segment_start_points; + std::vector basis_curve_points; + m_curve_converter->convertIfcCurve(ifc_directrix_curve, basis_curve_points, segment_start_points, true); + + GeomProcessingParams params(m_geom_settings, fixed_reference_swept_area_solid.get(), this); + m_sweeper->sweepArea(basis_curve_points, profile_paths, item_data_solid, params); + item_data->addItemData(item_data_solid); + item_data->applyTransformToItem(swept_area_pos); + + return; + } - shared_ptr surface_curve_swept_area_solid = dynamic_pointer_cast( swept_area_solid ); - if( surface_curve_swept_area_solid ) - { - shared_ptr& ifc_directrix_curve = surface_curve_swept_area_solid->m_Directrix; - //shared_ptr& ifc_start_param = surface_curve_swept_area_solid->m_StartParam; //optional - //shared_ptr& ifc_end_param = surface_curve_swept_area_solid->m_EndParam; //optional - shared_ptr& ifc_reference_surface = surface_curve_swept_area_solid->m_ReferenceSurface; // TODO: apply start_param, end_param - messageCallback( "IfcSurfaceCurveSweptAreaSolid: StartParam and EndParam not implemented", StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, surface_curve_swept_area_solid.get() ); - - std::vector segment_start_points; - std::vector directrix_curve_points; - m_curve_converter->convertIfcCurve( ifc_directrix_curve, directrix_curve_points, segment_start_points, true ); - - // apply reference curve - //shared_ptr reference_surface_data( new carve::input::PolylineSetData() ); - shared_ptr surface_proxy; - m_face_converter->convertIfcSurface( ifc_reference_surface, item_data_solid, surface_proxy ); + shared_ptr revolved_area_solid = dynamic_pointer_cast(swept_area_solid); + if (revolved_area_solid) + { + convertIfcRevolvedAreaSolid(revolved_area_solid, item_data_solid); + item_data->addItemData(item_data_solid); + item_data->applyTransformToItem(swept_area_pos); + return; + } - if( surface_proxy ) + shared_ptr surface_curve_swept_area_solid = dynamic_pointer_cast(swept_area_solid); + if (surface_curve_swept_area_solid) { - for( size_t ii = 0; ii < directrix_curve_points.size(); ++ii ) + shared_ptr& ifc_directrix_curve = surface_curve_swept_area_solid->m_Directrix; + //shared_ptr& ifc_start_param = surface_curve_swept_area_solid->m_StartParam; //optional + //shared_ptr& ifc_end_param = surface_curve_swept_area_solid->m_EndParam; //optional + shared_ptr& ifc_reference_surface = surface_curve_swept_area_solid->m_ReferenceSurface; // TODO: apply start_param, end_param + messageCallback("IfcSurfaceCurveSweptAreaSolid: StartParam and EndParam not implemented", StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, surface_curve_swept_area_solid.get()); + + std::vector segment_start_points; + std::vector directrix_curve_points; + m_curve_converter->convertIfcCurve(ifc_directrix_curve, directrix_curve_points, segment_start_points, true); + + // apply reference curve + //shared_ptr reference_surface_data( new carve::input::PolylineSetData() ); + shared_ptr surface_proxy; + m_face_converter->convertIfcSurface(ifc_reference_surface, item_data_solid, surface_proxy); + + if (surface_proxy) { - //vec3& point_3d = directrix_curve_points[ii]; - //vec2 point_2d( carve::geom::VECTOR( point_3d.x, point_3d.y ) ); - //surface_proxy->computePointOnSurface( point_3d, point_3d ); - // TODO: implement + for (size_t ii = 0; ii < directrix_curve_points.size(); ++ii) + { + //vec3& point_3d = directrix_curve_points[ii]; + //vec2 point_2d( carve::geom::VECTOR( point_3d.x, point_3d.y ) ); + //surface_proxy->computePointOnSurface( point_3d, point_3d ); + // TODO: implement + } } - } - GeomProcessingParams params( m_geom_settings, surface_curve_swept_area_solid.get(), this ); - m_sweeper->sweepArea( directrix_curve_points, profile_paths, item_data_solid, params ); - item_data->addItemData( item_data_solid ); - item_data->applyTransformToItem( swept_area_pos ); + GeomProcessingParams params(m_geom_settings, surface_curve_swept_area_solid.get(), this); + m_sweeper->sweepArea(directrix_curve_points, profile_paths, item_data_solid, params); + item_data->addItemData(item_data_solid); + item_data->applyTransformToItem(swept_area_pos); - return; + return; + } } messageCallback( "Unhandled IFC Representation", StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, solid_model.get() ); @@ -371,16 +374,20 @@ class SolidModelConverter : public StatusCallback messageCallback( "Invalid SweptArea", StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, extruded_area.get() ); return; } - shared_ptr profile_converter = m_profile_cache->getProfileConverter( swept_area ); - profile_converter->simplifyPaths(); - const std::vector >& paths = profile_converter->getCoordinates(); - if( paths.size() == 0 ) + shared_ptr profile_converter = m_profile_cache->getProfileConverter( swept_area ); + if (profile_converter) { - return; + profile_converter->simplifyPaths(); + const std::vector >& paths = profile_converter->getCoordinates(); + + if (paths.size() == 0) + { + return; + } + GeomProcessingParams params(m_geom_settings, extruded_area.get(), this); + m_sweeper->extrude(paths, extrusion_vector, item_data, params); } - GeomProcessingParams params( m_geom_settings, extruded_area.get(), this ); - m_sweeper->extrude( paths, extrusion_vector, item_data, params ); } void convertRevolvedAreaSolid( const std::vector >& profile_coords_unchecked, const vec3& axis_location, const vec3& axis_direction, double revolution_angle, shared_ptr item_data, BuildingEntity* entity_of_origin = nullptr ) @@ -435,7 +442,7 @@ class SolidModelConverter : public StatusCallback } // triangulate - double CARVE_EPSILON = m_geom_settings->getEpsilonCoplanarDistance(); + double eps = m_geom_settings->getEpsilonCoplanarDistance(); std::vector path_merged; std::vector > path_incorporated_holes; std::vector triangulated; @@ -459,7 +466,7 @@ class SolidModelConverter : public StatusCallback const vec2 & point_2d = loop_2d[index_in_loop]; path_merged.push_back( point_2d ); } - carve::triangulate::triangulate( path_merged, triangulated, CARVE_EPSILON ); + carve::triangulate::triangulate( path_merged, triangulated, eps ); carve::triangulate::improve( path_merged, triangulated ); } catch( ... ) @@ -504,7 +511,7 @@ class SolidModelConverter : public StatusCallback vec3 polygon_normal = GeomUtils::computePolygon2DNormal( profile_coords[0] ); const vec2& pt0_2d = profile_coords[0][0]; vec3 pt0_3d( carve::geom::VECTOR( pt0_2d.x, pt0_2d.y, 0 ) ); - vec3 pt0 = carve::math::Matrix::ROT( d_angle, axis_direction, CARVE_EPSILON )*(pt0_3d + base_point); + vec3 pt0 = carve::math::Matrix::ROT( d_angle, axis_direction, eps )*(pt0_3d + base_point); if( polygon_normal.z*pt0.z > 0 ) { angle = revolution_angle; @@ -519,7 +526,7 @@ class SolidModelConverter : public StatusCallback carve::math::Matrix m; for( int ii = 0; ii <= num_segments; ++ii ) { - m = carve::math::Matrix::ROT( angle, -axis_direction, CARVE_EPSILON ); + m = carve::math::Matrix::ROT( angle, -axis_direction, eps ); for( size_t jj = 0; jj < profile_coords.size(); ++jj ) { const std::vector& loop = profile_coords[jj]; @@ -709,7 +716,7 @@ class SolidModelConverter : public StatusCallback segment_offset += num_vertices_per_section; } - item_data->addOpenOrClosedPolyhedron( polyhedron_data, CARVE_EPSILON ); + item_data->addOpenOrClosedPolyhedron( polyhedron_data, eps ); } void convertIfcRevolvedAreaSolid( const shared_ptr& revolved_area, shared_ptr item_data ) @@ -773,8 +780,11 @@ class SolidModelConverter : public StatusCallback // swept area shared_ptr profile_converter = m_profile_cache->getProfileConverter( swept_area_profile ); - const std::vector >& profile_coords_unchecked = profile_converter->getCoordinates(); - convertRevolvedAreaSolid( profile_coords_unchecked, axis_location, axis_direction, revolution_angle, item_data ); + if (profile_converter) + { + const std::vector >& profile_coords_unchecked = profile_converter->getCoordinates(); + convertRevolvedAreaSolid(profile_coords_unchecked, axis_location, axis_direction, revolution_angle, item_data); + } } void convertIfcBooleanResult( const shared_ptr& bool_result, shared_ptr item_data ) @@ -789,7 +799,11 @@ class SolidModelConverter : public StatusCallback } carve::csg::CSG::OP csg_operation = carve::csg::CSG::A_MINUS_B; - if( ifc_boolean_operator->m_enum == IfcBooleanOperator::ENUM_UNION ) + if (ifc_boolean_operator->m_enum == IfcBooleanOperator::ENUM_DIFFERENCE) + { + csg_operation = carve::csg::CSG::A_MINUS_B; + } + else if( ifc_boolean_operator->m_enum == IfcBooleanOperator::ENUM_UNION ) { csg_operation = carve::csg::CSG::UNION; } @@ -797,10 +811,6 @@ class SolidModelConverter : public StatusCallback { csg_operation = carve::csg::CSG::INTERSECTION; } - else if( ifc_boolean_operator->m_enum == IfcBooleanOperator::ENUM_DIFFERENCE ) - { - csg_operation = carve::csg::CSG::A_MINUS_B; - } else { messageCallback( "Invalid IfcBooleanOperator", StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, bool_result.get() ); @@ -816,56 +826,19 @@ class SolidModelConverter : public StatusCallback shared_ptr second_operand_data( new ItemShapeData() ); convertIfcBooleanOperand( ifc_second_operand, second_operand_data, first_operand_data ); -#ifdef _DEBUG - if( bool_result->m_tag == 269529 || bool_result->m_tag == 244 )// 428815 )//429391 ) - { - glm::dvec4 color(0.5, 0.6, 0.7, 1.0 ); - if( first_operand_data->m_meshsets.size() > 0 ) - { - GeomDebugDump::dumpMeshset(first_operand_data->m_meshsets[0], color, true); - } - else - { - std::cout << "first_operand_data->m_meshsets.size() == 0" << std::endl; - } - if( second_operand_data->m_meshsets.size() > 0 ) - { - GeomDebugDump::dumpMeshset(second_operand_data->m_meshsets[0], color, true); - } - else - { - std::cout << "second_operand_data->m_meshsets.size() == 0" << std::endl; - } - } -#endif - // for every first operand polyhedrons, apply all second operand polyhedrons std::vector > >& vec_first_operand_meshsets = first_operand_data->m_meshsets; for( size_t i_meshset_first = 0; i_meshset_first < vec_first_operand_meshsets.size(); ++i_meshset_first ) { shared_ptr >& first_operand_meshset = vec_first_operand_meshsets[i_meshset_first]; - std::vector > >& vec_second_operand_meshsets = second_operand_data->m_meshsets; - shared_ptr > result; - CSG_Adapter::computeCSG( first_operand_meshset, vec_second_operand_meshsets, csg_operation, result, m_geom_settings, this, bool_result ); - first_operand_meshset = result; - } - - -#ifdef _DEBUG - if( bool_result->m_tag == 269529 )// 428815 )//429391 ) - { - glm::dvec4 color(0.5, 0.6, 0.7, 1.0); - if( first_operand_data->m_meshsets.size() > 0 ) + if (!first_operand_meshset) { - GeomDebugDump::dumpMeshset(first_operand_data->m_meshsets[0], color, true); - } - else - { - std::cout << "first_operand_data->m_meshsets.size() == 0" << std::endl; + continue; } + std::vector > >& vec_second_operand_meshsets = second_operand_data->m_meshsets; + CSG_Adapter::computeCSG( first_operand_meshset, vec_second_operand_meshsets, csg_operation, m_geom_settings, this, bool_result ); } -#endif // now copy processed first operands to result input data std::copy( first_operand_data->m_meshsets.begin(), first_operand_data->m_meshsets.end(), std::back_inserter( item_data->m_meshsets ) ); @@ -885,7 +858,7 @@ class SolidModelConverter : public StatusCallback { shared_ptr polyhedron_data( new carve::input::PolyhedronData() ); const double length_factor = m_point_converter->getUnitConverter()->getLengthInMeterFactor(); - double CARVE_EPSILON = m_geom_settings->getEpsilonCoplanarDistance(); + double eps = m_geom_settings->getEpsilonCoplanarDistance(); // ENTITY IfcCsgPrimitive3D ABSTRACT SUPERTYPE OF(ONEOF(IfcBlock, IfcRectangularPyramid, IfcRightCircularCone, IfcRightCircularCylinder, IfcSphere shared_ptr primitive_placement_transform; @@ -957,7 +930,7 @@ class SolidModelConverter : public StatusCallback polyhedron_data->addFace( 3, 7, 4 ); polyhedron_data->addFace( 4, 0, 3 ); - item_data->addOpenOrClosedPolyhedron( polyhedron_data, CARVE_EPSILON ); + item_data->addOpenOrClosedPolyhedron( polyhedron_data, eps ); return; } @@ -997,7 +970,7 @@ class SolidModelConverter : public StatusCallback polyhedron_data->addFace( 0, 4, 3 ); polyhedron_data->addFace( 0, 3, 2 ); - item_data->addOpenOrClosedPolyhedron( polyhedron_data, CARVE_EPSILON ); + item_data->addOpenOrClosedPolyhedron( polyhedron_data, eps ); return; } @@ -1043,7 +1016,7 @@ class SolidModelConverter : public StatusCallback } polyhedron_data->addFace( 1, m_geom_settings->getNumVerticesPerCircleWithRadius(radius) + 1, 2 ); - item_data->addOpenOrClosedPolyhedron( polyhedron_data, CARVE_EPSILON ); + item_data->addOpenOrClosedPolyhedron( polyhedron_data, eps ); return; } @@ -1092,7 +1065,7 @@ class SolidModelConverter : public StatusCallback polyhedron_data->addFace( 1, i*2 + 5, i*2 + 3 ); // bottom cap: 1-5-3 1-7-5 1-9-7 } - item_data->addOpenOrClosedPolyhedron( polyhedron_data, CARVE_EPSILON ); + item_data->addOpenOrClosedPolyhedron( polyhedron_data, eps ); return; } @@ -1167,7 +1140,7 @@ class SolidModelConverter : public StatusCallback polyhedron_data->addFace( last_index, last_index - ( i + 2 ), last_index - ( i + 1 ) ); } polyhedron_data->addFace( last_index, last_index - 1, last_index - nvc ); - item_data->addOpenOrClosedPolyhedron( polyhedron_data, CARVE_EPSILON ); + item_data->addOpenOrClosedPolyhedron( polyhedron_data, eps ); return; } messageCallback( "Unhandled IFC Representation", StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, csg_primitive.get() ); @@ -1197,12 +1170,12 @@ class SolidModelConverter : public StatusCallback box_data->addFace( 7, 3, 2 ); } - void convertIfcHalfSpaceSolid( const shared_ptr& half_space_solid, shared_ptr item_data, const shared_ptr& other_operand ) + void convertIfcHalfSpaceSolid( const shared_ptr& half_space_solid, shared_ptr& item_data, const shared_ptr& other_operand ) { //ENTITY IfcHalfSpaceSolid SUPERTYPE OF(ONEOF(IfcBoxedHalfSpace, IfcPolygonalBoundedHalfSpace)) double length_factor = m_point_converter->getUnitConverter()->getLengthInMeterFactor(); shared_ptr base_surface = half_space_solid->m_BaseSurface; - double CARVE_EPSILON = m_geom_settings->getEpsilonCoplanarDistance(); + double eps = m_geom_settings->getEpsilonCoplanarDistance(); // base surface shared_ptr elem_base_surface = dynamic_pointer_cast( base_surface ); @@ -1288,19 +1261,27 @@ class SolidModelConverter : public StatusCallback poly_point = box_position_matrix*poly_point; } - item_data->addOpenOrClosedPolyhedron( polyhedron_data, CARVE_EPSILON ); + item_data->addOpenOrClosedPolyhedron( polyhedron_data, eps ); return; } // check dimensions of other operand + carve::geom::aabb<3> bbox_other_operand; double extrusion_depth = HALF_SPACE_BOX_SIZE*m_point_converter->getUnitConverter()->getCustomLengthFactor(); + vec3 extrusion_extent = carve::geom::VECTOR(0, 0, extrusion_depth); if( other_operand ) { - carve::geom::aabb<3> bbox_other_operand; - other_operand->computeBoundingBox(bbox_other_operand); - vec3& aabb_extent = bbox_other_operand.extent; - double max_extent = std::max( aabb_extent.x, std::max( aabb_extent.y, aabb_extent.z ) ); - extrusion_depth = 2.5*max_extent; + std::set setVisited; + other_operand->computeBoundingBox(bbox_other_operand, setVisited); + extrusion_extent = bbox_other_operand.extent; + + //double max_extent = std::max( aabb_extent.x, std::max( aabb_extent.y, aabb_extent.z ) ); + //if (std::abs(max_extent) > eps) + //{ + // extrusion_depth = 2.1 * max_extent; + //} + + extrusion_depth = 2.1 * extrusion_extent.z; } shared_ptr polygonal_half_space = dynamic_pointer_cast( half_space_solid ); @@ -1324,6 +1305,9 @@ class SolidModelConverter : public StatusCallback } boundary_plane_normal = carve::geom::VECTOR( boundary_position_matrix._31, boundary_position_matrix._32, boundary_position_matrix._33 ); boundary_position = carve::geom::VECTOR( boundary_position_matrix._41, boundary_position_matrix._42, boundary_position_matrix._43 ); + + extrusion_extent = boundary_position_matrix * extrusion_extent; + extrusion_depth = 2.1 * extrusion_extent.z; } // PolygonalBoundary is given in 2D @@ -1345,16 +1329,21 @@ class SolidModelConverter : public StatusCallback paths.push_back( polygonal_boundary ); shared_ptr polygonal_halfspace_item_data( new ItemShapeData ); GeomProcessingParams params( m_geom_settings, polygonal_half_space.get(), this ); - m_sweeper->extrude( paths, vec3( carve::geom::VECTOR( 0, 0, extrusion_depth ) ), polygonal_halfspace_item_data, params ); + vec3 extrusionVector = carve::geom::VECTOR(0, 0, extrusion_depth); + m_sweeper->extrude( paths, extrusionVector, polygonal_halfspace_item_data, params ); if( polygonal_halfspace_item_data->m_meshsets.size() != 1 ) { +#ifdef _DEBUG + glm::vec4 color(0.5, 0.5, 0.5, 1); + GeomDebugDump::dumpPolyline(paths, color, true); +#endif messageCallback( "polygonal_halfspace_item_data->meshsets.size() != 1", StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__, polygonal_half_space.get() ); return; } // apply position of PolygonalBoundary - polygonal_halfspace_item_data->applyTransformToItem( boundary_position_matrix, CARVE_EPSILON ); + polygonal_halfspace_item_data->applyTransformToItem( boundary_position_matrix, eps ); shared_ptr > polygonal_halfspace_meshset = polygonal_halfspace_item_data->m_meshsets[0]; if( !polygonal_halfspace_meshset ) @@ -1381,7 +1370,7 @@ class SolidModelConverter : public StatusCallback // points below the base surface are projected into plane vec3 v; double t; - carve::IntersectionClass intersect = carve::geom3d::rayPlaneIntersection( base_surface_plane, poly_point, poly_point + boundary_plane_normal, v, t, CARVE_EPSILON ); + carve::IntersectionClass intersect = carve::geom3d::rayPlaneIntersection( base_surface_plane, poly_point, poly_point + boundary_plane_normal, v, t, eps ); if( intersect > 0 ) { if( agreement_check > 0 ) @@ -1415,7 +1404,7 @@ class SolidModelConverter : public StatusCallback for( size_t i_mesh = 0; i_mesh < polygonal_halfspace_meshset->meshes.size(); ++i_mesh ) { - polygonal_halfspace_meshset->meshes[i_mesh]->recalc(CARVE_EPSILON); + polygonal_halfspace_meshset->meshes[i_mesh]->recalc(eps); } item_data->m_meshsets.push_back( polygonal_halfspace_meshset ); @@ -1425,72 +1414,84 @@ class SolidModelConverter : public StatusCallback if( !isClosed || polygonal_half_space->m_tag == 754980 ) { std::cout << "!polygonal_halfspace_meshset->isClosed()" << std::endl; - GeomDebugDump::dumpMeshset(polygonal_halfspace_meshset, glm::dvec4(0.7, 0.7, 0.7, 1), true); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(polygonal_halfspace_meshset, glm::vec4(0.7, 0.7, 0.7, 1), drawNormals, true); } #endif } else { // else, its an unbounded half space solid, create simple box + + if (!bbox_other_operand.isEmpty()) + { + double max_extent = std::max(bbox_other_operand.extent.x, std::max(bbox_other_operand.extent.y, bbox_other_operand.extent.z)); + if (std::abs(max_extent) > eps) + { + extrusion_depth = 2.1 * max_extent; + } + } + + int var = 0; - if( var == 0 ) + if (var == 0) { - shared_ptr surface_item_data( new ItemShapeData() ); + shared_ptr surface_item_data(new ItemShapeData()); shared_ptr surface_proxy; - m_face_converter->convertIfcSurface( base_surface, surface_item_data, surface_proxy, extrusion_depth ); - if( surface_item_data->m_polylines.size() > 0 ) + m_face_converter->convertIfcSurface(base_surface, surface_item_data, surface_proxy, extrusion_depth); + if (surface_item_data->m_polylines.size() > 0) { shared_ptr& surface_data = surface_item_data->m_polylines[0]; std::vector base_surface_points = surface_data->points; - if( base_surface_points.size() != 4 ) + if (base_surface_points.size() != 4) { - messageCallback( "invalid IfcHalfSpaceSolid.BaseSurface", StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__, polygonal_half_space.get() ); + messageCallback("invalid IfcHalfSpaceSolid.BaseSurface", StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__, polygonal_half_space.get()); return; } + // If the agreement flag is TRUE, then the subset is the one the normal points away from bool agreement = half_space_solid->m_AgreementFlag->m_value; - if( !agreement ) + if (!agreement) { - std::reverse( base_surface_points.begin(), base_surface_points.end() ); + std::reverse(base_surface_points.begin(), base_surface_points.end()); } - vec3 base_surface_normal = GeomUtils::computePolygonNormal( base_surface_points ); + vec3 base_surface_normal = GeomUtils::computePolygonNormal(base_surface_points); vec3 half_space_extrusion_direction = -base_surface_normal; - vec3 half_space_extrusion_vector = half_space_extrusion_direction*extrusion_depth; - shared_ptr half_space_box_data( new carve::input::PolyhedronData() ); - extrudeBox( base_surface_points, half_space_extrusion_vector, half_space_box_data ); - item_data->addOpenOrClosedPolyhedron( half_space_box_data, CARVE_EPSILON ); + vec3 half_space_extrusion_vector = half_space_extrusion_direction * extrusion_depth; + shared_ptr half_space_box_data(new carve::input::PolyhedronData()); + extrudeBox(base_surface_points, half_space_extrusion_vector, half_space_box_data); + item_data->addOpenOrClosedPolyhedron(half_space_box_data, eps); } } - - if( var == 1 ) + else if (var == 1) { std::vector box_base_points; - box_base_points.push_back( base_position_matrix*carve::geom::VECTOR( extrusion_depth, extrusion_depth, 0.0 ) ); - box_base_points.push_back( base_position_matrix*carve::geom::VECTOR( -extrusion_depth, extrusion_depth, 0.0 ) ); - box_base_points.push_back( base_position_matrix*carve::geom::VECTOR( -extrusion_depth, -extrusion_depth, 0.0 ) ); - box_base_points.push_back( base_position_matrix*carve::geom::VECTOR( extrusion_depth, -extrusion_depth, 0.0 ) ); + box_base_points.push_back(base_position_matrix * carve::geom::VECTOR(extrusion_depth, extrusion_depth, 0.0)); + box_base_points.push_back(base_position_matrix * carve::geom::VECTOR(-extrusion_depth, extrusion_depth, 0.0)); + box_base_points.push_back(base_position_matrix * carve::geom::VECTOR(-extrusion_depth, -extrusion_depth, 0.0)); + box_base_points.push_back(base_position_matrix * carve::geom::VECTOR(extrusion_depth, -extrusion_depth, 0.0)); vec3 half_space_extrusion_direction = -base_surface_plane.N; - vec3 half_space_extrusion_vector = half_space_extrusion_direction*extrusion_depth; + vec3 half_space_extrusion_vector = half_space_extrusion_direction * extrusion_depth; - vec3 box_base_normal = GeomUtils::computePolygonNormal( box_base_points ); - double dot_normal = dot( box_base_normal, base_surface_plane.N ); - if( dot_normal > 0 ) + vec3 box_base_normal = GeomUtils::computePolygonNormal(box_base_points); + double dot_normal = dot(box_base_normal, base_surface_plane.N); + if (dot_normal > 0) { - std::reverse( box_base_points.begin(), box_base_points.end() ); + std::reverse(box_base_points.begin(), box_base_points.end()); } - shared_ptr half_space_box_data( new carve::input::PolyhedronData() ); - extrudeBox( box_base_points, half_space_extrusion_vector, half_space_box_data ); - item_data->addOpenOrClosedPolyhedron( half_space_box_data, CARVE_EPSILON ); + shared_ptr half_space_box_data(new carve::input::PolyhedronData()); + extrudeBox(box_base_points, half_space_extrusion_vector, half_space_box_data); + item_data->addOpenOrClosedPolyhedron(half_space_box_data, eps); } return; } } - void convertIfcBooleanOperand( const shared_ptr& operand_select, shared_ptr item_data, const shared_ptr& other_operand ) + void convertIfcBooleanOperand( const shared_ptr& operand_select, shared_ptr& item_data, const shared_ptr& other_operand ) { // TYPE IfcBooleanOperand = SELECT (IfcBooleanResult ,IfcCsgPrimitive3D ,IfcHalfSpaceSolid ,IfcSolidModel); shared_ptr solid_model = dynamic_pointer_cast( operand_select ); diff --git a/IfcPlusPlus/src/ifcpp/geometry/Sweeper.h b/IfcPlusPlus/src/ifcpp/geometry/Sweeper.h index 1403fabf9..6343478e8 100644 --- a/IfcPlusPlus/src/ifcpp/geometry/Sweeper.h +++ b/IfcPlusPlus/src/ifcpp/geometry/Sweeper.h @@ -243,7 +243,7 @@ class Sweeper : public StatusCallback { if( params.ifc_entity->m_tag == 258816 ) { - glm::dvec4 color(0.3, 0.4, 0.5, 1.0); + glm::vec4 color(0.3, 0.4, 0.5, 1.0); for( size_t ii = 0; ii < faceLoopsTriangulate.size(); ++ii ) { std::vector >& loop2D = faceLoopsTriangulate[ii]; @@ -392,7 +392,7 @@ class Sweeper : public StatusCallback } } #endif - itemData->addClosedPolyhedron(meshOut, params); + itemData->addClosedPolyhedron(meshOut, params, m_geom_settings); } /*\brief Extrudes a circle cross section along a path. At turns, the points are placed in the bisecting plane @@ -440,7 +440,7 @@ class Sweeper : public StatusCallback use_radius_inner = radius; } - double CARVE_EPSILON = params.epsMergePoints; + double eps = params.epsMergePoints; vec3 local_z( carve::geom::VECTOR( 0, 0, 1 ) ); vec3 curve_point_first = curve_points[0]; vec3 curve_point_second = curve_points[1]; @@ -588,7 +588,7 @@ class Sweeper : public StatusCallback } vec3 bisecting_normal; - GeomUtils::bisectingPlane( vertex_before, vertex_current, vertex_next, bisecting_normal, CARVE_EPSILON ); + GeomUtils::bisectingPlane( vertex_before, vertex_current, vertex_next, bisecting_normal, eps ); vec3 section1 = vertex_current - vertex_before; vec3 section2 = vertex_next - vertex_current; @@ -626,7 +626,7 @@ class Sweeper : public StatusCallback vec3 v; double t; - carve::IntersectionClass intersect = carve::geom3d::rayPlaneIntersection( bisecting_plane, vertex, vertex + section1, v, t, CARVE_EPSILON); + carve::IntersectionClass intersect = carve::geom3d::rayPlaneIntersection( bisecting_plane, vertex, vertex + section1, v, t, eps); if( intersect > 0 ) { vertex = v; @@ -647,7 +647,7 @@ class Sweeper : public StatusCallback vec3 v; double t; - carve::IntersectionClass intersect = carve::geom3d::rayPlaneIntersection( bisecting_plane, vertex, vertex + section1, v, t, CARVE_EPSILON); + carve::IntersectionClass intersect = carve::geom3d::rayPlaneIntersection( bisecting_plane, vertex, vertex + section1, v, t, eps); if( intersect > 0 ) { vertex = v; @@ -763,26 +763,27 @@ class Sweeper : public StatusCallback try { - item_data->addClosedPolyhedron( poly_data, params ); + item_data->addClosedPolyhedron( poly_data, params, m_geom_settings ); } catch( BuildingException& exception ) { messageCallback( exception.what(), StatusCallback::MESSAGE_TYPE_WARNING, "", params.ifc_entity ); // calling function already in e.what() #ifdef _DEBUG - shared_ptr > meshset( poly_data->createMesh( carve::input::opts(), CARVE_EPSILON ) ); - glm::dvec4 color( 0.7, 0.7, 0.7, 1.0 ); - GeomDebugDump::dumpMeshset( meshset, color, true ); + shared_ptr > meshset( poly_data->createMesh( carve::input::opts(), eps ) ); + glm::vec4 color( 0.7, 0.7, 0.7, 1.0 ); + bool drawNormals = true; + GeomDebugDump::dumpMeshset( meshset, color, drawNormals, true ); #endif } #ifdef _DEBUG - shared_ptr > meshset( poly_data->createMesh(carve::input::opts(), CARVE_EPSILON) ); + shared_ptr > meshset( poly_data->createMesh(carve::input::opts(), eps) ); MeshSetInfo infoMesh( this, params.ifc_entity ); - MeshUtils::checkMeshSetValidAndClosed( meshset, infoMesh, CARVE_EPSILON ); + MeshOps::checkMeshSetValidAndClosed( meshset, infoMesh, params); #endif } - void findEnclosedLoops(const std::vector >& face_loops_input, std::vector > >& profile_paths_enclosed, double CARVE_EPSILON) + void findEnclosedLoops(const std::vector >& face_loops_input, std::vector > >& profile_paths_enclosed, double eps) { if (face_loops_input.size() > 1) { @@ -794,7 +795,7 @@ class Sweeper : public StatusCallback for (size_t ii = 1; ii < face_loops_input.size(); ++ii) { const std::vector& loop = face_loops_input[ii]; - bool loop_enclosed_in_loop1 = GeomUtils::isEnclosed(loop, loop1, CARVE_EPSILON); + bool loop_enclosed_in_loop1 = GeomUtils::isEnclosed(loop, loop1, eps); if (loop_enclosed_in_loop1) { @@ -840,7 +841,7 @@ class Sweeper : public StatusCallback vec3 normal_first_loop; bool warning_small_loop_detected = false; bool polyline_created = false; - double CARVE_EPSILON = m_geom_settings->getEpsilonCoplanarDistance(); + double eps = m_geom_settings->getEpsilonCoplanarDistance(); for( size_t i_face_loops = 0; i_face_loops < profile_paths_input.size(); ++i_face_loops ) { @@ -976,7 +977,7 @@ class Sweeper : public StatusCallback // | 1 5<---------------4 | // | / / | // 0 6----------------------->7 - carve::triangulate::triangulate( merged_path, triangulated, CARVE_EPSILON ); + carve::triangulate::triangulate( merged_path, triangulated, eps ); carve::triangulate::improve( merged_path, triangulated ); // triangles: (3,8,9) (2,0,1) (4,6,7) (4,5,6) (9,0,2) (9,2,3) (7,8,3) (3,4,7) } @@ -984,7 +985,7 @@ class Sweeper : public StatusCallback { #ifdef _DEBUG messageCallback("carve::triangulate failed", StatusCallback::MESSAGE_TYPE_WARNING, __FUNC__, ifc_entity); - glm::dvec4 color(0.3, 0.4, 0.5, 1.0); + glm::vec4 color(0.3, 0.4, 0.5, 1.0); GeomDebugDump::dumpPolyline(face_loops_used_for_triangulation, color, true ); #endif return; @@ -1073,9 +1074,9 @@ class Sweeper : public StatusCallback // | | // 0-------face_loops[0]--------1 - double CARVE_EPSILON = m_geom_settings->getEpsilonCoplanarDistance(); + double eps = m_geom_settings->getEpsilonCoplanarDistance(); std::vector > > profile_paths_enclosed; - findEnclosedLoops(profile_paths_input, profile_paths_enclosed, CARVE_EPSILON); + findEnclosedLoops(profile_paths_input, profile_paths_enclosed, eps); for (size_t ii_profile_paths = 0; ii_profile_paths < profile_paths_enclosed.size(); ++ii_profile_paths) { @@ -1159,7 +1160,7 @@ class Sweeper : public StatusCallback } vec3 bisecting_normal; - GeomUtils::bisectingPlane(curve_point_before, curve_point_current, curve_point_next, bisecting_normal, CARVE_EPSILON); + GeomUtils::bisectingPlane(curve_point_before, curve_point_current, curve_point_next, bisecting_normal, eps); vec3 section1 = curve_point_current - curve_point_before; section1.normalize(); @@ -1178,7 +1179,7 @@ class Sweeper : public StatusCallback vec3 v; double t; - carve::IntersectionClass intersect = carve::geom3d::rayPlaneIntersection(bisecting_plane, previous_section_point_3d, previous_section_point_3d + section1, v, t, CARVE_EPSILON); + carve::IntersectionClass intersect = carve::geom3d::rayPlaneIntersection(bisecting_plane, previous_section_point_3d, previous_section_point_3d + section1, v, t, eps); if (intersect > 0) { section_point_3d = v; @@ -1276,23 +1277,18 @@ class Sweeper : public StatusCallback try { - item_data->addClosedPolyhedron(poly_data, params); + item_data->addClosedPolyhedron(poly_data, params, m_geom_settings); } catch (BuildingException & exception) { messageCallback(exception.what(), StatusCallback::MESSAGE_TYPE_WARNING, "", params.ifc_entity); // calling function already in e.what() #ifdef _DEBUG - glm::dvec4 color(0.7, 0.7, 0.7, 1.0); - shared_ptr > meshset(poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); - GeomDebugDump::dumpMeshset(meshset, color, true); + glm::vec4 color(0.7, 0.7, 0.7, 1.0); + shared_ptr > meshset(poly_data->createMesh(carve::input::opts(), eps)); + bool drawNormals = true; + GeomDebugDump::dumpMeshset(meshset, color, drawNormals, true); #endif } - -#ifdef _DEBUG - shared_ptr > meshset(poly_data->createMesh(carve::input::opts(), CARVE_EPSILON)); - MeshSetInfo infoMesh(this, params.ifc_entity); - MeshUtils::checkMeshSetValidAndClosed(meshset, infoMesh, CARVE_EPSILON); -#endif } } } diff --git a/IfcPlusPlus/src/ifcpp/model/BuildingModel.cpp b/IfcPlusPlus/src/ifcpp/model/BuildingModel.cpp index ff10b7858..265edf635 100644 --- a/IfcPlusPlus/src/ifcpp/model/BuildingModel.cpp +++ b/IfcPlusPlus/src/ifcpp/model/BuildingModel.cpp @@ -558,7 +558,6 @@ void BuildingModel::clearIfcModel() m_IFC_FILE_DESCRIPTION = ""; m_file_header = ""; m_unit_converter->resetUnitFactors(); - m_num_geometric_items = 0; } void BuildingModel::resetIfcModel() diff --git a/IfcPlusPlus/src/ifcpp/model/BuildingModel.h b/IfcPlusPlus/src/ifcpp/model/BuildingModel.h index 41e1e5885..115048f17 100644 --- a/IfcPlusPlus/src/ifcpp/model/BuildingModel.h +++ b/IfcPlusPlus/src/ifcpp/model/BuildingModel.h @@ -63,8 +63,7 @@ class IFCQUERY_EXPORT BuildingModel : public StatusCallback const std::string& getFileHeader() { return m_file_header; } const std::string& getFileDescription() { return m_IFC_FILE_DESCRIPTION; } const std::string& getFileName() { return m_IFC_FILE_NAME; } - size_t getNumGeometicItems() { return m_num_geometric_items; } - + void setFileHeader( const std::string& header ); void setFileDescription( const std::string& description ); void setFileName( const std::string& name ); @@ -96,5 +95,4 @@ class IFCQUERY_EXPORT BuildingModel : public StatusCallback std::string m_IFC_FILE_NAME; SchemaVersionEnum m_ifc_schema_version_loaded_file = IFC4X3; SchemaVersionEnum m_ifc_schema_version_current = IFC4X3; - size_t m_num_geometric_items = 0; }; diff --git a/IfcPlusPlus/src/ifcpp/model/BuildingObject.h b/IfcPlusPlus/src/ifcpp/model/BuildingObject.h index b84c93562..bfbcaaa02 100644 --- a/IfcPlusPlus/src/ifcpp/model/BuildingObject.h +++ b/IfcPlusPlus/src/ifcpp/model/BuildingObject.h @@ -21,6 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #include #include #include +#include #include #include "ifcpp/model/BasicTypes.h" diff --git a/IfcPlusPlus/src/ifcpp/model/UnitConverter.cpp b/IfcPlusPlus/src/ifcpp/model/UnitConverter.cpp index 7d50e04b4..7e3e5e13f 100644 --- a/IfcPlusPlus/src/ifcpp/model/UnitConverter.cpp +++ b/IfcPlusPlus/src/ifcpp/model/UnitConverter.cpp @@ -41,22 +41,6 @@ using namespace IFC4X3; UnitConverter::UnitConverter() { resetComplete(); - m_prefix_map[IfcSIPrefix::ENUM_EXA] = 1E18; - m_prefix_map[IfcSIPrefix::ENUM_PETA] = 1E15; - m_prefix_map[IfcSIPrefix::ENUM_TERA] = 1E12; - m_prefix_map[IfcSIPrefix::ENUM_GIGA] = 1E9; - m_prefix_map[IfcSIPrefix::ENUM_MEGA] = 1E6; - m_prefix_map[IfcSIPrefix::ENUM_KILO] = 1E3; - m_prefix_map[IfcSIPrefix::ENUM_HECTO] = 1E2; - m_prefix_map[IfcSIPrefix::ENUM_DECA] = 1E1; - m_prefix_map[IfcSIPrefix::ENUM_DECI] = 1E-1; - m_prefix_map[IfcSIPrefix::ENUM_CENTI] = 1E-2; - m_prefix_map[IfcSIPrefix::ENUM_MILLI] = 1E-3; - m_prefix_map[IfcSIPrefix::ENUM_MICRO] = 1E-6; - m_prefix_map[IfcSIPrefix::ENUM_NANO] = 1E-9; - m_prefix_map[IfcSIPrefix::ENUM_PICO] = 1E-12; - m_prefix_map[IfcSIPrefix::ENUM_FEMTO] = 1E-15; - m_prefix_map[IfcSIPrefix::ENUM_ATTO] = 1E-18; m_plane_angle_factor = M_PI/180.0; } @@ -82,6 +66,7 @@ void UnitConverter::resetComplete() { m_angular_unit = UNDEFINED; m_length_unit_found = false; + m_loaded_units.clear(); resetUnitFactors(); } @@ -106,6 +91,153 @@ void UnitConverter::setAngleUnit(AngularUnit unit) } } +std::string UnitConverter::getUnitLabel(IFC4X3::IfcUnitEnum::IfcUnitEnumEnum unitEnum) +{ + double unit_factor = 1.0; + std::string unit_label = ""; + + auto itFind = m_loaded_units.find(unitEnum); + if( itFind != m_loaded_units.end() ) + { + shared_ptr si_unit = itFind->second; + if( si_unit ) + { + if( si_unit->m_Prefix ) + { + switch( si_unit->m_Prefix->m_enum ) + { + case IfcSIPrefix::ENUM_EXA: + { + unit_factor = 1E18; + unit_label = "exa_"; + break; + } + case IfcSIPrefix::ENUM_PETA: + { + unit_factor = 1E15; + unit_label = "peta_"; + break; + } + case IfcSIPrefix::ENUM_TERA: + { + unit_factor = 1E12; + unit_label = "tera_"; + break; + } + case IfcSIPrefix::ENUM_GIGA: + { + unit_factor = 1E9; + unit_label = "giga_"; + break; + } + case IfcSIPrefix::ENUM_MEGA: + { + unit_factor = 1E6; + unit_label = "mega_"; + break; + } + case IfcSIPrefix::ENUM_KILO: + { + unit_factor = 1E3; + unit_label = "kilo_"; + break; + } + case IfcSIPrefix::ENUM_HECTO: + { + unit_factor = 1E2; + unit_label = "hecto_m"; + break; + } + case IfcSIPrefix::ENUM_DECA: + { + unit_factor = 1E1; + unit_label = ""; + break; + } + case IfcSIPrefix::ENUM_DECI: + { + unit_factor = 1E-1; + unit_label = "deci_"; + break; + } + case IfcSIPrefix::ENUM_CENTI: + { + unit_factor = 1E-2; + unit_label = "centi_"; + break; + } + case IfcSIPrefix::ENUM_MILLI: + { + unit_factor = 1E-3; + unit_label = "milli_"; + break; + } + case IfcSIPrefix::ENUM_MICRO: + { + unit_factor = 1E-6; + unit_label = "micro_"; + break; + } + case IfcSIPrefix::ENUM_NANO: + { + unit_factor = 1E-9; + unit_label = "nano_"; + break; + } + case IfcSIPrefix::ENUM_PICO: + { + unit_factor = 1E-12; + unit_label = "pico_"; + break; + } + case IfcSIPrefix::ENUM_FEMTO: + { + unit_factor = 1E-15; + unit_label = "femto_"; + break; + } + case IfcSIPrefix::ENUM_ATTO: + { + unit_factor = 1E-18; + unit_label = "atto_"; + break; + } + } + } + + shared_ptr unit_type = si_unit->m_UnitType; + if( unit_type ) + { + if( unit_type->m_enum == IfcUnitEnum::ENUM_LENGTHUNIT ) + { + unit_label += "m"; + + if( si_unit->m_Prefix ) + { + if( si_unit->m_Prefix->m_enum == IfcSIPrefix::ENUM_MILLI ) + { + unit_label = "mm"; + } + } + } + else if( unit_type->m_enum == IfcUnitEnum::ENUM_AREAUNIT ) + { + unit_label += "m2"; + } + else if( unit_type->m_enum == IfcUnitEnum::ENUM_VOLUMEUNIT ) + { + unit_label += "m3"; + } + else if( unit_type->m_enum == IfcUnitEnum::ENUM_MASSUNIT ) + { + unit_label += "gram"; + } + } + } + } + return unit_label; +} + void UnitConverter::setIfcProject( shared_ptr project ) { resetComplete(); @@ -120,7 +252,7 @@ void UnitConverter::setIfcProject( shared_ptr project ) std::vector >& vec_units = unit_assignment->m_Units; for(auto unit : vec_units) { - if( !unit ) + if( !unit ) { continue; } @@ -138,6 +270,7 @@ void UnitConverter::setIfcProject( shared_ptr project ) if( unit_type ) { + m_loaded_units[unit_type->m_enum] = si_unit; if( unit_type->m_enum == IfcUnitEnum::ENUM_LENGTHUNIT ) { if( unit_name ) @@ -146,17 +279,102 @@ void UnitConverter::setIfcProject( shared_ptr project ) { m_length_unit_factor = 1.0; m_length_unit_found = true; + //unit_label = "m"; } } if( si_unit->m_Prefix ) { m_loaded_prefix = si_unit->m_Prefix; - if( m_prefix_map.find( si_unit->m_Prefix->m_enum ) != m_prefix_map.end() ) + m_length_unit_found = true; + + switch( m_loaded_prefix->m_enum ) { - m_length_unit_factor = m_prefix_map[si_unit->m_Prefix->m_enum]; - m_length_unit_found = true; + case IfcSIPrefix::ENUM_EXA: + { + m_length_unit_factor = 1E18; + break; } + case IfcSIPrefix::ENUM_PETA: + { + m_length_unit_factor = 1E15; + break; + } + case IfcSIPrefix::ENUM_TERA: + { + m_length_unit_factor = 1E12; + break; + } + case IfcSIPrefix::ENUM_GIGA: + { + m_length_unit_factor = 1E9; + break; + } + case IfcSIPrefix::ENUM_MEGA: + { + m_length_unit_factor = 1E6; + break; + } + case IfcSIPrefix::ENUM_KILO: + { + m_length_unit_factor = 1E3; + break; + } + case IfcSIPrefix::ENUM_HECTO: + { + m_length_unit_factor = 1E2; + break; + } + case IfcSIPrefix::ENUM_DECA: + { + m_length_unit_factor = 1E1; + break; + } + case IfcSIPrefix::ENUM_DECI: + { + m_length_unit_factor = 1E-1; + break; + } + case IfcSIPrefix::ENUM_CENTI: + { + m_length_unit_factor = 1E-2; + break; + } + case IfcSIPrefix::ENUM_MILLI: + { + m_length_unit_factor = 1E-3; + break; + } + case IfcSIPrefix::ENUM_MICRO: + { + m_length_unit_factor = 1E-6; + break; + } + case IfcSIPrefix::ENUM_NANO: + { + m_length_unit_factor = 1E-9; + break; + } + case IfcSIPrefix::ENUM_PICO: + { + m_length_unit_factor = 1E-12; + break; + } + case IfcSIPrefix::ENUM_FEMTO: + { + m_length_unit_factor = 1E-15; + break; + } + case IfcSIPrefix::ENUM_ATTO: + { + m_length_unit_factor = 1E-18; + break; + } + + default: + m_length_unit_found = false; + } + } } else if( unit_type->m_enum == IfcUnitEnum::ENUM_AREAUNIT ) diff --git a/IfcPlusPlus/src/ifcpp/model/UnitConverter.h b/IfcPlusPlus/src/ifcpp/model/UnitConverter.h index 9ebcfb21c..791d6df78 100644 --- a/IfcPlusPlus/src/ifcpp/model/UnitConverter.h +++ b/IfcPlusPlus/src/ifcpp/model/UnitConverter.h @@ -23,7 +23,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #include "BuildingException.h" #include "ifcpp/IFC4X3/include/IfcProject.h" #include "ifcpp/IFC4X3/include/IfcSIPrefix.h" +#include "ifcpp/IFC4X3/include/IfcSIUnit.h" #include "ifcpp/IFC4X3/include/IfcSIUnitName.h" +#include "ifcpp/IFC4X3/include/IfcUnitEnum.h" //\brief class to convert values from different units into meter and radian class IFCQUERY_EXPORT UnitConverter : public StatusCallback @@ -69,12 +71,15 @@ class IFCQUERY_EXPORT UnitConverter : public StatusCallback AngularUnit getAngularUnit() { return m_angular_unit; } shared_ptr& getLoadedPrefix() { return m_loaded_prefix; } + std::string getUnitLabel(IFC4X3::IfcUnitEnum::IfcUnitEnumEnum); + std::map >& getLoadedUnits() { return m_loaded_units; } + void resetUnitFactors(); void resetComplete(); protected: - std::map m_prefix_map; shared_ptr m_loaded_prefix; + std::map > m_loaded_units; double m_length_unit_factor = 1.0; double m_custom_length_factor = 1.0; bool m_length_unit_found = false; diff --git a/IfcPlusPlus/src/ifcpp/reader/ReaderSTEP.cpp b/IfcPlusPlus/src/ifcpp/reader/ReaderSTEP.cpp index 92bb8e43e..431fb6d4b 100644 --- a/IfcPlusPlus/src/ifcpp/reader/ReaderSTEP.cpp +++ b/IfcPlusPlus/src/ifcpp/reader/ReaderSTEP.cpp @@ -56,8 +56,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU #ifdef _MSC_VER #include #include -#include #endif +#include #include "ifcpp/model/OpenMPIncludes.h" #include "ReaderUtil.h" @@ -65,54 +65,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU using namespace IFC4X3; -bool unzipFile(const std::string& filePathIn, std::stringstream& bufferResult) -{ - bool bRet = false; -#ifdef _MSC_VER - HZIP hZip = OpenZipW((void*)filePathIn.c_str(), 0, ZIP_FILENAME); - - if( hZip ) - { - ZIPENTRYW ze; - ZRESULT dRes = GetZipItemW(hZip, -1, &ze); - - if( dRes == ZR_OK ) - { - int numitems = ze.index; - - for( int zi = 0; zi < numitems && !bRet; zi++ ) - { - ZIPENTRYW ze; - dRes = GetZipItemW(hZip, zi, &ze); // fetch individual details - - if( dRes == ZR_OK ) - { - int nSize = ze.unc_size + 1; - std::vector vecBuffer; - vecBuffer.resize(nSize); - - dRes = UnzipItemW(hZip, zi, vecBuffer.data(), nSize, ZIP_MEMORY); - - if( dRes != ZR_OK ) - { - std::string strBuffer(vecBuffer.begin(), vecBuffer.end()); - size_t file_header_start = strBuffer.find("HEADER;"); - size_t file_header_end = strBuffer.find("ENDSEC;"); - if( file_header_start != std::string::npos && file_header_end != std::string::npos ) - { - bufferResult << strBuffer; - bRet = true; - } - } - } - } - } - CloseZip(hZip); - } -#endif - return bRet; -} - ReaderSTEP::ReaderSTEP()= default; ReaderSTEP::~ReaderSTEP()= default; @@ -120,6 +72,8 @@ void ReaderSTEP::loadModelFromFile( const std::string& filePath, shared_ptr 0) + { + try + { + std::filesystem::remove(uncompressedFileName); + } + catch (std::exception& e) + { + std::cout << __FUNCTION__ << ": " << __LINE__ << ": exception: " << e.what() << ", input file: " << uncompressedFileName << std::endl; + } + } } void ReaderSTEP::loadModelFromStream(std::istream& content, std::streampos file_end_pos, shared_ptr& targetModel) @@ -525,19 +511,19 @@ void ReaderSTEP::readSingleStepLine( const std::string& line, std::pair > >& vec_entities, const std::map >& map_entities, shared_ptr& model ) +void ReaderSTEP::readEntityArguments(std::vector > >& vec_entities, const std::map >& map_entities, shared_ptr& model) { // second pass, now read arguments // every object can be initialized independently in parallel const int num_objects = static_cast(vec_entities.size()); std::stringstream err; std::string ifc_version = model->getIfcSchemaVersionOfLoadedFile(); - + // set progress double progress = 0.3; - progressValueCallback( progress, "parse" ); + progressValueCallback(progress, "parse"); double last_progress = 0.3; - const std::map >* map_entities_ptr = &map_entities; + const std::map >* map_entities_ptr = &map_entities; std::vector > >* vec_entities_ptr = &vec_entities; bool canceled = isCanceled(); @@ -549,51 +535,51 @@ void ReaderSTEP::readEntityArguments( std::vector > &map_entities_ptr_local = *map_entities_ptr; + const std::map >& map_entities_ptr_local = *map_entities_ptr; #ifdef _OPENMP #pragma omp for schedule(dynamic, 100) #endif - for( int i=0; i >& entity_read_object = (*vec_entities_ptr)[i]; const shared_ptr& entity = entity_read_object.second; - if( !entity ) + if (!entity) { continue; } std::stringstream errorStream; std::string& argument_str = entity_read_object.first; std::vector arguments_raw; - tokenizeEntityArguments( argument_str, arguments_raw ); + tokenizeEntityArguments(argument_str, arguments_raw); argument_str.clear(); // character decoding: std::vector arguments_decoded; - decodeArgumentStrings( arguments_raw, arguments_decoded ); + decodeArgumentStrings(arguments_raw, arguments_decoded); arguments_raw.clear(); const size_t num_expected_arguments = entity->getNumAttributes(); - if( entity->classID() == IFCCOLOURRGB ) + if (entity->classID() == IFCCOLOURRGB) { - if( arguments_decoded.size() < num_expected_arguments ) + if (arguments_decoded.size() < num_expected_arguments) { arguments_decoded.insert(arguments_decoded.begin(), "$"); } } - else if( entity->classID() == IFCPRESENTATIONSTYLEASSIGNMENT ) + else if (entity->classID() == IFCPRESENTATIONSTYLEASSIGNMENT) { - if( num_expected_arguments > arguments_decoded.size() ) + if (num_expected_arguments > arguments_decoded.size()) { arguments_decoded.insert(arguments_decoded.begin(), "$"); } } - else if( entity->classID() == IFCTRIANGULATEDFACESET ) + else if (entity->classID() == IFCTRIANGULATEDFACESET) { // IFC4: second argument: Closed : OPTIONAL IfcBoolean; // Coordinates : IfcCartesianPointList3D; @@ -609,32 +595,32 @@ void ReaderSTEP::readEntityArguments( std::vector 2 ) + if (arguments_decoded.size() > 2) { - if( arguments_decoded[2].compare(".T.") == 0 || arguments_decoded[2].compare(".F.") == 0 ) + if (arguments_decoded[2].compare(".T.") == 0 || arguments_decoded[2].compare(".F.") == 0) { std::swap(arguments_decoded[2], arguments_decoded[1]); } } } #ifdef _DEBUG - if( entity->classID() == IFCRELVOIDSELEMENT ) + if (entity->classID() == IFCRELVOIDSELEMENT) { int tag = entity->m_tag; } - if( entity->m_tag == 5 ) + if (entity->m_tag == 5) { std::string className = EntityFactory::getStringForClassID(entity->classID()); } #endif - if( num_expected_arguments != arguments_decoded.size() ) + if (num_expected_arguments != arguments_decoded.size()) { - while( arguments_decoded.size() > num_expected_arguments ) { arguments_decoded.pop_back(); } - while( arguments_decoded.size() < num_expected_arguments ) { arguments_decoded.emplace_back("$"); } + while (arguments_decoded.size() > num_expected_arguments) { arguments_decoded.pop_back(); } + while (arguments_decoded.size() < num_expected_arguments) { arguments_decoded.emplace_back("$"); } #ifdef _DEBUG std::string className = EntityFactory::getStringForClassID(entity->classID()); - if( setClassesWithAdjustedArguments.find(className) == setClassesWithAdjustedArguments.end() ) + if (setClassesWithAdjustedArguments.find(className) == setClassesWithAdjustedArguments.end()) { //std::cout << "adjusted number of arguments for entity #" << entity->m_tag << "=" << className << std::endl; setClassesWithAdjustedArguments.insert(className); @@ -645,118 +631,30 @@ void ReaderSTEP::readEntityArguments( std::vectorreadStepArguments(arguments_decoded, map_entities_ptr_local, errorStream); - - if( entity->classID() == IFCSTYLEDITEM ) - { - int tag = entity->m_tag; - shared_ptr styledItem = dynamic_pointer_cast(entity); - if( styledItem ) - { - std::vector > vec_presentationStylesReplaced; - for( shared_ptr& presentationStyle : styledItem->m_Styles ) - { - if( !presentationStyle ) - { - continue; - } - - shared_ptr presentationStyleAssignment = dynamic_pointer_cast(presentationStyle); - if( presentationStyleAssignment ) - { - // IFCPRESENTATIONSTYLEASSIGNMENT has been removed in IFC4X3 - // old: IfcRepresentationItem <- IFCSTYLEDITEM -> IFCPRESENTATIONSTYLEASSIGNMENT -> IFCSURFACESTYLE - // new IfcRepresentationItem <- IFCSTYLEDITEM -> [x] -> IFCSURFACESTYLE - - for( shared_ptr& presentationStyle : presentationStyleAssignment->m_Styles ) - { - if( !presentationStyle ) - { - continue; - } - - //ENTITY IfcPresentationStyle ABSTRACT SUPERTYPE OF (ONEOF (IfcCurveStyle ,IfcFillAreaStyle ,IfcSurfaceStyle ,IfcTextStyle)); - - shared_ptr surfaceStyle = dynamic_pointer_cast(presentationStyle); - if( surfaceStyle ) - { - vec_presentationStylesReplaced.push_back(surfaceStyle); - continue; - } - - shared_ptr curveStyle = dynamic_pointer_cast(presentationStyle); - if( curveStyle ) - { - vec_presentationStylesReplaced.push_back(curveStyle); - continue; - } - - shared_ptr fillAreaStyle = dynamic_pointer_cast(presentationStyle); - if( fillAreaStyle ) - { - vec_presentationStylesReplaced.push_back(fillAreaStyle); - continue; - } - - shared_ptr textStyle = dynamic_pointer_cast(presentationStyle); - if( textStyle ) - { - vec_presentationStylesReplaced.push_back(textStyle); - continue; - } - } - continue; - } - - vec_presentationStylesReplaced.push_back(presentationStyle); - } - - styledItem->m_Styles = vec_presentationStylesReplaced; - } - } - - // prepare an estimation of mesh size - shared_ptr elementAsProduct = dynamic_pointer_cast(entity); - if( elementAsProduct ) - { - shared_ptr productRepresentation = elementAsProduct->m_Representation; - if( productRepresentation ) - { - for( const shared_ptr& representation : productRepresentation->m_Representations ) - { - for( const shared_ptr& representation_item : representation->m_Items ) - { - if( representation_item->classID() != IFC4X3::IFCBOUNDINGBOX ) - { - ++model->m_num_geometric_items; - } - } - } - } - } } - catch( std::exception& e ) + catch (std::exception& e) { #ifdef _OPENMP #pragma omp critical #endif - err << "#" << entity->m_tag << "=" << EntityFactory::getStringForClassID( entity->classID() ) << ": " << e.what(); + err << "#" << entity->m_tag << "=" << EntityFactory::getStringForClassID(entity->classID()) << ": " << e.what(); } - catch( std::exception* e ) + catch (std::exception* e) { #ifdef _OPENMP #pragma omp critical #endif - err << "#" << entity->m_tag << "=" << EntityFactory::getStringForClassID( entity->classID() ) << ": " << e->what(); + err << "#" << entity->m_tag << "=" << EntityFactory::getStringForClassID(entity->classID()) << ": " << e->what(); } - catch(...) + catch (...) { #ifdef _OPENMP #pragma omp critical #endif - err << "#" << entity->m_tag << "=" << EntityFactory::getStringForClassID( entity->classID() ) << " readStepData: error occurred" << std::endl; + err << "#" << entity->m_tag << "=" << EntityFactory::getStringForClassID(entity->classID()) << " readStepData: error occurred" << std::endl; } - if( errorStream.tellp() > 0 ) + if (errorStream.tellp() > 0) { #ifdef _OPENMP #pragma omp critical @@ -764,19 +662,19 @@ void ReaderSTEP::readEntityArguments( std::vector 0.03 ) + progress = 0.3 + 0.6 * double(i) / double(num_objects); + if (progress - last_progress > 0.03) { #ifdef _OPENMP - if( omp_get_thread_num() == 0 ) + if (omp_get_thread_num() == 0) #endif { - progressValueCallback( progress, "parse" ); + progressValueCallback(progress, "parse"); last_progress = progress; - if ( isCanceled() ) + if (isCanceled()) { canceledCallback(); #ifdef _OPENMP @@ -792,6 +690,86 @@ void ReaderSTEP::readEntityArguments( std::vector >& entity_read_object = *it; + const shared_ptr& entity = entity_read_object.second; + + if (entity->classID() == IFCSTYLEDITEM) + { + int tag = entity->m_tag; + shared_ptr styledItem = dynamic_pointer_cast(entity); + if (styledItem) + { + std::vector > vec_presentationStylesReplaced; + for (shared_ptr& presentationStyle : styledItem->m_Styles) + { + if (!presentationStyle) + { + continue; + } + + shared_ptr presentationStyleAssignment = dynamic_pointer_cast(presentationStyle); + if (presentationStyleAssignment) + { + // IFCPRESENTATIONSTYLEASSIGNMENT has been removed in IFC4X3 + // old: IfcRepresentationItem <- IFCSTYLEDITEM -> IFCPRESENTATIONSTYLEASSIGNMENT -> IFCSURFACESTYLE + // new IfcRepresentationItem <- IFCSTYLEDITEM -> [x] -> IFCSURFACESTYLE + + for (shared_ptr& presentationStyle : presentationStyleAssignment->m_Styles) + { + if (!presentationStyle) + { + continue; + } + + //ENTITY IfcPresentationStyle ABSTRACT SUPERTYPE OF (ONEOF (IfcCurveStyle ,IfcFillAreaStyle ,IfcSurfaceStyle ,IfcTextStyle)); + + shared_ptr surfaceStyle = dynamic_pointer_cast(presentationStyle); + if (surfaceStyle) + { + vec_presentationStylesReplaced.push_back(surfaceStyle); + continue; + } + + shared_ptr curveStyle = dynamic_pointer_cast(presentationStyle); + if (curveStyle) + { + vec_presentationStylesReplaced.push_back(curveStyle); + continue; + } + + shared_ptr fillAreaStyle = dynamic_pointer_cast(presentationStyle); + if (fillAreaStyle) + { + vec_presentationStylesReplaced.push_back(fillAreaStyle); + continue; + } + + shared_ptr textStyle = dynamic_pointer_cast(presentationStyle); + if (textStyle) + { + vec_presentationStylesReplaced.push_back(textStyle); + continue; + } + } + continue; + } + + vec_presentationStylesReplaced.push_back(presentationStyle); + } + + styledItem->m_Styles = vec_presentationStylesReplaced; + } + } + } + if( err.tellp() > 0 ) { messageCallback( err.str(), StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__ ); diff --git a/examples/SimpleViewerExampleQt/src/gui/IfcTreeWidget.cpp b/examples/SimpleViewerExampleQt/src/gui/IfcTreeWidget.cpp index 09f96d9f4..9b564bd4f 100644 --- a/examples/SimpleViewerExampleQt/src/gui/IfcTreeWidget.cpp +++ b/examples/SimpleViewerExampleQt/src/gui/IfcTreeWidget.cpp @@ -262,6 +262,11 @@ QTreeWidgetItem* resolveTreeItems( shared_ptr obj, std::unordere } set_visited.insert( obj_def->m_tag ); + shared_ptr opening = dynamic_pointer_cast(obj); + if (opening) + { + return nullptr; + } item = new QTreeWidgetItem(); @@ -358,6 +363,12 @@ void IfcTreeWidget::slotModelLoadingDone() { shared_ptr& ifc_object = it->second; + shared_ptr opening = dynamic_pointer_cast(ifc_object); + if (opening) + { + continue; + } + if (hasParentInBuildingStructure(ifc_object)) { continue; @@ -372,12 +383,15 @@ void IfcTreeWidget::slotModelLoadingDone() } } - m_block_selection_signals = true; - blockSignals( true ); - insertTopLevelItem( topLevelItemCount(), item_outside ); - setCurrentItem( item_outside ); - blockSignals( false ); - m_block_selection_signals = false; + if (item_outside->childCount() > 0) + { + m_block_selection_signals = true; + blockSignals(true); + insertTopLevelItem(topLevelItemCount(), item_outside); + setCurrentItem(item_outside); + blockSignals(false); + m_block_selection_signals = false; + } } expandToDepth(2); } diff --git a/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.cpp b/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.cpp index a31514c0f..c239bae35 100644 --- a/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.cpp +++ b/examples/SimpleViewerExampleQt/src/gui/TabReadWrite.cpp @@ -304,19 +304,7 @@ void TabReadWrite::loadIfcFile( QString& path_in ) converter_osg->setMessageTarget(geometry_converter.get()); converter_osg->convertToOSG(geometry_converter->getShapeInputData(), model_switch); - // in case there are IFC entities that are not in the spatial structure - const std::map >& objects_outside_spatial_structure = geometry_converter->getObjectsOutsideSpatialStructure(); - if (objects_outside_spatial_structure.size() > 0 && false) - { - osg::ref_ptr sw_objects_outside_spatial_structure = new osg::Switch(); - sw_objects_outside_spatial_structure->setName("IfcProduct objects outside spatial structure"); - converter_osg->addNodes(objects_outside_spatial_structure, sw_objects_outside_spatial_structure); - if (sw_objects_outside_spatial_structure->getNumChildren() > 0) - { - model_switch->addChild(sw_objects_outside_spatial_structure); - } - } if (model_switch) {