首页 / cms / oaCMObjectStateRef

oaCMObjectStateRef

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

概览

oaCMObjectStateRefoapy 中可用,可通过 _cms 模块访问。

本页汇总 oaCMObjectStateRef 当前在 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 oaCMObjectStateRef is an object reference in which the object can be identified by its state (a collection of its attributes and relationships)。 oaCMObjectStateRefs are managed by oaChangeSets。 When an oaCMObjectStateRef is created, it is immediately externalized。 A string representation of its identifying state is stored with it。 If the live object is destroyed, the oaCMObjectStateRef 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 oaCMObjectStateRef can be activated by resetting the boolean flag。 The oaCMObjectStateRef class supports a visitor design pattern interface, which uses a dual dispatch technique。 The oaCMObjectStateRef class has an accept method, which provides access to a visitor。 The visitor can then execute its behavior for that element。

构造函数

_cms.oaCMObjectStateRef(def, object, tbl, timeStamp, isNew=false, scope=NULL)

obj = _cms.oaCMObjectStateRef(def, object, tbl, timeStamp, isNew=false, scope=NULL)

方法总览

状态 Python 调用
obj.accept(visitor)
obj.passivate()
obj.activate()
obj.getDatabase()
obj.getScope()
obj.getState()
obj.setState(state)

方法说明

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 oaCMObjectStateRef
obj.accept(visitor)

obj.passivate()

绑定状态: 已绑定

Python 调用: obj.passivate()

This function passivates (marks as invalid) this oaCMObjectStateRef。 从 oaCMObjectRef 重新实现。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMObjectStateRef
obj.passivate()

obj.activate()

绑定状态: 已绑定

Python 调用: obj.activate()

This function activates (marks as valid) this oaCMObjectStateRef。 从 oaCMObjectRef 重新实现。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMObjectStateRef
obj.activate()

obj.getDatabase()

绑定状态: 已绑定

Python 调用: obj.getDatabase()

This function returns a smart pointer to the oaCMDatabaseRef for this oaCMObjectStateRef。 实现 oaCMObjectRef。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMObjectStateRef
obj.getDatabase()

obj.getScope()

绑定状态: 已绑定

Python 调用: obj.getScope()

This function returns the scope for the oaCMObjectStateRef。 The default is the block domain。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMObjectStateRef
obj.getScope()

obj.getState()

绑定状态: 已绑定

Python 调用: obj.getState()

此函数返回此 oaCMObjectStateRef 的 oaCMObjectStateTbl 条目。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMObjectStateRef
obj.getState()

obj.setState(state)

绑定状态: 已绑定

Python 调用: obj.setState(state)

This function sets this oaCMObjectStateRef to the specified state。 It also increments the reference count on the oaCMObjectStateRef。

参数

  • state: A pointer to the oaCMObjectStateEntry to set on this oaCMObjectStateRef。

Python 示例

from oapy._oa import _cms

# assume obj is a oaCMObjectStateRef
obj.setState(state)