Public Member Functions | Private Member Functions | Private Attributes

UT_ByteBuf Class Reference

#include <ut_bytebuf.h>

List of all members.

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_BytegetPointer (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_Bytem_pBuf
UT_uint32 m_iSize
UT_uint32 m_iSpace
UT_uint32 m_iChunk

Constructor & Destructor Documentation

UT_ByteBuf::UT_ByteBuf ( UT_uint32  iChunk = 0  ) 

References m_iChunk, and MIN_CHUNK.

UT_ByteBuf::~UT_ByteBuf (  ) 

References FREEP, and m_pBuf.


Member Function Documentation

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().

bool UT_ByteBuf::append ( const UT_Byte pValue,
UT_uint32  length 
)

References ins(), and m_iSize.

Referenced by IE_Imp_Applix::_applixGetLine(), IE_ImpGraphic_Cocoa::_convertGraphic(), AP_Win32App::_copyFmtToClipboard(), XAP_UnixClipboard::_getDataFromServer(), s_AbiWord_1_Listener::_handleDataItems(), IE_Imp_MsWord_97::_handleImage(), IE_Imp_MsWord_97::_handlePositionedImage(), ABI_Collab_Import::_import(), ODi_Abi_Data::_loadStream(), Text_Listener::_outputData(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), IE_Imp_Object::_parseStream(), _write_png(), abi_CairoWrite(), AbiWord_WMF_function(), UT_Multipart::append(), UT_Multipart::append_Base64(), UT_Multipart::append_Quoted(), changed_cb(), UT_svg::charData(), OXMLi_ListenerState_Math::charData(), ODi_Frame_ListenerState::charData(), IE_Imp_XML::charData(), IE_Imp_XHTML::charData(), convCallback(), IE_Imp_MathML_EntityTable::convert(), GR_VectorImage::convertFromBuffer(), GR_RSVGVectorImage::convertFromBuffer(), IE_ImpGraphic_WMF::convertGraphicToSVG(), GR_VectorImage::convertToBuffer(), GR_RSVGVectorImage::convertToBuffer(), convertToPng(), IE_Exp_OpenDocument::copyToBuffer(), IE_Exp_HTML::copyToBuffer(), CreateBMP(), CreateBMPFile(), IE_Imp_RTF::CreateDataItemfromStream(), OXMLi_ListenerState_Math::endElement(), ODi_Frame_ListenerState::endElement(), IE_Imp_XHTML::endElement(), abiword_document::garble_jpeg(), GDIconvertGraphic(), GOComponentView::getSnapShot(), IE_Imp_RTF::HandleField(), IE_Imp_RTF::HandlePCData(), IE_Imp_RTF::LoadPictData(), loadStream(), IE_MailMerge_Delimiter_Listener::mergeFile(), IE_Imp_MSWrite::parse_file(), IE_Imp_XHTML::pasteFromBuffer(), AP_UnixApp::pasteFromClipboard(), AP_CocoaApp::pasteFromClipboard(), XAP_UnixDialog_FileOpenSaveAs::previewPicture(), IE_Imp_MSWrite::read_pic(), IE_Imp_RTF::ReadFontTable(), s_dndDropEvent(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), OXMLi_ListenerState_Math::startElement(), ODi_Frame_ListenerState::startElement(), IE_Imp_XHTML::startElement(), IE_Imp_RTF::StuffCurrentGroup(), StyleListener::tagRaw(), TextboxPage::TextboxPage(), TFTEST_MAIN(), GOComponentView::update(), IE_Exp::write(), and write_png_data().

bool UT_ByteBuf::del ( UT_uint32  position,
UT_uint32  amount 
)
UT_uint32 UT_ByteBuf::getLength ( void   )  const

References m_iSize.

Referenced by IE_Imp_RTF::_appendHdrFtr(), ABI_Collab_Export::_buildPacket(), IE_ImpGraphic_Win32Native::_convertGraphic(), IE_ImpGraphic_Cocoa::_convertGraphic(), AP_Win32App::_copyFmtToClipboard(), s_XSL_FO_Listener::_handleDataItems(), s_WML_Listener::_handleDataItems(), s_KWord_1_Listener::_handleDataItems(), s_DocBook_Listener::_handleDataItems(), s_AbiWord_1_Listener::_handleDataItems(), IE_RSVGBitmapGraphic::_importGraphic(), _jpegFillInputBuffer(), XAP_UnixDialog_FileOpenSaveAs::_loadXPM(), IE_ImpGraphic_GdkPixbuf::_loadXPM(), s_RTF_ListenerWriteDoc::_openFrame(), s_RTF_ListenerWriteDoc::_openTag(), Text_Listener::_outputData(), IE_Imp_RTF::_parseFldinstBlock(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), FV_View::_pasteFromLocalTo(), _png_write(), _UT_ByteBuf_PNG_read(), s_RTF_ListenerWriteDoc::_writeEmbedData(), IE_Exp_S5::_writeHeader(), s_RTF_ListenerWriteDoc::_writeImageInRTF(), abi_widget_get_selection(), IE_Exp_OpenXML_Listener::addImages(), ODi_Abi_Data::addObjectDataItem(), UT_UTF8String::appendBuf(), IE_Imp_XML::charData(), FV_View::cmdInsertEmbed(), IE_ImpGraphic::constructImporter(), GR_VectorImage::convertFromBuffer(), GR_UnixImage::convertFromBuffer(), GR_CocoaImage::convertFromBuffer(), GR_RSVGVectorImage::convertFromBuffer(), IE_ImpGraphic_WMF::convertGraphic(), IE_ImpGraphic_WMF::convertGraphicToSVG(), GR_VectorImage::convertToBuffer(), GR_RSVGVectorImage::convertToBuffer(), AP_UnixApp::copyToClipboard(), AP_CocoaApp::copyToClipboard(), PD_Document::createDataItem(), IE_MailMerge_Delimiter_Listener::defineItem(), IE_Exp_HTML_DataExporter::encodeDataBase64(), IE_Imp_AbiWord_1::endElement(), GDIconvertGraphic(), GR_Image::getBufferType(), AP_UnixApp::getCurrentSelection(), AP_CocoaApp::getCurrentSelection(), GR_UnixCairoImage::getPixbuf(), GR_EmbedView::getSnapShots(), IE_Imp_XML::importFile(), IE_ImpGraphic::importGraphic(), IE_Imp_MHT::importHTML4(), IE_Imp_MHT::importImage(), IE_Imp_MHT::importXHTML(), GOComponentView::loadBuffer(), IE_ImpGraphic::loadGraphic(), FL_DocLayout::loadPendingObjects(), IE_MailMerge_Delimiter_Listener::mergeFile(), FV_UnixVisualDrag::mouseDrag(), FV_UnixVisualInlineImage::mouseDrag(), FV_UnixFrameEdit::mouseDrag(), UT_XML::parse(), UT_svg::parse(), FV_Selection::pasteRowOrCol(), XAP_UnixDialog_FileOpenSaveAs::pixbufForByteBuf(), IE_ImpGraphic_GdkPixbuf::pixbufForByteBuf(), s_RTF_ListenerWriteDoc::populate(), IE_Imp_MSWrite::read_pic(), IE_Imp_MSWrite::read_txt(), IE_ImpGraphic_Win32Native::ReadBytes(), FL_DocLayout::relocateFrame(), PD_Document::replaceDataItem(), IE_Exp::rewindChar(), s_drag_data_get_cb(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), UT_XML::sniff(), TextboxPage::TextboxPage(), TFTEST_MAIN(), UT_Base64Decode(), UT_Base64Encode(), UT_SVG_getDimensions(), IE_Exp::writeBufferToFile(), IE_Exp_OpenXML::writeImage(), ODe_PicturesWriter::writePictures(), OO_PicturesWriter::writePictures(), and ODe_ThumbnailsWriter::writeThumbnails().

const UT_Byte * UT_ByteBuf::getPointer ( UT_uint32  position  )  const

References m_iSize, m_pBuf, and UT_ASSERT.

Referenced by IE_Imp_RTF::_appendHdrFtr(), ABI_Collab_Export::_buildPacket(), IE_ImpGraphic_Win32Native::_convertGraphic(), IE_ImpGraphic_Cocoa::_convertGraphic(), AP_Win32App::_copyFmtToClipboard(), XAP_UnixClipboard::_getDataFromServer(), s_XSL_FO_Listener::_handleDataItems(), s_WML_Listener::_handleDataItems(), s_KWord_1_Listener::_handleDataItems(), s_DocBook_Listener::_handleDataItems(), s_AbiWord_1_Listener::_handleDataItems(), IE_Imp_MsWord_97::_handleImage(), IE_Imp_MsWord_97::_handlePositionedImage(), IE_RSVGBitmapGraphic::_importGraphic(), _jpegFillInputBuffer(), XAP_UnixDialog_FileOpenSaveAs::_loadXPM(), IE_ImpGraphic_GdkPixbuf::_loadXPM(), IE_Exp_HTML_Listener::_makeStylesheet(), s_RTF_ListenerWriteDoc::_openFrame(), s_RTF_ListenerWriteDoc::_openTag(), Text_Listener::_outputData(), IE_Imp_Applix::_parseFile(), IE_Imp_RTF::_parseFldinstBlock(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), FV_View::_pasteFromLocalTo(), _png_read(), _UT_ByteBuf_PNG_read(), s_RTF_ListenerWriteDoc::_writeEmbedData(), IE_Exp_S5::_writeHeader(), s_RTF_ListenerWriteDoc::_writeImageInRTF(), IE_Exp_S5::_writeSlide(), abi_widget_get_selection(), AbiWord_WMF_read(), ODi_Abi_Data::addObjectDataItem(), UT_UTF8String::appendBuf(), FV_View::cmdInsertEmbed(), IE_ImpGraphic::constructImporter(), IE_ImpGraphic_Win32Native::Convert_BMP(), IE_ImpGraphic_BMP::Convert_BMP(), GR_VectorImage::convertFromBuffer(), GR_UnixImage::convertFromBuffer(), GR_CocoaImage::convertFromBuffer(), GR_RSVGVectorImage::convertFromBuffer(), GR_VectorImage::convertToBuffer(), GR_RSVGVectorImage::convertToBuffer(), IE_Exp::copyToBuffer(), AP_UnixApp::copyToClipboard(), AP_CocoaApp::copyToClipboard(), PD_Document::createDataItem(), IE_MailMerge_Delimiter_Listener::defineItem(), IE_Exp_HTML_DataExporter::encodeDataBase64(), OXMLi_ListenerState_Math::endElement(), ODi_Frame_ListenerState::endElement(), IE_Imp_AbiWord_1::endElement(), GDIconvertGraphic(), GR_Image::getBufferType(), AP_UnixApp::getCurrentSelection(), AP_CocoaApp::getCurrentSelection(), GR_UnixCairoImage::getPixbuf(), GR_EmbedView::getSnapShots(), IE_Imp_XML::importFile(), IE_ImpGraphic::importGraphic(), IE_Imp_MHT::importHTML4(), IE_Imp_MHT::importXHTML(), GOComponentView::loadBuffer(), IE_ImpGraphic::loadGraphic(), FL_DocLayout::loadPendingObjects(), FV_UnixVisualDrag::mouseDrag(), FV_UnixVisualInlineImage::mouseDrag(), FV_UnixFrameEdit::mouseDrag(), UT_XML::parse(), UT_svg::parse(), FV_Selection::pasteRowOrCol(), XAP_UnixDialog_FileOpenSaveAs::pixbufForByteBuf(), IE_ImpGraphic_GdkPixbuf::pixbufForByteBuf(), s_RTF_ListenerWriteDoc::populate(), IE_Exp_OpenXML_Listener::populate(), IE_Imp_MSWrite::read_pic(), read_png_data(), IE_Imp_MSWrite::read_txt(), IE_ImpGraphic_Win32Native::ReadBytes(), IE_ImpGraphic_BMP::ReadBytes(), FL_DocLayout::relocateFrame(), PD_Document::replaceDataItem(), IE_Exp::rewindChar(), s_drag_data_get_cb(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), UT_XML::sniff(), TextboxPage::TextboxPage(), TFTEST_MAIN(), UT_Base64Decode(), UT_Base64Encode(), UT_SVG_getDimensions(), IE_Exp::writeBufferToFile(), IE_Exp_OpenXML::writeImage(), ODe_PicturesWriter::writePictures(), OO_PicturesWriter::writePictures(), and ODe_ThumbnailsWriter::writeThumbnails().

bool UT_ByteBuf::ins ( UT_uint32  position,
const UT_Byte pValue,
UT_uint32  length 
)
bool UT_ByteBuf::ins ( UT_uint32  position,
UT_uint32  length 
)

References _byteBuf(), m_iSize, m_iSpace, and m_pBuf.

bool UT_ByteBuf::insertFromFile ( UT_uint32  iPosition,
FILE *  fp 
)

References ins(), 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 
)
bool UT_ByteBuf::insertFromURI ( UT_uint32  iPosition,
const char *  pszURI 
)
bool UT_ByteBuf::overwrite ( UT_uint32  position,
const UT_Byte pValue,
UT_uint32  length 
)
void UT_ByteBuf::truncate ( UT_uint32  position  ) 
bool UT_ByteBuf::writeToFile ( const char *  pszFileName  )  const

References m_iSize, m_pBuf, and UT_ASSERT.

bool UT_ByteBuf::writeToURI ( const char *  pszURI  )  const

Member Data Documentation

Referenced by _byteBuf(), del(), truncate(), and UT_ByteBuf().

Referenced by _byteBuf(), del(), ins(), overwrite(), and truncate().


The documentation for this class was generated from the following files: