mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-31 00:46:36 +00:00
IfcConvert links on windows
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "AbstractKernel.h"
|
||||
|
||||
#include "../../ifcgeom/schema_agnostic/IfcGeomElement.h"
|
||||
#include "../../ifcgeom/kernels/opencascade/OpenCascadeKernel.h"
|
||||
|
||||
namespace {
|
||||
/* A compile-time for loop over the taxonomy kinds */
|
||||
@@ -28,6 +29,15 @@ bool ifcopenshell::geometry::kernels::AbstractKernel::convert(const taxonomy::it
|
||||
return dispatch_conversion<0>::dispatch(this, item, results);
|
||||
}
|
||||
|
||||
ifcopenshell::geometry::kernels::AbstractKernel* ifcopenshell::geometry::kernels::construct(const std::string& geometry_library, IfcParse::IfcFile* file) {
|
||||
const std::string geometry_library_lower = boost::to_lower_copy(geometry_library);
|
||||
if (geometry_library_lower == "opencascade") {
|
||||
return new OpenCascadeKernel;
|
||||
} else {
|
||||
throw IfcParse::IfcException("No geometry kernel registered for " + geometry_library);
|
||||
}
|
||||
}
|
||||
|
||||
//void ifcopenshell::geometry::kernels::AbstractKernel::set_conversion_placement_rel_to(const IfcParse::declaration* type) {
|
||||
// placement_rel_to = type;
|
||||
//}
|
||||
|
||||
@@ -53,18 +53,7 @@ namespace ifcopenshell { namespace geometry { namespace kernels {
|
||||
virtual bool convert_impl(const taxonomy::node*, ifcopenshell::geometry::ConversionResults&) { throw std::runtime_error("Not implemented"); }
|
||||
};
|
||||
|
||||
namespace impl {
|
||||
typedef boost::function1 < AbstractKernel*, const std::string&> kernel_fn;
|
||||
|
||||
class KernelFactoryImplementation : public std::map<std::string, kernel_fn> {
|
||||
public:
|
||||
KernelFactoryImplementation();
|
||||
void bind(const std::string& geometry_library, kernel_fn);
|
||||
AbstractKernel* construct(const std::string& geometry_library, IfcParse::IfcFile*);
|
||||
};
|
||||
|
||||
KernelFactoryImplementation& kernel_implementations();
|
||||
}
|
||||
AbstractKernel* construct(const std::string& geometry_library, IfcParse::IfcFile*);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user