首页 / base / oaNameMem

oaNameMem

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

概览

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

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

详细说明

The oaNameMem class is an internal part of the structure of any oaName 。 It is used by code that implements namespaces。 Each oaNameMem holds a single hierarchical part of a name。 So a hierarchical name that would look like mod4.abuf[4] in the Verilog namespace would be stored in two oaNameMems。 This class exposes the internal storage of names as a string in the Native namespace。 Each nameMem may be set as case-insensitive or case-sensitive。 Regular application code should not directly reference oaNameMems。 Instances of oaNameMem are referenced by various oaName classes。 If a name is hierarchical, its oaName will reference an array of oaNameMems。 See oaNameBase for information on accessing these NameMems。

构造函数

_base.oaNameMem()

obj = _base.oaNameMem()

_base.oaNameMem(in, caseSensitive)

obj = _base.oaNameMem(in, caseSensitive)

_base.oaNameMem(in, caseSensitive)

obj = _base.oaNameMem(in, caseSensitive)

_base.oaNameMem(name)

obj = _base.oaNameMem(name)

方法总览

状态 Python 调用
obj.isCaseSensitive()
obj.hasIndex()
obj.getIndex()
obj.getValue()
obj.getBaseName(out)
obj.operator=(value)

方法说明

obj.isCaseSensitive()

绑定状态: 已绑定

Python 调用: obj.isCaseSensitive()

This function returns a boolean value that indicates if this name member was case sensitive in its original nameSpace。

Python 示例

from oapy._oa import _base

# assume obj is a oaNameMem
obj.isCaseSensitive()

obj.hasIndex()

绑定状态: 已绑定

Python 调用: obj.hasIndex()

This function returns a boolean value that indicates if this object has an associated index。

Python 示例

from oapy._oa import _base

# assume obj is a oaNameMem
obj.hasIndex()

obj.getIndex()

绑定状态: 已绑定

Python 调用: obj.getIndex()

This function returns an integer indicating the index value of this name member。 For example, an oaNameMem with the string value test[4] returns the value 4 。

返回

  • The integer value of the index of this name member。

异常

  • oacNameNotIndexed

Python 示例

from oapy._oa import _base

# assume obj is a oaNameMem
obj.getIndex()

obj.getValue()

绑定状态: 已绑定

Python 调用: obj.getValue()

This function returns the string value of the oaNameMem object in the oaNative nameSpace。 If the name member has an index, the index is included in the string returned。

返回

  • The string value of this name member in the oaNative nameSpace。

Python 示例

from oapy._oa import _base

# assume obj is a oaNameMem
obj.getValue()

obj.getBaseName(out)

绑定状态: 已绑定

Python 调用: obj.getBaseName(out)

This function returns the string portion of this object without its index portion, mapped to the oaNative nameSpace。 For example, an oaNameMem with the string value test[4] returns test 。

参数

  • out: The string value of this name member without its index。

Python 示例

from oapy._oa import _base

# assume obj is a oaNameMem
obj.getBaseName(out)

obj.operator=(value)

绑定状态: 已绑定

Python 调用: obj.operator=(value)

Python 示例

from oapy._oa import _base

# assume obj is a oaNameMem
obj.operator=(value)