CArrayPakBase Class Reference
class CArrayPakBase : public CBase
|
An implementation base class for all variable length, packed arrays.
The class is always derived from and is never instantiated explicitly.
Public Member Functions
|
|
~CArrayPakBase
()
|
IMPORT_C
TAny
*
|
At
(
TInt
)
|
IMPORT_C void
|
Compress
()
|
TInt
|
Count
()
|
IMPORT_C void
|
Delete
(
TInt
)
|
IMPORT_C void
|
Delete
(
TInt
,
TInt
)
|
IMPORT_C
TAny
*
|
ExpandL
(
TInt
,
TInt
)
|
IMPORT_C
TInt
|
Find
(const
TAny
*,
TKeyArrayPak
&,
TInt
&)
|
IMPORT_C
TInt
|
FindIsq
(const
TAny
*,
TKeyArrayPak
&,
TInt
&)
|
IMPORT_C
TInt
|
InsertIsqAllowDuplicatesL
(const
TAny
*,
TInt
,
TKeyArrayPak
&)
|
IMPORT_C
TInt
|
InsertIsqL
(const
TAny
*,
TInt
,
TKeyArrayPak
&)
|
IMPORT_C void
|
InsertL
(
TInt
, const
TAny
*,
TInt
)
|
IMPORT_C
TInt
|
Length
(
TInt
)
|
IMPORT_C void
|
Reset
()
|
IMPORT_C void
|
SortL
(
TKeyArrayVar
&)
|
Constructor & Destructor Documentation
CArrayPakBase(TBufRep, TInt)
IMPORT_C
|
CArrayPakBase
|
(
|
TBufRep
|
aRep,
|
|
TInt
|
aGranularity
|
|
)
|
[protected]
|
~CArrayPakBase()
IMPORT_C
|
~CArrayPakBase
|
(
|
)
|
|
Destructor.
Frees all resources owned by the object, prior to its destruction.
Member Functions Documentation
At(TInt)
IMPORT_C
TAny
*
|
At
|
(
|
TInt
|
anIndex
|
)
|
const
|
AtR(const CBase *, TInt)
IMPORT_C const
TAny
*
|
AtR
|
(
|
const
CBase
*
|
aPtr,
|
|
TInt
|
anIndex
|
|
)
|
[protected, static]
|
BuildVarArrayL(CArrayVarFlat< TAny > *&)
Compress()
IMPORT_C void
|
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.
Count()
TInt
|
Count
|
(
|
)
|
const [inline]
|
Gets the number of elements held in the array.
CountR(const CBase *)
IMPORT_C
TInt
|
CountR
|
(
|
const
CBase
*
|
aPtr
|
)
|
[protected, static]
|
Delete(TInt)
IMPORT_C void
|
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.
-
panic
-
E32USER-CBase 21, if anIndex is negative or is greater than the number of elements currently in the array.
CArrayPakBase::Compress
Parameters
TInt
anIndex
|
The position within the array of the element to delete, relative to zero.
|
Delete(TInt, TInt)
IMPORT_C void
|
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.
-
panic
-
E32USER-CBase 21, if anIndex is negative or greater than the number of elements currently in the array.
-
panic
-
E32USER-CBase 26, if aCount is negative.
CArrayPakBase::Compress
Parameters
TInt
anIndex
|
The position within the array from where deletion of elements is to start, relative to zero.
|
TInt
aCount
|
The number of elements to be deleted from the array.
|
Find(const TAny *, TKeyArrayPak &, TInt &)
FindIsq(const TAny *, TKeyArrayPak &, TInt &)
GetOffset(TInt)
IMPORT_C
TInt
|
GetOffset
|
(
|
TInt
|
anIndex
|
)
|
const [protected]
|
InsertIsqAllowDuplicatesL(const TAny *, TInt, TKeyArrayPak &)
InsertIsqL(const TAny *, TInt, TKeyArrayPak &)
InsertL(TInt, const TAny *, TInt)
IMPORT_C void
|
InsertL
|
(
|
TInt
|
anIndex,
|
|
const
TAny
*
|
aPtr,
|
|
TInt
|
aLength
|
|
)
|
|
Length(TInt)
IMPORT_C
TInt
|
Length
|
(
|
TInt
|
anIndex
|
)
|
const
|
Gets the length of the specified element.
-
panic
-
E32USER-CBase 21, if anIndex is negative or is greater than the number of elements currently in the array.
Parameters
TInt
anIndex
|
The 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).
|
Reset()
Deletes all elements from the array and frees the memory allocated to the array buffer.
SetKey(TKeyArrayPak &)
IMPORT_C void
|
SetKey
|
(
|
TKeyArrayPak
&
|
aKey
|
)
|
const [protected]
|
SortL(TKeyArrayVar &)
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
TKeyArrayVar
& aKey
|
The key object defining the properties of the key.
|
Member Data Documentation
TInt
iCacheIndex
TInt
|
iCacheIndex
|
[private]
|
TInt
iCacheOffset
TInt
|
iCacheOffset
|
[private]
|
TInt
iGranularity
TInt
|
iGranularity
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.