Runtime schema by name

This commit is contained in:
Thomas Krijnen
2017-12-12 10:33:24 +01:00
parent 33e1fa6a14
commit 33fc2080df
13 changed files with 967 additions and 73 deletions
+4 -4
View File
@@ -38,7 +38,7 @@ public:
IfcParse::IfcFile* file;
protected:
unsigned id_;
IfcSchema::Type::Enum type_;
const IfcParse::declaration* type_;
mutable std::vector<Argument*> attributes_;
// To reduce memory footprint, these two could potentially be combined,
@@ -49,11 +49,11 @@ protected:
unsigned offset_in_file_;
public:
IfcEntityInstanceData(IfcSchema::Type::Enum type, IfcParse::IfcFile* file_, unsigned id = 0, unsigned offset_in_file = 0)
IfcEntityInstanceData(const IfcParse::declaration* type, IfcParse::IfcFile* file_, unsigned id = 0, unsigned offset_in_file = 0)
: file(file_), id_(id), type_(type), initialized_(false), offset_in_file_(offset_in_file)
{}
IfcEntityInstanceData(IfcSchema::Type::Enum type)
IfcEntityInstanceData(const IfcParse::declaration* type)
: file(0), id_(0), type_(type), initialized_(true)
{}
@@ -89,7 +89,7 @@ public:
return (unsigned int)attributes_.size();
}
IfcSchema::Type::Enum type() const {
const IfcParse::declaration* type() const {
return type_;
}