creaImageIO_lib
creaImageIO::tree::IntComparator Struct Reference

Comparator which compares the values of a given Attribute of the Nodes which is decoded as an int value. More...

#include <creaImageIOTreeComparators.h>

Inheritance diagram for creaImageIO::tree::IntComparator:
Collaboration diagram for creaImageIO::tree::IntComparator:

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
 

Detailed Description

Comparator which compares the values of a given Attribute of the Nodes which is decoded as an int value.

Definition at line 121 of file creaImageIOTreeComparators.h.

Constructor & Destructor Documentation

creaImageIO::tree::IntComparator::IntComparator ( const std::string &  key,
bool  reverse_order 
)
inline

Definition at line 124 of file creaImageIOTreeComparators.h.

127  :
128  ComparatorWithOrder(reverse_order),
129  mKey(key)
{}

Member Function Documentation

virtual bool creaImageIO::tree::IntComparator::compare ( Node *const &  x,
Node *const &  y 
)
virtual
virtual bool creaImageIO::tree::ComparatorWithOrder::operator() ( Node *const &  x,
Node *const &  y 
)
inlinevirtualinherited

Implements creaImageIO::tree::Comparator.

Definition at line 70 of file creaImageIOTreeComparators.h.

References creaImageIO::tree::ComparatorWithOrder::compare(), and creaImageIO::tree::ComparatorWithOrder::mReverseOrder.

71  {
72  if (mReverseOrder) return this->compare(y,x);
73  return this->compare(x,y);
74  };

Here is the call graph for this function:

Member Data Documentation

std::string creaImageIO::tree::IntComparator::mKey
private

Definition at line 133 of file creaImageIOTreeComparators.h.

bool creaImageIO::tree::ComparatorWithOrder::mReverseOrder
inherited

The documentation for this struct was generated from the following file: