mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 11:46:33 +00:00
Fix IfcFile::getInverse<T>()
This commit is contained in:
@@ -265,14 +265,7 @@ public:
|
|||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
typename T::list::ptr getInverse(int instance_id, int attribute_index) {
|
typename T::list::ptr getInverse(int instance_id, int attribute_index) {
|
||||||
aggregate_of_instance::ptr return_value(new aggregate_of_instance);
|
return getInverse(instance_id, &T::Class(), attribute_index)->as<T>();
|
||||||
auto it = byref.find({ instance_id, T::Class().index_in_schema(), attribute_index });
|
|
||||||
if (it != byref.end()) {
|
|
||||||
for (auto& i : it->second) {
|
|
||||||
return_value->push((T*)instance_by_id(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return return_value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int FreshId() { return ++MaxId; }
|
unsigned int FreshId() { return ++MaxId; }
|
||||||
|
|||||||
Reference in New Issue
Block a user