PNocase_Conditional_Generic< T > Class Template Reference
[String Manipulations]

Search Toolkit Book for PNocase_Conditional_Generic

#include <ncbistr.hpp>

List of all members.


Detailed Description

template<typename T>
class PNocase_Conditional_Generic< T >

Define Case-insensitive string comparison methods.

Case sensitivity can be turned on and off at runtime.

Used as arguments to template functions for specifying the type of comparison.

See also:
PNocase_Generic

Definition at line 3112 of file ncbistr.hpp.

Public Member Functions

 PNocase_Conditional_Generic (NStr::ECase case_sens=NStr::eCase)
 Construction.
NStr::ECase GetCase () const
 Get comparison type.
void SetCase (NStr::ECase case_sens)
 Set comparison type.
int Compare (const T &s1, const T &s2) const
 Return difference between "s1" and "s2".
bool Less (const T &s1, const T &s2) const
 Return TRUE if s1 < s2.
bool Equals (const T &s1, const T &s2) const
 Return TRUE if s1 == s2.
bool operator() (const T &s1, const T &s2) const
 Return TRUE if s1 < s2 ignoring case.

Private Attributes

NStr::ECase m_CaseSensitive
 case sensitive when TRUE


Constructor & Destructor Documentation

template<typename T>
PNocase_Conditional_Generic< T >::PNocase_Conditional_Generic NStr::ECase  case_sens = NStr::eCase  )  [inline]
 

Construction.

Definition at line 3741 of file ncbistr.hpp.


Member Function Documentation

template<typename T>
int PNocase_Conditional_Generic< T >::Compare const T &  s1,
const T &  s2
const [inline]
 

Return difference between "s1" and "s2".

Definition at line 3747 of file ncbistr.hpp.

References NStr::Compare(), and PNocase_Conditional_Generic< T >::m_CaseSensitive.

Referenced by PNocase_Conditional_Generic< T >::Equals(), and PNocase_Conditional_Generic< T >::Less().

template<typename T>
bool PNocase_Conditional_Generic< T >::Equals const T &  s1,
const T &  s2
const [inline]
 

Return TRUE if s1 == s2.

Definition at line 3761 of file ncbistr.hpp.

References PNocase_Conditional_Generic< T >::Compare().

template<typename T>
NStr::ECase PNocase_Conditional_Generic< T >::GetCase  )  const [inline]
 

Get comparison type.

Definition at line 3119 of file ncbistr.hpp.

References PNocase_Conditional_Generic< T >::m_CaseSensitive.

template<typename T>
bool PNocase_Conditional_Generic< T >::Less const T &  s1,
const T &  s2
const [inline]
 

Return TRUE if s1 < s2.

Definition at line 3754 of file ncbistr.hpp.

References PNocase_Conditional_Generic< T >::Compare().

Referenced by PNocase_Conditional_Generic< T >::operator()().

template<typename T>
bool PNocase_Conditional_Generic< T >::operator() const T &  s1,
const T &  s2
const [inline]
 

Return TRUE if s1 < s2 ignoring case.

Definition at line 3768 of file ncbistr.hpp.

References PNocase_Conditional_Generic< T >::Less().

template<typename T>
void PNocase_Conditional_Generic< T >::SetCase NStr::ECase  case_sens  )  [inline]
 

Set comparison type.

Definition at line 3122 of file ncbistr.hpp.

References PNocase_Conditional_Generic< T >::m_CaseSensitive.


Member Data Documentation

template<typename T>
NStr::ECase PNocase_Conditional_Generic< T >::m_CaseSensitive [private]
 

case sensitive when TRUE

Definition at line 3136 of file ncbistr.hpp.

Referenced by PNocase_Conditional_Generic< T >::Compare(), PNocase_Conditional_Generic< T >::GetCase(), and PNocase_Conditional_Generic< T >::SetCase().


The documentation for this class was generated from the following file:
Generated on Mon Dec 7 15:45:43 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:24:29 2009 by modify_doxy.py rev. 173732