scnlib  0.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reader.h File Reference
#include "args.h"
#include "locale.h"
#include "range.h"
#include "result.h"
#include "small_vector.h"
#include "span.h"

Go to the source code of this file.

Classes

struct  scn::empty_parser
 
struct  scn::detail::char_scanner
 
struct  scn::detail::buffer_scanner
 
struct  scn::detail::bool_scanner
 
struct  scn::detail::integer_scanner< T >
 
struct  scn::detail::float_scanner< T >
 
struct  scn::detail::string_scanner
 
struct  scn::detail::string_view_scanner
 
struct  scn::scanner< CharT, CharT >
 
struct  scn::scanner< CharT, span< CharT > >
 
struct  scn::scanner< CharT, bool >
 
struct  scn::scanner< CharT, short >
 
struct  scn::scanner< CharT, int >
 
struct  scn::scanner< CharT, long >
 
struct  scn::scanner< CharT, long long >
 
struct  scn::scanner< CharT, unsigned short >
 
struct  scn::scanner< CharT, unsigned int >
 
struct  scn::scanner< CharT, unsigned long >
 
struct  scn::scanner< CharT, unsigned long long >
 
struct  scn::scanner< CharT, float >
 
struct  scn::scanner< CharT, double >
 
struct  scn::scanner< CharT, long double >
 
struct  scn::scanner< CharT, std::basic_string< CharT > >
 
struct  scn::scanner< CharT, basic_string_view< CharT > >
 

Namespaces

 scn
 
 scn::detail
 

Functions

template<typename WrappedRange , typename std::enable_if< WrappedRange::is_direct >::type * = nullptr>
expected
< detail::ranges::range_value_t
< WrappedRange > > 
scn::read_char (WrappedRange &r)
 Reads a single character from the range. More...
 
template<typename WrappedRange , typename std::enable_if<!WrappedRange::is_direct >::type * = nullptr>
detail::ranges::range_value_t
< WrappedRange > 
scn::read_char (WrappedRange &r)
 
template<typename WrappedRange , typename std::enable_if< WrappedRange::is_contiguous >::type * = nullptr>
expected< span< const typename
detail::extract_char_type
< typename
WrappedRange::iterator >::type > > 
scn::read_zero_copy (WrappedRange &r, detail::ranges::range_difference_t< WrappedRange > n)
 Reads up to n characters from r, and returns a span into the range. More...
 
template<typename WrappedRange , typename std::enable_if< WrappedRange::is_contiguous >::type * = nullptr>
expected< span< const typename
detail::extract_char_type
< typename
WrappedRange::iterator >::type > > 
scn::read_all_zero_copy (WrappedRange &r)
 Reads every character from r, and returns a span into the range. More...
 
template<typename WrappedRange , typename OutputIterator , typename std::enable_if< WrappedRange::is_contiguous >::type * = nullptr>
error scn::read_into (WrappedRange &r, OutputIterator &it, detail::ranges::range_difference_t< WrappedRange > n)
 Reads n characters from r into it. More...
 
template<typename WrappedRange , typename Predicate , typename std::enable_if< WrappedRange::is_contiguous >::type * = nullptr>
expected< span< const typename
detail::extract_char_type
< typename
WrappedRange::iterator >::type > > 
scn::read_until_space_zero_copy (WrappedRange &r, Predicate is_space, bool keep_final_space)
 Reads characters from r until a space is found (as determined by is_space), and returns a span into the range. More...
 
template<typename WrappedRange , typename OutputIterator , typename Predicate , typename std::enable_if< WrappedRange::is_contiguous >::type * = nullptr>
error scn::read_until_space (WrappedRange &r, OutputIterator &out, Predicate is_space, bool keep_final_space)
 Reads characters from r until a space is found (as determined by is_space) and writes them into out. More...
 
template<typename WrappedRange , typename OutputIterator , typename Sentinel , typename Predicate , typename std::enable_if< WrappedRange::is_direct >::type * = nullptr>
error scn::read_until_space_ranged (WrappedRange &r, OutputIterator &out, Sentinel end, Predicate is_space, bool keep_final_space)
 Reads characters from r until a space is found (as determined by is_space), or out reaches end, and writes them into out. More...
 
template<typename WrappedRange , typename std::enable_if< WrappedRange::is_contiguous >::type * = nullptr>
error scn::putback_n (WrappedRange &r, detail::ranges::range_difference_t< WrappedRange > n)
 Puts back n characters into r as if by repeatedly calling r.advance(-1) . More...
 
template<typename Context , typename std::enable_if< !Context::range_type::is_contiguous >::type * = nullptr>
error scn::skip_range_whitespace (Context &ctx) noexcept
 Reads from the range in ctx as if by repeatedly calling read_char(), until a non-space character is found (as determined by ctx.locale()), or EOF is reached. More...