mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
Work on runtime representation of schema
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#include "IfcSchema.h"
|
||||
|
||||
bool IfcParse::declaration::is(const std::string& name) const {
|
||||
return is(IfcSchema::Type::FromString(name));
|
||||
}
|
||||
|
||||
bool IfcParse::declaration::is(IfcSchema::Type::Enum name) const {
|
||||
if (this->as_entity()) {
|
||||
return this->as_entity()->is(name);
|
||||
} else {
|
||||
return this->name() == IfcSchema::Type::ToString(name);
|
||||
}
|
||||
}
|
||||
|
||||
bool IfcParse::named_type::is(const std::string& name) const {
|
||||
return declared_type()->is(name);
|
||||
}
|
||||
|
||||
bool IfcParse::named_type::is(IfcSchema::Type::Enum name) const {
|
||||
return declared_type()->is(name);
|
||||
}
|
||||
Reference in New Issue
Block a user