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

Method get_inverse

src/ifcparse/IfcUtil.cpp:233–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233aggregate_of_instance::ptr IfcUtil::IfcBaseEntity::get_inverse(const std::string& name) const {
234 if (file_ == nullptr) {
235 throw IfcParse::IfcException("Instance not added to file");
236 }
237 const std::vector<const IfcParse::inverse_attribute*> attrs = declaration().as_entity()->all_inverse_attributes();
238 std::vector<const IfcParse::inverse_attribute*>::const_iterator iter = attrs.begin();
239 for (; iter != attrs.end(); ++iter) {
240 if ((*iter)->name() == name) {
241 return file_->getInverse(
242 id_,
243 (*iter)->entity_reference(),
244 (int)(*iter)->entity_reference()->attribute_index((*iter)->attribute_reference()));
245 }
246 }
247 throw IfcParse::IfcException(name + " not found on " + declaration().name());
248}
249
250/*
251void IfcUtil::IfcBaseClass::data(IfcEntityInstanceData* data) {

Callers 15

tests.pyFile · 0.45
sv_freeMethod · 0.45
sv_freeMethod · 0.45
get_curve_style_nameFunction · 0.45
writeMethod · 0.45
insert_dataMethod · 0.45
mergeMethod · 0.45
patchMethod · 0.45

Calls 5

getInverseMethod · 0.80
declarationClass · 0.70
beginMethod · 0.45
endMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected