OSB_LIB::LessName< T, S > Struct Template Reference

Inheritance diagram for OSB_LIB::LessName< T, S >:

Inheritance graph
[legend]
Collaboration diagram for OSB_LIB::LessName< T, S >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename T, typename S = std::string>
struct OSB_LIB::LessName< T, S >

Template to sort objects by name.

Parameters:
T Class or struct to sort, it must have a member function name() returning S.
S The type returned by the member function T::name().
Optionally the class allows for case-insensitive sorting.

See also:
GreaterName for a usage example.

Definition at line 373 of file stringutil.h.

Public Member Functions

Private Attributes


Constructor & Destructor Documentation

template<typename T, typename S = std::string>
OSB_LIB::LessName< T, S >::LessName ( bool  ignoreCase = false  )  [inline, explicit]

Constructor with flag to ignore the case.

Definition at line 375 of file stringutil.h.


Member Function Documentation

template<typename T, typename S = std::string>
bool OSB_LIB::LessName< T, S >::operator() ( const T &  lhs,
const T &  rhs 
) const [inline]

The comparison function.

Definition at line 382 of file stringutil.h.

References OSB_LIB::LessName< T, S >::ignoreCase_.


Member Data Documentation

template<typename T, typename S = std::string>
bool OSB_LIB::LessName< T, S >::ignoreCase_ [private]

Flag to ignore the case when comparing the 2 names.

Definition at line 391 of file stringutil.h.

Referenced by OSB_LIB::LessName< T, S >::operator()().


The documentation for this struct was generated from the following file:
Generated on Sat Sep 2 14:13:18 2006 for OSB Library by  doxygen 1.4.7