InterpreterManagerShell Class Reference
[Plug-In Shells]

Interpreter Manager Shell More...

#include <InterpreterManagerShell.h>

Inheritance diagram for InterpreterManagerShell:

Inheritance graph

List of all members.

Public Member Functions

 InterpreterManagerShell ()
virtual ~InterpreterManagerShell ()
virtual bool getInputSpecification (PlugInArgList *&pArgList)
virtual bool getOutputSpecification (PlugInArgList *&pArgList)
virtual bool isInteractiveEnabled () const
virtual std::string getFileExtensions () const

Protected Member Functions

void setFileExtensions (const std::string &extensions)
void setInteractiveEnabled (bool enabled)


Detailed Description

Interpreter Manager Shell

This class represents the shell for an interpreter plug-in. Interpreter developers would take this class and extend it to support their interpreter specific code.

An implementation must provide the following additional methods:

See also:
ExecutableShell, InterpreterManager

Definition at line 39 of file InterpreterManagerShell.h.


Constructor & Destructor Documentation

InterpreterManagerShell::InterpreterManagerShell (  ) 

Creates the interpreter plug-in.

The constructor initializes the plug-in as follows:

virtual InterpreterManagerShell::~InterpreterManagerShell (  )  [virtual]

Destroys the interpreter plug-in.


Member Function Documentation

virtual bool InterpreterManagerShell::getInputSpecification ( PlugInArgList *&  pArgList  )  [virtual]

Retrieves the plug-in input parameters.

This method queries the plug-in for its input parameters that are needed to execute properly. The input arguments may be different in interactive mode and batch mode.

Parameters:
pArgList A plug-in arg list pointer that is set to a created input argument list specifying the plug-in input parameters. NULL is a valid pointer value if the plug-in does not require any input arguments.
Returns:
Returns true if the input parameter argument list was successfully created. If the plug-in does not require input arguments, true is returned, but the given plug-in arg list pointer may be NULL.
See also:
PlugInArgList

Default Implementation:
Initializes the pArgList to NULL, indicating no input arguments.

Implements Executable.

virtual bool InterpreterManagerShell::getOutputSpecification ( PlugInArgList *&  pArgList  )  [virtual]

Retrieves the plug-in output parameters.

This method queries the plug-in for its output parameters that are created during execution. The output arguments may be different in interactive mode and batch mode.

Parameters:
pArgList A plug-in arg list pointer that is set to a created output argument list specifying the plug-in output parameters. NULL is a valid pointer value if the plug-in does not provide any output arguments.
Returns:
Returns true if the output parameter argument list was successfully created. If the plug-in does not provide output arguments, true is returned, but the given plug-in arg list pointer may be NULL.
See also:
PlugInArgList

Default Implementation:
Initializes the pArgList to NULL, indicating no output arguments.

Implements Executable.

virtual bool InterpreterManagerShell::isInteractiveEnabled (  )  const [virtual]

Returns whether the user should be permitted to enter commands into the Scripting Window.

If true is returned, the user will be permitted to enter commands into the Scripting Window. If false, the Scripting Window will be made read-only. The value returned from this function must not change between calls to this function.

The behavior of Interpreter::executeCommand() and Interpreter::executeScopedCommand() must NOT be different based upon the return value of this function.

Returns:
Returns whether the user should be permitted to enter commands into the Scripting Window.

Default Implementation:
Returns the last value passed into setInteractiveEnabled(). If setInteractiveEnabled() has not yet been called, true will be returned.

Implements InterpreterManager.

virtual std::string InterpreterManagerShell::getFileExtensions (  )  const [virtual]

Returns the default scripting file extensions recognized by the interpreter.

Returns:
The file extensions recognized by the interpreter as a string. The string consists of a description followed by one or more file extensions separated by a space. Multiple file types may be specified with a double semicolon. Examples include "ENVI Header Files (*.hdr)", "TIFF Files (*.tif *.tiff)", and "Source Files (*.c*);;Header Files (*.h)".

Default Implementation:
The default implementation returns the extension string that was passed into setFileExtensions(). If setFileExtensions() has not yet been called, an empty string is returned.

Implements InterpreterManager.

void InterpreterManagerShell::setFileExtensions ( const std::string &  extensions  )  [protected]

Sets the default scripting file extensions recognized by the interpreter.

Parameters:
extensions The file extensions recognized by the interpreter. The string should consist of a description followed by one or more extensions separated by a space. Multiple file types may be specified with a double semicolon. Examples include "ENVI Header Files (*.hdr)", "TIFF Files (*.tif *.tiff)", and "Source Files (*.c*);;Header Files (*.h)".

void InterpreterManagerShell::setInteractiveEnabled ( bool  enabled  )  [protected]

Sets the default interactive support for the interpreter.

Parameters:
enabled True will enable interactive support and false will disable interactive support.
See also:
InterpreterManager::isInteractiveEnabled()


Software Development Kit - Opticks 4.9.0 Build 16218