oaBaseObserver
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaBaseObserver 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaBaseObserver 当前在 oapy 中可用的 Python 接口。
详细说明
The oaBaseObserver <> class is a base class for oaObservers。 It supports functions that set and get the enabled status of an observer object。 See oaObserver for information on using OpenAccess observer classes to derive and instantiate observers in an application。
构造函数
_base.oaBaseObserver(priorityIn, enabledIn=true)
obj = _base.oaBaseObserver(priorityIn, enabledIn=true)
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.isEnabled() |
| ✅ | obj.enable(enabledIn) |
方法说明
obj.isEnabled()
绑定状态: 已绑定
Python 调用: obj.isEnabled()
This function returns true if this observer is enabled; otherwise, it returns false。
Python 示例
from oapy._oa import _base
# assume obj is a oaBaseObserver
obj.isEnabled()
obj.enable(enabledIn)
绑定状态: 已绑定
Python 调用: obj.enable(enabledIn)
This function sets the enabled status of this observer according to the enabledIn parameter passed to the function。
参数
enabledIn: specify true to set enable this observer; false to disable this observer。
Python 示例
from oapy._oa import _base
# assume obj is a oaBaseObserver
obj.enable(enabledIn)