| 206 | |
| 207 | template <class U> |
| 208 | typename U::list::ptr aggregate_of_instance::as() { |
| 209 | typename U::list::ptr result(new typename U::list); |
| 210 | for (it i = begin(); i != end(); ++i) { |
| 211 | if ((*i)->template as<U>()) { |
| 212 | result->push((*i)->template as<U>()); |
| 213 | } |
| 214 | } |
| 215 | return result; |
| 216 | } |
| 217 | |
| 218 | template <class U> |
| 219 | typename aggregate_of_aggregate_of<U>::ptr aggregate_of_aggregate_of_instance::as() { |