oaCMObjectIDRef
模块: oapy._oa._cms
导入: from oapy._oa import _cms
概览
oaCMObjectIDRef 在 oapy 中可用,可通过 _cms 模块访问。
本页汇总 oaCMObjectIDRef 当前在 oapy 中可用的 Python 接口。
详细说明
The oaCMObjectRef and its derived classes add lifecycle management to schema representation (sr) object references, and are used in the OpenAccess Change Management System (CMS) 。 An oaCMObjectIDRef is an object reference in which the object can be identified by a single string。 oaCMObjectIDRefs are managed by oaChangeSets。 When an oaCMObjectIDRef is created, it is immediately externalized。 A string representation of its identifying state is stored with it。 If the live object is destroyed, the oaCMObjectIDRef corresponding to the destroyed object is passivated by setting a boolean flag to indicate that the object pointer is invalid。 If an undo operation recreates the live object that was destroyed, the oaCMObjectIDRef can be activated by resetting the boolean flag。 The oaCMObjectIDRef class supports a visitor design pattern interface, which uses a dual dispatch technique。 The oaCMObjectIDRef class has an accept method, which provides access to a visitor。 The visitor can then execute its behavior for that element。
构造函数
_cms.oaCMObjectIDRef(def, object, tbl, timeStamp, isNew=false, scope=NULL)
obj = _cms.oaCMObjectIDRef(def, object, tbl, timeStamp, isNew=false, scope=NULL)
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.accept(visitor) |
| ✅ | obj.passivate() |
| ✅ | obj.activate() |
| ✅ | obj.getDatabase() |
| ✅ | obj.getScope() |
| ✅ | obj.getName() |
| ✅ | obj.setName(name) |
方法说明
obj.accept(visitor)
绑定状态: 已绑定
Python 调用: obj.accept(visitor)
This function accepts an srVisitorMgr visitor。 It calls the visit function of the specified visitor on this object。
参数
visitor: The visitor to call on this object。
Python 示例
from oapy._oa import _cms
# assume obj is a oaCMObjectIDRef
obj.accept(visitor)
obj.passivate()
绑定状态: 已绑定
Python 调用: obj.passivate()
This function passivates (marks as invalid) this oaCMObjectIDRef。 从 oaCMObjectRef 重新实现。
Python 示例
from oapy._oa import _cms
# assume obj is a oaCMObjectIDRef
obj.passivate()
obj.activate()
绑定状态: 已绑定
Python 调用: obj.activate()
This function activates (marks as valid) this oaCMObjectIDRef。 从 oaCMObjectRef 重新实现。
Python 示例
from oapy._oa import _cms
# assume obj is a oaCMObjectIDRef
obj.activate()
obj.getDatabase()
绑定状态: 已绑定
Python 调用: obj.getDatabase()
This function returns a smart pointer to the database for this oaCMObjectIDRef。 实现 oaCMObjectRef。
Python 示例
from oapy._oa import _cms
# assume obj is a oaCMObjectIDRef
obj.getDatabase()
obj.getScope()
绑定状态: 已绑定
Python 调用: obj.getScope()
This function returns the scope for this oaCMObjectIDRef。 The default is the block domain。
Python 示例
from oapy._oa import _cms
# assume obj is a oaCMObjectIDRef
obj.getScope()
obj.getName()
绑定状态: 已绑定
Python 调用: obj.getName()
This function returns a smart pointer to the oaCMStringTblEntry for this oaCMObjectIDRef。
Python 示例
from oapy._oa import _cms
# assume obj is a oaCMObjectIDRef
obj.getName()
obj.setName(name)
绑定状态: 已绑定
Python 调用: obj.setName(name)
This function sets the name to the given string entry。 It increments the reference count of that string entry。
参数
name: The string entry to set on this oaCMObjectIDRef。
Python 示例
from oapy._oa import _cms
# assume obj is a oaCMObjectIDRef
obj.setName(name)