oaBundleName Class Reference


Public Methods

 oaBundleName ()
 oaBundleName (const oaNameSpace &nSpace, const oaChar *in)
 oaBundleName (const oaScalarName &in, oaUInt4 repeat=1)
 oaBundleName (const oaVectorName &in, oaUInt4 repeat=1)
 oaBundleName (const oaVectorBitName &in, oaUInt4 repeat=1)
 oaBundleName (const oaSimpleName &in, oaUInt4 repeat=1)
 oaBundleName (const oaBundleName &in)
 ~oaBundleName ()
void init (const oaNameSpace &nSpace, const oaChar *in)
void get (const oaNameSpace &nSpace, oaString &out) const
void get (oaString &out) const
void getBitName (const oaNameSpace &nSpace, oaUInt4 bit, oaString &out) const
void append (const oaScalarName &name, oaUInt4 repeat=1)
void append (const oaVectorName &name, oaUInt4 repeat=1)
void append (const oaVectorBitName &name, oaUInt4 repeat=1)
void append (const oaSimpleName &name, oaUInt4 repeat=1)
void addHierPath (const oaScalarName &path)
void addHierPath (const oaVectorBitName &path)
void addHierMem (const oaNameSpace &nSpace, const oaChar *in, oaUInt4 len)
void addHierMem (const oaNameMem &in)
oaBoolean isEmpty () const
oaUInt4 getNumMembers () const
oaUInt4 getNumBits () const
oaUInt4 getSize () const
void resize (oaUInt4 newSize)
oaBundleName & operator= (const oaBundleName &name)
const oaSimpleNameoperator[] (oaUInt4 i) const
oaBoolean operator== (const oaBundleName &name) const
oaBoolean operator!= (const oaBundleName &name) const

Friends

class oaNameTbl
class oaCdbaNS

Detailed Description

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


Constructor & Destructor Documentation

oaBundleName::oaBundleName  
 

This function constructs an empty oaBundleName object.

oaBundleName::oaBundleName const oaNameSpace &    nSpace,
const oaChar *    in
 

This function constructs an oaBundleName object, evaluating the specified input string in the specified name space.

Exceptions:
oacInvalidNameLength 

oaBundleName::oaBundleName const oaScalarName &    in,
oaUInt4    repeat = 1
 

This function constructs an oaBundleName object that contains the specified oaScalarName as the first bundle member. The optional repeat argument indicates the initial repeat value for the input member. The default value for the repeat argument is one.

Parameters:
in The oaScalarName to initialize as the first bundle member
repeat The repeat value for the member specified

oaBundleName::oaBundleName const oaVectorName &    in,
oaUInt4    repeat = 1
 

This function constructs an oaBundleName object that contains the specified oaVectorName as the first bundle member. The optional repeat argument indicates the initial repeat value for the input member. The default value for the repeat argument is one.

Parameters:
in The oaVectorName to initialize as the first bundle member
repeat The repeat value for the member specified

oaBundleName::oaBundleName const oaVectorBitName &    in,
oaUInt4    repeat = 1
 

This function constructs an oaBundleName object that contains the specified oaVectorBitName as the first bundle member. The optional repeat argument indicates the initial repeat value for the input member. The default value for the repeat argument is one.

Parameters:
in The oaVectorBitName to initialize as the first bundle member
repeat The repeat value for the member specified

oaBundleName::oaBundleName const oaSimpleName &    in,
oaUInt4    repeat = 1
 

This function constructs an oaBundleName object that contains the specified oaSimpleName as the first bundle member. The optional repeat argument indicates the initial repeat value for the input member. The default value for the repeat argument is one.

Parameters:
in The oaSimpleName to initialize as the first bundle member
repeat The repeat value for the member specified

oaBundleName::oaBundleName const oaBundleName &    in
 

This function creates a copy of the specified oaBundleName object.

oaBundleName::~oaBundleName   [inline]
 

This function destroys this oaBundleName object and all associated data.


Member Function Documentation

