More schema macro rewriting

This commit is contained in:
Thomas Krijnen
2022-07-18 11:57:02 +02:00
parent dc67287d4b
commit 163e10b608
2 changed files with 24 additions and 27 deletions
+22 -27
View File
@@ -5,33 +5,28 @@
#include "../ifcgeom_schema_agnostic/IfcGeomIteratorSettings.h" #include "../ifcgeom_schema_agnostic/IfcGeomIteratorSettings.h"
#include "../ifcgeom_schema_agnostic/IfcRepresentationShapeItem.h" #include "../ifcgeom_schema_agnostic/IfcRepresentationShapeItem.h"
#ifdef HAS_SCHEMA_2x3 #include <boost/preprocessor/stringize.hpp>
#include "../ifcparse/Ifc2x3.h" #include <boost/preprocessor/seq/size.hpp>
#endif #include <boost/preprocessor/comparison/greater.hpp>
#ifdef HAS_SCHEMA_4
#include "../ifcparse/Ifc4.h" // @tfk A macro cannot define an include (I think), so here we can't
#endif // loop over the sequence of schema identifiers, but rather we have
#ifdef HAS_SCHEMA_4x1 // unroll the loop with at least the amount of schemas we'd like support
#include "../ifcparse/Ifc4x1.h" // for and then overflow into an existing empty include file.
#endif
#ifdef HAS_SCHEMA_4x2 #define INCLUDE_SCHEMA(n) \
#include "../ifcparse/Ifc4x2.h" BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_SEQ_SIZE(SCHEMA_SEQ), n), BOOST_PP_STRINGIZE(BOOST_PP_CAT(BOOST_PP_CAT(../ifcparse/Ifc,BOOST_PP_SEQ_ELEM(n,SCHEMA_SEQ)),.h)), "empty.h")
#endif
#ifdef HAS_SCHEMA_4x3_rc1 #include INCLUDE_SCHEMA(0)
#include "../ifcparse/Ifc4x3_rc1.h" #include INCLUDE_SCHEMA(1)
#endif #include INCLUDE_SCHEMA(2)
#ifdef HAS_SCHEMA_4x3_rc2 #include INCLUDE_SCHEMA(3)
#include "../ifcparse/Ifc4x3_rc2.h" #include INCLUDE_SCHEMA(4)
#endif #include INCLUDE_SCHEMA(5)
#ifdef HAS_SCHEMA_4x3_rc3 #include INCLUDE_SCHEMA(6)
#include "../ifcparse/Ifc4x3_rc3.h" #include INCLUDE_SCHEMA(7)
#endif #include INCLUDE_SCHEMA(8)
#ifdef HAS_SCHEMA_4x3_rc4 #include INCLUDE_SCHEMA(9)
#include "../ifcparse/Ifc4x3_rc4.h"
#endif
#ifdef HAS_SCHEMA_4x3
#include "../ifcparse/Ifc4x3.h"
#endif
#include <boost/function.hpp> #include <boost/function.hpp>
+2
View File
@@ -0,0 +1,2 @@
// A purposely empty file so that the unrolled loop
// can overflow into an existing empty include file.