|
rapidyaml
0.7.2
parse and emit YAML, and do it fast
|
Filters in place. More...
#include <filter_processor.hpp>
Public Member Functions | |
| FilterProcessorInplaceMidExtending (substr src_, size_t wcap_) noexcept | |
| void | setwpos (size_t wpos_) noexcept |
| void | setpos (size_t rpos_, size_t wpos_) noexcept |
| void | set_at_end () noexcept |
| bool | has_more_chars () const noexcept |
| bool | has_more_chars (size_t maxpos) const noexcept |
| FilterResultExtending | result () const noexcept |
| csubstr | sofar () const noexcept |
| csubstr | rem () const noexcept |
| char | curr () const noexcept |
| char | next () const noexcept |
| void | skip () noexcept |
| void | skip (size_t num) noexcept |
| void | set_at (size_t pos, char c) noexcept |
| void | set (char c) noexcept |
| void | set (char c, size_t num) noexcept |
| void | copy () noexcept |
| void | copy (size_t num) noexcept |
| void | translate_esc (char c) noexcept |
| void | translate_esc_bulk (const char *s, size_t nw, size_t nr) noexcept |
| void | translate_esc_extending (const char *s, size_t nw, size_t nr) noexcept |
Public Attributes | |
| substr | src |
| the subject string More... | |
| size_t | wcap |
| write capacity - the capacity of the subject string's buffer More... | |
| size_t | rpos |
| read position More... | |
| size_t | wpos |
| write position More... | |
| size_t | maxcap |
| the max capacity needed for filtering the string. This may be larger than the final string size. More... | |
| bool | unfiltered_chars |
| number of characters that were not added to wpos from lack of capacity More... | |
Filters in place.
The result may be larger than the source, and extending may happen anywhere. As a result some characters may be left unfiltered when there is no slack in the buffer and the write-position would overlap the read-position. Consequently, it's possible for characters to be left unfiltered. In YAML, this happens only with double-quoted strings, and only with a small number of escape sequences such as \L which is substituted by three bytes. These escape sequences cause a call to translate_esc_extending() which is the only entry point to this unfiltered situation.
Definition at line 279 of file filter_processor.hpp.
|
inlinenoexcept |
Definition at line 288 of file filter_processor.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 301 of file filter_processor.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 306 of file filter_processor.hpp.
References maxcap, src, unfiltered_chars, wcap, and wpos.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 324 of file filter_processor.hpp.
|
inlinenoexcept |
Definition at line 332 of file filter_processor.hpp.
References maxcap, rpos, src, unfiltered_chars, wcap, and wpos.
Referenced by set_at().
|
inlinenoexcept |
Definition at line 347 of file filter_processor.hpp.
References maxcap, rpos, src, unfiltered_chars, wcap, and wpos.
|
inlinenoexcept |
Definition at line 364 of file filter_processor.hpp.
References maxcap, rpos, src, unfiltered_chars, wcap, and wpos.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 405 of file filter_processor.hpp.
References maxcap, rpos, src, unfiltered_chars, wcap, and wpos.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 445 of file filter_processor.hpp.
References maxcap, rpos, src, unfiltered_chars, wcap, and wpos.
| substr c4::yml::FilterProcessorInplaceMidExtending::src |
the subject string
Definition at line 281 of file filter_processor.hpp.
Referenced by FilterProcessorInplaceMidExtending(), copy(), curr(), has_more_chars(), next(), rem(), result(), set(), set_at_end(), sofar(), translate_esc(), translate_esc_bulk(), and translate_esc_extending().
| size_t c4::yml::FilterProcessorInplaceMidExtending::wcap |
write capacity - the capacity of the subject string's buffer
Definition at line 282 of file filter_processor.hpp.
Referenced by FilterProcessorInplaceMidExtending(), copy(), result(), set(), sofar(), translate_esc(), translate_esc_bulk(), and translate_esc_extending().
| size_t c4::yml::FilterProcessorInplaceMidExtending::rpos |
read position
Definition at line 283 of file filter_processor.hpp.
Referenced by copy(), curr(), has_more_chars(), next(), rem(), set(), set_at_end(), setpos(), skip(), translate_esc(), translate_esc_bulk(), and translate_esc_extending().
| size_t c4::yml::FilterProcessorInplaceMidExtending::wpos |
write position
Definition at line 284 of file filter_processor.hpp.
Referenced by copy(), result(), set(), set_at(), setpos(), setwpos(), sofar(), translate_esc(), translate_esc_bulk(), and translate_esc_extending().
| size_t c4::yml::FilterProcessorInplaceMidExtending::maxcap |
the max capacity needed for filtering the string. This may be larger than the final string size.
Definition at line 285 of file filter_processor.hpp.
Referenced by copy(), result(), set(), translate_esc(), translate_esc_bulk(), and translate_esc_extending().
| bool c4::yml::FilterProcessorInplaceMidExtending::unfiltered_chars |
number of characters that were not added to wpos from lack of capacity
Definition at line 286 of file filter_processor.hpp.
Referenced by copy(), result(), set(), translate_esc(), translate_esc_bulk(), and translate_esc_extending().