Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
CArrayPakBase Class Reference

An implementation base class for all variable length, packed arrays. More...

#include <e32base.h>

Inheritance diagram for CArrayPakBase:
CBase CArrayPak< TEntry > CArrayPak< T > CArrayPak< TAny > CArrayPakFlat< TEntry > CArrayPakFlat< T >

Public Member Functions

IMPORT_C ~CArrayPakBase ()
 Destructor.
 
TInt Count () const
 Gets the number of elements held in the array.
 
IMPORT_C TInt Length (TInt anIndex) const
 Gets the length of the specified element.
 
IMPORT_C void Compress ()
 Removes excess space from the array buffer.
 
IMPORT_C void Reset ()
 Deletes all elements from the array and frees the memory allocated to the array buffer.
 
IMPORT_C void SortL (TKeyArrayVar &aKey)
 Sorts the elements of the array into key sequence.
 
IMPORT_C TAny * At (TInt anIndex) const
 TAny points to the data associated with the record with anIndex.
 
IMPORT_C void Delete (TInt anIndex)
 Removes a single element from the array.
 
IMPORT_C void Delete (TInt anIndex, TInt aCount)
 Removes one or more contiguous elements from the array, starting at a specific position.
 
IMPORT_C TAny * ExpandL (TInt anIndex, TInt aLength)
 Expand the array at anIndex.
 
IMPORT_C TInt Find (const TAny *aPtr, TKeyArrayPak &aKey, TInt &anIndex) const
 Find using a sequential search.
 
IMPORT_C TInt FindIsq (const TAny *aPtr, TKeyArrayPak &aKey, TInt &anIndex) const
 Find using a binary search.
 
IMPORT_C void InsertL (TInt anIndex, const TAny *aPtr, TInt aLength)
 Inserts a record at index anIndex.
 
IMPORT_C TInt InsertIsqL (const TAny *aPtr, TInt aLength, TKeyArrayPak &aKey)
 Insert in sequence, no duplicates allowed.
 
IMPORT_C TInt InsertIsqAllowDuplicatesL (const TAny *aPtr, TInt aLength, TKeyArrayPak &aKey)
 Insert in sequence, allow duplicates.
 
- Public Member Functions inherited from CBase
 CBase ()
 Default constructor.
 
virtual IMPORT_C ~CBase ()
 Virtual destructor.
 
TAny * operator new (TUint aSize, TAny *aBase) __NO_THROW
 Initialises the object to binary zeroes.
 
TAny * operator new (TUint aSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TUint aExtraSize) __NO_THROW
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 
TAny * operator new (TUint aSize, TLeave, TUint aExtraSize)
 Allocates the object from the heap and then initialises its contents to binary zeroes.
 

Protected Member Functions

IMPORT_C CArrayPakBase (TBufRep aRep, TInt aGranularity)
 Constructor.
 
IMPORT_C void SetKey (TKeyArrayPak &aKey) const
 Set the key data.
 
IMPORT_C TInt GetOffset (TInt anIndex) const
 Return the offset into the buffer of the record with index anIndex;.
 
IMPORT_C void BuildVarArrayL (CArrayVarFlat< TAny > *&aVarFlat)
 Make a copy of the current array as a CArrayVarFlat.
 
- Protected Member Functions inherited from CBase
virtual IMPORT_C TInt Extension_ (TUint aExtensionId, TAny *&a0, TAny *a1)
 Extension function.
 

Static Protected Member Functions

static IMPORT_C TInt CountR (const CBase *aPtr)
 Return the number of items in the array.
 
static IMPORT_C const TAny * AtR (const CBase *aPtr, TInt anIndex)
 Return the address of an item in the array.
 

Additional Inherited Members

- Static Public Member Functions inherited from CBase
static IMPORT_C void Delete (CBase *aPtr)
 Deletes the specified object.
 

Detailed Description

An implementation base class for all variable length, packed arrays.

The class is always derived from and is never instantiated explicitly.

API status
Published to all clients. Released API.

Definition at line 973 of file e32base.h.

Constructor & Destructor Documentation

◆ ~CArrayPakBase()

IMPORT_C CArrayPakBase::~CArrayPakBase ( )

Destructor.

Frees all resources owned by the object, prior to its destruction.

(generated from Symbian Developer Library)

◆ CArrayPakBase()

IMPORT_C CArrayPakBase::CArrayPakBase ( TBufRep  aRep,
TInt  aGranularity 
)
protected

Constructor.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

Member Function Documentation

◆ At()

IMPORT_C TAny * CArrayPakBase::At ( TInt  anIndex) const

TAny points to the data associated with the record with anIndex.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ AtR()

static IMPORT_C const TAny * CArrayPakBase::AtR ( const CBase *  aPtr,
TInt  anIndex 
)
staticprotected

