+private:
+ template<typename T>
+ void collect_items(std::list<T *> *objects, std::list<std::string> *names, std::list<std::string> *future_names)
+ {
+ typedef RefPtr<typename RemoveConst<T>::Type> RPNCT;
+
+ for(ItemMap::const_iterator i=items.begin(); i!=items.end(); ++i)
+ if(i->second.check_type<RPNCT>())
+ {
+ T *ptr = i->second.value<RPNCT>().get();
+ if(ptr)
+ {
+ if(objects)
+ objects->push_back(ptr);
+ if(names)
+ names->push_back(i->first);
+ }
+ else if(future_names)
+ future_names->push_back(i->first);
+ }
+ }
+
+public:
+ /** Returns a list of the names of loaded objects of one type in the
+ collection. */