Public Member Functions | Public Attributes

creaImageIO::tree::ComparatorWithOrder Struct Reference

Abstract Comparator whose order can be reversed. More...

#include <creaImageIOTreeComparators.h>

Inheritance diagram for creaImageIO::tree::ComparatorWithOrder:
Inheritance graph
[legend]
Collaboration diagram for creaImageIO::tree::ComparatorWithOrder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ComparatorWithOrder (bool reverse_order=false)
virtual ~ComparatorWithOrder ()
virtual bool compare (Node *const &, Node *const &)=0
virtual bool operator() (Node *const &x, Node *const &y)

Public Attributes

bool mReverseOrder

Detailed Description

Abstract Comparator whose order can be reversed.

Definition at line 33 of file creaImageIOTreeComparators.h.


Constructor & Destructor Documentation

creaImageIO::tree::ComparatorWithOrder::ComparatorWithOrder ( bool  reverse_order = false  )  [inline]

Definition at line 35 of file creaImageIOTreeComparators.h.

      : mReverseOrder(reverse_order) {}

virtual creaImageIO::tree::ComparatorWithOrder::~ComparatorWithOrder (  )  [inline, virtual]

Definition at line 37 of file creaImageIOTreeComparators.h.

{}


Member Function Documentation

virtual bool creaImageIO::tree::ComparatorWithOrder::compare ( Node *const &  ,
Node *const &   
) [pure virtual]

Implemented in creaImageIO::tree::IntComparator, creaImageIO::tree::FloatComparator, and creaImageIO::tree::StringComparator.

Referenced by operator()().

Here is the caller graph for this function:

virtual bool creaImageIO::tree::ComparatorWithOrder::operator() ( Node *const &  x,
Node *const &  y 
) [inline, virtual]

Implements creaImageIO::tree::Comparator.

Definition at line 42 of file creaImageIOTreeComparators.h.

References compare(), and mReverseOrder.

    {
      if (mReverseOrder) return this->compare(y,x);
      return this->compare(x,y);
    };

Here is the call graph for this function:


Member Data Documentation

Definition at line 46 of file creaImageIOTreeComparators.h.

Referenced by operator()().


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