MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / is

Method is

src/ifcparse/IfcSchema.cpp:64–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62#include "Header_section_schema.h"
63
64bool 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
89bool IfcParse::declaration::is(const IfcParse::declaration& decl) const {
90 if (this == &decl) {

Callers 15

operator()Method · 0.80
get_curve_style_nameFunction · 0.80
writeMethod · 0.80
idElementMethod · 0.80
setFileMethod · 0.80
format_attributeFunction · 0.80
descendFunction · 0.80
format_propertiesFunction · 0.80
writeGroupToNodeFunction · 0.80
format_quantitiesFunction · 0.80
format_tasksFunction · 0.80

Calls 3

declared_typeFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected