Back to index

nux  3.0.0
Public Member Functions | Public Attributes
nux::LexicographicCompareWithConversion< T, ConversionFunctor > Struct Template Reference

Compare two char or TCHAR. More...

#include <TextString.h>

List of all members.

Public Member Functions

 LexicographicCompareWithConversion ()
unsigned int operator() (const T &lhs, const T &rhs)

Public Attributes

ConversionFunctor m_ConversionFunctor

Detailed Description

template<typename T, typename ConversionFunctor>
struct nux::LexicographicCompareWithConversion< T, ConversionFunctor >

Compare two char or TCHAR.

Apply the conversion functor before the comparison.

Returns:
0 if equal, -1 if(lhs<rhs), +1 if(lhs>rhs)

Definition at line 191 of file TextString.h.


Constructor & Destructor Documentation

template<typename T , typename ConversionFunctor >
nux::LexicographicCompareWithConversion< T, ConversionFunctor >::LexicographicCompareWithConversion ( ) [inline]

Definition at line 193 of file TextString.h.

{}

Member Function Documentation

template<typename T , typename ConversionFunctor >
unsigned int nux::LexicographicCompareWithConversion< T, ConversionFunctor >::operator() ( const T &  lhs,
const T &  rhs 
) [inline]

Definition at line 194 of file TextString.h.

    {
      T newlhs = m_ConversionFunctor (lhs);
      T newrhs = m_ConversionFunctor (rhs);

      if (newlhs < newrhs) return -1;

      if (newrhs < newlhs) return 1;

      return 0;
    }

Member Data Documentation

template<typename T , typename ConversionFunctor >
ConversionFunctor nux::LexicographicCompareWithConversion< T, ConversionFunctor >::m_ConversionFunctor

Definition at line 205 of file TextString.h.


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