ZED Open Capture  v0.6.0
Low level camera driver for the ZED stereo camera family
Public Member Functions | List of all members
sl_oc::tools::SI_GenericNoCase< SI_CHAR > Struct Template Reference

#include <calibration.hpp>

Public Member Functions

SI_CHAR locase (SI_CHAR ch) const
 
bool operator() (const SI_CHAR *pLeft, const SI_CHAR *pRight) const
 

Detailed Description

template<class SI_CHAR>
struct sl_oc::tools::SI_GenericNoCase< SI_CHAR >

Generic ASCII case-insensitive less than comparison. This class returns numerically ordered ASCII case-insensitive text for all possible sizes and types of SI_CHAR. It is not safe for MBCS text comparison where ASCII A-Z characters are used in the encoding of multi-byte characters.

Definition at line 2531 of file calibration.hpp.

Member Function Documentation

◆ locase()

template<class SI_CHAR >
SI_CHAR sl_oc::tools::SI_GenericNoCase< SI_CHAR >::locase ( SI_CHAR  ch) const
inline

Definition at line 2533 of file calibration.hpp.

2533  {
2534  return (ch < 'A' || ch > 'Z') ? ch : (ch - 'A' + 'a');
2535  }

Referenced by sl_oc::tools::SI_GenericNoCase< SI_CHAR >::operator()().

◆ operator()()

template<class SI_CHAR >
bool sl_oc::tools::SI_GenericNoCase< SI_CHAR >::operator() ( const SI_CHAR *  pLeft,
const SI_CHAR *  pRight 
) const
inline

Definition at line 2537 of file calibration.hpp.

2537  {
2538  long cmp;
2539  for (; *pLeft && *pRight; ++pLeft, ++pRight) {
2540  cmp = (long) locase(*pLeft) - (long) locase(*pRight);
2541  if (cmp != 0) {
2542  return cmp < 0;
2543  }
2544  }
2545  return *pRight != 0;
2546  }
SI_CHAR locase(SI_CHAR ch) const

References sl_oc::tools::SI_GenericNoCase< SI_CHAR >::locase().


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