The master counter from which clients obtain the current occurence count. More...
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 |
The master counter from which clients obtain the current occurence count.
Definition at line 127 of file TrackingCounter.h.
mockpp::TrackingCounterMaster::TrackingCounterMaster | ( | const String & | name, | |
VerifiableList * | parent = 0 | |||
) |
Constructs the expectation.
name | human readable description about the expectation | |
parent | parent TrackingCounterClient |
Definition at line 116 of file TrackingCounter.cpp.
void mockpp::TrackingCounterMaster::addClient | ( | TrackingCounterClient * | vf | ) | [protected, virtual] |
Adds another TrackingCounterClient object to the list.
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.
Implements mockpp::TrackingCounterBase.
Definition at line 174 of file TrackingCounter.cpp.
unsigned mockpp::TrackingCounterMaster::numClients | ( | ) | const |
Gets the number of registered clients.
Definition at line 151 of file TrackingCounter.cpp.
void mockpp::TrackingCounterMaster::removeClient | ( | TrackingCounterClient * | vf | ) | [protected] |
Removes a TrackingCounterClient object from the list.
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.