mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-17 02:49:12 +00:00
Schema dependent serializers
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#define SCHEMA_METHOD
|
||||
|
||||
#include "../ifcparse/IfcFile.h"
|
||||
|
||||
#include <boost/function.hpp>
|
||||
|
||||
#include <map>
|
||||
|
||||
template <typename T>
|
||||
class schema_delegate {
|
||||
|
||||
};
|
||||
|
||||
class XmlSerializer : public schema_delegate<> {
|
||||
|
||||
};
|
||||
|
||||
struct XmlSerializerFactory {
|
||||
typedef boost::function1<XmlSerializer*, IfcParse::IfcFile*> fn;
|
||||
|
||||
class Factory : public std::map<std::string, fn> {
|
||||
public:
|
||||
Factory();
|
||||
void bind(const std::string& schema_name, fn);
|
||||
XmlSerializer* construct(const std::string& schema_name, IfcParse::IfcFile*);
|
||||
};
|
||||
|
||||
Factory& implementations();
|
||||
};
|
||||
Reference in New Issue
Block a user