mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fix #540. Fix XML serializer schema registration.
This commit is contained in:
@@ -36,7 +36,7 @@ using boost::property_tree::ptree;
|
||||
#include "XmlSerializer.h"
|
||||
|
||||
namespace {
|
||||
struct factory_t {
|
||||
struct MAKE_TYPE_NAME(factory_t) {
|
||||
XmlSerializer* operator()(IfcParse::IfcFile* file, const std::string& xml_filename) const {
|
||||
MAKE_TYPE_NAME(XmlSerializer)* s = new MAKE_TYPE_NAME(XmlSerializer)(file, xml_filename);
|
||||
s->setFile(file);
|
||||
@@ -47,7 +47,7 @@ namespace {
|
||||
|
||||
void MAKE_INIT_FN(XmlSerializer)(XmlSerializerFactory::Factory* mapping) {
|
||||
static const std::string schema_name = STRINGIFY(IfcSchema);
|
||||
factory_t factory;
|
||||
MAKE_TYPE_NAME(factory_t) factory;
|
||||
mapping->bind(schema_name, factory);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user