mockpp::TrackingCounterMaster Class Reference
[Basic Mock ObjectsPoor Man's Mock Objects]

The master counter from which clients obtain the current occurence count. More...

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

List of all members.

Public Member Functions

 TrackingCounterMaster (const String &name, VerifiableList *parent=0)
 Constructs the expectation.
virtual void verify ()
 Verify that the amount of Value is within the allowed bounds.
virtual void clearActual ()
 Resets the internal state to reflect that there is no actual value set.
virtual unsigned getActual () const
 Gets the number of actual Value.
unsigned numClients () const
 Gets the number of registered clients.

Protected Member Functions

virtual void addClient (TrackingCounterClient *vf)
 Adds another TrackingCounterClient object to the list.
void removeClient (TrackingCounterClient *vf)
 Removes a TrackingCounterClient object from the list.
unsigned increment ()
 Increments the counter value by 1 and returns it.

Friends

class TrackingCounterClient

Detailed Description

The master counter from which clients obtain the current occurence count.

Definition at line 127 of file TrackingCounter.h.


Constructor & Destructor Documentation

mockpp::TrackingCounterMaster::TrackingCounterMaster ( const String name,
VerifiableList parent = 0 
)

Constructs the expectation.

Parameters:
name human readable description about the expectation
parent parent TrackingCounterClient

Definition at line 116 of file TrackingCounter.cpp.


Member Function Documentation

void mockpp::TrackingCounterMaster::addClient ( TrackingCounterClient vf  )  [protected, virtual]

Adds another TrackingCounterClient object to the list.

Parameters:
vf pointer to the TrackingCounterClient object

Definition at line 157 of file TrackingCounter.cpp.

unsigned mockpp::TrackingCounterMaster::getActual (  )  const [virtual]

Gets the number of actual Value.

Returns:
counter value.

Implements mockpp::TrackingCounterBase.

Definition at line 174 of file TrackingCounter.cpp.

unsigned mockpp::TrackingCounterMaster::numClients (  )  const

Gets the number of registered clients.

Returns:
number of clients

Definition at line 151 of file TrackingCounter.cpp.

void mockpp::TrackingCounterMaster::removeClient ( TrackingCounterClient vf  )  [protected]

Removes a TrackingCounterClient object from the list.

Parameters:
vf pointer to the TrackingCounterClient object

Definition at line 164 of file TrackingCounter.cpp.

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

Verify that the amount of Value is within the allowed bounds.

If it fails, an AssertionFailedError is thrown

Implements mockpp::AbstractExpectation< unsigned >.

Definition at line 123 of file TrackingCounter.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