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

Base class for arrays of fixed length objects. More...

#include <e32base.h>

Inheritance diagram for CArrayFixBase:
CBase CArrayFix< TInt > CArrayFix< TUid > CArrayFix< T * > CArrayFix< TModelEntry > CArrayFix< TFileEntry > CArrayFix< HBufC * > CArrayFix< TFontAccess > CArrayFix< T > CArrayFix< TAny >

Public Member Functions

IMPORT_C ~CArrayFixBase ()
 Destructor.
 
TInt Count () const
 Gets the number of elements held in the array.
 
TInt Length () const
 Gets the length of an element.
 
IMPORT_C void Compress ()
 Compresses the array.
 
IMPORT_C void Reset ()
 Deletes all elements from the array and frees the memory allocated to the array buffer.
 
IMPORT_C TInt Sort (TKeyArrayFix &aKey)
 Sorts the elements of the array into key sequence.
 
IMPORT_C TAny * At (TInt anIndex) const
 Index into the array.
 
IMPORT_C TAny * End (TInt anIndex) const
 Return a pointer past contiguous elements starting at anIndex.
 
IMPORT_C TAny * Back (TInt anIndex) const
 Return a pointer to contiguous elements before anIndex.
 
IMPORT_C void Delete (TInt anIndex)
 Deletes a single element from the array at a specified position.
 
IMPORT_C void Delete (TInt anIndex, TInt aCount)
 Deletes one or more contiguous elements from the array, starting at a specific position.
 
IMPORT_C TAny * ExpandL (TInt anIndex)
 Expand the array to make room for a new record at anIndex.
 
IMPORT_C TInt Find (const TAny *aPtr, TKeyArrayFix &aKey, TInt &anIndex) const
 Find in the array using a sequential search.
 
IMPORT_C TInt FindIsq (const TAny *aPtr, TKeyArrayFix &aKey, TInt &anIndex) const
 Find in the array using a binary search.
 
IMPORT_C void InsertL (TInt anIndex, const TAny *aPtr)
 Insert a record into the array.
 
IMPORT_C void InsertL (TInt anIndex, const TAny *aPtr, TInt aCount)
 Insert aCount records into the array.
 
IMPORT_C TInt InsertIsqL (const TAny *aPtr, TKeyArrayFix &aKey)
 Insert in sequence, no duplicates allowed.
 
IMPORT_C TInt InsertIsqAllowDuplicatesL (const TAny *aPtr, TKeyArrayFix &aKey)
 Insert in sequence, allow duplicates.
 
IMPORT_C void ResizeL (TInt aCount, const TAny *aPtr)
 Resize the array to contain aCount records, copying a record into any new slots.
 
- 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 CArrayFixBase (TBufRep aRep, TInt aRecordLength, TInt aGranularity)
 Constructor.
 
IMPORT_C void InsertRepL (TInt anIndex, const TAny *aPtr, TInt aReplicas)
 Insert aReplicas copies of a record into the array.
 
IMPORT_C void SetKey (TKeyArrayFix &aKey) const
 Set the key data.
 
IMPORT_C void SetReserveFlatL (TInt aCount)
 Reserve space to contain aCount items.
 
- 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

Base class for arrays of fixed length objects.

It provides implementation and public functions which are common to all arrays of this type.

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

API status
Published to all clients. Released API.

Definition at line 335 of file e32base.h.

Constructor & Destructor Documentation

◆ ~CArrayFixBase()

IMPORT_C CArrayFixBase::~CArrayFixBase ( )

Destructor.

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

(generated from Symbian Developer Library)

◆ CArrayFixBase()

IMPORT_C CArrayFixBase::CArrayFixBase ( TBufRep  aRep,
TInt  aRecordLength,
TInt  aGranularity 
)
protected

Constructor.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

Member Function Documentation

◆ At()

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

Index into the array.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ AtR()

static IMPORT_C const TAny * CArrayFixBase::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.

◆ Back()

IMPORT_C TAny * CArrayFixBase::Back ( TInt  anIndex) const

