OpenBarnyard
 
Loading...
Searching...
No Matches
T2CharTraits< CharT > Class Template Reference

#include <T2CharTraits.h>

Public Types

using CharType = CharT
 
using UCharType = std::make_unsigned_t<CharT>
 

Public Member Functions

TINLINE TBOOL IsSpace (TINT a_cChar)
 
TINLINE TBOOL IsUpperCase (TINT a_cChar)
 
TINLINE TBOOL IsLowerCase (TINT a_cChar)
 
TINLINE T2CharTraits< TCHAR >::CharType ToUpperCase (TINT a_cChar)
 
TINLINE T2CharTraits< TCHAR >::CharType ToLowerCase (TINT a_cChar)
 
TINLINE TBOOL IsSpace (TINT a_cChar)
 
TINLINE TBOOL IsUpperCase (TINT a_cChar)
 
TINLINE TBOOL IsLowerCase (TINT a_cChar)
 
TINLINE T2CharTraits< TWCHAR >::CharType ToUpperCase (TINT a_cChar)
 
TINLINE T2CharTraits< TWCHAR >::CharType ToLowerCase (TINT a_cChar)
 

Static Public Member Functions

static TBOOL IsSpace (TINT a_cChar)
 
static TBOOL IsUpperCase (TINT a_cChar)
 
static TBOOL IsLowerCase (TINT a_cChar)
 
static CharType ToUpperCase (TINT a_cChar)
 
static CharType ToLowerCase (TINT a_cChar)
 

Static Public Attributes

static constexpr TSIZE CharSize = sizeof( CharType )
 
static constexpr CharType NullChar = 0
 

Detailed Description

template<typename CharT>
class T2CharTraits< CharT >

Definition at line 13 of file T2CharTraits.h.

Member Typedef Documentation

◆ CharType

template<typename CharT>
using T2CharTraits< CharT >::CharType = CharT

Definition at line 16 of file T2CharTraits.h.

◆ UCharType

template<typename CharT>
using T2CharTraits< CharT >::UCharType = std::make_unsigned_t<CharT>

Definition at line 17 of file T2CharTraits.h.

Member Function Documentation

◆ IsLowerCase() [1/3]

template<typename CharT>
static TBOOL T2CharTraits< CharT >::IsLowerCase ( TINT a_cChar)
inlinestatic

Definition at line 24 of file T2CharTraits.h.

24{ TUNREACHABLE(); }
#define TUNREACHABLE()
Definition Defines.h:142

◆ IsLowerCase() [2/3]

TINLINE TBOOL T2CharTraits< TCHAR >::IsLowerCase ( TINT a_cChar)

Definition at line 49 of file T2CharTraits.h.

50{
51 return islower( a_cChar ) != 0 || isalpha( a_cChar ) == 0;
52}

◆ IsLowerCase() [3/3]

TINLINE TBOOL T2CharTraits< TWCHAR >::IsLowerCase ( TINT a_cChar)

Definition at line 83 of file T2CharTraits.h.

84{
85 return iswlower( a_cChar ) != 0 || iswalpha( a_cChar ) == 0;
86}

◆ IsSpace() [1/3]

template<typename CharT>
static TBOOL T2CharTraits< CharT >::IsSpace ( TINT a_cChar)
inlinestatic

Definition at line 22 of file T2CharTraits.h.

22{ TUNREACHABLE(); }

◆ IsSpace() [2/3]

TINLINE TBOOL T2CharTraits< TCHAR >::IsSpace ( TINT a_cChar)

Definition at line 37 of file T2CharTraits.h.

38{
39 return isspace( a_cChar ) != 0;
40}

◆ IsSpace() [3/3]

TINLINE TBOOL T2CharTraits< TWCHAR >::IsSpace ( TINT a_cChar)

Definition at line 71 of file T2CharTraits.h.

72{
73 return iswspace( a_cChar ) != 0;
74}

◆ IsUpperCase() [1/3]

template<typename CharT>
static TBOOL T2CharTraits< CharT >::IsUpperCase ( TINT a_cChar)
inlinestatic

Definition at line 23 of file T2CharTraits.h.

23{ TUNREACHABLE(); }

◆ IsUpperCase() [2/3]

TINLINE TBOOL T2CharTraits< TCHAR >::IsUpperCase ( TINT a_cChar)

Definition at line 43 of file T2CharTraits.h.

44{
45 return isupper( a_cChar ) != 0 || isalpha( a_cChar ) == 0;
46}

◆ IsUpperCase() [3/3]

TINLINE TBOOL T2CharTraits< TWCHAR >::IsUpperCase ( TINT a_cChar)

Definition at line 77 of file T2CharTraits.h.

78{
79 return iswupper( a_cChar ) != 0 || iswalpha( a_cChar ) == 0;
80}

◆ ToLowerCase() [1/3]

template<typename CharT>
static CharType T2CharTraits< CharT >::ToLowerCase ( TINT a_cChar)
inlinestatic

Definition at line 26 of file T2CharTraits.h.

26{ TUNREACHABLE(); }

◆ ToLowerCase() [2/3]

TINLINE T2CharTraits< TCHAR >::CharType T2CharTraits< TCHAR >::ToLowerCase ( TINT a_cChar)

Definition at line 61 of file T2CharTraits.h.

62{
63 return (TCHAR)tolower( a_cChar );
64}

◆ ToLowerCase() [3/3]

Definition at line 95 of file T2CharTraits.h.

96{
97 return (TWCHAR)towlower( a_cChar );
98}

◆ ToUpperCase() [1/3]

template<typename CharT>
static CharType T2CharTraits< CharT >::ToUpperCase ( TINT a_cChar)
inlinestatic

Definition at line 25 of file T2CharTraits.h.

25{ TUNREACHABLE(); }

◆ ToUpperCase() [2/3]

TINLINE T2CharTraits< TCHAR >::CharType T2CharTraits< TCHAR >::ToUpperCase ( TINT a_cChar)

Definition at line 55 of file T2CharTraits.h.

56{
57 return (TCHAR)toupper( a_cChar );
58}

◆ ToUpperCase() [3/3]

Definition at line 89 of file T2CharTraits.h.

90{
91 return (TWCHAR)towupper( a_cChar );
92}

Member Data Documentation

◆ CharSize

template<typename CharT>
TSIZE T2CharTraits< CharT >::CharSize = sizeof( CharType )
staticconstexpr

Definition at line 18 of file T2CharTraits.h.

◆ NullChar

template<typename CharT>
CharType T2CharTraits< CharT >::NullChar = 0
staticconstexpr

Definition at line 19 of file T2CharTraits.h.


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