Fix compilation and execution of IfcConvert

This commit is contained in:
Thomas Krijnen
2017-12-21 14:14:04 +01:00
parent 6622afd93a
commit 4d325e026e
10 changed files with 1465 additions and 1458 deletions
+9 -12
View File
@@ -13,21 +13,18 @@ namespace IfcGeom {
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
void MAKE_INIT_FN(IteratorImplementation_)() {
template <typename P>
void MAKE_INIT_FN(IteratorImplementation_)(IteratorFactoryImplementation<P>* mapping) {
static const std::string schema_name = TOSTRING(IfcSchema);
struct {
IfcGeom::IteratorImplementation<float>* operator()(const IfcGeom::IteratorSettings& settings, IfcParse::IfcFile* file) const {
return new IfcGeom::MAKE_TYPE_NAME(IteratorImplementation_)<float>(settings, file);
IfcGeom::IteratorImplementation<P>* operator()(const IfcGeom::IteratorSettings& settings, IfcParse::IfcFile* file) const {
return new IfcGeom::MAKE_TYPE_NAME(IteratorImplementation_)<P>(settings, file);
}
} factory_float;
} factory;
struct {
IfcGeom::IteratorImplementation<double>* operator()(const IfcGeom::IteratorSettings& settings, IfcParse::IfcFile* file) const {
return new IfcGeom::MAKE_TYPE_NAME(IteratorImplementation_)<double>(settings, file);
}
} factory_double;
mapping->bind(schema_name, factory);
}
static Registrar< IfcGeom::MAKE_TYPE_NAME(IteratorImplementation_)<float> > float_registration(schema_name, factory_float);
static Registrar< IfcGeom::MAKE_TYPE_NAME(IteratorImplementation_)<double> > double_registration(schema_name, factory_double);
}
template void MAKE_INIT_FN(IteratorImplementation_)<float>(IteratorFactoryImplementation<float>*);
template void MAKE_INIT_FN(IteratorImplementation_)<double>(IteratorFactoryImplementation<double>*);