17inline read_sz_stream::read_sz_stream(const_char_pointer psz, const_char_pointer pszBegin =
nullptr);
19inline read_sz_stream::~read_sz_stream();
39inline ::u64 read_sz_stream::read_natural(::i32 iRadix = 10)
42 return consume_natural(m_psz, m_pszBegin, iRadix);
47inline ::i64 read_sz_stream::read_integer(::i32 iRadix = 10)
50 return consume_integer(m_psz, m_pszBegin, iRadix);
55inline ::f64 read_sz_stream::read_floating()
58 return consume_floating(m_psz, m_pszBegin);
64inline ::string read_sz_stream::get_word(const_char_pointer pszBreakCharacters =
" \n\t\r,;")
67 return read_find_first_character_in(scopedstrBreakCharacters);
71inline ::string read_sz_stream::read_find_first_character_in(const_char_pointer pszBreakCharacters)
74 auto size = string_find_first_character_in(m_psz, pszBreakCharacters);
76 ::string str(m_psz, size);
80 return ::transfer(str);
119 auto strWord = get_word();
121 strWord.trim_left(
"\"'([{");
123 strWord.trim_right(
"\"')]}");
125 if (strWord.case_insensitive_equals(
"no")
126 || strWord.case_insensitive_equals(
"false")
127 || strWord.case_insensitive_equals(
"0"))
152 throw_exception(error_premature_end_of_file);
166 return operator >>((::i8&)uch);
176 auto iIndex = unicode_index_length(m_psz, len);
181 throw_exception(error_premature_end_of_file);
184 else if (iIndex >= 65536)
203 return operator >>((::i8&)i);
211 auto iRead = read_integer();
213 if (iRead < SHRT_MIN)
216 throw_exception(error_standard_int_overflow);
219 else if (iRead > SHRT_MAX)
222 throw_exception(error_standard_int_overflow);
236 auto uRead = read_natural();
238 if (uRead > USHRT_MAX)
241 throw_exception(error_standard_int_overflow);
255 auto iRead = read_integer();
260 throw_exception(error_standard_int_overflow,
"INT_MIN overflow: " + as_string(iRead));
263 else if (iRead > INT_MAX)
266 throw_exception(error_standard_int_overflow,
"INT_MAX overflow: " + as_string(iRead));
280 auto uRead = read_natural();
282 if (uRead > UINT_MAX)
285 throw_exception(error_standard_int_overflow);
319 f = (::f32) read_floating();
350 template <
typename TYPE >
364#include "_impl_read_sz_stream.h"
Definition read_sz_stream.h:9
Definition ___serialization_draft.h:42