scnlib  0.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
scn::detail::integer_scanner< T > Struct Template Reference

#include <reader.h>

Public Types

enum  localized_type : uint8_t { thousands_separator = 1, digits = 2 }
 

Public Member Functions

template<typename ParseCtx >
error parse (ParseCtx &pctx)
 
template<typename Context >
error scan (T &val, Context &ctx)
 
template<typename CharT >
expected< std::ptrdiff_t > _parse_int (T &val, span< const CharT > s, CharT thsep)
 
template<typename CharT >
expected< typename span< const
CharT >::iterator > 
_read_int (T &val, bool minus_sign, span< const CharT > buf, CharT thsep) const
 
unsigned char _char_to_int (char ch) const
 
unsigned char _char_to_int (wchar_t ch) const
 

Public Attributes

int base {0}
 
uint8_t localized {0}
 
bool have_thsep {false}
 

Detailed Description

template<typename T>
struct scn::detail::integer_scanner< T >

Definition at line 743 of file reader.h.

Member Enumeration Documentation

template<typename T>
enum scn::detail::integer_scanner::localized_type : uint8_t
Enumerator
thousands_separator 
digits 

Definition at line 948 of file reader.h.

Member Function Documentation

template<typename T>
unsigned char scn::detail::integer_scanner< T >::_char_to_int ( char  ch) const
inline

Definition at line 1147 of file reader.h.

template<typename T>
unsigned char scn::detail::integer_scanner< T >::_char_to_int ( wchar_t  ch) const
inline

Definition at line 1174 of file reader.h.

template<typename T>
template<typename CharT >
expected<std::ptrdiff_t> scn::detail::integer_scanner< T >::_parse_int ( T &  val,
span< const CharT >  s,
CharT  thsep 
)
inline

Definition at line 958 of file reader.h.

template<typename T>
template<typename CharT >
expected<typename span<const CharT>::iterator> scn::detail::integer_scanner< T >::_read_int ( T &  val,
bool  minus_sign,
span< const CharT >  buf,
CharT  thsep 
) const
inline

Definition at line 1053 of file reader.h.

template<typename T>
template<typename ParseCtx >
error scn::detail::integer_scanner< T >::parse ( ParseCtx &  pctx)
inline

Definition at line 747 of file reader.h.

template<typename T>
template<typename Context >
error scn::detail::integer_scanner< T >::scan ( T &  val,
Context &  ctx 
)
inline

Definition at line 894 of file reader.h.

Member Data Documentation

template<typename T>
int scn::detail::integer_scanner< T >::base {0}

Definition at line 953 of file reader.h.

template<typename T>
bool scn::detail::integer_scanner< T >::have_thsep {false}

Definition at line 955 of file reader.h.

template<typename T>
uint8_t scn::detail::integer_scanner< T >::localized {0}

Definition at line 954 of file reader.h.


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