This class count the number of success and failure. More...
#include <hpp/statistics/success-bin.hh>
Classes | |
struct | Reason |
In case of failure, you can provide a reason. More... | |
Public Member Functions | |
SuccessBin (const bool success, const Reason &r=REASON_UNKNOWN) | |
Constructor. More... | |
bool | isSuccess () const |
Value of the bin. More... | |
const Reason & | reason () const |
If this bin represents 'failure', returns the reason. More... | |
const std::string & | reasonString () const |
If this bin represents 'failure', returns the reason as a string. More... | |
bool | operator== (const SuccessBin &other) const |
Check for equality. More... | |
bool | operator< (const SuccessBin &other) const |
Comparison. More... | |
![]() | |
const std::size_t & | freq () const |
Return the number of element in the bin. More... | |
std::size_t | operator++ () |
Add an occurence. More... | |
std::size_t | operator++ (int) |
Add an occurence. More... | |
virtual std::ostream & | print (std::ostream &os) const |
Print the bin. More... | |
Static Public Member Functions | |
static Reason | createReason (const std::string &what) |
Create a new Reason. More... | |
Static Public Attributes | |
static const Reason | REASON_UNKNOWN |
The default reason for 'failure'. More... | |
Additional Inherited Members | |
![]() | |
Bin () | |
Constructor. More... | |
This class count the number of success and failure.
|
inline |
Constructor.
|
inlinestatic |
Create a new Reason.
what | The text associated with the reason. |
References hpp::statistics::SuccessBin::Reason::what.
|
inline |
Value of the bin.
|
inline |
Comparison.
References hpp::statistics::SuccessBin::Reason::id, and reason().
|
inline |
Check for equality.
References hpp::statistics::SuccessBin::Reason::id, and reason().
|
inline |
If this bin represents 'failure', returns the reason.
Referenced by operator<(), and operator==().
|
inline |
If this bin represents 'failure', returns the reason as a string.
|
static |
The default reason for 'failure'.