oaName Class Reference
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
|
This function constructs a default oaName object with an empty name type. |
|
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:
-
|
oaName::oaName |
( |
const oaName & |
name |
) |
|
|
|
This function constructs a copy of the specified oaName object. |
|
This function constructs an oaName object from the specified oaSimpleName object. |
|
This function constructs an oaName object from the specified oaBundleName object. |
|
This function constructs an oaName object from the specified oaVectorName object. |
|
This function constructs an oaName object from the specified oaVectorBitName object. |
|
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:
-
|
|
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:
-
|
|
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:
-
- Exceptions:
-
|
|
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:
-
- Exceptions:
-
|
void oaName::get |
( |
oaString & |
out |
) |
const |
|
|
This function fills the string out with the oaName, mapped into the oaNative nameSpace. |
|
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:
-
|
|
This function fills the string out with the bit name of this vector name, mapped into the specified oaNameSpace.
- Exceptions:
-
|
|
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. |
|
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. |
|
This function returns the type of name that this name contains. |
|
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. |
|
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. |
|
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:
-
|
|
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:
-
|
|
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:
-
|
|
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:
-
|
|
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:
-
|
|
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:
-
|
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 |
|
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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:
-
|
|
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:
-
|
|
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:
-
|
|
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:
-
|
|
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:
-
|
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
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.