| 231 | } |
| 232 | |
| 233 | aggregate_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 | /* |
| 251 | void IfcUtil::IfcBaseClass::data(IfcEntityInstanceData* data) { |
no test coverage detected