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

The client counter to track occurrences based on a shared counter. More...

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

List of all members.

Public Member Functions

 TrackingCounterClient (const String &name, TrackingCounterMaster &master)
 Constructs the expectation.
virtual ~TrackingCounterClient ()
 Destructs the expectation.
unsigned inc ()
 Stores and returns the current master count value.
unsigned operator++ ()
 Stores and returns the current master count value.
unsigned operator++ (int)
 Stores and returns the current master count value.
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 numTags () const
 Gets the number of counter transfers from the master.
unsigned getTag (unsigned index) const
 Gets the value of a conter transfer.

Detailed Description

The client counter to track occurrences based on a shared counter.

This class stores all the actual master counter values when invoked.

Definition at line 189 of file TrackingCounter.h.


Constructor & Destructor Documentation

mockpp::TrackingCounterClient::TrackingCounterClient ( const String name,
TrackingCounterMaster master 
)

Constructs the expectation.

Parameters:
name human readable description about the expectation
master the according master counter

Definition at line 206 of file TrackingCounter.cpp.


Member Function Documentation

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

Gets the number of actual Value.

Returns:
counter value.

Implements mockpp::TrackingCounterBase.

Definition at line 228 of file TrackingCounter.cpp.

unsigned mockpp::TrackingCounterClient::operator++ ( int   )  [inline]

Stores and returns the current master count value.

Replacement for

See also:
inc().

Definition at line 218 of file TrackingCounter.h.

unsigned mockpp::TrackingCounterClient::operator++ (  )  [inline]

Stores and returns the current master count value.

Replacement for

See also:
inc().

Definition at line 210 of file TrackingCounter.h.

void mockpp::TrackingCounterClient::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 248 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