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

References m_iChunk, m_iSize, m_iSpace, m_pBuf, and UT_ASSERT.

Referenced by IE_Exp::rewindChar().

UT_uint32 UT_ByteBuf::getLength ( void   )  const
const UT_Byte * UT_ByteBuf::getPointer ( UT_uint32  position  )  const
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 
)

References ins(), m_pBuf, and UT_return_val_if_fail.

Referenced by insertFromURI().

bool UT_ByteBuf::insertFromURI ( UT_uint32  iPosition,
const char *  pszURI 
)
bool UT_ByteBuf::overwrite ( UT_uint32  position,
const UT_Byte pValue,
UT_uint32  length 
)

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

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: