STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Static Public Member Functions | List of all members
char_traits< char > Struct Template Reference

Public Types

typedef char _Elem
 
typedef _Elem char_type
 
typedef int int_type
 
typedef streampos pos_type
 
typedef streamoff off_type
 
typedef _Mbstatet state_type
 

Static Public Member Functions

static int __CLRCALL_OR_CDECL compare (const _Elem *_First1, const _Elem *_First2, size_t _Count)
 
static size_t __CLRCALL_OR_CDECL length (const _Elem *_First)
 
static _Elem *__CLRCALL_OR_CDECL copy (_Elem *_First1, const _Elem *_First2, size_t _Count)
 
static _Elem *__CLRCALL_OR_CDECL _Copy_s (_Out_writes_(_Size_in_bytes) _Elem *_First1, size_t _Size_in_bytes, _In_reads_(_Count) const _Elem *_First2, size_t _Count)
 
static const _Elem *__CLRCALL_OR_CDECL find (const _Elem *_First, size_t _Count, const _Elem &_Ch)
 
static _Elem *__CLRCALL_OR_CDECL move (_Elem *_First1, const _Elem *_First2, size_t _Count)
 
static _Elem *__CLRCALL_OR_CDECL assign (_Elem *_First, size_t _Count, _Elem _Ch)
 
static void __CLRCALL_OR_CDECL assign (_Elem &_Left, const _Elem &_Right) _NOEXCEPT
 
