CAknsItemDef Class Reference

class CAknsItemDef : public CBase

Base class for item definitions. Item definition maps item ID specified as TAknsItemID to a specific resource (such as bitmap filename and index). Content of the definition varies depending of the type of the resource.

CAknsItemDef does not itself have any dynamically allocated members. Therefore the members of its friend classes can instantiate CAknsItemDef into stack (e.g. to perform binary search with LineraOrder without heap allocation) using CAknsItemDef::CAknsItemDef(const TAknsItemID aID) constructor. Derived classes, however, require two-phased construction and proper destruction.

This is a public class with exported functions. The class is not intended for derivation outside the library.

AknSkinSrv.lib

Since
2.0

Inherits from

Constructor & Destructor Documentation

CAknsItemDef(const TAknsItemType, const TAknsItemID &)

CAknsItemDef ( const TAknsItemType aType,
const TAknsItemID & aID
) [protected]

C++ constructor for derived classes. Constructs item definition object with given item type and ID, and localization type EAknsIDLTDefault.

Parameters

const TAknsItemType aType Item type of the new object.
const TAknsItemID & aID Item ID of the new object.

CAknsItemDef(const TAknsItemID &)

IMPORT_C CAknsItemDef ( const TAknsItemID & aID ) [private]

C++ constructor for internal use. Constructs item definition object with specified ID and item type EAknsITUnknown , and localization type EAknsIDLTDefault.

Parameters

const TAknsItemID & aID Item ID of the new item definition.

~CAknsItemDef()

IMPORT_C ~CAknsItemDef ( ) [virtual]

Destructor. Base-class destructor does nothing. It exists only to enable destruction of derived objects using pointer to base class object.

Member Functions Documentation

ID()

IMPORT_C TAknsItemID ID ( ) const

Returns the item ID of this item definition.

Since
2.0

LinearOrder(const CAknsItemDef &, const CAknsItemDef &)

IMPORT_C TInt LinearOrder ( const CAknsItemDef & aFirst,
const CAknsItemDef & aSecond
) [static]

Determines the order of two CAknsItemDef objects. Order is determined based on the item ID of the object, as described in TAknsItemID::LinearOrder() .

Since
2.0

Parameters

const CAknsItemDef & aFirst First object to be compared.
const CAknsItemDef & aSecond Second object to be compared.

NewL(const TAknsItemID &)

IMPORT_C CAknsItemDef * NewL ( const TAknsItemID & aID ) [static]

Two-phased constructor. Constructs item definition object with specified ID, item type EAknsITUnknown and localization type EAknsIDLTDefault.

Exceptions:
If allocation fails, function leaves with a system-wide error code.

Parameters

const TAknsItemID & aID Item ID of the newly created item definition.

Reserved1()

IMPORT_C void Reserved1 ( ) [private]

Reserved for future use.

Since
2.0

Reserved2()

IMPORT_C void Reserved2 ( ) [private]

Reserved for future use.

Since
2.0

Type()

IMPORT_C TAknsItemType Type ( ) const

Returns the item type of this item definition. This method can be used to provide run-time type information. Corresponding classes are listed in definition of TAknsItemType .

Since
2.0

Member Data Documentation

TAknsItemID iID

TAknsItemID iID [protected]

TInt iSpare1

TInt iSpare1 [protected]

TInt iSpare2

TInt iSpare2 [protected]

TAknsItemType iType

TAknsItemType iType [protected]