scnlib  0.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
visitor.h File Reference
#include "reader.h"

Go to the source code of this file.

Classes

class  scn::basic_visitor< Context, ParseCtx >
 
class  scn::scan_result< Range, Base >
 
struct  scn::scan_result_for< Context >
 
struct  scn::wrapped_error
 

Namespaces

 scn
 

Macros

#define SCN_VISIT_INT(T)
 
#define SCN_VISIT_FLOAT(T)
 

Typedefs

template<typename Context >
using scn::scan_result_for_t = typename scan_result_for< Context >::type
 

Functions

template<typename Context , typename ParseCtx >
scan_result_for_t< Context > scn::visit (Context &ctx, ParseCtx &pctx, basic_args< Context > args)
 

Macro Definition Documentation

#define SCN_VISIT_FLOAT (   T)
Value:
error visit(T& val, detail::priority_tag<1>) \
{ \
detail::float_scanner<T> s; \
auto err = parse(s); \
if (!err) { \
return err; \
} \
return s.scan(val, *m_ctx); \
}
scan_result_for_t< Context > visit(Context &ctx, ParseCtx &pctx, basic_args< Context > args)
Definition: visitor.h:226

Definition at line 92 of file visitor.h.

#define SCN_VISIT_INT (   T)
Value:
error visit(T& val, detail::priority_tag<0>) \
{ \
detail::integer_scanner<T> s; \
auto err = parse(s); \
if (!err) { \
return err; \
} \
return s.scan(val, *m_ctx); \
}
scan_result_for_t< Context > visit(Context &ctx, ParseCtx &pctx, basic_args< Context > args)
Definition: visitor.h:226

Definition at line 72 of file visitor.h.