From ab50609854d9047c65a7cbc72bb094c488446528 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 5 Nov 2021 16:54:16 +0100 Subject: [PATCH] Rename some files with more sensical names --- cmake/CMakeLists.txt | 2 +- src/ifcgeom/IfcGeom.h | 6 +++--- src/ifcgeom/IfcGeomCurves.cpp | 4 ++-- src/ifcgeom/IfcGeomFaces.cpp | 4 ++-- src/ifcgeom/IfcGeomFunctions.cpp | 2 +- src/ifcgeom/IfcGeomHelpers.cpp | 4 ++-- src/ifcgeom/IfcGeomShapes.cpp | 4 ++-- src/ifcgeom/IfcGeomWires.cpp | 4 ++-- src/ifcgeom/IfcRegisterCreateCache.h | 6 ------ src/ifcgeom/IfcRegisterPurgeCache.h | 6 ------ src/ifcgeom/IfcRepresentationShapeItem.h | 2 +- src/ifcgeom/{IfcRegister.cpp => mapping.cpp} | 14 +++++++------- src/ifcgeom/{IfcRegister.h => mapping.i} | 2 +- src/ifcgeom/mapping_cache.i | 6 ++++++ .../{IfcRegisterConvertCurve.h => mapping_curve.i} | 6 +++--- .../{IfcRegisterDef.h => mapping_define_missing.i} | 2 +- .../{IfcRegisterConvertFace.h => mapping_face.i} | 6 +++--- ...egisterGeomHeader.h => mapping_kernel_header.i} | 6 +++--- src/ifcgeom/mapping_purge_cache.i | 6 ++++++ .../{IfcRegisterConvertShape.h => mapping_shape.i} | 6 +++--- ...IfcRegisterShapeType.h => mapping_shape_type.i} | 6 +++--- ...IfcRegisterConvertShapes.h => mapping_shapes.i} | 6 +++--- .../{IfcRegisterUndef.h => mapping_undefine.i} | 2 +- .../{IfcRegisterConvertWire.h => mapping_wire.i} | 6 +++--- 24 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 src/ifcgeom/IfcRegisterCreateCache.h delete mode 100644 src/ifcgeom/IfcRegisterPurgeCache.h rename src/ifcgeom/{IfcRegister.cpp => mapping.cpp} (93%) rename src/ifcgeom/{IfcRegister.h => mapping.i} (98%) create mode 100644 src/ifcgeom/mapping_cache.i rename src/ifcgeom/{IfcRegisterConvertCurve.h => mapping_curve.i} (51%) rename src/ifcgeom/{IfcRegisterDef.h => mapping_define_missing.i} (92%) rename src/ifcgeom/{IfcRegisterConvertFace.h => mapping_face.i} (50%) rename src/ifcgeom/{IfcRegisterGeomHeader.h => mapping_kernel_header.i} (76%) create mode 100644 src/ifcgeom/mapping_purge_cache.i rename src/ifcgeom/{IfcRegisterConvertShape.h => mapping_shape.i} (89%) rename src/ifcgeom/{IfcRegisterShapeType.h => mapping_shape_type.i} (83%) rename src/ifcgeom/{IfcRegisterConvertShapes.h => mapping_shapes.i} (86%) rename src/ifcgeom/{IfcRegisterUndef.h => mapping_undefine.i} (91%) rename src/ifcgeom/{IfcRegisterConvertWire.h => mapping_wire.i} (50%) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 368f2a33ee..4648b35ec7 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -697,7 +697,7 @@ TARGET_LINK_LIBRARIES(IfcParse ${Boost_LIBRARIES} ${BCRYPT_LIBRARIES} ${LIBXML2_ if (BUILD_IFCGEOM) # IfcGeom -file(GLOB IFCGEOM_H_FILES ../src/ifcgeom/*.h) +file(GLOB IFCGEOM_H_FILES ../src/ifcgeom/*.h ../src/ifcgeom/*.i) file(GLOB IFCGEOM_CPP_FILES ../src/ifcgeom/*.cpp) set(IFCGEOM_FILES ${IFCGEOM_CPP_FILES} ${IFCGEOM_H_FILES}) diff --git a/src/ifcgeom/IfcGeom.h b/src/ifcgeom/IfcGeom.h index 69187f9e8b..efae3ff959 100644 --- a/src/ifcgeom/IfcGeom.h +++ b/src/ifcgeom/IfcGeom.h @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * * @@ -107,7 +107,7 @@ namespace IfcGeom { class IFC_GEOM_API MAKE_TYPE_NAME(Cache) { public: -#include "IfcRegisterCreateCache.h" +#include "mapping_cache.i" std::map Shape; }; @@ -536,7 +536,7 @@ public: void set_conversion_placement_rel_to(const IfcParse::declaration* type); -#include "IfcRegisterGeomHeader.h" +#include "mapping_kernel_header.i" virtual void setValue(GeomValue var, double value); virtual double getValue(GeomValue var) const; diff --git a/src/ifcgeom/IfcGeomCurves.cpp b/src/ifcgeom/IfcGeomCurves.cpp index 1941255fd0..92c14ce31c 100644 --- a/src/ifcgeom/IfcGeomCurves.cpp +++ b/src/ifcgeom/IfcGeomCurves.cpp @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * * @@ -19,7 +19,7 @@ /******************************************************************************** * * - * Implementations of the various conversion functions defined in IfcRegister.h * + * Implementations of the various conversion functions defined in mapping.i * * * ********************************************************************************/ diff --git a/src/ifcgeom/IfcGeomFaces.cpp b/src/ifcgeom/IfcGeomFaces.cpp index d18c16a629..907f9d1d60 100644 --- a/src/ifcgeom/IfcGeomFaces.cpp +++ b/src/ifcgeom/IfcGeomFaces.cpp @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * * @@ -19,7 +19,7 @@ /******************************************************************************** * * - * Implementations of the various conversion functions defined in IfcRegister.h * + * Implementations of the various conversion functions defined in mapping.i * * * ********************************************************************************/ diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 6461095ee0..fbb1f1b835 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * * diff --git a/src/ifcgeom/IfcGeomHelpers.cpp b/src/ifcgeom/IfcGeomHelpers.cpp index ba51971694..3a48581b10 100644 --- a/src/ifcgeom/IfcGeomHelpers.cpp +++ b/src/ifcgeom/IfcGeomHelpers.cpp @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * * @@ -19,7 +19,7 @@ /******************************************************************************** * * - * Implementations of the various conversion functions defined in IfcRegister.h * + * Implementations of the various conversion functions defined in mapping.i * * * ********************************************************************************/ diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index 8bfad90ef6..5ce6845aa2 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * * @@ -19,7 +19,7 @@ /******************************************************************************** * * - * Implementations of the various conversion functions defined in IfcRegister.h * + * Implementations of the various conversion functions defined in mapping.i * * * ********************************************************************************/ diff --git a/src/ifcgeom/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp index f80d172948..74bb48f39e 100644 --- a/src/ifcgeom/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * * @@ -19,7 +19,7 @@ /******************************************************************************** * * - * Implementations of the various conversion functions defined in IfcRegister.h * + * Implementations of the various conversion functions defined in mapping.i * * * ********************************************************************************/ diff --git a/src/ifcgeom/IfcRegisterCreateCache.h b/src/ifcgeom/IfcRegisterCreateCache.h deleted file mode 100644 index c1425d071f..0000000000 --- a/src/ifcgeom/IfcRegisterCreateCache.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "IfcRegisterUndef.h" -#define CLASS(T,V) \ - std::map T; -#include "IfcRegisterDef.h" - -#include "IfcRegister.h" \ No newline at end of file diff --git a/src/ifcgeom/IfcRegisterPurgeCache.h b/src/ifcgeom/IfcRegisterPurgeCache.h deleted file mode 100644 index 1afa070943..0000000000 --- a/src/ifcgeom/IfcRegisterPurgeCache.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "IfcRegisterUndef.h" -#define CLASS(T,V) \ - T.clear(); -#include "IfcRegisterDef.h" - -#include "IfcRegister.h" \ No newline at end of file diff --git a/src/ifcgeom/IfcRepresentationShapeItem.h b/src/ifcgeom/IfcRepresentationShapeItem.h index 2087ed7876..3a2f0938dd 100644 --- a/src/ifcgeom/IfcRepresentationShapeItem.h +++ b/src/ifcgeom/IfcRepresentationShapeItem.h @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * * diff --git a/src/ifcgeom/IfcRegister.cpp b/src/ifcgeom/mapping.cpp similarity index 93% rename from src/ifcgeom/IfcRegister.cpp rename to src/ifcgeom/mapping.cpp index 1902e3cb1d..725301d8bd 100644 --- a/src/ifcgeom/IfcRegister.cpp +++ b/src/ifcgeom/mapping.cpp @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * * @@ -40,13 +40,13 @@ bool IfcGeom::Kernel::convert_shapes(const IfcBaseInterface* l, IfcRepresentatio return false; } -#include "IfcRegisterConvertShapes.h" +#include "mapping_shapes.i" Logger::Message(Logger::LOG_ERROR,"No operation defined for:",l); return false; } IfcGeom::ShapeType IfcGeom::Kernel::shape_type(const IfcBaseInterface* l) { -#include "IfcRegisterShapeType.h" +#include "mapping_shape_type.i" return ST_OTHER; } @@ -70,7 +70,7 @@ bool IfcGeom::Kernel::convert_shape(const IfcBaseInterface* l, TopoDS_Shape& r) IfcRepresentationShapeItems items; success = convert_shapes(l, items) && flatten_shape_list(items, r, false); } else if (st == ST_SHAPE && include_solids_and_surfaces) { -#include "IfcRegisterConvertShape.h" +#include "mapping_shape.i" } else if (st == ST_FACE && include_solids_and_surfaces) { processed = true; success = convert_face(l, r); @@ -112,7 +112,7 @@ bool IfcGeom::Kernel::convert_shape(const IfcBaseInterface* l, TopoDS_Shape& r) } bool IfcGeom::Kernel::convert_wire(const IfcBaseInterface* l, TopoDS_Wire& r) { -#include "IfcRegisterConvertWire.h" +#include "mapping_wire.i" Handle(Geom_Curve) curve; if (IfcGeom::Kernel::convert_curve(l, curve)) { return IfcGeom::Kernel::convert_curve_to_wire(curve, r); @@ -122,13 +122,13 @@ bool IfcGeom::Kernel::convert_wire(const IfcBaseInterface* l, TopoDS_Wire& r) { } bool IfcGeom::Kernel::convert_face(const IfcBaseInterface* l, TopoDS_Shape& r) { -#include "IfcRegisterConvertFace.h" +#include "mapping_face.i" Logger::Message(Logger::LOG_ERROR,"No operation defined for:",l); return false; } bool IfcGeom::Kernel::convert_curve(const IfcBaseInterface* l, Handle(Geom_Curve)& r) { -#include "IfcRegisterConvertCurve.h" +#include "mapping_curve.i" Logger::Message(Logger::LOG_ERROR,"No operation defined for:",l); return false; } diff --git a/src/ifcgeom/IfcRegister.h b/src/ifcgeom/mapping.i similarity index 98% rename from src/ifcgeom/IfcRegister.h rename to src/ifcgeom/mapping.i index 0f9524f454..50a6919b83 100644 --- a/src/ifcgeom/IfcRegister.h +++ b/src/ifcgeom/mapping.i @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * * diff --git a/src/ifcgeom/mapping_cache.i b/src/ifcgeom/mapping_cache.i new file mode 100644 index 0000000000..c0aba26247 --- /dev/null +++ b/src/ifcgeom/mapping_cache.i @@ -0,0 +1,6 @@ +#include "mapping_undefine.i" +#define CLASS(T,V) \ + std::map T; +#include "mapping_define_missing.i" + +#include "mapping.i" \ No newline at end of file diff --git a/src/ifcgeom/IfcRegisterConvertCurve.h b/src/ifcgeom/mapping_curve.i similarity index 51% rename from src/ifcgeom/IfcRegisterConvertCurve.h rename to src/ifcgeom/mapping_curve.i index 693771842c..cd9e05e897 100644 --- a/src/ifcgeom/IfcRegisterConvertCurve.h +++ b/src/ifcgeom/mapping_curve.i @@ -1,6 +1,6 @@ -#include "IfcRegisterUndef.h" +#include "mapping_undefine.i" #define CURVE(T) \ if (l->as()) return convert(l->as(), r); -#include "IfcRegisterDef.h" +#include "mapping_define_missing.i" -#include "IfcRegister.h" \ No newline at end of file +#include "mapping.i" \ No newline at end of file diff --git a/src/ifcgeom/IfcRegisterDef.h b/src/ifcgeom/mapping_define_missing.i similarity index 92% rename from src/ifcgeom/IfcRegisterDef.h rename to src/ifcgeom/mapping_define_missing.i index 65f8704a81..a1d5af0f47 100644 --- a/src/ifcgeom/IfcRegisterDef.h +++ b/src/ifcgeom/mapping_define_missing.i @@ -1,4 +1,4 @@ -#ifndef SHAPES +#ifndef SHAPES #define SHAPES(T) #endif #ifndef SHAPE diff --git a/src/ifcgeom/IfcRegisterConvertFace.h b/src/ifcgeom/mapping_face.i similarity index 50% rename from src/ifcgeom/IfcRegisterConvertFace.h rename to src/ifcgeom/mapping_face.i index aafc568bef..5a8ae00840 100644 --- a/src/ifcgeom/IfcRegisterConvertFace.h +++ b/src/ifcgeom/mapping_face.i @@ -1,6 +1,6 @@ -#include "IfcRegisterUndef.h" +#include "mapping_undefine.i" #define FACE(T) \ if (l->as()) return convert(l->as(), r); -#include "IfcRegisterDef.h" +#include "mapping_define_missing.i" -#include "IfcRegister.h" \ No newline at end of file +#include "mapping.i" \ No newline at end of file diff --git a/src/ifcgeom/IfcRegisterGeomHeader.h b/src/ifcgeom/mapping_kernel_header.i similarity index 76% rename from src/ifcgeom/IfcRegisterGeomHeader.h rename to src/ifcgeom/mapping_kernel_header.i index 9969d5e2db..36ef9fade8 100644 --- a/src/ifcgeom/IfcRegisterGeomHeader.h +++ b/src/ifcgeom/mapping_kernel_header.i @@ -1,10 +1,10 @@ -#include "IfcRegisterUndef.h" +#include "mapping_undefine.i" #define CLASS(T,V) bool convert(const IfcSchema::T* L, V& r); #define SHAPES(T) CLASS(T,IfcRepresentationShapeItems) #define SHAPE(T) CLASS(T,TopoDS_Shape) #define WIRE(T) CLASS(T,TopoDS_Wire) #define FACE(T) CLASS(T,TopoDS_Shape) #define CURVE(T) CLASS(T,Handle(Geom_Curve)) -#include "IfcRegisterDef.h" +#include "mapping_define_missing.i" -#include "IfcRegister.h" \ No newline at end of file +#include "mapping.i" \ No newline at end of file diff --git a/src/ifcgeom/mapping_purge_cache.i b/src/ifcgeom/mapping_purge_cache.i new file mode 100644 index 0000000000..d7ea255c8b --- /dev/null +++ b/src/ifcgeom/mapping_purge_cache.i @@ -0,0 +1,6 @@ +#include "mapping_undefine.i" +#define CLASS(T,V) \ + T.clear(); +#include "mapping_define_missing.i" + +#include "mapping.i" \ No newline at end of file diff --git a/src/ifcgeom/IfcRegisterConvertShape.h b/src/ifcgeom/mapping_shape.i similarity index 89% rename from src/ifcgeom/IfcRegisterConvertShape.h rename to src/ifcgeom/mapping_shape.i index 4e53c121ac..689d1b4800 100644 --- a/src/ifcgeom/IfcRegisterConvertShape.h +++ b/src/ifcgeom/mapping_shape.i @@ -1,4 +1,4 @@ -#include "IfcRegisterUndef.h" +#include "mapping_undefine.i" #define SHAPE(T) \ if (!processed && l->as()) { \ processed = true; \ @@ -21,6 +21,6 @@ return false; \ } \ } -#include "IfcRegisterDef.h" +#include "mapping_define_missing.i" -#include "IfcRegister.h" \ No newline at end of file +#include "mapping.i" \ No newline at end of file diff --git a/src/ifcgeom/IfcRegisterShapeType.h b/src/ifcgeom/mapping_shape_type.i similarity index 83% rename from src/ifcgeom/IfcRegisterShapeType.h rename to src/ifcgeom/mapping_shape_type.i index a0185a0279..c0816c531c 100644 --- a/src/ifcgeom/IfcRegisterShapeType.h +++ b/src/ifcgeom/mapping_shape_type.i @@ -1,4 +1,4 @@ -#include "IfcRegisterUndef.h" +#include "mapping_undefine.i" #define SHAPES(T) \ if ( l->declaration().is(IfcSchema::T::Class()) ) return ST_SHAPELIST; #define SHAPE(T) \ @@ -9,6 +9,6 @@ if ( l->declaration().is(IfcSchema::T::Class()) ) return ST_FACE; #define CURVE(T) \ if ( l->declaration().is(IfcSchema::T::Class()) ) return ST_CURVE; -#include "IfcRegisterDef.h" +#include "mapping_define_missing.i" -#include "IfcRegister.h" \ No newline at end of file +#include "mapping.i" \ No newline at end of file diff --git a/src/ifcgeom/IfcRegisterConvertShapes.h b/src/ifcgeom/mapping_shapes.i similarity index 86% rename from src/ifcgeom/IfcRegisterConvertShapes.h rename to src/ifcgeom/mapping_shapes.i index d43643ecc8..55975fe00c 100644 --- a/src/ifcgeom/IfcRegisterConvertShapes.h +++ b/src/ifcgeom/mapping_shapes.i @@ -1,4 +1,4 @@ -#include "IfcRegisterUndef.h" +#include "mapping_undefine.i" #define SHAPES(T) \ if (l->as()) { \ try { \ @@ -13,6 +13,6 @@ } \ return false; \ } -#include "IfcRegisterDef.h" +#include "mapping_define_missing.i" -#include "IfcRegister.h" \ No newline at end of file +#include "mapping.i" \ No newline at end of file diff --git a/src/ifcgeom/IfcRegisterUndef.h b/src/ifcgeom/mapping_undefine.i similarity index 91% rename from src/ifcgeom/IfcRegisterUndef.h rename to src/ifcgeom/mapping_undefine.i index d2d537a073..97fab37319 100644 --- a/src/ifcgeom/IfcRegisterUndef.h +++ b/src/ifcgeom/mapping_undefine.i @@ -1,4 +1,4 @@ -#ifdef SHAPES +#ifdef SHAPES #undef SHAPES #endif #ifdef SHAPE diff --git a/src/ifcgeom/IfcRegisterConvertWire.h b/src/ifcgeom/mapping_wire.i similarity index 50% rename from src/ifcgeom/IfcRegisterConvertWire.h rename to src/ifcgeom/mapping_wire.i index 69716410d4..d391861bdc 100644 --- a/src/ifcgeom/IfcRegisterConvertWire.h +++ b/src/ifcgeom/mapping_wire.i @@ -1,6 +1,6 @@ -#include "IfcRegisterUndef.h" +#include "mapping_undefine.i" #define WIRE(T) \ if (l->as()) return convert(l->as(), r); -#include "IfcRegisterDef.h" +#include "mapping_define_missing.i" -#include "IfcRegister.h" \ No newline at end of file +#include "mapping.i" \ No newline at end of file