首页 / base / oaNameBase

oaNameBase

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

概览

oaNameBaseoapy 中可用,可通过 _base 模块访问。

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

详细说明

The oaNameBase class is an abstract class that includes functions common to Scalar, Vector and VectorBit names。 It contains the actual oaNameMem instances that store the strings that comprise a name。 For a hierarchical name, it will contain an array of oaNameMems。 This class is generally only used directly by code that implements a namespace。

构造函数

_base.oaNameBase()

obj = _base.oaNameBase()

方法总览

状态 Python 调用
obj.isHier()
obj.isEmpty()
obj.getNumMembers()
obj.operator[](i)
obj.addHierPath(path)
obj.addHierPath(path)
obj.addHierMem(nSpace, in, len)
obj.addHierMem(in)

方法说明

obj.isHier()

绑定状态: 已绑定

Python 调用: obj.isHier()

This function returns a boolean value that indicates if this oaNameBase object is hierarchical (has more than one name member)。

Python 示例

from oapy._oa import _base

# assume obj is a oaNameBase
obj.isHier()

obj.isEmpty()

绑定状态: 已绑定

Python 调用: obj.isEmpty()

This function returns a boolean value that indicates if this oaNameBase object is empty。

Python 示例

from oapy._oa import _base

# assume obj is a oaNameBase
obj.isEmpty()

obj.getNumMembers()

绑定状态: 已绑定

Python 调用: obj.getNumMembers()

This function returns the number of members in this oaNameBase object。 A name will have more than one member if it has hierarchical delimiters。

Python 示例

from oapy._oa import _base

# assume obj is a oaNameBase
obj.getNumMembers()

obj.operator[](i)

绑定状态: 已绑定

Python 调用: obj.operator[](i)

Python 示例

from oapy._oa import _base

# assume obj is a oaNameBase
obj.operator[](i)

obj.addHierPath(path)

绑定状态: 已绑定

Python 调用: obj.addHierPath(path)

This function prepends a hierarchical path to this name。 An exception is thrown if this name is empty。

参数

  • path: The path to add。

异常

  • oacInvalidName

Python 示例

from oapy._oa import _base

# assume obj is a oaNameBase
obj.addHierPath(path)

obj.addHierPath(path)

绑定状态: 已绑定

Python 调用: obj.addHierPath(path)

This function prepends a hierarchical path to this name。 An exception is thrown if this name is empty。

参数

  • path: The path to add。

异常

  • oacInvalidName

Python 示例

from oapy._oa import _base

# assume obj is a oaNameBase
obj.addHierPath(path)

obj.addHierMem(nSpace, in, len)

绑定状态: 已绑定

Python 调用: obj.addHierMem(nSpace, in, len)

This function adds a hierarchical member to this name, inserting a copy of in after the existing members that represent a partial hierarchical path, and before the last member, which represents the local name。 An exception is thrown if this name is empty。

参数

  • in: The member to be added。

异常

  • oacInvalidName

Python 示例

from oapy._oa import _base

# assume obj is a oaNameBase
obj.addHierMem(nSpace, in, len)

obj.addHierMem(in)

绑定状态: 已绑定

Python 调用: obj.addHierMem(in)

This function adds the given string as a member of the hierarchical portion of this name。 An exception is thrown if this name is empty。 The in string must not contain any hierarchy delimiters。 Only len characters of in are considered。 An exception is thrown if this name is empty。

参数

  • nSpace: The nameSpace in which to evaluate the given string。
  • in: The input string to add to the hierarchy of this name。
  • len: The length of the specified input string。

异常

  • oacInvalidName

Python 示例

from oapy._oa import _base

# assume obj is a oaNameBase
obj.addHierMem(in)