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< _Elem, _Int_type > Struct Template Reference

Public Types

typedef _Elem char_type
 
typedef _Int_type int_type
 
typedef streampos pos_type
 
typedef streamoff off_type
 
typedef _Mbstatet state_type
 

Static Public Member Functions

static int __CLRCALL_OR_CDECL compare (_In_reads_(_Count) const _Elem *_First1, _In_reads_(_Count) const _Elem *_First2, size_t _Count)
 
static size_t __CLRCALL_OR_CDECL length (_In_z_ const _Elem *_First)
 
static _Elem *__CLRCALL_OR_CDECL copy (_Out_writes_(_Count) _Elem *_First1, _In_reads_(_Count) const _Elem *_First2, size_t _Count)
 
static _Elem *__CLRCALL_OR_CDECL _Copy_s (_Out_writes_(_Dest_size) _Elem *_First1, size_t _Dest_size, _In_reads_(_Count) const _Elem *_First2, size_t _Count)
 
static const _Elem *__CLRCALL_OR_CDECL find (_In_reads_(_Count) const _Elem *_First, size_t _Count, const _Elem &_Ch)
 
static _Elem *__CLRCALL_OR_CDECL move (_Out_writes_(_Count) _Elem *_First1, _In_reads_(_Count) const _Elem *_First2, size_t _Count)
 
