Exemplo n.º 1
0
Any& ReturnObjectListImpl::invoke()
{
    if(firstUnused < numberOfValidObjects())
    {
      return objects[firstUnused++];
    }
    
    MOCKCPP_FAIL("All objects has been returned");

    return getEmptyAny();
}
Exemplo n.º 2
0
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();
}
Exemplo n.º 3
0
const std::type_info& ReturnObjectListImpl::type() const
{
    if (firstUnused >= objects.size()) return getEmptyAny().type();

    return objects[firstUnused].type();
}