首页 / design / oaScriptEngineLink

oaScriptEngineLink

模块: oapy._oa._design 导入: from oapy._oa import _design

概览

oaScriptEngineLinkoapy 中可用,可通过 _design 模块访问。

本页汇总 oaScriptEngineLink 当前在 oapy 中可用的 Python 接口。

详细说明

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。

方法总览

状态 Python 调用
obj.destroy()
obj.getEngine()
obj.getName()
_design.oaScriptEngineLink.get(seName)
_design.oaScriptEngineLink.create(scriptEngineIn, nameIn)

方法说明

obj.destroy()

绑定状态: 已绑定

Python 调用: obj.destroy()

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

Python 示例

from oapy._oa import _design

# assume obj is a oaScriptEngineLink
obj.destroy()

obj.getEngine()

绑定状态: 已绑定

Python 调用: obj.getEngine()

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。

Python 示例

from oapy._oa import _design

# assume obj is a oaScriptEngineLink
obj.getEngine()

obj.getName()

绑定状态: 已绑定

Python 调用: obj.getName()

This function returns the name of the script engine。

Python 示例

from oapy._oa import _design

# assume obj is a oaScriptEngineLink
obj.getName()

_design.oaScriptEngineLink.get(seName)

绑定状态: 已绑定

Python 调用: _design.oaScriptEngineLink.get(seName)

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。

参数

  • seName: The name of the script engine plug-in。

Python 示例

from oapy._oa import _design

_design.oaScriptEngineLink.get(seName)

_design.oaScriptEngineLink.create(scriptEngineIn, nameIn)

绑定状态: 已绑定

Python 调用: _design.oaScriptEngineLink.create(scriptEngineIn, nameIn)

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

参数

  • scriptEngineIn: The IScriptEngine for this link。
  • nameIn: The name of the script engine。

异常

  • oacScriptEngineLinkExists

Python 示例

from oapy._oa import _design

_design.oaScriptEngineLink.create(scriptEngineIn, nameIn)