首页 / base / oaScalarName

oaScalarName

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

概览

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

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

详细说明

The oaScalarName utility class represents the name of an object that has no associated index。 It is one of the oaName related classes that hold names for objects that can be mapped to various name spaces。 Scalar names can be hierarchical。 In conjunction with oaNameSpace objects, this class facilitates mapping names from one namespace to another。 See the Name Mapping Section in the Programmers Guide for more information about mapping names between different namespaces。 For developers implementing a new namespace, the new namespace must provide support for scalar names。

构造函数

_base.oaScalarName()

obj = _base.oaScalarName()

_base.oaScalarName(nSpace, in)

obj = _base.oaScalarName(nSpace, in)

_base.oaScalarName(in)

obj = _base.oaScalarName(in)

方法总览

状态 Python 调用
obj.init(nSpace, in)
obj.get(nSpace, out)
obj.get(out)
obj.getNumBits()
obj.operator=(name)
obj.append(in)
obj.operator==(name)
obj.operator!=(name)

方法说明

obj.init(nSpace, in)

绑定状态: 已绑定

Python 调用: obj.init(nSpace, in)

This function initializes the oaScalarName object by clearing previously stored name data, then re-initializes its value to the string specified by in, evaluating it in the specified nameSpace。 This allows reuse of the oaName object to improve application performance and capacity。

参数

  • nSpace: The nameSpace in which to evaluate the string。
  • in: The input string to evaluate。

异常

  • oacInvalidNameLength
  • oacInvalidNameSyntax

Python 示例

from oapy._oa import _base

# assume obj is a oaScalarName
obj.init(nSpace, in)

obj.get(nSpace, out)

绑定状态: 已绑定

Python 调用: obj.get(nSpace, out)

This function returns this name mapped into the oaNative nameSpace。

参数

  • out: The string in which to output the mapped name。

Python 示例

from oapy._oa import _base

# assume obj is a oaScalarName
obj.get(nSpace, out)

obj.get(out)

绑定状态: 已绑定

Python 调用: obj.get(out)

This function returns this name mapped into the specified nameSpace。

参数

  • nSpace: The nameSpace in which to map this name。
  • out: The string in which to output the mapped name。

Python 示例

from oapy._oa import _base

# assume obj is a oaScalarName
obj.get(out)

obj.getNumBits()

绑定状态: 已绑定

Python 调用: obj.getNumBits()

This function returns the number of bits this scalar name represents。 It returns 0 if this scalar name is empty, and 1 otherwise。

Python 示例

from oapy._oa import _base

# assume obj is a oaScalarName
obj.getNumBits()

obj.operator=(name)

绑定状态: 已绑定

Python 调用: obj.operator=(name)

Python 示例

from oapy._oa import _base

# assume obj is a oaScalarName
obj.operator=(name)

obj.append(in)

绑定状态: 已绑定

Python 调用: obj.append(in)

This function appends the specified member to this name。

参数

  • in: The member to append。

Python 示例

from oapy._oa import _base

# assume obj is a oaScalarName
obj.append(in)

obj.operator==(name)

绑定状态: 已绑定

Python 调用: obj.operator==(name)

Python 示例

from oapy._oa import _base

# assume obj is a oaScalarName
obj.operator==(name)

obj.operator!=(name)

绑定状态: 已绑定

Python 调用: obj.operator!=(name)

Python 示例

from oapy._oa import _base

# assume obj is a oaScalarName
obj.operator!=(name)