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

Method as

src/ifcparse/aggregate_of_instance.h:94–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 bool contains(T* type) const { return std::find(list_.begin(), list_.end(), type) != list_.end(); }
93 template <class U>
94 typename U::list::ptr as() {
95 typename U::list::ptr result(new typename U::list);
96 for (it i = begin(); i != end(); ++i) {
97 if ((*i)->template as<U>()) {
98 result->push((*i)->template as<U>());
99 }
100 }
101 return result;
102 }
103 void remove(T* type) {
104 typename std::vector<T*>::iterator iter;
105 while ((iter = std::find(list_.begin(), list_.end(), type)) != list_.end()) {

Callers

nothing calls this directly

Calls 3

beginFunction · 0.70
endFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected