LCmdEnablerAttachment is a PowerPlant class that is used for coupling commands and updating chores in PowerPlant object relationships.
Methods :
The methods in this class are:
Data Members:
The data members in this class are:
Operation:
This Attachment responds to the msg_CommandStatus message. When you create the Attachment, you also specify the
command that should be enabled.. When it executes, this Attachment
enables the menu item associated with the command. It also prevents
the host from executing, because it has already enabled the related
command. It does not do any item manipulation such as setting
a mark in the menu.
You can uset shi Attachment as a model for handling other updating tasks. For example, you might create a check mark Attachment that puts a check mark in front of a menu item.
Source files:
See also:
Purpose:
The constructor creates the object containing the passed-in parameters.
Access:
Prototype:
LCmdEnablerAttachment( CommandT inCmdToEnable );
LCmdEnablerAttachment( LStream* inStream );Parameters:
The parameters for these constructors are:
Purpose:
This method decides whether to enable the command, then sets mExecuteHost appropriately. This is an override of ExecuteSelf() in LAttachment.
Purpose:
This member holds the value of the command for which we want to control enabling behavior.
Access:
Prototype:
CommandT mCmdToEnable;