THuiCommand Class Reference

class THuiCommand

THuiCommand is the base class of all commands. A command is an instruction to some class that can be set to occur some time in the future. Each command stores information about an operation. Each command is also responsible for the execution of the command. Commands are processed by the class's OfferEventL() method.

Constructor & Destructor Documentation

THuiCommand(THuiCommandType)

IMPORT_C THuiCommand ( THuiCommandType aType ) [protected]

Protected constructor.

Parameters

THuiCommandType aType Type of the command.

~THuiCommand()

IMPORT_C ~THuiCommand ( ) [virtual]

Member Functions Documentation

CommandExtension(const TUid &, TAny **)

IMPORT_C void CommandExtension ( const TUid & aExtensionUid,
TAny ** aExtensionParams
) [protected, virtual]

Parameters

const TUid & aExtensionUid
TAny ** aExtensionParams

ExecuteL(CHuiEnv &)

void ExecuteL ( CHuiEnv & aEnv ) const [pure virtual]

Executes the command.

Parameters

CHuiEnv & aEnv The environment in which the command is being executed.

ObjectCommand()

IMPORT_C const THuiObjectCommand * ObjectCommand ( ) const [virtual]

Returns a pointer to the command casted to THuiObjectCommand . If this is not possible (the command is not derived from THuiObjectCommand ), returns NULL instead.

Sender()

IMPORT_C TAny * Sender ( ) const

Returns the sender object. This is the object which issued the command originally.

SenderControl()

IMPORT_C CHuiControl * SenderControl ( ) const

Returns the sender control. Returns NULL if the sender is not a control.

Sender()

SenderControlGroup()

IMPORT_C CHuiControlGroup * SenderControlGroup ( ) const

Returns the sender control group. Returns NULL if the sender is not a control group.

Sender()

SenderType()

IMPORT_C THuiCommandObjectType SenderType ( ) const

Determines the type of the object that sent the command.

SenderVisual()

IMPORT_C CHuiVisual * SenderVisual ( ) const

Returns the sender visual. Returns NULL if the sender is not a visual.

Sender()

SetSender(THuiCommandObjectType, TAny *)

IMPORT_C void SetSender ( THuiCommandObjectType aType,
TAny * aSender
)

Sets the sender object of the command. The sender must not be deleted while the command is pending execution in a scheduler.

Parameters

THuiCommandObjectType aType Sender type.
TAny * aSender Pointer to sender.

Size()

TInt Size ( ) const [pure virtual]

Returns the size of the command.

Type()

IMPORT_C THuiCommandType Type ( ) const

Determines the type of the command.

Member Data Documentation

TAny * iSender

TAny * iSender [private]

Object that sent this command. Must exist.

THuiCommandObjectType iSenderType

THuiCommandObjectType iSenderType [private]

Type of the object that sent the command.

TInt iSpare1

TInt iSpare1 [private]

TInt iSpare2

TInt iSpare2 [private]

THuiCommandType iType

THuiCommandType iType [private]

Type of the command. Depends on the command class.