oaName Class Reference


Public Methods

 oaName ()
 oaName (const oaNameSpace &nSpace, const oaChar *in)
 oaName (const oaName &name)
 oaName (const oaSimpleName &name)
 oaName (const oaBundleName &name)
 oaName (const oaVectorName &name)
 oaName (const oaVectorBitName &name)
 oaName (const oaScalarName &name)
 ~oaName ()
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
oaNameType getType () const
oaUInt4 getNumBits () const
oaScalarNamegetScalar () const
oaVectorNamegetVector () const
oaVectorBitNamegetVectorBit () const
oaBundleNamegetBundle () const
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)
oaName & operator= (const oaName &name)
oaName & operator= (const oaScalarName &name)
oaName & operator= (const oaVectorName &name)
oaName & operator= (const oaVectorBitName &name)
oaName & operator= (const oaBundleName &name)
oaName & operator= (const oaSimpleName &name)
oaBoolean operator== (const oaName &name) const
oaBoolean operator== (const oaSimpleName &name) const
oaBoolean operator== (const oaBundleName &name) const
oaBoolean operator== (const oaVectorName &name) const
oaBoolean operator== (const oaVectorBitName &name) const
oaBoolean operator== (const oaScalarName &name) const
oaBoolean operator!= (const oaName &name) const
oaBoolean operator!= (const oaSimpleName &name) const
oaBoolean operator!= (const oaBundleName &name) const
oaBoolean operator!= (const oaVectorName &name) const
oaBoolean operator!= (const oaVectorBitName &name) const
oaBoolean operator!= (const oaScalarName &name) const

Friends

class oaNameTbl

Detailed Description

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.


Constructor & Destructor Documentation

oaName::oaName  
 

This function constructs a default oaName object with an empty name type.

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

This function constructs an oaName object, evaluating the input string in the specified nameSpace.

Parameters:
nSpace The nameSpace to evaluate the string
in The input string to evaluate
Exceptions:
oacInvalidNameLength 

oaName::oaName const oaName &    name
 

This function constructs a copy of the specified oaName object.

oaName::oaName const oaSimpleName &    name
 

This function constructs an oaName object from the specified oaSimpleName object.

oaName::oaName const oaBundleName &    name
 

This function constructs an oaName object from the specified oaBundleName object.

oaName::oaName const oaVectorName &    name
 

This function constructs an oaName object from the specified oaVectorName object.

oaName::oaName const oaVectorBitName &    name
 

This function constructs an oaName object from the specified oaVectorBitName object.

oaName::oaName const oaScalarName &    name
 

This function constructs an oaName object from the specified oaScalarName object.

oaName::~oaName   [inline]
 

This function destroys this oaName object and all of its associated data.


Member Function Documentation

void oaName::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 oaName::addHierMem const oaNameSpace &    nSpace,
const oaChar *    in,
oaUInt4    len
 

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.

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

Parameters:
path The path to add
Exceptions:
oacInvalidName 

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

Parameters:
path The path to add
Exceptions:
oacInvalidName 

void oaName::get oaString &    out const
 

This function fills the string out with the oaName, mapped into the oaNative nameSpace.

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

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.

Parameters:
nSpace The nameSpace in which to map this name
out The string in which to output the mapped name
Exceptions:
oacVectorNameInvalid 
oacBundleNameInvalid 
oacHierNameInvalid 
oacIndexedNameInvalid 

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

This function fills the string out with the bit name of this vector name, mapped into the specified oaNameSpace.

Exceptions:
oacBitNotInRangeForName 

oaBundleName * oaName::getBundle   const [inline]
 

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.

oaUInt4 oaName::getNumBits   const
 

This function returns the number of bits this name represents.

oaScalarName * oaName::getScalar   const [inline]
 

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.

oaNameType oaName::getType   const [inline]
 

This function returns the type of name that this name contains.

oaVectorName * oaName::getVector   const [inline]
 

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.

oaVectorBitName * oaName::getVectorBit   const [inline]
 

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.

void oaName::init const oaNameSpace &    nSpace,
const oaChar *    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.

Parameters:
in The input string to evaluate
nSpace The nameSpace in which to evaluate the string
Exceptions:
oacInvalidNameLength 
oacInvalidNameSyntax 

oaBoolean oaName::operator!= const oaScalarName &    name const [inline]
 

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

Parameters:
name The oaScalarName object to compare

oaBoolean oaName::operator!= const oaVectorBitName &    name const [inline]
 

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

Parameters:
name The oaVectorBitName object to compare

oaBoolean oaName::operator!= const oaVectorName &    name const [inline]
 

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

Parameters:
name The oaVectorName object to compare

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

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

Parameters:
name The oaBundleName object to compare

oaBoolean oaName::operator!= const oaSimpleName &    name const [inline]
 

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

Parameters:
name The oaSimpleName object to compare

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

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

Parameters:
name The oaName object to compare

oaName & oaName::operator= const oaSimpleName &    name
 

This function copies the specified oaSimpleName object into this object and returns the current oaName. The function copies all member data so the duplicate does not rely on information from the original.

oaName & oaName::operator= const oaBundleName &    name
 

This function copies the specified oaBundleName object into this object and returns the current oaName object. The function copies all member data so the duplicate does not rely on information from the original.

oaName & oaName::operator= const oaVectorBitName &    name
 

This function copies the specified oaVectorBitName object into this object and returns the current oaName object. The function copies all member data so the duplicate does not rely on information from the original.

oaName & oaName::operator= const oaVectorName &    name
 

This function is the assignment operator that copies the specified oaVectorName object into this object and returns the current oaName object. The function copies all member data so the duplicate does not rely on information from the original.

oaName & oaName::operator= const oaScalarName &    name
 

This function is the assignment operator that copies the specified oaScalarName object into this object and returns the current oaName object. The function copies all member data so the duplicate does not rely on information from the original.

oaName & oaName::operator= const oaName &    name
 

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

oaBoolean oaName::operator== const oaScalarName &    name const [inline]
 

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

Parameters:
name The oaScalarName object to compare

oaBoolean oaName::operator== const oaVectorBitName &    name const [inline]
 

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

Parameters:
name The oaVectorBitName object to compare

oaBoolean oaName::operator== const oaVectorName &    name const [inline]
 

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

Parameters:
name The oaVectorName object to compare

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

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

Parameters:
name The oaBundleName object to compare

oaBoolean oaName::operator== const oaSimpleName &    name const
 

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

Parameters:
name The oaSimpleName object to compare

oaBoolean oaName::operator== const oaName &    name const
 

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

Parameters:
name The oaName object to compare


Friends And Related Function Documentation

friend class oaNameTbl [friend]
 


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

Return to top of page