Public Member Functions | Protected Member Functions

Barry::Data Class Reference

List of all members.

Public Member Functions

size_t GetBufSize () const
 Returns size of buffer returned by GetBuffer().
void AppendHexString (const char *str)
 Append bytes of data based on str.
void QuickZap ()
 set buffer to 0 size, but don't bother overwriting memory with 0
void Zap ()
 set buffer to 0 and remove all data
void Prechop (size_t size)
 Removes size bytes from the beginning of the buffer.

Protected Member Functions

void MakeSpace (size_t desiredsize, size_t desiredprepend=0)
 Reallocates buffers so that it is safe to write desiredsize data to m_dataStart after it returns.

Detailed Description

Definition at line 33 of file data.h.


Member Function Documentation

void Barry::Data::AppendHexString ( const char *  str  ) 

Append bytes of data based on str.

Definition at line 310 of file data.cc.

References MakeSpace().

Here is the call graph for this function:

size_t Barry::Data::GetBufSize (  )  const

Returns size of buffer returned by GetBuffer().

Note that this does not include available prepend space.

Definition at line 281 of file data.cc.

Referenced by MakeSpace().

Here is the caller graph for this function:

void Barry::Data::MakeSpace ( size_t  desiredsize,
size_t  desiredprepend = 0 
) [protected]

Reallocates buffers so that it is safe to write desiredsize data to m_dataStart after it returns.

All existing data is preserved.

This function also performs any copy on write needed.

If desiredprepend is nonzero, then at least desiredprepend bytes of prepend space will exist in the buffer after return. If desiredprepend is zero, defaults will be used if needed.

Definition at line 134 of file data.cc.

References GetBufSize().

Referenced by AppendHexString().

Here is the call graph for this function:

Here is the caller graph for this function:

void Barry::Data::Prechop ( size_t  size  ) 

Removes size bytes from the beginning of the buffer.

If GetSize() is less than size, then all bytes will be chopped and GetSize() will end up 0.

Definition at line 384 of file data.cc.

References QuickZap().

Here is the call graph for this function:

void Barry::Data::QuickZap (  )  [inline]

set buffer to 0 size, but don't bother overwriting memory with 0

Definition at line 85 of file data.h.

Referenced by Prechop().

Here is the caller graph for this function:

void Barry::Data::Zap (  ) 

set buffer to 0 and remove all data

Definition at line 324 of file data.cc.

Referenced by Barry::Task::BuildFields(), Barry::Memo::BuildFields(), Barry::Contact::BuildFields(), Barry::Calendar::BuildFields(), and Barry::Mode::JavaLoader::GetScreenshot().

Here is the caller graph for this function:


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