tree and document plug-ins

This commit is contained in:
Thomas Krijnen
2026-04-17 11:24:09 +02:00
parent 3824e7b449
commit d2cc66fdf0
60 changed files with 2207 additions and 766 deletions
@@ -32,22 +32,6 @@
using json = nlohmann::json;
namespace {
struct POSTFIX_SCHEMA(factory_t) {
JsonSerializer* operator()(ifcopenshell::file* file, const std::string& json_filename, JsonSerializer::Dialect dialect) const {
POSTFIX_SCHEMA(JsonSerializer)* s = new POSTFIX_SCHEMA(JsonSerializer)(file, json_filename, dialect);
s->setFile(file);
return s;
}
};
}
void MAKE_INIT_FN(JsonSerializer)(JsonSerializerFactory::Factory* mapping) {
static const std::string schema_name = STRINGIFY(IfcSchema);
POSTFIX_SCHEMA(factory_t) factory;
mapping->bind(schema_name, factory);
}
namespace {
class format_value_visitor : public boost::static_visitor<std::string> {
@@ -598,4 +582,4 @@ void POSTFIX_SCHEMA(JsonSerializer)::finalize() {
f << output.dump(4);
}
#endif
#endif