#include <ComparisonPlatform.h>
Inheritance diagram for Patternist::ComparisonPlatform< TSubClass, issueError, comparisonType, errorCode >:


Protected Member Functions | |
| AtomicComparator::Ptr | comparator () const |
| bool | compare (const Item::Ptr &i1, const Item::Ptr &i2, const AtomicComparator::Ptr &comp, const AtomicComparator::Operator op) const |
| ComparisonPlatform () | |
| AtomicComparator::Ptr | fetchComparator (const ItemType::Ptr &type1, const ItemType::Ptr &type2, const ReportContext::Ptr &context) const |
| bool | flexibleCompare (const Item::Ptr &it1, const Item::Ptr &it2, const DynamicContext::Ptr &context) const |
| void | prepareComparison (const AtomicComparator::Ptr &comparator) |
| void | useCaseInsensitiveComparator () |
Classes which need comparison functionalities should inherit from this class.
The parameter of this template class is the class inheriting from ComparisonPlatform.
The class inheriting ComparisonPlatform must implement the following function:
AtomicComparator::Operator operatorID() const
Definition at line 48 of file ComparisonPlatform.h.
| Patternist::ComparisonPlatform< TSubClass, issueError, comparisonType, errorCode >::ComparisonPlatform | ( | ) | [inline, protected] |
Default constructor. Does nothing. It is implemented in order make template instantiation easier.
Definition at line 60 of file ComparisonPlatform.h.
| AtomicComparator::Ptr Patternist::ComparisonPlatform< TSubClass, issueError, comparisonType, errorCode >::comparator | ( | ) | const [inline, protected] |
null. Definition at line 99 of file ComparisonPlatform.h.
Referenced by Patternist::IndexOfIterator::copy(), Patternist::DistinctIterator::copy(), Patternist::DistinctValuesFN::evaluateSequence(), and Patternist::IndexOfFN::evaluateSequence().
Here is the caller graph for this function:

| AtomicComparator::Ptr Patternist::ComparisonPlatform< TSubClass, issueError, comparisonType, errorCode >::fetchComparator | ( | const ItemType::Ptr & | type1, | |
| const ItemType::Ptr & | type2, | |||
| const ReportContext::Ptr & | context | |||
| ) | const [protected] |
Utility function for fetching the appropriate AtomicComparator for two atomic values of type type1 and type2, for the operator op.
This function is used throughout the implementation, ranging from the ValueComparison itself, to for example the aggregate functions.
| context | the ordinary ReportContext, used for issuing errors. | |
| type1 | the type of the first operand value in a comparison for which the returned AtomicComparator is intended for | |
| type2 | the type of the second operand value in a comparison for which the returned AtomicComparator is intended for. Whether type1 and type2 corresponds to what is the first second operand type does not have significance, the order can be arbitrary |
Definition at line 219 of file ComparisonPlatform.h.
Referenced by Patternist::DistinctValuesFN::typeCheck(), Patternist::IndexOfFN::typeCheck(), Patternist::DeepEqualFN::typeCheck(), and Patternist::ValueComparison::typeCheck().
Here is the caller graph for this function:

| void Patternist::ComparisonPlatform< TSubClass, issueError, comparisonType, errorCode >::prepareComparison | ( | const AtomicComparator::Ptr & | comparator | ) | [protected] |
Makes ComparisonPlatform use the AtomicComparator comparator.
Definition at line 276 of file ComparisonPlatform.h.
Referenced by Patternist::DistinctIterator::DistinctIterator(), Patternist::IndexOfIterator::IndexOfIterator(), Patternist::DistinctValuesFN::typeCheck(), Patternist::IndexOfFN::typeCheck(), Patternist::DeepEqualFN::typeCheck(), Patternist::ValueComparison::typeCheck(), and Patternist::GeneralComparison::typeCheck().
Here is the caller graph for this function:

| void Patternist::ComparisonPlatform< TSubClass, issueError, comparisonType, errorCode >::useCaseInsensitiveComparator | ( | ) | [inline, protected] |
Calling this function makes ComparisonPlatform use a comparator that compares strings case insensitively.
Definition at line 110 of file ComparisonPlatform.h.
Referenced by Patternist::ValueComparison::compress(), and Patternist::GeneralComparison::compress().
Here is the caller graph for this function:

1.5.1