Return a pointer to contiguous elements before anIndex.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ Compress()

IMPORT_C void CArrayFixBase::Compress ( )

Compresses the array.

The function removes the 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. This applies to both flat and segmented array buffers.

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

(generated from Symbian Developer Library)

◆ Count()

TInt CArrayFixBase::Count ( ) const
inline

Gets the number of elements held in the array.

(generated from Symbian Developer Library)

◆ CountR()

static IMPORT_C TInt CArrayFixBase::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 CArrayFixBase::Delete ( TInt  anIndex)

Deletes a single element from the array at a specified position.

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

Parameters
anIndexThe position within the array at which to delete the element, This is a value relative to zero.

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

(generated from Symbian Developer Library)

◆ Delete() [2/2]

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

Deletes 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 CArrayFixBase::Compress() to return excess space to the heap.

Parameters
anIndexThe position within the array from where deletion of elements is to start. The position is relative to zero, i.e. zero implies that elements, starting with the first, are deleted from the array.
aCountThe number of contiguous elements to be deleted from the array.

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

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

Panic condition: E32USER-CBase 29, if the sum of anIndex and aCount is greater than or equal to the number of elements currently in the array.

(generated from Symbian Developer Library)

◆ End()

IMPORT_C TAny * CArrayFixBase::End ( TInt  anIndex) const

Return a pointer past contiguous elements starting at anIndex.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ ExpandL()

IMPORT_C TAny * CArrayFixBase::ExpandL ( TInt  anIndex)

Expand the array to make room for a new record at anIndex.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ Find()

IMPORT_C TInt CArrayFixBase::Find ( const TAny *  aPtr,
TKeyArrayFix &  aKey,
TInt &  anIndex 
) const

Find in the array using a sequential search.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ FindIsq()

IMPORT_C TInt CArrayFixBase::FindIsq ( const TAny *  aPtr,
TKeyArrayFix &  aKey,
TInt &  anIndex 
) const

Find in the array using a binary search.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ InsertIsqAllowDuplicatesL()

IMPORT_C TInt CArrayFixBase::InsertIsqAllowDuplicatesL ( const TAny *  aPtr,
TKeyArrayFix &  aKey 
)

Insert in sequence, allow duplicates.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ InsertIsqL()

IMPORT_C TInt CArrayFixBase::InsertIsqL ( const TAny *  aPtr,
TKeyArrayFix &  aKey 
)

Insert in sequence, no duplicates allowed.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ InsertL() [1/2]

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

Insert a record into the array.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ InsertL() [2/2]

IMPORT_C void CArrayFixBase::InsertL ( TInt  anIndex,
const TAny *  aPtr,
TInt  aCount 
)

Insert aCount records into the array.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ InsertRepL()

IMPORT_C void CArrayFixBase::InsertRepL ( TInt  anIndex,
const TAny *  aPtr,
TInt  aReplicas 
)
protected

Insert aReplicas copies of a record into the array.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ Length()

TInt CArrayFixBase::Length ( ) const
inline

Gets the length of an element.

(generated from Symbian Developer Library)

◆ Reset()

IMPORT_C void CArrayFixBase::Reset ( )

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

(generated from Symbian Developer Library)

◆ ResizeL()

IMPORT_C void CArrayFixBase::ResizeL ( TInt  aCount,
const TAny *  aPtr 
)

Resize the array to contain aCount records, copying a record into any new slots.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ SetKey()

IMPORT_C void CArrayFixBase::SetKey ( TKeyArrayFix &  aKey) const
protected

Set the key data.

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ SetReserveFlatL()

IMPORT_C void CArrayFixBase::SetReserveFlatL ( TInt  aCount)
protected

Reserve space to contain aCount items.

Only for flat arrays!

API status

(generated from Original Symbian implementation)

API status
Internal component API.

◆ Sort()

IMPORT_C TInt CArrayFixBase::Sort ( TKeyArrayFix &  aKey)

Sorts the elements of the array into key sequence.

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: