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 TAknsItemTypeaType,
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 aTypeItem type of the new object.
const TAknsItemID & aIDItem ID of the new object.

CAknsItemDef(const TAknsItemID &)

IMPORT_CCAknsItemDef(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 & aIDItem 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 TAknsItemIDID()const

Returns the item ID of this item definition.

Since
2.0

LinearOrder(const CAknsItemDef &, const CAknsItemDef &)

IMPORT_C TIntLinearOrder(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 & aFirstFirst object to be compared.
const CAknsItemDef & aSecondSecond 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 & aIDItem ID of the newly created item definition.

Reserved1()

IMPORT_C voidReserved1()[private]

Reserved for future use.

Since
2.0

Reserved2()

IMPORT_C voidReserved2()[private]

Reserved for future use.

Since
2.0

Type()

IMPORT_C TAknsItemTypeType()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]