mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
Mark abstract entities in latebound schema
This commit is contained in:
+653
-653
File diff suppressed because it is too large
Load Diff
+776
-776
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user