#include <coherence/util/aggregator/AbstractComparableAggregator.hpp>
Inherits AbstractAggregator.
Inherited by ComparableMax, and ComparableMin.
There are two ways to use the AbstractComparableAggregator:
Comparable, orComparator object.aggregate is empty, a NULL result is returned.
Public Types |
||||
| typedef spec::Handle | Handle | |||
| AbstractComparableAggregator Handle definition. |
||||
| typedef spec::View | View | |||
| AbstractComparableAggregator View definition. |
||||
| typedef spec::Holder | Holder | |||
| AbstractComparableAggregator Holder definition. |
||||
Public Member Functions |
||||
| virtual void | readExternal (PofReader::Handle hIn) | |||
| virtual void | writeExternal (PofWriter::Handle hOut) const | |||
Protected Member Functions |
||||
| AbstractComparableAggregator (ValueExtractor::View vExtractor, Comparator::View vComparator=NULL) | ||||
| Construct an AbstractComparableAggregator object. |
||||
| virtual void | init (bool fFinal) | |||
Initialize the aggregation result.
|
||||
| virtual Object::Holder | finalizeResult (bool fFinal) | |||
| Obtain the result of the aggregation.
If the
|
||||
Protected Attributes |
||||
| int32_t | m_count | |||
| The count of processed entries. |
||||
| MemberView< Object > | m_vResult | |||
| The running result value. |
||||
| MemberView< Comparator > | m_vComparator | |||
| The comparator to use for comparing extracted values. |
||||
| AbstractComparableAggregator | ( | ValueExtractor::View | vExtractor, | |
| Comparator::View | vComparator = NULL |
|||
| ) | [protected] |
Construct an AbstractComparableAggregator object.
| vExtractor | the extractor that provides an object to be compared | |
| vComparator | the comparator used to compare the extracted object, if NULL then the extracted object must implement Comparable |