mockpp::ThrowableList Class Reference
[Basic Mock Objects]

A list of throwable objects. More...

Inheritance diagram for mockpp::ThrowableList:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ThrowableList (const String &aName, VerifiableList *parent)
 Construct a new empty list.
virtual ~ThrowableList () throw ()
 Destruct the list.
void push_back (Throwable *t)
 Add a next object to the end of the list.
void addObjectToThrow (Throwable *t)
 Add a next object to the end of the list.
template<class T >
void push_back (const T &w)
 Add a next object to the end of the list.
template<class T >
void addObjectToThrow (const T &w)
 Add a next object to the end of the list.
ThrowablenextThrowableObject ()
 Returns the next object from the list.
bool hasMoreObjects () const
 Returns true if there are more objects to be returned.
Throwableat (unsigned i)
 Returns a pointer to the specified object in the list.
virtual void verify ()
 Verify that there are no objects left within the list.
virtual void reset ()
 Sets all internal objects to the state after construction.
unsigned size () const
 Returns the amount of response values.

Detailed Description

A list of throwable objects.

The objects are completely managed which also includes the destruction of the objects by the destructor of this list.

Definition at line 48 of file ThrowableList.h.


Constructor & Destructor Documentation

mockpp::ThrowableList::ThrowableList ( const String aName,
VerifiableList parent 
)

Construct a new empty list.

Parameters:
aName Label used to identify list
parent parent verifiable

Definition at line 41 of file ThrowableList.cpp.


Member Function Documentation

template<class T >
void mockpp::ThrowableList::addObjectToThrow ( const T &  w  )  [inline]

Add a next object to the end of the list.

The objects remains from now on in the responsibiliy of this list until the list itself is destroyed! This is valid even for objects taken via nextThrowableObject()!

Parameters:
w object to be added to the list

Definition at line 101 of file ThrowableList.h.

void mockpp::ThrowableList::addObjectToThrow ( Throwable t  ) 

Add a next object to the end of the list.

The objects remains from now on in the responsibiliy of this list until the list itself is destroyed! This is valid even for objects taken via nextThrowableObject()! Don't add the same object (the same pointer!) more than once via this method.

Parameters:
t pointer to object to be added to the list

Definition at line 59 of file ThrowableList.cpp.

Throwable * mockpp::ThrowableList::at ( unsigned  i  ) 

Returns a pointer to the specified object in the list.

The list is not changed!

Parameters:
i index of the object

Definition at line 73 of file ThrowableList.cpp.

Throwable * mockpp::ThrowableList::nextThrowableObject (  ) 

Returns the next object from the list.

Each object it returned in the order in which they where added.

Definition at line 89 of file ThrowableList.cpp.

template<class T >
void mockpp::ThrowableList::push_back ( const T &  w  )  [inline]

Add a next object to the end of the list.

The objects remains from now on in the responsibiliy of this list until the list itself is destroyed! This is valid even for objects taken via nextThrowableObject()!

Deprecated:
Parameters:
w object to be added to the list

Definition at line 89 of file ThrowableList.h.

void mockpp::ThrowableList::push_back ( Throwable t  ) 

Add a next object to the end of the list.

The objects remains from now on in the responsibiliy of this list until the list itself is destroyed! This is valid even for objects taken via nextThrowableObject()! Don't add the same object (the same pointer!) more than once via this method.

Deprecated:
Parameters:
t pointer to object to be added to the list

Definition at line 53 of file ThrowableList.cpp.

unsigned mockpp::ThrowableList::size (  )  const

Returns the amount of response values.

The count covers already used and still unused obbjects!

Returns:
number of response values

Definition at line 67 of file ThrowableList.cpp.

void mockpp::ThrowableList::verify (  )  [virtual]

Verify that there are no objects left within the list.

If it fails, an AssertionFailedError is thrown

Implements mockpp::Verifiable.

Definition at line 121 of file ThrowableList.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on Tue Jan 5 09:49:00 2010 for mockpp by  doxygen 1.6.1