Mark abstract entities in latebound schema

This commit is contained in:
Thomas Krijnen
2019-02-20 15:35:19 +01:00
parent 45136fce6c
commit dbc3c5ebef
5 changed files with 1437 additions and 1431 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+5 -1
View File
@@ -240,6 +240,7 @@ namespace IfcParse {
class entity : public declaration {
protected:
bool is_abstract_;
const entity* supertype_; /* NB: IFC explicitly allows only single inheritance */
std::vector<const entity*> subtypes_;
@@ -274,8 +275,9 @@ namespace IfcParse {
}
public:
entity(const std::string& name, int index_in_schema, entity* supertype)
entity(const std::string& name, bool is_abstract, int index_in_schema, entity* supertype)
: declaration(name, index_in_schema)
, is_abstract_(is_abstract)
, supertype_(supertype)
{}
@@ -291,6 +293,8 @@ namespace IfcParse {
else return false;
}
bool is_abstract() const { return is_abstract_; }
void set_subtypes(const std::vector<const entity*>& subtypes) {
subtypes_ = subtypes;
}