oaName
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaName 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaName 当前在 oapy 中可用的 Python 接口。
详细说明
Named objects that commonly appear in netlists and other file formats are represented by oaNames in the OpenAccess API。 oaNames provide a form of a name that is free from any assumptions about which specific name syntax and rules the name is following。 Such rules are incorporated into the oaNameSpace classes that are used whenever a name is transferred out of or into a string。 There are several oaName classes: oaName, oaScalarName , oaVectorName , oaVectorBitName , oaSimpleName , and oaBundleName 。 The specialized forms are present to help the name handling functions in OpenAccess be as efficient as possible and to make some functions in the API more type specific。 The oaName class itself can hold any type of name from any of its specializations。 The specialized name classes differ in the forms of indexing and grouping of names that they allow。 All of the oaName classes are capable of representing hierarchical names。 oaNames work in conjunction with the oaNameSpace classes to enable the mapping of names from one nameSpace to another。 See the Name Mapping section of the Programmer's Guide for more information about mapping names between different namespaces。 Names are somewhat complex objects in order to allow flexible name mapping between different name spaces。 They should be used carefully in order to avoid performance issues。 In general, when using the oaName classes, it is best to choose the object type with closest match to the name。 For example, if an application only uses scalar names, using the oaScalarName object is the most efficient even though using oaName would work also。 In addition, name objects should be re-used whenever possible, in order to improve application capacity and performance。 oaName member functions such as init() are provided for this purpose。 When using the more general forms of the name classes (oaName and oaSimpleName ), one technique for getting the best performance is to use the getScalar() , getVector() , getVectorBit() , or getBundle() functions。 These functions return a pointer to the specific name object that the oaName or oaSimpleName represents。 Applications can then pass this pointer to functions where a specific name type is required。 It is the application's responsibility to call getType() to determine what type of name object the oaName or oaSimpleName represents before calling the corresponding get[NameType] function。 Note that the object returned by these get functions is managed by the oaName or oaSimpleName class and should not be destroyed on its own。
构造函数
_base.oaName()
obj = _base.oaName()
_base.oaName(nSpace, in)
obj = _base.oaName(nSpace, in)
_base.oaName(name)
obj = _base.oaName(name)
_base.oaName(name)
obj = _base.oaName(name)
_base.oaName(name)
obj = _base.oaName(name)
_base.oaName(name)
obj = _base.oaName(name)
_base.oaName(name)
obj = _base.oaName(name)
_base.oaName(name)
obj = _base.oaName(name)
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.init(nSpace, in) |
| ✅ | obj.get(nSpace, out) |
| ✅ | obj.get(out) |
| ✅ | obj.getBitName(nSpace, bit, out) |
| ✅ | obj.getType() |
| ✅ | obj.getNumBits() |
| ✅ | obj.getScalar() |
| ✅ | obj.getVector() |
| ✅ | obj.getVectorBit() |
| ✅ | obj.getBundle() |
| ✅ | obj.addHierPath(path) |
| ✅ | obj.addHierPath(path) |
| ✅ | obj.addHierMem(nSpace, in, len) |
| ✅ | obj.addHierMem(in) |
| ✅ | obj.operator=(name) |
| ✅ | obj.operator=(name) |
| ✅ | obj.operator=(name) |
| ✅ | obj.operator=(name) |
| ✅ | obj.operator=(name) |
| ✅ | obj.operator=(name) |
| ✅ | obj.operator==(name) |
| ✅ | obj.operator==(name) |
| ✅ | obj.operator==(name) |
| ✅ | obj.operator==(name) |
| ✅ | obj.operator==(name) |
| ✅ | obj.operator==(name) |
| ✅ | obj.operator!=(name) |
| ✅ | obj.operator!=(name) |
| ✅ | obj.operator!=(name) |
| ✅ | obj.operator!=(name) |
| ✅ | obj.operator!=(name) |
| ✅ | obj.operator!=(name) |
方法说明
obj.init(nSpace, in)
绑定状态: 已绑定
Python 调用: obj.init(nSpace, in)
This function initializes this oaName object by deleting the previous name data, and then re-initializes its value to the string specified by in, evaluated in the specified nameSpace。 This allows reuse of the oaName object to improve application performance and capacity。
参数
in: The input string to evaluate。nSpace: The nameSpace in which to evaluate the string。
异常
oacInvalidNameLength。oacInvalidNameSyntax。
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.init(nSpace, in)
obj.get(nSpace, out)
绑定状态: 已绑定
Python 调用: obj.get(nSpace, out)
This function fills the string out with the oaName, mapped into the oaNative nameSpace。
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.get(nSpace, out)
obj.get(out)
绑定状态: 已绑定
Python 调用: obj.get(out)
This function fills in out with the oaName, mapped into the specified oaNameSpace 。 An exception is thrown if the specified nameSpace does not support the type of thus oaName。 For information on the names supported in each nameSpace, see Details of OpenAccess Name Spaces 。
参数
nSpace: The nameSpace in which to map this name。out: The string in which to output the mapped name。
异常
oacVectorNameInvalid。oacBundleNameInvalid。oacHierNameInvalid。oacIndexedNameInvalid。
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.get(out)
obj.getBitName(nSpace, bit, out)
绑定状态: 已绑定
Python 调用: obj.getBitName(nSpace, bit, out)
This function fills the string out with the bit name of this vector name, mapped into the specified oaNameSpace 。
异常
oacBitNotInRangeForName。
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.getBitName(nSpace, bit, out)
obj.getType()
绑定状态: 已绑定
Python 调用: obj.getType()
This function returns the type of name that this name contains。
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.getType()
obj.getNumBits()
绑定状态: 已绑定
Python 调用: obj.getNumBits()
This function returns the number of bits this name represents。
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.getNumBits()
obj.getScalar()
绑定状态: 已绑定
Python 调用: obj.getScalar()
This function returns a pointer to the scalar name data if this name represents an oaScalarName 。 If this name does not contain a scalar name, NULL is returned。 The scalar name data returned belongs to the oaName object and should not be destroyed on its own by the application code。
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.getScalar()
obj.getVector()
绑定状态: 已绑定
Python 调用: obj.getVector()
This function returns a pointer to the vector name data if this name represents an oaVectorName 。 If this name does not contain a vector name, NULL is returned。
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.getVector()
obj.getVectorBit()
绑定状态: 已绑定
Python 调用: obj.getVectorBit()
This function returns a pointer to the vector bit name data if this name represents an oaVectorBitName 。 If this name does contain a vector bit name, NULL is returned。
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.getVectorBit()
obj.getBundle()
绑定状态: 已绑定
Python 调用: obj.getBundle()
This function returns a pointer to the bundle name data if this name represents an oaBundleName 。 If this name does not contain a bundle name, NULL is returned。
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.getBundle()
obj.addHierPath(path)
绑定状态: 已绑定
Python 调用: obj.addHierPath(path)
This function prepends a hierarchical path to this name。 If this name is a bundle name, the hierarchical path is added to each of the members of the bundle。 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 oaName
obj.addHierPath(path)
obj.addHierPath(path)
绑定状态: 已绑定
Python 调用: obj.addHierPath(path)
This function prepends a hierarchical path to this name。 If this name is a bundle name, the hierarchical path is added to each of the members of the bundle。 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 oaName
obj.addHierPath(path)
obj.addHierMem(nSpace, in, len)
绑定状态: 已绑定
Python 调用: obj.addHierMem(nSpace, in, len)
This function adds a hierarchical nameMem to each of the bundle members of this name。 For each bundle member, this function inserts a copy of in after the existing nameMems that represent the hierarchical path for the bundle member, and before the last nameMem, 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 oaName
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。 If this name is a bundle name, this function adds the given string as a nameMem to the hierarchical portion of the name for each of the members of this bundle name。 For each bundle member, the nameMem is inserted after the existing hierarchical nameMems and before the last nameMem, which represents the local name of the bundle member。 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 oaName
obj.addHierMem(in)
obj.operator=(name)
绑定状态: 已绑定
Python 调用: obj.operator=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator=(name)
obj.operator=(name)
绑定状态: 已绑定
Python 调用: obj.operator=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator=(name)
obj.operator=(name)
绑定状态: 已绑定
Python 调用: obj.operator=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator=(name)
obj.operator=(name)
绑定状态: 已绑定
Python 调用: obj.operator=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator=(name)
obj.operator=(name)
绑定状态: 已绑定
Python 调用: obj.operator=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator=(name)
obj.operator=(name)
绑定状态: 已绑定
Python 调用: obj.operator=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator=(name)
obj.operator==(name)
绑定状态: 已绑定
Python 调用: obj.operator==(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator==(name)
obj.operator==(name)
绑定状态: 已绑定
Python 调用: obj.operator==(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator==(name)
obj.operator==(name)
绑定状态: 已绑定
Python 调用: obj.operator==(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator==(name)
obj.operator==(name)
绑定状态: 已绑定
Python 调用: obj.operator==(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator==(name)
obj.operator==(name)
绑定状态: 已绑定
Python 调用: obj.operator==(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator==(name)
obj.operator==(name)
绑定状态: 已绑定
Python 调用: obj.operator==(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator==(name)
obj.operator!=(name)
绑定状态: 已绑定
Python 调用: obj.operator!=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator!=(name)
obj.operator!=(name)
绑定状态: 已绑定
Python 调用: obj.operator!=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator!=(name)
obj.operator!=(name)
绑定状态: 已绑定
Python 调用: obj.operator!=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator!=(name)
obj.operator!=(name)
绑定状态: 已绑定
Python 调用: obj.operator!=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator!=(name)
obj.operator!=(name)
绑定状态: 已绑定
Python 调用: obj.operator!=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator!=(name)
obj.operator!=(name)
绑定状态: 已绑定
Python 调用: obj.operator!=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaName
obj.operator!=(name)