void oaBundleName::addHierMem const oaNameMem &    in
 

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.

Parameters:
in The member to be added
Exceptions:
oacInvalidName 

void oaBundleName::addHierMem const oaNameSpace &    nSpace,
const oaChar *    in,
oaUInt4    len
 

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.

Parameters:
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
Exceptions:
oacInvalidName 

void oaBundleName::addHierPath const oaVectorBitName &    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.

Parameters:
path The path to add
Exceptions:
oacInvalidName 

void oaBundleName::addHierPath const oaScalarName &    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.

Parameters:
path The path to add
Exceptions:
oacInvalidName 

void oaBundleName::append const oaSimpleName &    name,
oaUInt4    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.

Parameters:
name The oaSimpleName to append
repeat The repeat value for the member specified

void oaBundleName::append const oaVectorBitName &    name,
oaUInt4    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.

Parameters:
name The oaVectorBitName to append
repeat The repeat value for the member specified

void oaBundleName::append const oaVectorName &    name,
oaUInt4    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.

Parameters:
name The oaVectorName to append
repeat The repeat value for the member specified

void oaBundleName::append const oaScalarName &    name,
oaUInt4    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.

Parameters:
name The oaScalarName to append
repeat The repeat value for the member specified

void oaBundleName::get oaString &    out const
 

This function returns this name mapped into the oaNative name space.

Parameters:
out The string in which to output the mapped name

void oaBundleName::get const oaNameSpace &    nSpace,
oaString &    out
const
 

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.

Parameters:
nSpace The name space to which to map this name
out The string in which to output the mapped name
Exceptions:
oacBundleNameInvalid 

void oaBundleName::getBitName const oaNameSpace &    nSpace,
oaUInt4    bit,
oaString &    out
const
 

This function returns the bit name of this oaBundleName, mapped into the specified oaNameSpace.

Parameters:
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
Exceptions:
oacBitNotInRangeForName 

oaUInt4 oaBundleName::getNumBits   const
 

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.

oaUInt4 oaBundleName::getNumMembers   const [inline]
 

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.

oaUInt4 oaBundleName::getSize   const [inline]
 

This function returns the size of this oaBundleName object, which indicates the number of oaSimpleName objects.

void oaBundleName::init const oaNameSpace &    nSpace,
const oaChar *    in
 

This function clears old name data, then initializes its value to the string in, evaluated in the specified name space.

Parameters:
nSpace The name space in which to evaluate the string
in The input string to evaluate
Exceptions:
oacInvalidNameLength 

oaBoolean oaBundleName::isEmpty   const [inline]
 

This function returns an boolean value that indicates if this oaBundleName object contains any bundle members.

oaBoolean oaBundleName::operator!= const oaBundleName &    name const [inline]
 

This function compares the specified oaBundleName object with this oaBundleName object. If the two oaBundleName objects are the same, this function returns false; otherwise, this function returns true.

Parameters:
name The oaBundleName object to compare

oaBundleName & oaBundleName::operator= const oaBundleName &    name
 

This function is the assignment operator that copies the specified oaBundleName object and returns it. The function copies all member data so the duplicate does not rely on information from the original.

oaBoolean oaBundleName::operator== const oaBundleName &    name const [inline]
 

This function compares the specified oaBundleName object with this oaBundleName object. If the two oaBundleName objects are the same, this function returns true; otherwise, this function returns false.

Parameters:
name The oaBundleName object to compare

const oaSimpleName & oaBundleName::operator[] oaUInt4    i const [inline]
 

This function returns an oaSimpleName object that represents the specified bundle member of this oaBundleName.

Parameters:
i The bundle member to return

void oaBundleName::resize oaUInt4    newSize
 

This function resizes the size of the storage in this bundle to newSize, which is the number of oaSimpleName objects.


Friends And Related Function Documentation

friend class oaCdbaNS [friend]
 

friend class oaNameTbl [friend]
 


The documentation for this class was generated from the following files:

Return to top of page