oaVectorName Class Reference

Inheritance diagram for oaVectorName:

oaNameBase


Public Methods

 oaVectorName ()
 oaVectorName (const oaNameSpace &nSpace, const oaChar *in, oaUInt4 start, oaUInt4 stop, oaUInt4 step=1)
 oaVectorName (const oaNameSpace &nSpace, const oaChar *in)
 oaVectorName (const oaScalarName &in, oaUInt4 start, oaUInt4 stop, oaUInt4 step=1)
 oaVectorName (const oaVectorName &in)
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
void getBitName (const oaNameSpace &nSpace, oaUInt4 bit, oaString &out) const
oaUInt4 getNumBits () const
oaUInt4 getStart () const
oaUInt4 getStop () const
oaUInt4 getStep () const
void setStart (oaUInt4 val)
void setStop (oaUInt4 val)
void setStep (oaUInt4 val)
oaVectorName & operator= (const oaVectorName &name)
oaBoolean operator== (const oaVectorName &name) const
oaBoolean operator!= (const oaVectorName &name) const

Friends

class oaNameTbl

Detailed Description

The oaVectorName utility class holds a name for a database object that consists of a base name with an index range. These names can be hierarchical. The index range may be high to low or low to high, and may have an optional step value. If the step value is greater than 1, then a step value of n means that the vector only includes every nth bit after the starting bit.

In conjunction with the oaNameSpace objects, this class facilitates mapping names from one namespace to another. See the Name Mapping Section in the Programmers Guide for more information about mapping names between different namespaces.

An example of an oaVectorName in the oaVerilog namespace is test[3:0], where the base portion of this name is test, and start index is 3, the stop index is 0, and the implied step value is 1.


Constructor & Destructor Documentation

oaVectorName::oaVectorName  
 

This function constructs an empty oaVectorName object.

oaVectorName::oaVectorName const oaNameSpace &    nSpace,
const oaChar *    in,
oaUInt4    start,
oaUInt4    stop,
oaUInt4    step = 1
 

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

Parameters:
nSpace The oaNameSpace in which to evaluate the string
in The input string to evaluate as the base name
start The start index for the vector
stop The stop index for the vector
step The step value for the vector
Exceptions:
oacInvalidNameLength 
oacInvalidNameSyntax 
oacInvalidVectorValue 

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

This function constructs an oaVectorName object, evaluating the specified input string in the specified oaNameSpace.

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

oaVectorName::oaVectorName const oaScalarName &    in,
oaUInt4    start,
oaUInt4    stop,
oaUInt4    step = 1
 

This function constructs an oaVectorName object using an oaScalarName that represents the base name of the vector, plus start, stop, and step values that represent the vector value of the name.

Parameters:
in The base portion of this name represented as an oaScalarName
start The start index for the vector
stop The stop index for the vector
step The step value for the vector
Exceptions:
oacInvalidVectorValue 

oaVectorName::oaVectorName const oaVectorName &    name
 

This function constructs a copy of the specified oaVectorName object.

Parameters:
name The vector to copy


Member Function Documentation

void oaVectorName::get oaString &    out const
 

This function returns this vector name, mapped into the oaNative nameSpace.

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

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

This function returns the vector name, mapped into the specified oaNameSpace.

An oacVectorNameInvalid exception is thrown if the specified nameSpace does not support vectorNames. For information on the names supported in each nameSpace, see Details of OpenAccess Name Spaces.

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

void oaVectorName::getBaseName oaScalarName &    out const
 

This function returns the base portion of this name.

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

void oaVectorName::getBaseName oaString &    out const
 

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

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

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

This function returns the base portion of this name, mapped into the specified oaNameSpace.

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

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

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

Parameters:
nSpace The oaNameSpace in which to map the bit value of this name
bit The bit value of this vector name
out The string to which to output the mapped name
Exceptions:
oacBitNotInRangeForName 

oaUInt4 oaVectorName::getNumBits   const
 

This function returns the number of bits this vector name represents.

oaUInt4 oaVectorName::getStart   const [inline]
 

This function returns the start index for this oaVectorName.

oaUInt4 oaVectorName::getStep   const [inline]
 

This function returns the step value for this oaVectorName.

oaUInt4 oaVectorName::getStop   const [inline]
 

This function returns the stop index of this oaVectorName.

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

This function allows reuse of the oaVectorName 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 vector name or as the entire name -- for example, with nSpace set to the oaVerilog namespace, baseOnly equal to true, and in specified as "abc[0:7:1]".

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 vector name or only the base portion
Exceptions:
oacInvalidNameLength 
oacInvalidNameSyntax 
oacInvalidVectorValue 

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

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

Parameters:
name The oaVectorName object to compare

oaVectorName & oaVectorName::operator= const oaVectorName &    name
 

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

Parameters:
name The vector name to copy and return

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

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

Parameters:
name The oaVectorName object to compare

void oaVectorName::setStart oaUInt4    val [inline]
 

This function sets the start index for this vector name to the specified value.

Parameters:
val The start value

void oaVectorName::setStep oaUInt4    val [inline]
 

This function sets the step value for this vector name to the specified value.

Parameters:
val The step value

void oaVectorName::setStop oaUInt4    val [inline]
 

This function sets the stop index for this vector name to the specified value.

Parameters:
val The stop 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