Public Member Functions | Private Member Functions | Private Attributes

UT_GrowBuf Class Reference

#include <ut_growbuf.h>

List of all members.

Public Member Functions

 UT_GrowBuf (UT_uint32 iChunk=0)
 ~UT_GrowBuf ()
bool append (const UT_GrowBufElement *pValue, UT_uint32 length)
bool ins (UT_uint32 position, const UT_GrowBufElement *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, UT_GrowBufElement *pValue, UT_uint32 length)
void truncate (UT_uint32 position)
UT_uint32 getLength (void) const
UT_GrowBufElementgetPointer (UT_uint32 position) const

Private Member Functions

bool _growBuf (UT_uint32 spaceNeeded)

Private Attributes

UT_GrowBufElementm_pBuf
UT_uint32 m_iSize
UT_uint32 m_iSpace
UT_uint32 m_iChunk

Constructor & Destructor Documentation

UT_GrowBuf::UT_GrowBuf ( UT_uint32  iChunk = 0  ) 

References m_iChunk, and MIN_CHUNK.

UT_GrowBuf::~UT_GrowBuf (  ) 

References FREEP, and m_pBuf.


Member Function Documentation

bool UT_GrowBuf::_growBuf ( UT_uint32  spaceNeeded  )  [private]

References m_iChunk, m_iSize, m_iSpace, m_pBuf, and UT_calloc().

Referenced by ins(), and overwrite().

bool UT_GrowBuf::append ( const UT_GrowBufElement pValue,
UT_uint32  length 
)
bool UT_GrowBuf::del ( UT_uint32  position,
UT_uint32  amount 
)

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

UT_uint32 UT_GrowBuf::getLength ( void   )  const
UT_GrowBufElement * UT_GrowBuf::getPointer ( UT_uint32  position  )  const
bool UT_GrowBuf::ins ( UT_uint32  position,
const UT_GrowBufElement pValue,
UT_uint32  length 
)
bool UT_GrowBuf::ins ( UT_uint32  position,
UT_uint32  length 
)

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

bool UT_GrowBuf::overwrite ( UT_uint32  position,
UT_GrowBufElement pValue,
UT_uint32  length 
)

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

void UT_GrowBuf::truncate ( UT_uint32  position  ) 

Member Data Documentation

Referenced by _growBuf(), del(), truncate(), and UT_GrowBuf().

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


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