#include <ExecutableShell.h>

Public Member Functions | |
| ExecutableShell () | |
| virtual | ~ExecutableShell () |
| bool | isExecutedOnStartup () const |
| bool | isDestroyedAfterExecute () const |
| const std::vector< std::string > & | getMenuLocations () const |
| bool | setBatch () |
| bool | setInteractive () |
| bool | initialize () |
| bool | abort () |
| bool | hasAbort () |
| bool | isBackground () const |
| bool | isBatch () const |
| bool | isAborted () const |
| bool | hasWizardSupport () const |
Protected Member Functions | |
| void | executeOnStartup (bool bExecute) |
| void | destroyAfterExecute (bool bDestroy) |
| void | setMenuLocation (const std::string &menuLocation) |
| void | addMenuLocation (const std::string &menuLocation) |
| void | setAbortSupported (bool bSupported) |
| void | setBackground (bool bBackground) |
| void | setWizardSupported (bool bSupported) |
Protected Attributes | |
| bool | mAborted |
This class provides a default implementation of the Executable plug-in interfaces and serves as an optional base class for specialized plug-in shell classes and/or custom plug-ins.
Tutorial/Tutorial1.h, Tutorial/Tutorial2.h, Tutorial/Tutorial3.h, Tutorial/Tutorial4.h, and Tutorial/Tutorial5.h.
Definition at line 32 of file ExecutableShell.h.
| ExecutableShell::ExecutableShell | ( | ) |
Creates the plug-in.
The constructor initializes the plug-in as follows:
| virtual ExecutableShell::~ExecutableShell | ( | ) | [virtual] |
Destroys the plug-in.
| bool ExecutableShell::isExecutedOnStartup | ( | ) | const [virtual] |
Queries whether the plug-in is automatically executed when the application starts.
Implements Executable.
| bool ExecutableShell::isDestroyedAfterExecute | ( | ) | const [virtual] |
Queries whether the plug-in is automatically destroyed after it is successfully executed.
Plug-ins which are not successfully executed are automatically destroyed by the application.
After a plug-in is successfully executed, it can be destroyed by the application or stay resident in memory. A plug-in may need to exist after execution, such as those containing modeless GUI components that require user interaction or continually display data.
Implements Executable.
| const std::vector<std::string>& ExecutableShell::getMenuLocations | ( | ) | const [virtual] |
Returns the menu locations and names of the commands from which the plug-in is executed.
Implements Executable.
| bool ExecutableShell::setBatch | ( | ) | [virtual] |
Sets the plug-in to execute in batch mode.
This method is used to set the plug-in to execute in a non-GUI mode.
Implements Executable.
Reimplemented in DockWindowShell, and AlgorithmPlugIn.
| bool ExecutableShell::setInteractive | ( | ) | [virtual] |
Sets the plug-in to execute in interactive mode.
This method is used to set the plug-in to execute in a GUI mode.
Implements Executable.
Reimplemented in AlgorithmPlugIn.
| bool ExecutableShell::initialize | ( | ) | [virtual] |
Initializes the plug-in before execution.
This method is used by the plug-in manager to initialize the plug-in before it is executed.
Implements Executable.
| bool ExecutableShell::abort | ( | ) | [virtual] |
Aborts the plug-in during execution.
This method may be called by the application to attempt to gracefully abort a plug-in. Depending on the specific plug-in implementation of this method, it may simply initiate the abort process and return or it may attempt to complete the abort process before returning.
Implements Executable.
Reimplemented in ViewerShell, and AlgorithmPlugIn.
| bool ExecutableShell::hasAbort | ( | ) | [virtual] |
Queries whether the plug-in can be aborted.
This method may be called to determine if the plug-in can be aborted. This can be useful in GUI applications where the user may not be given the chance to cancel.
Implements Executable.
| bool ExecutableShell::isBackground | ( | ) | const [virtual] |
Queries whether the plug-in performs background processing.
This method is called by the application after executing the plug-in to determine if the plug-in should be unloaded or should wait until processing is finished. This method is called before isDestroyedAfterExecute() is called, so a return value of false does not necessarily mean that the plug-in will be destroyed.
Implements Executable.
| bool ExecutableShell::isBatch | ( | ) | const |
Queries whether the plug-in is set to execute in batch mode.
| bool ExecutableShell::isAborted | ( | ) | const |
Queries whether the plug-in is in an aborting state.
| bool ExecutableShell::hasWizardSupport | ( | ) | const [virtual] |
Queries whether the plug-in supports being added as a wizard item.
Implements Executable.
| void ExecutableShell::executeOnStartup | ( | bool | bExecute | ) | [protected] |
Sets whether the plug-in is automatically executed when the application starts.
| bExecute | Set this value to true if the plug-in should be automatically executed, otherwise false. |
| void ExecutableShell::destroyAfterExecute | ( | bool | bDestroy | ) | [protected] |
Sets whether the plug-in is automatically destroyed after it is successfully executed.
Plug-ins which are not successfully executed are automatically destroyed by the application.
After a plug-in is successfully executed, it can be destroyed by the application or stay resident in memory. A plug-in may need to exist after execution, such as those containing modeless GUI components that require user interaction or continually display data.
| bDestroy | Set this value to true if the plug-in should be automatically destroyed after it is successfully executed, otherwise false. |
| void ExecutableShell::setMenuLocation | ( | const std::string & | menuLocation | ) | [protected] |
Sets a single menu location and command name from which the plug-in is executed.
This method sets the location and name of a single menu command that is used to execute the plug-in. Any existing menu command locations are removed to set the given location. Additional menu commands can be specified to execute this plug-in by calling the addMenuLocation() method instead.
| menuLocation | The menu location and name of the menu commmand used to execute the plug-in. The string should be formatted with brackets ([,]) to specify a toolbar and a slash (/) to indicate submenus. The toolbar name appears first in the string, followed by an optional slash, and then the menus, submenus and command name separated by slashes. If the optional slash appears following the toolbar name, this indicates that the submenus and command should be added to the default toolbar menu, which has the same name as the toolbar. If a slash does not follow the toolbar name, the menus and command are added directly to the toolbar. If the string does not include a toolbar name, the menus and command are added to the main menu bar. The string cannot end with a slash, and the name after the last slash indicates the command name. An empty string indicates that the plug-in does not have a menu location, and that it should not be executed from the menus. Examples of the menu string include the following:
|
| void ExecutableShell::addMenuLocation | ( | const std::string & | menuLocation | ) | [protected] |
Adds a menu location and command name from which the plug-in is executed.
This method adds an additional menu command that is used to execute the plug-in. Derived plug-ins that call this method should specify the following input arg in getInputSpecification():
When the execute() method is called, this plug-in arg in the input arg list should be populated with the command name that was used to execute the plug-in.
| menuLocation | The menu location and name of the menu commmand used to execute the plug-in. The string should be formatted with brackets ([,]) to specify a toolbar and a slash (/) to indicate submenus. The toolbar name appears first in the string, followed by an optional slash, and then the menus, submenus and command name separated by slashes. If the optional slash appears following the toolbar name, this indicates that the submenus and command should be added to the default toolbar menu, which has the same name as the toolbar. If a slash does not follow the toolbar name, the menus and command are added directly to the toolbar. If the string does not include a toolbar name, the menus and command are added to the main menu bar. The string cannot end with a slash, and the name after the last slash indicates the command name. An empty string indicates that the plug-in does not have a menu location, and that it should not be executed from the menus. Examples of the menu string include the following:
|
| void ExecutableShell::setAbortSupported | ( | bool | bSupported | ) | [protected] |
Sets whether the plug-in supports aborting.
| bSupported | If this value is true, aborting is enabled and the default implementation of hasAbort() will return true. If this value is false, aborting is disabled and the default implementation of hasAbort() will return false. |
| void ExecutableShell::setBackground | ( | bool | bBackground | ) | [protected] |
Sets whether the plug-in performs background processing.
| bBackground | If this value is true, the plug-in is set to perform background processing. Destruction and possible unloading of the plug-in will be delayed until the plug-in indicates that background processing has ended. |
| void ExecutableShell::setWizardSupported | ( | bool | bSupported | ) | [protected] |
Sets whether the plug-in supports being added to a wizard.
| bSupported | If this value is true, then a user will be able to add this plug-in to a wizard in the wizard builder. If this value is false, then a user will not be able to add this plug-in to a wizard in the wizard builder. |
bool ExecutableShell::mAborted [mutable, protected] |
Set to true if the plug-in has been aborted.
Subclasses should typically use isAborted(). This is only made available for the case where a pointer or reference to an abort flag is passed into other code.
Definition at line 294 of file ExecutableShell.h.