+protected:
+ /** Adds the name of a future object to the collection. The object itself
+ will be loaded on first access. The calling subclass should be prepared to
+ create the object on request. */
+ template<typename T>
+ void add_future(const std::string &name)
+ {
+ RefPtr<typename RemoveConst<T>::Type> ptr(0);
+ insert_unique(items, name, ptr);
+ }
+
+ /** Adds the name of a future object, guessing its type. If a type matching
+ the name can't be found, nothing is done. */
+ void add_future(const std::string &name);
+
+ /** Adds the name of a future object, using a keyword to determine its type.
+ The keyword must be known to the collection. */
+ void add_future_with_keyword(const std::string &name, const std::string &);
+
+public:
+ /// Gets a typed object from the collection.