STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | 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
 

Public Member Functions

 _Pre_satisfies_ (_Dest_size >=_Count) static _Elem *__CLRCALL_OR_CDECL _Copy_s(_Out_writes_all_(_Dest_size) _Elem *const _First1
 
const size_t _In_reads_ (_Count) const _Elem *const _First2
 
 return (copy(_First1, _First2, _Count))
 

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) _NOEXCEPT
 
static size_t __CLRCALL_OR_CDECL length (_In_z_ const _Elem *_First) _NOEXCEPT
 
static _Elem *__CLRCALL_OR_CDECL copy (_Out_writes_all_(_Count) _Elem *const _First1, _In_reads_(_Count) const _Elem *_First2, size_t _Count) _NOEXCEPT
 
static const _Elem *__CLRCALL_OR_CDECL find (_In_reads_(_Count) const _Elem *_First, size_t _Count, const _Elem &_Ch) _NOEXCEPT
 
static _Elem *__CLRCALL_OR_CDECL move (_Out_writes_all_(_Count) _Elem *const _First1, _In_reads_(_Count) const _Elem *_First2, size_t _Count) _NOEXCEPT
 
static _Elem *__CLRCALL_OR_CDECL assign (_Out_writes_all_(_Count) _Elem *const _First, size_t _Count, const _Elem _Ch) _NOEXCEPT
 
static void __CLRCALL_OR_CDECL assign (_Elem &_Left, const _Elem &_Right) _NOEXCEPT
 
