oaBundleName
模块: oapy._oa._base
导入: from oapy._oa import _base
概览
oaBundleName 在 oapy 中可用,可通过 _base 模块访问。
本页汇总 oaBundleName 当前在 oapy 中可用的 Python 接口。
详细说明
The oaBundleName utility class represents a name that consists of a list of potentially repeated oaSimpleName objects。 In conjunction with the oaNameSpace objects, this class facilitates mapping names from one name space to another。 See the Name Mapping section in the Programmers Guide for more information about mapping names between different namespaces。 Only oaNets and oaTerminals can have bundle names。 Only the CDBA and Native namespaces have a syntax for representing bundle names。 A repeat operator used in a bundle name indicates the number of times to repeat the following name。 An example of a bundled name in the CDBA name space is: <*2>A,B<1:0>,C which expands to A,A,B<1>,B<0>,C。
构造函数
_base.oaBundleName()
obj = _base.oaBundleName()
_base.oaBundleName(nSpace, in)
obj = _base.oaBundleName(nSpace, in)
_base.oaBundleName(in, repeat=1)
obj = _base.oaBundleName(in, repeat=1)
_base.oaBundleName(in, repeat=1)
obj = _base.oaBundleName(in, repeat=1)
_base.oaBundleName(in, repeat=1)
obj = _base.oaBundleName(in, repeat=1)
_base.oaBundleName(in, repeat=1)
obj = _base.oaBundleName(in, repeat=1)
_base.oaBundleName(in)
obj = _base.oaBundleName(in)
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.init(nSpace, in) |
| ✅ | obj.get(nSpace, out) |
| ✅ | obj.get(out) |
| ✅ | obj.getBitName(nSpace, bit, out) |
| ✅ | obj.append(name, repeat=1) |
| ✅ | obj.append(name, repeat=1) |
| ✅ | obj.append(name, repeat=1) |
| ✅ | obj.append(name, repeat=1) |
| ✅ | obj.addHierPath(path) |
| ✅ | obj.addHierPath(path) |
| ✅ | obj.addHierMem(nSpace, in, len) |
| ✅ | obj.addHierMem(in) |
| ✅ | obj.isEmpty() |
| ✅ | obj.getNumMembers() |
| ✅ | obj.getNumBits() |
| ✅ | obj.getSize() |
| ✅ | obj.resize(newSize) |
| ✅ | obj.operator=(name) |
| ✅ | obj.operator[](i) |
| ✅ | obj.operator==(name) |
| ✅ | obj.operator!=(name) |
方法说明
obj.init(nSpace, in)
绑定状态: 已绑定
Python 调用: obj.init(nSpace, in)
This function clears old name data, then initializes its value to the string in, evaluated in the specified name space。
参数
nSpace: The name space in which to evaluate the string。in: The input string to evaluate。
异常
oacInvalidNameLength。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.init(nSpace, in)
obj.get(nSpace, out)
绑定状态: 已绑定
Python 调用: obj.get(nSpace, out)
This function returns this name mapped into the oaNative name space。
参数
out: The string in which to output the mapped name。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.get(nSpace, out)
obj.get(out)
绑定状态: 已绑定
Python 调用: obj.get(out)
This function returns this name mapped into the specified name space。 An oacBundleNameInvalid exception is thrown if the specified nameSpace does not support bundleNames。 For information on the names supported in each nameSpace, see Details of OpenAccess Name Spaces 。
参数
nSpace: The name space to which to map this name。out: The string in which to output the mapped name。
异常
oacBundleNameInvalid。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.get(out)
obj.getBitName(nSpace, bit, out)
绑定状态: 已绑定
Python 调用: obj.getBitName(nSpace, bit, out)
This function returns the bit name of this oaBundleName, mapped into the specified oaNameSpace 。
参数
nSpace: The name space to which to map this name。bit: The bit name to map to the string out。out: The string in which to output the mapped name。
异常
oacBitNotInRangeForName。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.getBitName(nSpace, bit, out)
obj.append(name, repeat=1)
绑定状态: 已绑定
Python 调用: obj.append(name, repeat=1)
This function appends the specified oaSimpleName object to this oaBundleName object。 The optional repeat argument indicates the initial repeat value for the input member。 The default value for the repeat argument is one。 If the current size of the bundle name object is not large enough to fit the additional member, this function will resize the bundle name object as needed。 If you plan to append to a bundle name object using a member of the same bundle name object, you must first check to make sure that the size of the bundle name is large enough to fit the additional member。 If not, you must resize the bundle name before calling append() 。 Otherwise, the result of append() may be incorrect。 For example, you may want to call append with bundle.append(bundle[0], 2); This is very dangerous if the bundle name object is not big enough to fit the additional member。 In that case, the bundle name is resized and the memory of the bundle name members will likely be changed, and the input bundle[0] will not refer to the correct data。
参数
name: The oaSimpleName to append。repeat: The repeat value for the member specified。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.append(name, repeat=1)
obj.append(name, repeat=1)
绑定状态: 已绑定
Python 调用: obj.append(name, repeat=1)
This function appends the specified oaVectorBitName object to this oaBundleName object。 The optional repeat argument indicates the initial repeat value for the input member。 The default value for the repeat argument is one。 If the current size of the bundle name object is not large enough to fit the additional member, this function will resize the bundle name object as needed。 If you plan to append to a bundle name object using a member of the same bundle name object, you must first check to make sure that the size of the bundle name is large enough to fit the additional member。 If not, you must resize the bundle name before calling append() 。 Otherwise, the result of append() may be incorrect。 For example, you may want to call append with bundle.append(bundle[0], 2); This is very dangerous if the bundle name object is not big enough to fit the additional member。 In that case, the bundle name is resized and the memory of the bundle name members will likely be changed, and the input bundle[0] will not refer to the correct data。
参数
name: The oaVectorBitName to append。repeat: The repeat value for the member specified。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.append(name, repeat=1)
obj.append(name, repeat=1)
绑定状态: 已绑定
Python 调用: obj.append(name, repeat=1)
This function appends the specified oaVectorName object to this oaBundleName object。 The optional repeat argument indicates the initial repeat value for the input member。 The default value for the repeat argument is one。 If the current size of the bundle name object is not large enough to fit the additional member, this function will resize the bundle name object as needed。 If you plan to append to a bundle name object using a member of the same bundle name object, you must first check to make sure that the size of the bundle name is large enough to fit the additional member。 If not, you must resize the bundle name before calling append() 。 Otherwise, the result of append() may be incorrect。 For example, you may want to call append with bundle.append(bundle[0], 2); This is very dangerous if the bundle name object is not big enough to fit the additional member。 In that case, the bundle name is resized and the memory of the bundle name members will likely be changed, and the input bundle[0] will not refer to the correct data。
参数
name: The oaVectorName to append。repeat: The repeat value for the member specified。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.append(name, repeat=1)
obj.append(name, repeat=1)
绑定状态: 已绑定
Python 调用: obj.append(name, repeat=1)
This function appends the specified oaScalarName object to this oaBundleName object。 The optional repeat argument indicates the initial repeat value for the input member。 The default value for the repeat argument is one。 If you plan to append to a bundle name object using a member of the same bundle name object, you must first check the size of the bundle name and resize the bundle name if necessary, before calling append() 。 For example, you may want to call append with bundle.append(bundle[0], 2); This is very dangerous if the bundle name object is not big enough to fit the additional member。 In that case, the bundle name is resized and the memory of the bundle name members will likely be changed, and the input bundle[0] will not refer to the correct data。
参数
name: The oaScalarName to append。repeat: The repeat value for the member specified。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.append(name, repeat=1)
obj.addHierPath(path)
绑定状态: 已绑定
Python 调用: obj.addHierPath(path)
This function prepends a hierarchical path to each of the bundle members of 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 oaBundleName
obj.addHierPath(path)
obj.addHierPath(path)
绑定状态: 已绑定
Python 调用: obj.addHierPath(path)
This function prepends a hierarchical path to each of the bundle members of 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 oaBundleName
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 oaBundleName
obj.addHierMem(nSpace, in, len)
obj.addHierMem(in)
绑定状态: 已绑定
Python 调用: obj.addHierMem(in)
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 oaBundleName
obj.addHierMem(in)
obj.isEmpty()
绑定状态: 已绑定
Python 调用: obj.isEmpty()
This function returns an boolean value that indicates if this oaBundleName object contains any bundle members。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.isEmpty()
obj.getNumMembers()
绑定状态: 已绑定
Python 调用: obj.getNumMembers()
This function returns the number of bundle members in this oaBundleName object。 Example: Assume an oaBundlename constructed with the oaCdbaNS string "a,2*b,c<5:0>"。 oaBundleName::getNumMembers will return 3。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.getNumMembers()
obj.getNumBits()
绑定状态: 已绑定
Python 调用: obj.getNumBits()
This function returns the number of bits this name represents。 Example: Assume an oaBundlename constructed with the oaNativeNS string "2*U,V[2],V[4:5]"。 oaBundleName::getNumBits will return 5。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.getNumBits()
obj.getSize()
绑定状态: 已绑定
Python 调用: obj.getSize()
This function returns the size of this oaBundleName object, which indicates the number of oaSimpleName objects。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.getSize()
obj.resize(newSize)
绑定状态: 已绑定
Python 调用: obj.resize(newSize)
This function resizes the size of the storage in this bundle to newSize, which is the number of oaSimpleName objects。
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.resize(newSize)
obj.operator=(name)
绑定状态: 已绑定
Python 调用: obj.operator=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.operator=(name)
obj.operator[](i)
绑定状态: 已绑定
Python 调用: obj.operator[](i)
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.operator[](i)
obj.operator==(name)
绑定状态: 已绑定
Python 调用: obj.operator==(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.operator==(name)
obj.operator!=(name)
绑定状态: 已绑定
Python 调用: obj.operator!=(name)
Python 示例
from oapy._oa import _base
# assume obj is a oaBundleName
obj.operator!=(name)