- /** Look through a list of objects and copy a shared_ptr to any object
- * which matches the ID of this one.
- */
- void resolve (std::list<boost::shared_ptr<Object> > objects)
- {
- typename std::list<boost::shared_ptr<Object> >::iterator i = objects.begin();
- while (i != objects.end() && (*i)->id() != _id) {
- ++i;
- }
-
- if (i != objects.end ()) {
- _object = boost::dynamic_pointer_cast<T> (*i);
- }
- }