oaScriptEngineLink Class Reference


Public Methods

void destroy ()
IScriptEngine * getEngine () const
const oaStringgetName () const

Static Public Methods

oaScriptEngineLink * get (const oaString &seName)
oaScriptEngineLink * create (IScriptEngine *scriptEngineIn, const oaString &nameIn)

Detailed Description

This class is used as an container class for IScriptEngine. IScriptEngine is the interface for a script engine. An IScriptEngine can be created in memory by the application or through a script engine plug-in. When the script engine is provided in memory, the application needs to create the script engine link using oaScriptEngineLink::create() to register with OpenAccess.


Member Function Documentation

static oaScriptEngineLink * oaScriptEngineLink::create IScriptEngine *    scriptEngineIn,
const oaString &    nameIn
[static]
 

This function creates the oaScriptEngineLink object in OpenAccess with the specified name.

Parameters:
scriptEngineIn The IScriptEngine for this link
nameIn The name of the script engine
Exceptions:
oacScriptEngineLinkExists 

void oaScriptEngineLink::destroy  
 

This function destroys the oaScriptEngineLink object and removes the link between OpenAccess and the application IScriptEngine.

static oaScriptEngineLink * oaScriptEngineLink::get const oaString &    seName [static]
 

This function returns the link associated with the specified script engine. If an existing link is not found, a link is created by trying to load the scriptEngine plug-in that has the same name. If the script engine plug-in cannot be successfully loaded, a link is created with the engine equal to NULL. This is done to avoid repeat attempts to load the plug-in when a script engine is accessed frequently. An application can try to reload a script engine by destroying the link before calling this function.

Parameters:
seName The name of the script engine plug-in

IScriptEngine * oaScriptEngineLink::getEngine   const [inline]
 

This function returns the IScriptEngine associated with this link. The return value can be NULL if the script engine plug-in is not successfully loaded.

const oaString & oaScriptEngineLink::getName   const [inline]
 

This function returns the name of the script engine.


The documentation for this class was generated from the following files:

Return to top of page