AfrFoundation CATAfrCommandHeader

Usage: you must use this class as is. You should never derive it.


public class CATAfrCommandHeader

Class to create a command header.
Role: Each command you want to make available in your workshop or workbench must have a command header. It holds the necessary information to load the command, such as the name of the shared library in which the command's executable code is located, the name of the command class, and the data to pass to the command's code when this command becomes the current one.

The command header has resources for each command to display, such as the command name shown to the end user, its ToolTip displayed in a balloon, its help message, and its icon. This enables the workshop or workbench to be displayed, that is loaded in memory, without any of its commands being itself loaded, except the default one, spares memory space, and improves performance. The end user can see the icons in the toolbars, the items in the menu bar, can ask for help on a given command, without the command being loaded. It is only when he/she clicks on the menu item or on the icon that the command code is actually loaded.


Method Index


o CATCreateCommandHeader(CATString&,CATString&,CATString&,void*,CATString&,CATFrmState)
Constructs a command header.
o CATCreateDE2CommandHeader(CATString&,CATString&,CATFrmState)
Constructs a command header for a DEČ state command.
o CATGetCommandHeader(CATString&)
Gets a pointer to a command header.

Methods


o CATCreateCommandHeader
public static CATCreateCommandHeader( const iHeaderID,
const iLoadName,
const iClassName,
iArgument,
const iResourceFileName,
iState= CATFrmAvailable)
Constructs a command header.
Parameters:
iHeaderID
The identifier of the header. It is the command argument of the SetAccessCommand macro.
iLoadName
The name of the shared library where iClassName is.
iClassName
The name of the CATCommand class.
iArgument
The argument of the CATCommand class.
iResourceFileName
The name of the resource file.
iState
The CATCommandHeader state.
Legal values:
  • CATFrmAvailable (The default value)
  • CATFrmUnavailable
  • See also:
    , ,
    o CATCreateDE2CommandHeader
    public static CATCreateDE2CommandHeader( const iHeaderID,
    const iResourceFileName,
    iState= CATFrmAvailable)
    Constructs a command header for a DEČ state command.
    Parameters:
    iHeaderID
    The identifier of the header. It is the command argument of the SetAccessCommand macro.
    iResourceFileName
    The name of the resource file.
    iState
    The CATCommandHeader state.
    Legal values:
  • CATFrmAvailable (The default value)
  • CATFrmUnavailable
  • See also:
    , ,
    o CATGetCommandHeader
    public static CATGetCommandHeader( const iHeaderID)
    Gets a pointer to a command header.
    Parameters:
    iHeaderID
    The identifier of the command header.
    Returns:
    Returns the command header if it exists or NULL if the identifier is not an existing command header identifier.

    This object is included in the file: CATAfrCommandHeader.h
    If needed, your Imakefile.mk should include the module: CATAfrFoundation

    Copyright © 1999-2015, Dassault Systèmes. All rights reserved.