#include <ut_bytebuf.h>
Public Member Functions | |
UT_ByteBuf (UT_uint32 iChunk=0) | |
~UT_ByteBuf () | |
bool | append (const UT_Byte *pValue, UT_uint32 length) |
bool | ins (UT_uint32 position, const UT_Byte *pValue, UT_uint32 length) |
bool | ins (UT_uint32 position, UT_uint32 length) |
bool | del (UT_uint32 position, UT_uint32 amount) |
bool | overwrite (UT_uint32 position, const UT_Byte *pValue, UT_uint32 length) |
void | truncate (UT_uint32 position) |
UT_uint32 | getLength (void) const |
const UT_Byte * | getPointer (UT_uint32 position) const |
bool | writeToFile (const char *pszFileName) const |
bool | writeToURI (const char *pszURI) const |
bool | insertFromFile (UT_uint32 iPosition, const char *pszFilename) |
bool | insertFromURI (UT_uint32 iPosition, const char *pszURI) |
bool | insertFromInput (UT_uint32 iPosition, GsfInput *fp) |
bool | insertFromFile (UT_uint32 iPosition, FILE *fp) |
Private Member Functions | |
bool | _byteBuf (UT_uint32 spaceNeeded) |
Private Attributes | |
UT_Byte * | m_pBuf |
UT_uint32 | m_iSize |
UT_uint32 | m_iSpace |
UT_uint32 | m_iChunk |
bool UT_ByteBuf::_byteBuf | ( | UT_uint32 | spaceNeeded | ) | [private] |
References m_iChunk, m_iSize, m_iSpace, m_pBuf, and UT_calloc().
Referenced by ins(), and overwrite().
References ins(), and m_iSize.
Referenced by AP_Win32App::_copyFmtToClipboard(), XAP_UnixClipboard::_getDataFromServer(), Text_Listener::_outputData(), _write_png(), abi_CairoWrite(), OXMLi_ListenerState_Math::charData(), convCallback(), convertToPng(), IE_Exp_HTML::copyToBuffer(), CreateBMP(), CreateBMPFile(), OXMLi_ListenerState_Math::endElement(), GDIconvertGraphic(), IE_Imp_RTF::HandleField(), IE_MailMerge_Delimiter_Listener::mergeFile(), IE_Imp_XHTML::pasteFromBuffer(), XAP_UnixDialog_FileOpenSaveAs::previewPicture(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), OXMLi_ListenerState_Math::startElement(), IE_Imp_RTF::StuffCurrentGroup(), StyleListener::tagRaw(), TextboxPage::TextboxPage(), TFTEST_MAIN(), IE_Exp::write(), and write_png_data().
UT_uint32 UT_ByteBuf::getLength | ( | void | ) | const |
References m_iSize.
Referenced by IE_Imp_RTF::_appendHdrFtr(), IE_ImpGraphic_Win32Native::_convertGraphic(), AP_Win32App::_copyFmtToClipboard(), XAP_UnixDialog_FileOpenSaveAs::_loadXPM(), Text_Listener::_outputData(), IE_Imp_RTF::_parseFldinstBlock(), FV_View::_pasteFromLocalTo(), _png_write(), _UT_ByteBuf_PNG_read(), IE_Exp_S5::_writeHeader(), abi_widget_get_selection(), AP_UnixApp::copyToClipboard(), AP_CocoaApp::copyToClipboard(), IE_MailMerge_Delimiter_Listener::defineItem(), GDIconvertGraphic(), AP_UnixApp::getCurrentSelection(), AP_CocoaApp::getCurrentSelection(), GR_UnixCairoImage::getPixbuf(), IE_Imp_XML::importFile(), FL_DocLayout::loadPendingObjects(), IE_MailMerge_Delimiter_Listener::mergeFile(), FV_UnixVisualDrag::mouseDrag(), UT_XML::parse(), FV_Selection::pasteRowOrCol(), XAP_UnixDialog_FileOpenSaveAs::pixbufForByteBuf(), s_RTF_ListenerWriteDoc::populate(), IE_ImpGraphic_Win32Native::ReadBytes(), FL_DocLayout::relocateFrame(), IE_Exp::rewindChar(), s_drag_data_get_cb(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), UT_XML::sniff(), TextboxPage::TextboxPage(), and TFTEST_MAIN().
References m_iSize, m_pBuf, and UT_ASSERT.
Referenced by IE_Imp_RTF::_appendHdrFtr(), IE_ImpGraphic_Win32Native::_convertGraphic(), AP_Win32App::_copyFmtToClipboard(), XAP_UnixClipboard::_getDataFromServer(), XAP_UnixDialog_FileOpenSaveAs::_loadXPM(), IE_Exp_HTML_Listener::_makeStylesheet(), Text_Listener::_outputData(), IE_Imp_RTF::_parseFldinstBlock(), FV_View::_pasteFromLocalTo(), _UT_ByteBuf_PNG_read(), IE_Exp_S5::_writeHeader(), IE_Exp_S5::_writeSlide(), abi_widget_get_selection(), IE_ImpGraphic_Win32Native::Convert_BMP(), IE_Exp::copyToBuffer(), AP_UnixApp::copyToClipboard(), AP_CocoaApp::copyToClipboard(), IE_MailMerge_Delimiter_Listener::defineItem(), OXMLi_ListenerState_Math::endElement(), GDIconvertGraphic(), AP_UnixApp::getCurrentSelection(), AP_CocoaApp::getCurrentSelection(), GR_UnixCairoImage::getPixbuf(), IE_Imp_XML::importFile(), FL_DocLayout::loadPendingObjects(), FV_UnixVisualDrag::mouseDrag(), UT_XML::parse(), FV_Selection::pasteRowOrCol(), XAP_UnixDialog_FileOpenSaveAs::pixbufForByteBuf(), s_RTF_ListenerWriteDoc::populate(), IE_ImpGraphic_Win32Native::ReadBytes(), FL_DocLayout::relocateFrame(), IE_Exp::rewindChar(), s_drag_data_get_cb(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), UT_XML::sniff(), TextboxPage::TextboxPage(), and TFTEST_MAIN().
References _byteBuf(), m_iSize, m_iSpace, m_pBuf, and UT_ASSERT.
Referenced by _png_write(), append(), AP_UnixApp::getCurrentSelection(), insertFromFile(), insertFromInput(), XAP_Win32Dialog_About::runModal(), and TFTEST_MAIN().
References _byteBuf(), m_iSize, m_iSpace, and m_pBuf.
bool UT_ByteBuf::insertFromFile | ( | UT_uint32 | iPosition, | |
const char * | pszFilename | |||
) |
References UT_ASSERT.
bool UT_ByteBuf::insertFromInput | ( | UT_uint32 | iPosition, | |
GsfInput * | fp | |||
) |
References ins(), m_pBuf, and UT_return_val_if_fail.
Referenced by insertFromURI().
bool UT_ByteBuf::insertFromURI | ( | UT_uint32 | iPosition, | |
const char * | pszURI | |||
) |
References insertFromInput(), and UT_go_file_open().
References _byteBuf(), m_iSpace, m_pBuf, and UT_ASSERT.
void UT_ByteBuf::truncate | ( | UT_uint32 | position | ) |
References m_iChunk, m_iSize, m_iSpace, and m_pBuf.
Referenced by XAP_UnixClipboard::_getDataFromServer(), CreateBMP(), CreateBMPFile(), AP_UnixApp::getCurrentSelection(), AP_CocoaApp::getCurrentSelection(), and IE_MailMerge_Delimiter_Listener::mergeFile().
bool UT_ByteBuf::writeToFile | ( | const char * | pszFileName | ) | const |
bool UT_ByteBuf::writeToURI | ( | const char * | pszURI | ) | const |
References m_iSize, m_pBuf, UT_ASSERT, and UT_go_file_create().
UT_uint32 UT_ByteBuf::m_iChunk [private] |
Referenced by _byteBuf(), del(), truncate(), and UT_ByteBuf().
UT_uint32 UT_ByteBuf::m_iSize [private] |
Referenced by _byteBuf(), append(), del(), getLength(), getPointer(), ins(), truncate(), writeToFile(), and writeToURI().
UT_uint32 UT_ByteBuf::m_iSpace [private] |
Referenced by _byteBuf(), del(), ins(), overwrite(), and truncate().
UT_Byte* UT_ByteBuf::m_pBuf [private] |
Referenced by _byteBuf(), del(), getPointer(), ins(), insertFromFile(), insertFromInput(), overwrite(), truncate(), writeToFile(), writeToURI(), and ~UT_ByteBuf().