| 62 | #include "Header_section_schema.h" |
| 63 | |
| 64 | bool IfcParse::declaration::is(const std::string& name) const { |
| 65 | const std::string* name_ptr = &name; |
| 66 | if (std::any_of(name.begin(), name.end(), [](char character) { return std::islower(character); })) { |
| 67 | temp_string_() = name; |
| 68 | boost::to_upper(temp_string_()); |
| 69 | name_ptr = &temp_string_(); |
| 70 | } |
| 71 | |
| 72 | if (name_upper_ == *name_ptr) { |
| 73 | return true; |
| 74 | } |
| 75 | |
| 76 | if ((this->as_entity() != nullptr) && (this->as_entity()->supertype() != nullptr)) { |
| 77 | return this->as_entity()->supertype()->is(name); |
| 78 | } |
| 79 | if (this->as_type_declaration() != nullptr) { |
| 80 | const IfcParse::named_type* named_type = this->as_type_declaration()->declared_type()->as_named_type(); |
| 81 | if (named_type != nullptr) { |
| 82 | return named_type->is(name); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | return false; |
| 87 | } |
| 88 | |
| 89 | bool IfcParse::declaration::is(const IfcParse::declaration& decl) const { |
| 90 | if (this == &decl) { |
no test coverage detected