static constexpr bool __CLRCALL_OR_CDECL eq (const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
 
static constexpr bool __CLRCALL_OR_CDECL lt (const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
 
static constexpr _Elem __CLRCALL_OR_CDECL to_char_type (const int_type &_Meta) _NOEXCEPT
 
static constexpr int_type __CLRCALL_OR_CDECL to_int_type (const _Elem &_Ch) _NOEXCEPT
 
static constexpr bool __CLRCALL_OR_CDECL eq_int_type (const int_type &_Left, const int_type &_Right) _NOEXCEPT
 
static constexpr int_type __CLRCALL_OR_CDECL not_eof (const int_type &_Meta) _NOEXCEPT
 
static constexpr int_type __CLRCALL_OR_CDECL eof () _NOEXCEPT
 

Public Attributes

const size_t _Dest_size
 
const size_t const size_t _Count _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>
const size_t _Char_traits< _Elem, _Int_type >::_In_reads_ ( _Count  ) const
template<class _Elem, class _Int_type>
_Char_traits< _Elem, _Int_type >::_Pre_satisfies_ ( _Dest_size >=  _Count) const
template<class _Elem, class _Int_type>
static _Elem* __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::assign ( _Out_writes_all_(_Count) _Elem *const  _First,
size_t  _Count,
const _Elem  _Ch 
)
inlinestatic
197  { // assign _Count * _Ch to [_First, ...)
198  _Elem * _Next = _First;
199  for (; 0 < _Count; --_Count, ++_Next)
200  assign(*_Next, _Ch);
201  return (_First);
202  }
static _Elem *__CLRCALL_OR_CDECL assign(_Out_writes_all_(_Count) _Elem *const _First, size_t _Count, const _Elem _Ch) _NOEXCEPT
Definition: iosfwd:195
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Int_type>
static void __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::assign ( _Elem &  _Left,
const _Elem &  _Right 
)
inlinestatic
205  { // assign an element
206  _Left = _Right;
207  }
constexpr const _Ty &() _Left
Definition: algorithm:3722
constexpr const _Ty &() _Right
Definition: algorithm:3723
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
141  { // compare [_First1, _First1 + _Count) with [_First2, ...)
142  for (; 0 < _Count; --_Count, ++_First1, ++_First2)
143  if (!eq(*_First1, *_First2))
144  return (lt(*_First1, *_First2) ? -1 : +1);
145  return (0);
146  }
static constexpr bool __CLRCALL_OR_CDECL lt(const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
Definition: iosfwd:214
static constexpr bool __CLRCALL_OR_CDECL eq(const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
Definition: iosfwd:209
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Int_type>
static _Elem* __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::copy ( _Out_writes_all_(_Count) _Elem *const  _First1,
_In_reads_(_Count) const _Elem *  _First2,
size_t  _Count 
)
inlinestatic
158  { // copy [_First2, _First2 + _Count) to [_First1, ...)
159  _Elem * _Next = _First1;
160  for (; 0 < _Count; --_Count, ++_Next, ++_First2)
161  assign(*_Next, *_First2);
162  return (_First1);
163  }
static _Elem *__CLRCALL_OR_CDECL assign(_Out_writes_all_(_Count) _Elem *const _First, size_t _Count, const _Elem _Ch) _NOEXCEPT
Definition: iosfwd:195
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Int_type>
static constexpr int_type __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::eof ( )
inlinestatic
240  { // return end-of-file metacharacter
241  return ((int_type)EOF);
242  }
#define EOF
Definition: stdio.h:36
_Int_type int_type
Definition: iosfwd:134
template<class _Elem, class _Int_type>
static constexpr bool __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::eq ( const _Elem &  _Left,
const _Elem &  _Right 
)
inlinestatic
210  { // test for element equality
211  return (_Left == _Right);
212  }
constexpr const _Ty &() _Left
Definition: algorithm:3722
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Elem, class _Int_type>
static constexpr bool __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::eq_int_type ( const int_type _Left,
const int_type _Right 
)
inlinestatic
230  { // test for metacharacter equality
231  return (_Left == _Right);
232  }
constexpr const _Ty &() _Left
Definition: algorithm:3722
constexpr const _Ty &() _Right
Definition: algorithm:3723
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
175  { // look for _Ch in [_First, _First + _Count)
176  for (; 0 < _Count; --_Count, ++_First)
177  if (eq(*_First, _Ch))
178  return (_First);
179  return (0);
180  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
static constexpr bool __CLRCALL_OR_CDECL eq(const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
Definition: iosfwd:209
_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
149  { // find length of null-terminated sequence
150  size_t _Count;
151  for (_Count = 0; !eq(*_First, _Elem()); ++_First)
152  ++_Count;
153  return (_Count);
154  }
static constexpr bool __CLRCALL_OR_CDECL eq(const _Elem &_Left, const _Elem &_Right) _NOEXCEPT
Definition: iosfwd:209
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Int_type>
static constexpr bool __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::lt ( const _Elem &  _Left,
const _Elem &  _Right 
)
inlinestatic
215  { // test if _Left precedes _Right
216  return (_Left < _Right);
217  }
constexpr const _Ty &() _Left
Definition: algorithm:3722
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Elem, class _Int_type>
static _Elem* __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::move ( _Out_writes_all_(_Count) _Elem *const  _First1,
_In_reads_(_Count) const _Elem *  _First2,
size_t  _Count 
)
inlinestatic
184  { // copy [_First2, _First2 + _Count) to [_First1, ...)
185  _Elem * _Next = _First1;
186  if (_First2 < _Next && _Next < _First2 + _Count)
187  for (_Next += _Count, _First2 += _Count; 0 < _Count; --_Count)
188  assign(*--_Next, *--_First2);
189  else
190  for (; 0 < _Count; --_Count, ++_Next, ++_First2)
191  assign(*_Next, *_First2);
192  return (_First1);
193  }
static _Elem *__CLRCALL_OR_CDECL assign(_Out_writes_all_(_Count) _Elem *const _First, size_t _Count, const _Elem _Ch) _NOEXCEPT
Definition: iosfwd:195
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Int_type>
static constexpr int_type __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::not_eof ( const int_type _Meta)
inlinestatic
235  { // return anything but EOF
236  return (_Meta != eof() ? _Meta : !eof());
237  }
static constexpr int_type __CLRCALL_OR_CDECL eof() _NOEXCEPT
Definition: iosfwd:239
template<class _Elem, class _Int_type>
_Char_traits< _Elem, _Int_type >::return ( copy(_First1, _First2, _Count )
template<class _Elem, class _Int_type>
static constexpr _Elem __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::to_char_type ( const int_type _Meta)
inlinestatic
220  { // convert metacharacter to character
221  return ((_Elem)_Meta);
222  }
template<class _Elem, class _Int_type>
static constexpr int_type __CLRCALL_OR_CDECL _Char_traits< _Elem, _Int_type >::to_int_type ( const _Elem &  _Ch)
inlinestatic
225  { // convert character to metacharacter
226  return ((int_type)_Ch);
227  }
_Int_type int_type
Definition: iosfwd:134
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89

Member Data Documentation

template<class _Elem, class _Int_type>
const size_t _Char_traits< _Elem, _Int_type >::_Dest_size
template<class _Elem, class _Int_type>
const size_t const size_t _Count _Char_traits< _Elem, _Int_type >::_NOEXCEPT

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