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 DEFAULT_CHUNK, m_iChunk, and MIN_CHUNK.

UT_ByteBuf::~UT_ByteBuf (  ) 

References FREEP, and m_pBuf.


Member Function Documentation

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(), ODi_Abi_Data::_loadStream(), Text_Listener::_outputData(), IE_Imp_MSWrite::_parseFile(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), IE_Imp_Object::_parseStream(), _write_png(), AbiWord_WMF_function(), UT_Multipart::append(), UT_Multipart::append_Base64(), UT_Multipart::append_Quoted(), changed_cb(), UT_svg::charData(), ODi_Frame_ListenerState::charData(), IE_Imp_XML::charData(), IE_Imp_XHTML::charData(), convCallback(), IE_Imp_MathML_EntityTable::convert(), GR_VectorImage::convertFromBuffer(), GR_VectorImage::convertToBuffer(), convertToPng(), CreateBMP(), CreateBMPFile(), ODi_Frame_ListenerState::endElement(), IE_Imp_XHTML::endElement(), GOComponentView::exportToSVG(), GDIconvertGraphic(), IE_Imp_RTF::HandleField(), IE_Imp_RTF::HandlePCData(), IE_Imp_RTF::LoadPictData(), loadStream(), IE_MailMerge_Delimiter_Listener::mergeFile(), IE_Imp_XHTML::pasteFromBuffer(), AP_UnixApp::pasteFromClipboard(), AP_CocoaApp::pasteFromClipboard(), XAP_UnixDialog_FileOpenSaveAs::previewPicture(), IE_Imp_RTF::ReadFontTable(), s_dndDropEvent(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), ODi_Frame_ListenerState::startElement(), IE_Imp_XHTML::startElement(), IE_Imp_RTF::StuffCurrentGroup(), TFTEST_MAIN(), GOComponentView::update(), IE_Exp::write(), write_png_data(), and write_to_png().

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::del ( UT_uint32  position,
UT_uint32  amount 
)

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

void UT_ByteBuf::truncate ( UT_uint32  position  ) 

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_RSVGGraphic::_importGraphic(), IE_ImpGraphic_JPEG::_jpegFillInputBuffer(), XAP_UnixDialog_FileOpenSaveAs::_loadXPM(), IE_ImpGraphic_GdkPixbuf::_loadXPM(), s_RTF_ListenerWriteDoc::_openFrame(), Text_Listener::_outputData(), IE_Imp_RTF::_parseFldinstBlock(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), FV_View::_pasteFromLocalTo(), _png_write(), IE_Exp_S5::_writeHeader(), s_LaTeX_Listener::_writeImage(), s_HTML_Listener::_writeImage(), s_HTML_Listener::_writeImageBase64(), 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(), IE_ImpGraphic_WMF::convertGraphic(), IE_ImpGraphic::convertGraphic(), GR_VectorImage::convertToBuffer(), AP_UnixApp::copyToClipboard(), AP_CocoaApp::copyToClipboard(), PD_Document::createDataItem(), IE_MailMerge_Delimiter_Listener::defineItem(), 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(), 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_char(), read_from_png(), IE_ImpGraphic_Win32Native::ReadBytes(), PD_Document::replaceDataItem(), IE_Exp::rewindChar(), s_drag_data_get_cb(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), UT_XML::sniff(), TFTEST_MAIN(), UT_Base64Decode(), UT_Base64Encode(), UT_SVG_getDimensions(), IE_Exp_OpenXML::writeImage(), ODe_PicturesWriter::writePictures(), and OO_PicturesWriter::writePictures().

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_RSVGGraphic::_importGraphic(), IE_ImpGraphic_JPEG::_jpegFillInputBuffer(), XAP_UnixDialog_FileOpenSaveAs::_loadXPM(), IE_ImpGraphic_GdkPixbuf::_loadXPM(), s_RTF_ListenerWriteDoc::_openFrame(), Text_Listener::_outputData(), IE_Imp_Applix::_parseFile(), IE_Imp_RTF::_parseFldinstBlock(), IE_Imp_MathML::_parseStream(), IE_Imp_Component::_parseStream(), FV_View::_pasteFromLocalTo(), _png_read(), XAP_Win32Dialog_FileOpenSaveAs::_previewPicture(), IE_Exp_S5::_writeHeader(), s_LaTeX_Listener::_writeImage(), s_HTML_Listener::_writeImage(), s_HTML_Listener::_writeImageBase64(), 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(), IE_ImpGraphic::convertGraphic(), GR_VectorImage::convertToBuffer(), IE_Exp::copyToBuffer(), AP_UnixApp::copyToClipboard(), AP_CocoaApp::copyToClipboard(), PD_Document::createDataItem(), IE_MailMerge_Delimiter_Listener::defineItem(), 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(), 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_char(), read_from_png(), read_png_data(), IE_ImpGraphic_Win32Native::ReadBytes(), IE_ImpGraphic_BMP::ReadBytes(), PD_Document::replaceDataItem(), IE_Exp::rewindChar(), s_drag_data_get_cb(), XAP_DiskStringSet::setValue(), AP_DiskStringSet::setValue(), UT_XML::sniff(), TFTEST_MAIN(), UT_Base64Decode(), UT_Base64Encode(), UT_SVG_getDimensions(), IE_Exp_OpenXML::writeImage(), ODe_PicturesWriter::writePictures(), and OO_PicturesWriter::writePictures().

bool UT_ByteBuf::writeToFile ( const char *  pszFileName  )  const

References m_iSize, m_pBuf, and UT_ASSERT.

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

bool UT_ByteBuf::insertFromFile ( UT_uint32  iPosition,
const char *  pszFilename 
)

bool UT_ByteBuf::insertFromURI ( UT_uint32  iPosition,
const char *  pszURI 
)

bool UT_ByteBuf::insertFromInput ( UT_uint32  iPosition,
GsfInput *  fp 
)

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

References ins(), and m_pBuf.

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


Member Data Documentation

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

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


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

Generated on Thu Nov 20 00:07:13 2008 for AbiWord by  doxygen 1.5.5