STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Functions
xlocnum File Reference
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <streambuf>

Classes

class  numpunct< _Elem >
 
class  numpunct_byname< _Elem >
 
class  num_get< _Elem, _InIt >
 
class  num_put< _Elem, _OutIt >
 

Macros

#define _XLOCNUM_
 
#define _ENABLE_V2_BEHAVIOR   1000000000
 
#define _FLOATING_BUFFER_SIZE   (_MAX_EXP_DIG + _MAX_SIG_DIG_V2 + 16)
 

Functions

_EXTERN_C _CRTIMP2_PURE float __CLRCALL_PURE_OR_CDECL _Stofx (const char *, _Out_opt_ _Deref_post_opt_valid_ char **, long, int *)
 
_CRTIMP2_PURE double __CLRCALL_PURE_OR_CDECL _Stodx (const char *, _Out_opt_ _Deref_post_opt_valid_ char **, long, int *)
 
_CRTIMP2_PURE long double __CLRCALL_PURE_OR_CDECL _Stoldx (const char *, _Out_opt_ _Deref_post_opt_valid_ char **, long, int *)
 
_CRTIMP2_PURE long __CLRCALL_PURE_OR_CDECL _Stolx (const char *, _Out_opt_ _Deref_post_opt_valid_ char **, int, int *)
 
_CRTIMP2_PURE unsigned long __CLRCALL_PURE_OR_CDECL _Stoulx (const char *, _Out_opt_ _Deref_post_opt_valid_ char **, int, int *)
 
_CRTIMP2_PURE long long __CLRCALL_PURE_OR_CDECL _Stollx (const char *, _Out_opt_ _Deref_post_opt_valid_ char **, int, int *)
 
_CRTIMP2_PURE unsigned long long __CLRCALL_PURE_OR_CDECL _Stoullx (const char *, _Out_opt_ _Deref_post_opt_valid_ char **, int, int *)
 
_END_EXTERN_C _STD_BEGIN double _Stodx_v2 (const char *_Str, char **_Endptr, int _Pten, int *_Perr)
 
float _Stofx_v2 (const char *_Str, char **_Endptr, int _Pten, int *_Perr)
 
template<class _Elem >
size_t _Find_elem (_Elem *_Base, _Elem _Ch)
 
wchar_t_Maklocwcs (const wchar_t *_Ptr)
 

Macro Definition Documentation

#define _ENABLE_V2_BEHAVIOR   1000000000
#define _FLOATING_BUFFER_SIZE   (_MAX_EXP_DIG + _MAX_SIG_DIG_V2 + 16)
#define _XLOCNUM_

Function Documentation

template<class _Elem >
size_t _Find_elem ( _Elem *  _Base,
_Elem  _Ch 
)
inline
89  { // lookup _Ch in NUL-terminated string _Base
90  _Elem *_Ptr = _Base;
91  for (; *_Ptr != (_Elem)0 && *_Ptr != _Ch; ++_Ptr)
92  ;
93  return ((size_t)(_Ptr - _Base));
94  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
_In_ int _Base
Definition: time.h:323
wchar_t* _Maklocwcs ( const wchar_t _Ptr)
inline
97  { // copy NTWCS to allocated storage
98  size_t _Count = _CSTD wcslen(_Ptr) + 1;
99 
100  wchar_t *_Ptrdest = (wchar_t *)_calloc_dbg(_Count, sizeof (wchar_t),
101  _CRT_BLOCK, __FILE__, __LINE__);
102 
103  if (!_Ptrdest)
104  _Xbad_alloc();
105  _CSTD wmemcpy(_Ptrdest, _Ptr, _Count);
106  return (_Ptrdest);
107  }
_Check_return_ _ACRTIMP size_t __cdecl wcslen(_In_z_ wchar_t const *_String)
#define _CRT_BLOCK
Definition: crtdbg.h:95
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xbad_alloc()
#define _calloc_dbg(c, s, t, f, l)
Definition: crtdbg.h:244
_Diff _Count
Definition: algorithm:1941
#define _CSTD
Definition: yvals.h:570
_CRTIMP2_PURE double __CLRCALL_PURE_OR_CDECL _Stodx ( const char ,
_Out_opt_ _Deref_post_opt_valid_ char **  ,
long  ,
int  
)
_END_EXTERN_C _STD_BEGIN double _Stodx_v2 ( const char _Str,
char **  _Endptr,
int  _Pten,
int _Perr 
)
inline
54  { // convert string to double
55  int& _Errno_ref = errno; // Nonzero cost, pay it once
56  const int _Orig = _Errno_ref;
57 
58  _Errno_ref = 0;
59  double _Val = _CSTD strtod(_Str, _Endptr);
60  *_Perr = _Errno_ref;
61  _Errno_ref = _Orig;
62 
63  if (_Pten != 0)
64  _Val *= _CSTD pow(10.0, static_cast<double>(_Pten));
65 
66  return (_Val);
67  }
#define _CSTD
Definition: yvals.h:570
_FwdIt const _Ty _Val
Definition: algorithm:1938
float pow(float _X, float _Y) __GPU_ONLY
Calculates _X raised to the power of _Y
Definition: amp_math.h:898
_Check_return_ _ACRTIMP double __cdecl strtod(_In_z_ char const *_String, _Out_opt_ _Deref_post_z_ char **_EndPtr)
#define errno
Definition: errno.h:19
float _Stofx_v2 ( const char _Str,
char **  _Endptr,
int  _Pten,
int _Perr 
)
inline
71  { // convert string to float
72  int& _Errno_ref = errno; // Nonzero cost, pay it once
73  const int _Orig = _Errno_ref;
74 
75  _Errno_ref = 0;
76  float _Val = _CSTD strtof(_Str, _Endptr);
77  *_Perr = _Errno_ref;
78  _Errno_ref = _Orig;
79 
80  if (_Pten != 0)
81  _Val *= _CSTD powf(10.0f, static_cast<float>(_Pten));
82 
83  return (_Val);
84  }
_Check_return_ __inline float __CRTDECL powf(_In_ float _X, _In_ float _Y)
Definition: corecrt_math.h:742
_Check_return_ _ACRTIMP float __cdecl strtof(_In_z_ char const *_String, _Out_opt_ _Deref_post_z_ char **_EndPtr)
#define _CSTD
Definition: yvals.h:570
_FwdIt const _Ty _Val
Definition: algorithm:1938
#define errno
Definition: errno.h:19
_CRTIMP2_PURE long double __CLRCALL_PURE_OR_CDECL _Stoldx ( const char ,
_Out_opt_ _Deref_post_opt_valid_ char **  ,
long  ,
int  
)
_CRTIMP2_PURE unsigned long long __CLRCALL_PURE_OR_CDECL _Stoullx ( const char ,
_Out_opt_ _Deref_post_opt_valid_ char **  ,
int  ,
int  
)
_CRTIMP2_PURE unsigned long __CLRCALL_PURE_OR_CDECL _Stoulx ( const char ,
_Out_opt_ _Deref_post_opt_valid_ char **  ,
int  ,
int  
)