mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-30 12:09:51 +00:00
Bring back multiple schema includes in IfcParseExamples.cpp
This commit is contained in:
@@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
#include "ifcparse/IfcFile.h"
|
#include "ifcparse/IfcFile.h"
|
||||||
#include "ifcparse/IfcLogger.h"
|
#include "ifcparse/IfcLogger.h"
|
||||||
#include INCLUDE_SCHEMA(ifcparse, IfcSchema)
|
|
||||||
#include INCLUDE_SCHEMA_DEFINITIONS(ifcparse, IfcSchema)
|
|
||||||
|
|
||||||
#include <boost/preprocessor/stringize.hpp>
|
#include <boost/preprocessor/stringize.hpp>
|
||||||
#include <boost/preprocessor/seq/for_each.hpp>
|
#include <boost/preprocessor/seq/for_each.hpp>
|
||||||
@@ -43,6 +41,30 @@
|
|||||||
static_assert(false, "A boost preprocessor sequence of schema identifiers is needed for this file to compile.");
|
static_assert(false, "A boost preprocessor sequence of schema identifiers is needed for this file to compile.");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// A macro cannot expand to an include directive, so unroll enough includes for
|
||||||
|
// the maximum number of schemas supported by the build configuration.
|
||||||
|
#define INCLUDE_SCHEMA_N(n) \
|
||||||
|
BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_SEQ_SIZE(SCHEMA_SEQ), n), \
|
||||||
|
BOOST_PP_STRINGIZE(ifcparse/BOOST_PP_CAT(Ifc, BOOST_PP_SEQ_ELEM(BOOST_PP_MIN(n, BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_POP_BACK(SCHEMA_SEQ))), SCHEMA_SEQ)).h), \
|
||||||
|
"ifcgeom/empty.h")
|
||||||
|
|
||||||
|
#include INCLUDE_SCHEMA_N(0)
|
||||||
|
#include INCLUDE_SCHEMA_N(1)
|
||||||
|
#include INCLUDE_SCHEMA_N(2)
|
||||||
|
#include INCLUDE_SCHEMA_N(3)
|
||||||
|
#include INCLUDE_SCHEMA_N(4)
|
||||||
|
#include INCLUDE_SCHEMA_N(5)
|
||||||
|
#include INCLUDE_SCHEMA_N(6)
|
||||||
|
#include INCLUDE_SCHEMA_N(7)
|
||||||
|
#include INCLUDE_SCHEMA_N(8)
|
||||||
|
#include INCLUDE_SCHEMA_N(9)
|
||||||
|
#include INCLUDE_SCHEMA_N(10)
|
||||||
|
#include INCLUDE_SCHEMA_N(11)
|
||||||
|
#include INCLUDE_SCHEMA_N(12)
|
||||||
|
#include INCLUDE_SCHEMA_N(13)
|
||||||
|
#include INCLUDE_SCHEMA_N(14)
|
||||||
|
#include INCLUDE_SCHEMA_N(15)
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
#if USE_VLD
|
#if USE_VLD
|
||||||
|
|||||||
Reference in New Issue
Block a user