#include <ie_imp_Text.h>
Public Member Functions | |
ImportStream () | |
virtual | ~ImportStream () |
bool | init (const char *szEncoding) |
bool | getChar (UT_UCSChar &b) |
UT_UCSChar | peekChar () |
Protected Member Functions | |
virtual bool | _getByte (unsigned char &b)=0 |
virtual bool | getRawChar (UT_UCSChar &b) |
bool | _get_eof () const |
void | _set_eof (bool b) |
UT_UCSChar | _lookAhead () const |
void | _lookAhead (UT_UCSChar c) |
Private Attributes | |
UT_UCS4_mbtowc | m_Mbtowc |
UT_UCSChar | m_ucsLookAhead |
bool | m_bEOF |
bool | m_bRaw |
ImportStream::ImportStream | ( | ) |
Construct ImportStream
ImportStream::~ImportStream | ( | ) | [virtual] |
bool ImportStream::_get_eof | ( | ) | const [inline, protected] |
Referenced by ImportISCIIStreamFile::getRawChar().
virtual bool ImportStream::_getByte | ( | unsigned char & | b | ) | [protected, pure virtual] |
Implemented in ImportStreamFile, and ImportStreamClipboard.
Referenced by getRawChar().
UT_UCSChar ImportStream::_lookAhead | ( | ) | const [inline, protected] |
Referenced by ImportISCIIStreamFile::getRawChar().
void ImportStream::_lookAhead | ( | UT_UCSChar | c | ) | [inline, protected] |
void ImportStream::_set_eof | ( | bool | b | ) | [inline, protected] |
Referenced by ImportISCIIStreamFile::getRawChar().
bool ImportStream::getChar | ( | UT_UCSChar & | ucs | ) |
Get UCS-2 character from stream
ucs | Reference to the character |
Returns single character for CRLF combination
References getRawChar(), peekChar(), UCS_CR, and UCS_LF.
Referenced by IE_Imp_Text::_parseStream(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), IE_Imp_Object::_parseStream(), and init().
bool ImportStream::getRawChar | ( | UT_UCSChar & | ucs | ) | [protected, virtual] |
Get UCS-2 character from stream
ucs | Reference to the character |
Get the next UCS character, converting from file's encoding
Reimplemented in ImportISCIIStreamFile.
References _getByte(), m_bEOF, m_bRaw, m_Mbtowc, m_ucsLookAhead, UT_UCS4_mbtowc::mbtowc(), UCS_ABICONTROL_END, and UT_ASSERT_HARMLESS.
Referenced by getChar().
bool ImportStream::init | ( | const char * | szEncoding | ) |
Initialize ImportStream
szEncoding | Text encoding to convert from |
Sets encoding and prefetches lookahead character. Set to 0 to handle raw bytes.
References getChar(), m_bRaw, m_Mbtowc, and UT_UCS4_mbtowc::setInCharset().
Referenced by IE_Imp_MathML::_loadFile(), IE_Imp_Component::_loadFile(), IE_Imp_Object::_loadFile(), IE_Imp_Text::_parseStream(), IE_Imp_MathML::pasteFromBuffer(), IE_Imp_Component::pasteFromBuffer(), and IE_Imp_Object::pasteFromBuffer().
UT_UCSChar ImportStream::peekChar | ( | ) | [inline] |
Referenced by getChar().
bool ImportStream::m_bEOF [private] |
Referenced by getRawChar().
bool ImportStream::m_bRaw [private] |
Referenced by getRawChar(), and init().
UT_UCS4_mbtowc ImportStream::m_Mbtowc [private] |
Referenced by getRawChar(), and init().
UT_UCSChar ImportStream::m_ucsLookAhead [private] |
Referenced by getRawChar().