| 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()) { |