Any& ReturnObjectListImpl::invoke() { if(firstUnused < numberOfValidObjects()) { return objects[firstUnused++]; } MOCKCPP_FAIL("All objects has been returned"); return getEmptyAny(); }
const Any& ResultImpl::getResult(const Any& result) const { std::list<ResultHandler*>::const_iterator i = handlers.begin(); for(; i != handlers.end(); i++) { if((*i)->matches(result)) { return (*i)->getResult(result); } } return getEmptyAny(); }
const std::type_info& ReturnObjectListImpl::type() const { if (firstUnused >= objects.size()) return getEmptyAny().type(); return objects[firstUnused].type(); }