Comparator which compares the values of a given Attribute of the Nodes which is decoded as an int value. More...
#include <creaImageIOTreeComparators.h>
Public Member Functions | |
IntComparator (const std::string &key, bool reverse_order) | |
virtual bool | compare (Node *const &x, Node *const &y) |
virtual bool | operator() (Node *const &x, Node *const &y) |
Public Attributes | |
bool | mReverseOrder |
Private Attributes | |
std::string | mKey |
Comparator which compares the values of a given Attribute of the Nodes which is decoded as an int value.
Definition at line 93 of file creaImageIOTreeComparators.h.
creaImageIO::tree::IntComparator::IntComparator | ( | const std::string & | key, | |
bool | reverse_order | |||
) | [inline] |
Definition at line 96 of file creaImageIOTreeComparators.h.
: ComparatorWithOrder(reverse_order), mKey(key) {}
virtual bool creaImageIO::tree::IntComparator::compare | ( | Node *const & | x, | |
Node *const & | y | |||
) | [virtual] |
Implements creaImageIO::tree::ComparatorWithOrder.
virtual bool creaImageIO::tree::ComparatorWithOrder::operator() | ( | Node *const & | x, | |
Node *const & | y | |||
) | [inline, virtual, inherited] |
Implements creaImageIO::tree::Comparator.
Definition at line 42 of file creaImageIOTreeComparators.h.
References creaImageIO::tree::ComparatorWithOrder::compare(), and creaImageIO::tree::ComparatorWithOrder::mReverseOrder.
{ if (mReverseOrder) return this->compare(y,x); return this->compare(x,y); };
std::string creaImageIO::tree::IntComparator::mKey [private] |
Definition at line 105 of file creaImageIOTreeComparators.h.
bool creaImageIO::tree::ComparatorWithOrder::mReverseOrder [inherited] |
Definition at line 46 of file creaImageIOTreeComparators.h.
Referenced by creaImageIO::tree::ComparatorWithOrder::operator()().