static bool __CLRCALL_OR_CDECL eq (const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
 
static bool __CLRCALL_OR_CDECL lt (const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
 
static _Elem __CLRCALL_OR_CDECL to_char_type (const int_type &_Meta) _NOEXCEPT
 
static int_type __CLRCALL_OR_CDECL to_int_type (const _Elem &_Ch) _NOEXCEPT
 
static bool __CLRCALL_OR_CDECL eq_int_type (const int_type &_Left, const int_type &_Right) _NOEXCEPT
 
static int_type __CLRCALL_OR_CDECL not_eof (const int_type &_Meta) _NOEXCEPT
 
static int_type __CLRCALL_OR_CDECL eof () _NOEXCEPT
 

Member Typedef Documentation

typedef char char_traits< char >::_Elem
typedef _Elem char_traits< char >::char_type
typedef int char_traits< char >::int_type
typedef streamoff char_traits< char >::off_type
typedef streampos char_traits< char >::pos_type
typedef _Mbstatet char_traits< char >::state_type

Member Function Documentation

static _Elem* __CLRCALL_OR_CDECL char_traits< char >::_Copy_s ( _Out_writes_(_Size_in_bytes) _Elem _First1,
size_t  _Size_in_bytes,
_In_reads_(_Count) const _Elem _First2,
size_t  _Count 
)
inlinestatic
536  { // copy [_First2, _First2 + _Count) to [_First1, ...)
537  if (0 < _Count)
538  _CRT_SECURE_MEMCPY(_First1, _Size_in_bytes, _First2, _Count);
539  return (_First1);
540  }
#define _CRT_SECURE_MEMCPY(dest, destsize, source, count)
Definition: yvals.h:356
_Diff _Count
Definition: algorithm:1941
static _Elem* __CLRCALL_OR_CDECL char_traits< char >::assign ( _Elem _First,
size_t  _Count,
_Elem  _Ch 
)
inlinestatic
558  { // assign _Count * _Ch to [_First, ...)
559  return ((_Elem *)_CSTD memset(_First, _Ch, _Count));
560  }
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
char _Elem
Definition: iosfwd:506
static void __CLRCALL_OR_CDECL char_traits< char >::assign ( _Elem _Left,
const _Elem _Right 
)
inlinestatic
563  { // assign an element
564  _Left = _Right;
565  }
const _Ty & _Right
Definition: algorithm:4087
static int __CLRCALL_OR_CDECL char_traits< char >::compare ( const _Elem _First1,
const _Elem _First2,
size_t  _Count 
)
inlinestatic
515  { // compare [_First1, _First1 + _Count) with [_First2, ...)
516  return (_Count == 0 ? 0
517  : _CSTD memcmp(_First1, _First2, _Count));
518  }
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
_Check_return_ int __cdecl memcmp(_In_reads_bytes_(_Size) const void *_Buf1, _In_reads_bytes_(_Size) const void *_Buf2, _In_ size_t _Size)
static _Elem* __CLRCALL_OR_CDECL char_traits< char >::copy ( _Elem _First1,
const _Elem _First2,
size_t  _Count 
)
inlinestatic
528  { // copy [_First2, _First2 + _Count) to [_First1, ...)
529  return (_Count == 0 ? _First1
530  : (_Elem *)_CSTD memcpy(_First1, _First2, _Count));
531  }
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
char _Elem
Definition: iosfwd:506
static int_type __CLRCALL_OR_CDECL char_traits< char >::eof ( )
inlinestatic
604  { // return end-of-file metacharacter
605  return (EOF);
606  }
#define EOF
Definition: stdio.h:59
static bool __CLRCALL_OR_CDECL char_traits< char >::eq ( const _Elem _Left,
const _Elem _Right 
)
inlinestatic
569  { // test for element equality
570  return (_Left == _Right);
571  }
const _Ty & _Right
Definition: algorithm:4087
static bool __CLRCALL_OR_CDECL char_traits< char >::eq_int_type ( const int_type _Left,
const int_type _Right 
)
inlinestatic
593  { // test for metacharacter equality
594  return (_Left == _Right);
595  }
const _Ty & _Right
Definition: algorithm:4087
static const _Elem* __CLRCALL_OR_CDECL char_traits< char >::find ( const _Elem _First,
size_t  _Count,
const _Elem _Ch 
)
inlinestatic
544  { // look for _Ch in [_First, _First + _Count)
545  return (_Count == 0 ? (const _Elem *)0
546  : (const _Elem *)_CSTD memchr(_First, _Ch, _Count));
547  }
_Check_return_ _CRTIMP _CONST_RETURN void *__cdecl memchr(_In_reads_bytes_opt_(_MaxCount) const void *_Buf, _In_ int _Val, _In_ size_t _MaxCount)
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
char _Elem
Definition: iosfwd:506
static size_t __CLRCALL_OR_CDECL char_traits< char >::length ( const _Elem _First)
inlinestatic
521  { // find length of null-terminated string
522  return (*_First == 0 ? 0
523  : _CSTD strlen(_First));
524  }
#define _CSTD
Definition: yvals.h:559
_Check_return_ size_t __cdecl strlen(_In_z_ const char *_Str)
static bool __CLRCALL_OR_CDECL char_traits< char >::lt ( const _Elem _Left,
const _Elem _Right 
)
inlinestatic
575  { // test if _Left precedes _Right
576  return ((unsigned char)_Left < (unsigned char)_Right);
577  }
const _Ty & _Right
Definition: algorithm:4087
static _Elem* __CLRCALL_OR_CDECL char_traits< char >::move ( _Elem _First1,
const _Elem _First2,
size_t  _Count 
)
inlinestatic
551  { // copy [_First2, _First2 + _Count) to [_First1, ...)
552  return (_Count == 0 ? _First1
553  : (_Elem *)_CSTD memmove(_First1, _First2, _Count));
554  }
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:559
char _Elem
Definition: iosfwd:506
static int_type __CLRCALL_OR_CDECL char_traits< char >::not_eof ( const int_type _Meta)
inlinestatic
599  { // return anything but EOF
600  return (_Meta != eof() ? _Meta : !eof());
601  }
static int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:603
static _Elem __CLRCALL_OR_CDECL char_traits< char >::to_char_type ( const int_type _Meta)
inlinestatic
581  { // convert metacharacter to character
582  return ((_Elem)_Meta);
583  }
char _Elem
Definition: iosfwd:506
static int_type __CLRCALL_OR_CDECL char_traits< char >::to_int_type ( const _Elem _Ch)
inlinestatic
587  { // convert character to metacharacter
588  return ((unsigned char)_Ch);
589  }
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161

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