static _Elem *__CLRCALL_OR_CDECL assign (_Out_writes_(_Count) _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

template<class _Elem, class _Int_type>
typedef _Elem _Char_traits< _Elem, _Int_type >::char_type
template<class _Elem, class _Int_type>
typedef _Int_type _Char_traits< _Elem, _Int_type >::int_type
template<class _Elem, class _Int_type>
typedef streamoff _Char_traits< _Elem, _Int_type >::off_type
template<class _Elem, class _Int_type>
typedef streampos _Char_traits< _Elem, _Int_type >::pos_type
template<class _Elem, class _Int_type>
typedef _Mbstatet _Char_traits< _Elem, _Int_type >::state_type

Member Function Documentation

template<class _Elem, class _Int_type>
static _Elem* __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::_Copy_s ( _Out_writes_(_Dest_size) _Elem *  _First1,
size_t  _Dest_size,
_In_reads_(_Count) const _Elem *  _First2,
size_t  _Count 
)
inlinestatic
172  { // copy [_First2, _First2 + _Count) to [_First1, ...)
173  _SCL_SECURE_CRT_VALIDATE(_Count <= _Dest_size, NULL);
174  return (copy(_First1, _First2, _Count));
175  }
#define _SCL_SECURE_CRT_VALIDATE(cond, retvalue)
Definition: yvals.h:296
#define NULL
Definition: crtdbg.h:30
static _Elem *__CLRCALL_OR_CDECL copy(_Out_writes_(_Count) _Elem *_First1, _In_reads_(_Count) const _Elem *_First2, size_t _Count)
Definition: iosfwd:159
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Int_type>
static _Elem* __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::assign ( _Out_writes_(_Count) _Elem *  _First,
size_t  _Count,
_Elem  _Ch 
)
inlinestatic
204  { // assign _Count * _Ch to [_First, ...)
205  _Elem *_Next = _First;
206  for (; 0 < _Count; --_Count, ++_Next)
207  assign(*_Next, _Ch);
208  return (_First);
209  }
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
_Diff _Count
Definition: algorithm:1941
static _Elem *__CLRCALL_OR_CDECL assign(_Out_writes_(_Count) _Elem *_First, size_t _Count, _Elem _Ch)
Definition: iosfwd:201
template<class _Elem, class _Int_type>
static void __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::assign ( _Elem &  _Left,
const _Elem &  _Right 
)
inlinestatic
212  { // assign an element
213  _Left = _Right;
214  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Int_type>
static int __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::compare ( _In_reads_(_Count) const _Elem *  _First1,
_In_reads_(_Count) const _Elem *  _First2,
size_t  _Count 
)
inlinestatic
144  { // compare [_First1, _First1 + _Count) with [_First2, ...)
145  for (; 0 < _Count; --_Count, ++_First1, ++_First2)
146  if (!eq(*_First1, *_First2))
147  return (lt(*_First1, *_First2) ? -1 : +1);
148  return (0);
149  }
static bool __CLRCALL_OR_CDECL lt(const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
Definition: iosfwd:222
static bool __CLRCALL_OR_CDECL eq(const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
Definition: iosfwd:216
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Int_type>
static _Elem* __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::copy ( _Out_writes_(_Count) _Elem *  _First1,
_In_reads_(_Count) const _Elem *  _First2,
size_t  _Count 
)
inlinestatic
162  { // copy [_First2, _First2 + _Count) to [_First1, ...)
163  _Elem *_Next = _First1;
164  for (; 0 < _Count; --_Count, ++_Next, ++_First2)
165  assign(*_Next, *_First2);
166  return (_First1);
167  }
_Diff _Count
Definition: algorithm:1941
static _Elem *__CLRCALL_OR_CDECL assign(_Out_writes_(_Count) _Elem *_First, size_t _Count, _Elem _Ch)
Definition: iosfwd:201
template<class _Elem, class _Int_type>
static int_type __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::eof ( )
inlinestatic
253  { // return end-of-file metacharacter
254  return ((int_type)EOF);
255  }
#define EOF
Definition: stdio.h:59
_Int_type int_type
Definition: iosfwd:136
template<class _Elem, class _Int_type>
static bool __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::eq ( const _Elem &  _Left,
const _Elem &  _Right 
)
inlinestatic
218  { // test for element equality
219  return (_Left == _Right);
220  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Int_type>
static bool __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::eq_int_type ( const int_type _Left,
const int_type _Right 
)
inlinestatic
242  { // test for metacharacter equality
243  return (_Left == _Right);
244  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Int_type>
static const _Elem* __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::find ( _In_reads_(_Count) const _Elem *  _First,
size_t  _Count,
const _Elem &  _Ch 
)
inlinestatic
180  { // look for _Ch in [_First, _First + _Count)
181  for (; 0 < _Count; --_Count, ++_First)
182  if (eq(*_First, _Ch))
183  return (_First);
184  return (0);
185  }
static bool __CLRCALL_OR_CDECL eq(const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
Definition: iosfwd:216
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Int_type>
static size_t __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::length ( _In_z_ const _Elem *  _First)
inlinestatic
152  { // find length of null-terminated sequence
153  size_t _Count;
154  for (_Count = 0; !eq(*_First, _Elem()); ++_First)
155  ++_Count;
156  return (_Count);
157  }
static bool __CLRCALL_OR_CDECL eq(const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
Definition: iosfwd:216
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Int_type>
static bool __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::lt ( const _Elem &  _Left,
const _Elem &  _Right 
)
inlinestatic
224  { // test if _Left precedes _Right
225  return (_Left < _Right);
226  }
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Int_type>
static _Elem* __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::move ( _Out_writes_(_Count) _Elem *  _First1,
_In_reads_(_Count) const _Elem *  _First2,
size_t  _Count 
)
inlinestatic
190  { // copy [_First2, _First2 + _Count) to [_First1, ...)
191  _Elem *_Next = _First1;
192  if (_First2 < _Next && _Next < _First2 + _Count)
193  for (_Next += _Count, _First2 += _Count; 0 < _Count; --_Count)
194  assign(*--_Next, *--_First2);
195  else
196  for (; 0 < _Count; --_Count, ++_Next, ++_First2)
197  assign(*_Next, *_First2);
198  return (_First1);
199  }
_Diff _Count
Definition: algorithm:1941
static _Elem *__CLRCALL_OR_CDECL assign(_Out_writes_(_Count) _Elem *_First, size_t _Count, _Elem _Ch)
Definition: iosfwd:201
template<class _Elem, class _Int_type>
static int_type __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::not_eof ( const int_type _Meta)
inlinestatic
248  { // return anything but EOF
249  return (_Meta != eof() ? (int_type)_Meta : (int_type)!eof());
250  }
static int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:252
_Int_type int_type
Definition: iosfwd:136
template<class _Elem, class _Int_type>
static _Elem __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::to_char_type ( const int_type _Meta)
inlinestatic
230  { // convert metacharacter to character
231  return ((_Elem)_Meta);
232  }
template<class _Elem, class _Int_type>
static int_type __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::to_int_type ( const _Elem &  _Ch)
inlinestatic
236  { // convert character to metacharacter
237  return ((int_type)_Ch);
238  }
_Int_type int_type
Definition: iosfwd:136
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161

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