Track inverse attributes more correctly

Rename Size() to size() on EntityList and friends
This commit is contained in:
Thomas Krijnen
2015-01-10 22:13:52 +00:00
parent 1d319f7ac4
commit 8581fed39b
22 changed files with 396 additions and 402 deletions
+1 -9
View File
@@ -178,15 +178,7 @@ std::string IfcParse::IfcLateBoundEntity::toString() {
}
IfcEntityList::ptr IfcParse::IfcLateBoundEntity::get_inverse(const std::string& a) {
std::pair<IfcSchema::Type::Enum, unsigned> inv = IfcSchema::Type::GetInverseAttribute(_type, a);
IfcEntityList::ptr invs = entity->getInverse(inv.first);
IfcEntityList::ptr filtered(new IfcEntityList());
for (IfcEntityList::it it = invs->begin(); it != invs->end(); ++it) {
try {
const int id = *(*it)->entity->getArgument(inv.second);
if (id == this->entity->id()) { filtered->push(*it); }
} catch (...) {}
}
return filtered;
return entity->getInverse(inv.first, inv.second);
}
bool IfcParse::IfcLateBoundEntity::is_valid() {
const unsigned arg_count = getArgumentCount();