mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Case sensitivity on entity str comparison from cmd line https://sourceforge.net/p/ifcopenshell/discussion/1782717/thread/2bf3324a7f
This commit is contained in:
@@ -13,8 +13,8 @@ bool IfcParse::declaration::is(const std::string& name) const {
|
|||||||
|
|
||||||
if (name_upper_ == *name_ptr) return true;
|
if (name_upper_ == *name_ptr) return true;
|
||||||
|
|
||||||
if (this->as_entity()) {
|
if (this->as_entity() && this->as_entity()->supertype()) {
|
||||||
return this->as_entity()->is(name);
|
return this->as_entity()->supertype()->is(name);
|
||||||
} else if (this->as_type_declaration()) {
|
} else if (this->as_type_declaration()) {
|
||||||
const IfcParse::named_type* nt = this->as_type_declaration()->declared_type()->as_named_type();
|
const IfcParse::named_type* nt = this->as_type_declaration()->declared_type()->as_named_type();
|
||||||
if (nt) return nt->is(name);
|
if (nt) return nt->is(name);
|
||||||
@@ -26,8 +26,8 @@ bool IfcParse::declaration::is(const std::string& name) const {
|
|||||||
bool IfcParse::declaration::is(const IfcParse::declaration& decl) const {
|
bool IfcParse::declaration::is(const IfcParse::declaration& decl) const {
|
||||||
if (this == &decl) return true;
|
if (this == &decl) return true;
|
||||||
|
|
||||||
if (this->as_entity()) {
|
if (this->as_entity() && this->as_entity()->supertype()) {
|
||||||
return this->as_entity()->is(decl);
|
return this->as_entity()->supertype()->is(decl);
|
||||||
} else if (this->as_type_declaration()) {
|
} else if (this->as_type_declaration()) {
|
||||||
const IfcParse::named_type* nt = this->as_type_declaration()->declared_type()->as_named_type();
|
const IfcParse::named_type* nt = this->as_type_declaration()->declared_type()->as_named_type();
|
||||||
if (nt) return nt->is(decl);
|
if (nt) return nt->is(decl);
|
||||||
|
|||||||
@@ -293,18 +293,6 @@ namespace IfcParse {
|
|||||||
|
|
||||||
virtual ~entity();
|
virtual ~entity();
|
||||||
|
|
||||||
bool is(const std::string& name) const {
|
|
||||||
if (name == name_) return true;
|
|
||||||
else if (supertype_) return supertype_->is(name);
|
|
||||||
else return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is(const IfcParse::declaration& decl) const {
|
|
||||||
if (this == &decl) return true;
|
|
||||||
else if (supertype_) return supertype_->is(decl);
|
|
||||||
else return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_abstract() const { return is_abstract_; }
|
bool is_abstract() const { return is_abstract_; }
|
||||||
|
|
||||||
void set_subtypes(const std::vector<const entity*>& subtypes) {
|
void set_subtypes(const std::vector<const entity*>& subtypes) {
|
||||||
|
|||||||
Reference in New Issue
Block a user