creaImageIO_lib
creaImageIO::tree::LexicographicalComparator Class Reference

which performs lexicographical comparison More...

#include <creaImageIOTreeComparators.h>

Inheritance diagram for creaImageIO::tree::LexicographicalComparator:
Collaboration diagram for creaImageIO::tree::LexicographicalComparator:

Public Member Functions

 LexicographicalComparator (const std::string &name)
 
 ~LexicographicalComparator ()
 
const std::string & GetName () const
 
void SetName (const std::string &s)
 
void Clear ()
 
void DeleteComparators ()
 
void Add (Comparator *c)
 
bool operator() (Node *const &x, Node *const &y)
 

Private Attributes

std::string mName
 
std::vector< Comparator * > mComparator
 

Detailed Description

which performs lexicographical comparison

A Comparator which stores a vector of Comparators and

Definition at line 85 of file creaImageIOTreeComparators.h.

Constructor & Destructor Documentation

creaImageIO::tree::LexicographicalComparator::LexicographicalComparator ( const std::string &  name)
inline

Definition at line 88 of file creaImageIOTreeComparators.h.

89  : mName(name) {}
creaImageIO::tree::LexicographicalComparator::~LexicographicalComparator ( )
inline

Definition at line 90 of file creaImageIOTreeComparators.h.

90 {}

Member Function Documentation

void creaImageIO::tree::LexicographicalComparator::Add ( Comparator c)
inline

Definition at line 106 of file creaImageIOTreeComparators.h.

References mComparator.

106 { mComparator.push_back(c); }
void creaImageIO::tree::LexicographicalComparator::Clear ( )
inline

Definition at line 94 of file creaImageIOTreeComparators.h.

References mComparator.

94 { mComparator.clear(); }
void creaImageIO::tree::LexicographicalComparator::DeleteComparators ( )
inline

Definition at line 95 of file creaImageIOTreeComparators.h.

References mComparator.

96  {
97  std::vector<Comparator*>::iterator i;
98  for (i =mComparator.begin();
99  i!=mComparator.end();
100  ++i)
101  {
102  delete *i;
103  }
104  mComparator.clear();
105  }
const std::string& creaImageIO::tree::LexicographicalComparator::GetName ( ) const
inline

Definition at line 92 of file creaImageIOTreeComparators.h.

References mName.

92 { return mName; }
bool creaImageIO::tree::LexicographicalComparator::operator() ( Node *const &  x,
Node *const &  y 
)
virtual
void creaImageIO::tree::LexicographicalComparator::SetName ( const std::string &  s)
inline

Definition at line 93 of file creaImageIOTreeComparators.h.

References mName.

93 { mName = s; }

Member Data Documentation

std::vector<Comparator*> creaImageIO::tree::LexicographicalComparator::mComparator
private

Definition at line 112 of file creaImageIOTreeComparators.h.

Referenced by Add(), Clear(), and DeleteComparators().

std::string creaImageIO::tree::LexicographicalComparator::mName
private

Definition at line 111 of file creaImageIOTreeComparators.h.

Referenced by GetName(), and SetName().


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