mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +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"
|
#include "XmlSerializer.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
struct factory_t {
|
struct MAKE_TYPE_NAME(factory_t) {
|
||||||
XmlSerializer* operator()(IfcParse::IfcFile* file, const std::string& xml_filename) const {
|
XmlSerializer* operator()(IfcParse::IfcFile* file, const std::string& xml_filename) const {
|
||||||
MAKE_TYPE_NAME(XmlSerializer)* s = new MAKE_TYPE_NAME(XmlSerializer)(file, xml_filename);
|
MAKE_TYPE_NAME(XmlSerializer)* s = new MAKE_TYPE_NAME(XmlSerializer)(file, xml_filename);
|
||||||
s->setFile(file);
|
s->setFile(file);
|
||||||
@@ -47,7 +47,7 @@ namespace {
|
|||||||
|
|
||||||
void MAKE_INIT_FN(XmlSerializer)(XmlSerializerFactory::Factory* mapping) {
|
void MAKE_INIT_FN(XmlSerializer)(XmlSerializerFactory::Factory* mapping) {
|
||||||
static const std::string schema_name = STRINGIFY(IfcSchema);
|
static const std::string schema_name = STRINGIFY(IfcSchema);
|
||||||
factory_t factory;
|
MAKE_TYPE_NAME(factory_t) factory;
|
||||||
mapping->bind(schema_name, factory);
|
mapping->bind(schema_name, factory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user