Snap! Websites
An Open Source CMS System in C++
#include <stream.h>
This function reads the next UTF-8 character. Since UTF-8 makes use of a variable number of bytes, the function may return Input::INPUT_NAC meaning that not enough data is available in the input buffer.
If an invalid UTF-8 sequence is discovered, then Input::INPUT_ERR is returned. The function can still be called with additional data to read whatever comes next. Multiple errors may be returned while skipping encoded bytes.
Implements as2js::DecodingFilter.
Definition at line 140 of file stream.cpp.
References as2js::DecodingFilter::f_buffer, as2js::Input::INPUT_ERR, as2js::Input::INPUT_NAC, and as2js::String::valid_character().
This function retrieves the next input character.
If there is data, but not enough of it, it returns Input::INPUT_NAC. Processing can safely continue.
If possible, the function avoids returning with the Input::INPUT_NAC result (i.e. if a filter returns that value when there is still data available in the buffer, their get_char() function gets called again.)
If there is data, but it cannot properly be converted to a valid character, it returns Input::INPUT_ERR.
If there is no data, then Input::INPUT_EOF is returned.
Definition at line 96 of file stream.cpp.
References as2js::DecodingFilter::f_buffer, as2js::DecodingFilter::get_char(), and as2js::Input::INPUT_EOF.
This function pushes exactly one byte in the decoder.
In most cases decoders expects their getc() function to be called right after each putc(), although it is not mandatory.
Definition at line 71 of file stream.cpp.
References as2js::DecodingFilter::f_buffer.
Definition at line 63 of file stream.h.
Referenced by as2js::DecodingFilterISO88591::get_char(), get_char(), as2js::DecodingFilterUTF16LE::get_char(), as2js::DecodingFilterUTF16BE::get_char(), as2js::DecodingFilterUTF32LE::get_char(), as2js::DecodingFilterUTF32BE::get_char(), as2js::DecodingFilterDetect::get_char(), as2js::DecodingFilter::getc(), as2js::DecodingFilterUTF16::next_char(), and as2js::DecodingFilter::putc().
This document is part of the Snap! Websites Project.
Copyright by Made to Order Software Corp.
Snap! Websites
An Open Source CMS System in C++