RRsBuf8 Class Reference

#include <epoc_rs_buf8.hpp>

List of all members.

Public Member Functions

 RRsBuf8 ()
 RRsBuf8 (TInt aGranularity)
void CopyL (const TDesC8 &aDes)
void CopyL (const TUint8 *aZeroTerminatedString)
void CopyL (const TUint8 *aBuf, TInt aLength)
void AppendL (const TDesC8 &aDes)
void AppendL (const TUint8 *aZeroTerminatedString)
void AppendL (const TUint8 *aBuf, TInt aLength)
const TUint8 * PtrZL ()

Private Member Functions

void ReserveL (TInt aMinRequiredCapacity)
void ReserveFreeCapacityL (TInt aExtraSpaceLength)

Private Attributes

TInt iGranularity

Detailed Description

Definition at line 7 of file epoc_rs_buf8.hpp.


Constructor & Destructor Documentation

RRsBuf8::RRsBuf8 (  )  [inline]

Definition at line 11 of file epoc_rs_buf8.hpp.

RRsBuf8::RRsBuf8 ( TInt  aGranularity  )  [inline]

Definition at line 12 of file epoc_rs_buf8.hpp.


Member Function Documentation

void RRsBuf8::AppendL ( const TUint8 *  aBuf,
TInt  aLength 
)

Definition at line 38 of file epoc_rs_buf8.cpp.

References ReserveFreeCapacityL().

void RRsBuf8::AppendL ( const TUint8 *  aZeroTerminatedString  ) 

Definition at line 31 of file epoc_rs_buf8.cpp.

References ReserveFreeCapacityL().

void RRsBuf8::AppendL ( const TDesC8 &  aDes  ) 

Definition at line 25 of file epoc_rs_buf8.cpp.

References ReserveFreeCapacityL().

Referenced by CFileDataSupplier::OpenL().

void RRsBuf8::CopyL ( const TUint8 *  aBuf,
TInt  aLength 
)

Definition at line 19 of file epoc_rs_buf8.cpp.

References ReserveL().

void RRsBuf8::CopyL ( const TUint8 *  aZeroTerminatedString  ) 

Definition at line 12 of file epoc_rs_buf8.cpp.

References ReserveL().

void RRsBuf8::CopyL ( const TDesC8 &  aDes  ) 

Definition at line 6 of file epoc_rs_buf8.cpp.

References ReserveL().

Referenced by CFileDataSupplier::OpenL().

const TUint8 * RRsBuf8::PtrZL (  ) 

Definition at line 44 of file epoc_rs_buf8.cpp.

References ReserveFreeCapacityL().

void RRsBuf8::ReserveFreeCapacityL ( TInt  aExtraSpaceLength  )  [private]

Ensures that the remaining unused space is more than the supplied value.

May reallocate a larger storage space to meet the requirement. As a result MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.

Typically, you use this method to reserve a known amount of required space in one go instead of relying on the automatic growth pattern.

Parameters:
aExtraSpaceLength The extra space required.
Exceptions:
KErrNoMemory if the the buffer needs to be reallocated and there are insufficient resources to do so.
USER 11 if aLength is negative

Definition at line 118 of file epoc_rs_buf8.cpp.

References ReserveL().

Referenced by AppendL(), and PtrZL().

void RRsBuf8::ReserveL ( TInt  aMinRequiredCapacity  )  [private]

Guarantees that MaxLength() is greater than or equal to the supplied capacity, reallocating the supplied capacity if necessary.

The actual value of MaxLength() after a call may differ from the exact value requested, but if it does differ it will always be greater. This flexibility allows the implementation to manage heap buffers more efficiently.

The string descriptor's heap buffer may be reallocated in order to accommodate the new size. As a result, MaxLength() and Ptr() may return different values afterwards, and any existing raw pointers to into the descriptor data may be invalidated.

Parameters:
aMinRequiredCapacity The minimum value of MaxLength() required
Exceptions:
KErrNoMemory if the underlying buffer needs to be grown and there are insufficient resources to do so

Definition at line 92 of file epoc_rs_buf8.cpp.

References AlignCapacity().

Referenced by CopyL(), and ReserveFreeCapacityL().


Member Data Documentation

TInt RRsBuf8::iGranularity [private]

Definition at line 29 of file epoc_rs_buf8.hpp.


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

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:50:04 2011 by Doxygen 1.6.1