oaVectorBitName Class Reference

Inheritance diagram for oaVectorBitName:

oaNameBase


Public Methods

 oaVectorBitName ()
 oaVectorBitName (const oaNameSpace &nSpace, const oaChar *in)
 oaVectorBitName (const oaNameSpace &nSpace, const oaChar *in, oaUInt4 index)
 oaVectorBitName (const oaScalarName &in, oaUInt4 index)
 oaVectorBitName (const oaVectorBitName &name)
void init (const oaNameSpace &nSpace, const oaChar *in, oaBoolean baseOnly=false)
void get (const oaNameSpace &nSpace, oaString &out) const
void get (oaString &out) const
void getBaseName (const oaNameSpace &nSpace, oaString &out) const
void getBaseName (oaString &out) const
void getBaseName (oaScalarName &out) const
oaUInt4 getIndex () const
oaUInt4 getNumBits () const
void setIndex (oaUInt4 val)
oaVectorBitName & operator= (const oaVectorBitName &name)
oaBoolean operator== (const oaVectorBitName &name) const
oaBoolean operator!= (const oaVectorBitName &name) const

Friends

class oaNameTbl

Detailed Description

The oaVectorBitName utility class represents the name for an object that has a base name and a single index number. This will be the name of an object that is a single bit of a vector. The name can be hierarchical. In conjunction with oaNameSpace objects, this class facilitates mapping names from one nameSpace to another. See the Name Mapping Section of the Programmers Guide for more information about mapping names between different namespaces.

A vector bit name has a base name and an index. An example of an oaVectorBitName in the Verilog namespace is test[3], where the base name is test and the index is 3.


Constructor & Destructor Documentation

oaVectorBitName::oaVectorBitName  
 

This function constructs an empty oaVectorBitName object.

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

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

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

oaVectorBitName::oaVectorBitName const oaNameSpace &    nSpace,
const oaChar *    in,
oaUInt4    index
 

This function constructs an oaVectorBitName object, evaluating the specified input string in the specified nameSpace. The input string is assumed to be the base portion of the name.

Parameters:
nSpace The nameSpace in which to evaluate the string
in The input string to evaluate as the base name
index The bit value for the name
Exceptions:
oacInvalidNameLength 
oacInvalidNameSyntax 

oaVectorBitName::oaVectorBitName const oaScalarName &    in,
oaUInt4    index
 

This function constructs an oaVectorBitName object by accepting an oaScalarName that represents the base name of the vector bit, plus an index that represents the bit value of the name.

Parameters:
in The base value of this name represented as an oaScalarName
index The bit value for the name

oaVectorBitName::oaVectorBitName const oaVectorBitName &    name
 

This function constructs a copy of the specified oaVectorBitName object.


Member Function Documentation

void oaVectorBitName::get oaString &    out const
 

This function returns this name mapped into the oaNative nameSpace.

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

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

This function returns this name mapped into the specified nameSpace.

Parameters:
nSpace The nameSpace in which to map this name
out The string in which to output the mapped name

void oaVectorBitName::getBaseName oaScalarName &    out const
 

This function returns the base value of this name.

Parameters:
out The oaScalarName in which to output the base value of this name

void oaVectorBitName::getBaseName oaString &    out const
 

This function returns the base value of this name mapped into the oaNative nameSpace.

Parameters:
out The string in which to output the base value of this name

void oaVectorBitName::getBaseName const oaNameSpace &    nSpace,
oaString &    out
const
 

This function returns the base value of this name mapped into the specified nameSpace.

Parameters:
nSpace The nameSpace in which to map the base value of this name
out The string in which to output the mapped name

oaUInt4 oaVectorBitName::getIndex   const [inline]
 

This function returns the bit index of this vectorbit name.

oaUInt4 oaVectorBitName::getNumBits   const [inline]
 

This function returns the number of bits this name represents.

void oaVectorBitName::init const oaNameSpace &    nSpace,
const oaChar *    in,
oaBoolean    baseOnly = false
 

This function allows reuse of the oaVectorBitName object in order to improve application performance and capacity. This function initializes the name by clearing any previously stored name data, then re-initializing its value to the string specified by in, evaluating the string in the specified namespace.

The optional boolean argument baseOnly indicates if the input name is interpreted as the base portion of the vectorbit name or as the entire name -- for example, with nSpace set to the oaVerilog namespace, baseOnly equal to true, and in specified as "abc[3]".

Parameters:
nSpace The oaNameSpace in which to evaluate the string
in The input string, which may specify the base name only (if baseOnly is true) or the entire name (if baseOnly is false)
baseOnly A boolean value that indicates if the input string is an entire vectorbit name or only the base portion
Exceptions:
oacInvalidNameLength 
oacInvalidNameSyntax 

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

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

Parameters:
name The oaVectorBitName object to compare

oaVectorBitName & oaVectorBitName::operator= const oaVectorBitName &    name
 

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

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

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

Parameters:
name The oaVectorBitName object to compare

void oaVectorBitName::setIndex oaUInt4    val [inline]
 

This function sets the bit value for this oaVectorBitName to the specified value.


Friends And Related Function Documentation

friend class oaNameTbl [friend]
 

Reimplemented from oaNameBase.


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

Return to top of page