Return the address of an item in the array.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ BuildVarArrayL()

IMPORT_C void CArrayPakBase::BuildVarArrayL ( CArrayVarFlat< TAny > *&  aVarFlat)
protected

Make a copy of the current array as a CArrayVarFlat.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ Compress()

IMPORT_C void CArrayPakBase::Compress ( )

Removes excess space from the array buffer.

The effect is to reduce the memory allocated to the array buffer so that it is just sufficient to contain the elements of the array.

If the array is empty, then the memory allocated to the array buffer is freed.

(generated from Symbian Developer Library)

◆ Count()

TInt CArrayPakBase::Count ( ) const
inline

Gets the number of elements held in the array.

(generated from Symbian Developer Library)

◆ CountR()

static IMPORT_C TInt CArrayPakBase::CountR ( const CBase *  aPtr)
staticprotected

Return the number of items in the array.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ Delete() [1/2]

IMPORT_C void CArrayPakBase::Delete ( TInt  anIndex)

Removes a single element from the array.

Deleting elements from the array does not cause the array buffer to be automatically compressed. Call CArrayPakBase::Compress() to return excess space to the heap.

Parameters
anIndexThe position within the array of the element to delete, relative to zero.

Panic condition: E32USER-CBase 21, if anIndex is negative or is greater than the number of elements currently in the array.

(generated from Symbian Developer Library)

◆ Delete() [2/2]

IMPORT_C void CArrayPakBase::Delete ( TInt  anIndex,
TInt  aCount 
)

Removes one or more contiguous elements from the array, starting at a specific position.

Deleting elements from the array does not cause the array buffer to be automatically compressed. Call CArrayPakBase::Compress() to return excess space to the heap.

Parameters
anIndexThe position within the array from where deletion of elements is to start, relative to zero.
aCountThe number of elements to be deleted from the array.

Panic condition: E32USER-CBase 21, if anIndex is negative or greater than the number of elements currently in the array.

Panic condition: E32USER-CBase 26, if aCount is negative.

(generated from Symbian Developer Library)

◆ ExpandL()

IMPORT_C TAny * CArrayPakBase::ExpandL ( TInt  anIndex,
TInt  aLength 
)

Expand the array at anIndex.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ Find()

IMPORT_C TInt CArrayPakBase::Find ( const TAny *  aPtr,
TKeyArrayPak &  aKey,
TInt &  anIndex 
) const

Find using a sequential search.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ FindIsq()

IMPORT_C TInt CArrayPakBase::FindIsq ( const TAny *  aPtr,
TKeyArrayPak &  aKey,
TInt &  anIndex 
) const

Find using a binary search.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ GetOffset()

IMPORT_C TInt CArrayPakBase::GetOffset ( TInt  anIndex) const
protected

Return the offset into the buffer of the record with index anIndex;.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ InsertIsqAllowDuplicatesL()

IMPORT_C TInt CArrayPakBase::InsertIsqAllowDuplicatesL ( const TAny *  aPtr,
TInt  aLength,
TKeyArrayPak &  aKey 
)

Insert in sequence, allow duplicates.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ InsertIsqL()

IMPORT_C TInt CArrayPakBase::InsertIsqL ( const TAny *  aPtr,
TInt  aLength,
TKeyArrayPak &  aKey 
)

Insert in sequence, no duplicates allowed.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ InsertL()

IMPORT_C void CArrayPakBase::InsertL ( TInt  anIndex,
const TAny *  aPtr,
TInt  aLength 
)

Inserts a record at index anIndex.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ Length()

IMPORT_C TInt CArrayPakBase::Length ( TInt  anIndex) const

Gets the length of the specified element.

Parameters
anIndexThe position of the element within the array. The position is relative to zero, (i.e. the first element in the array is at position 0).

Panic condition: E32USER-CBase 21, if anIndex is negative or is greater than the number of elements currently in the array.

(generated from Symbian Developer Library)

◆ Reset()

IMPORT_C void CArrayPakBase::Reset ( )

Deletes all elements from the array and frees the memory allocated to the array buffer.

(generated from Symbian Developer Library)

◆ SetKey()

IMPORT_C void CArrayPakBase::SetKey ( TKeyArrayPak &  aKey) const
protected

Set the key data.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ SortL()

IMPORT_C void CArrayPakBase::SortL ( TKeyArrayVar &  aKey)

Sorts the elements of the array into key sequence.

Note that the function requires a TKeyArrayVar key object because SortL() creates a temporary CArrayVarFlat array in its implementation and uses that array's Sort() member function.

CArrayVarFlat

Parameters
aKeyThe key object defining the properties of the key.

(generated from Symbian Developer Library)


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