首页 / dm / oaDMObject

oaDMObject

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

概览

oaDMObjectoapy 中可用,可通过 _dm 模块访问。

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

详细说明

The oaDMObject class is an abstract base for all OpenAccess DM objects。 Child classes are the oaDMContainer classes -- oaCell , oaView , oaCellView and oaLib -- and oaDMFile 。 Note: The oaDMObject function descriptions indicate if access to the library associated with the object is required for the called function。 If the access type must be write access, this requirement also is noted。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

方法总览

状态 Python 调用
obj.isContainer()
obj.getLib()
obj.getTempFile(path, sameFileSystem=false)
obj.getVCStatus(mask=oacVCStatusAll)
obj.getVersions()
obj.update(version, recurse=true, options=NULL)
obj.makeEditable(lock, recurse=true, options=NULL)
obj.cancelEdit(recurse=true, options=NULL)
obj.commitEdits(comment, recurse=true, keepEditable=false, options=NULL)
obj.setControlled(recurse=true, options=NULL)
obj.unsetControlled(recurse=true, keepLocalRep=true, options=NULL)

方法说明

obj.isContainer()

绑定状态: 已绑定

Python 调用: obj.isContainer()

This function returns true if this object is an oaDMContainer object implying that it is either an oaLib , oaCell , oaView or an oaCellView object。

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.isContainer()

obj.getLib()

绑定状态: 已绑定

Python 调用: obj.getLib()

This function returns a pointer to the library database associated with this object。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

异常

  • oacInvalidContainer
  • oacLibAccessDenied

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.getLib()

obj.getTempFile(path, sameFileSystem=false)

绑定状态: 已绑定

Python 调用: obj.getTempFile(path, sameFileSystem=false)

This function returns a path to a new, unique, temporary file which is associated with this object。 Temporary files are not DM objects, and the management of such files is left up to the application。 Temporary files are expected to be process-specific。 The user may specify the directory to create the temporary file in by using the writePath argument in oaLib::open() 。 If the library being used has been created in the process with oaLib::create() , then the library directory is assumed to be writeable and is used for temporary file creation。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

参数

  • path: returned unique path to the temp file associated with this object。
  • sameFileSystem: A boolean flag indicating whether the temp file should be created on the same file system as the one that the library is on。

异常

  • oacLibAccessDenied

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.getTempFile(path, sameFileSystem=false)

obj.getVCStatus(mask=oacVCStatusAll)

绑定状态: 已绑定

Python 调用: obj.getVCStatus(mask=oacVCStatusAll)

This function is only active when a Version Control system is in place for the library this object is in。 It gets the version control status of the object。 This status only relates to the given object and is not hierarchical。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

参数

  • mask: this parameter is used to limit the status bits being retrieved。 Some types of status are more expensive to discover than others; use this mask to optimize performance。

异常

  • oacLibAccessDenied

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.getVCStatus(mask=oacVCStatusAll)

obj.getVersions()

绑定状态: 已绑定

Python 调用: obj.getVersions()

This function gets the versions that exist for this object in the form of an oaVCVersionIter 。 This information is for this object only and is not recursive。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

异常

  • oacLibAccessDenied

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.getVersions()

obj.update(version, recurse=true, options=NULL)

绑定状态: 已绑定

Python 调用: obj.update(version, recurse=true, options=NULL)

This function is only active when a Version Control system is in place for the library this object is in。 It will retrieve the given version of the object from the repository。 If the object is current, it will be left unchanged; if it didn't previously exist in the local directory, it will be retrieved。 This function requires write access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if write access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

参数

  • version: the version of the object to retrieve from version control。 Use an oaVCVersion created with the default constructor to denote the most recent version in the repository。
  • recurse: signals to the version control system to apply this operation to all children of this object。
  • options: a string that represents options that are specific to the version control system that's install for this library。

异常

  • oacLibAccessDenied

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.update(version, recurse=true, options=NULL)

obj.makeEditable(lock, recurse=true, options=NULL)

绑定状态: 已绑定

Python 调用: obj.makeEditable(lock, recurse=true, options=NULL)

This function is only active when a Version Control system is in place for the library this object is in。 It will set the version control access mode of the object (and it's children if "recurse" is "true") to be editable。 On some version control systems this could result in a check-out of the underlying file(s)。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

参数

  • lock: if this parameter is true, the file(s) will be locked after this call returns。
  • recurse: signals to the version control system to apply this operation to all children of this object。
  • options: a string that represents options that are specific to the version control system that's install for this library。

异常

  • oacLibAccessDenied

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.makeEditable(lock, recurse=true, options=NULL)

obj.cancelEdit(recurse=true, options=NULL)

绑定状态: 已绑定

Python 调用: obj.cancelEdit(recurse=true, options=NULL)

This function is only active when a Version Control system is in place for the library this object is in。 It will cancel the editable state of the object (and it's children if "recurse" is set to "true")。 Note that in most VC systems this operation will cause the underlying file(s) to revert to what's currently in the repository。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

参数

  • recurse: signals to the version control system to apply this operation to all children of this object。
  • options: a string that represents options that are specific to the version control system that's install for this library。

异常

  • oacLibAccessDenied

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.cancelEdit(recurse=true, options=NULL)

obj.commitEdits(comment, recurse=true, keepEditable=false, options=NULL)

绑定状态: 已绑定

Python 调用: obj.commitEdits(comment, recurse=true, keepEditable=false, options=NULL)

This function is only active when a Version Control system is in place for the library this object is in。 It will commit the current set of edits to this object to the version control system's repository。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

参数

  • comment: the comment that will be stored with the new version of this object in the repository。
  • recurse: signals to the version control system to apply this operation to all children of this object。
  • keepEditable: setting this to true is equivalent to calling "makeEditable" immediately after this function。
  • options: a string that represents options that are specific to the version control system that's install for this library。

异常

  • oacLibAccessDenied

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.commitEdits(comment, recurse=true, keepEditable=false, options=NULL)

obj.setControlled(recurse=true, options=NULL)

绑定状态: 已绑定

Python 调用: obj.setControlled(recurse=true, options=NULL)

This function is only active when a Version Control system is in place for the library this object is in。 It adds the object to the version control system's repository。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

参数

  • recurse: signals to the version control system to apply this operation to all children of this object。
  • options: a string that represents options that are specific to the version control system that's install for this library。

异常

  • oacLibAccessDenied

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.setControlled(recurse=true, options=NULL)

obj.unsetControlled(recurse=true, keepLocalRep=true, options=NULL)

绑定状态: 已绑定

Python 调用: obj.unsetControlled(recurse=true, keepLocalRep=true, options=NULL)

This function is only active when a Version Control system is in place for the library this object is in。 It will remove the object from the version control systems repository。 if keepLocalRep is "false" the local file will also be removed。 This function requires access to the library associated with this object (through a call to oaLib::getAccess )。 An oacLibAccessDenied exception is thrown if access to the library does not exist。 For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide。

参数

  • recurse: signals to the version control system to apply this operation to all children of this object。
  • keepLocalRep: set to true to prevent the local file from being removed from disk after it is removed from the version control repository。
  • options: a string that represents options that are specific to the version control system that's install for this library。

异常

  • oacLibAccessDenied

Python 示例

from oapy._oa import _dm

# assume obj is a oaDMObject
obj.unsetControlled(recurse=true, keepLocalRep=true, options=NULL)