oaSimpleName Class Reference


Public Methods

 oaSimpleName ()
 oaSimpleName (const oaNameSpace &nSpace, const oaChar *in)
 oaSimpleName (const oaSimpleName &name)
 oaSimpleName (const oaScalarName &name)
 oaSimpleName (const oaVectorBitName &name)
 oaSimpleName (const oaVectorName &name)
 ~oaSimpleName ()
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 getRepeat () const
oaUInt4 getNumMembers () const
oaUInt4 getNumBits () const
oaScalarNamegetScalar () const
oaVectorNamegetVector () const
oaVectorBitNamegetVectorBit () 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)
oaSimpleName & operator= (const oaSimpleName &name)
oaSimpleName & operator= (const oaScalarName &name)
oaSimpleName & operator= (const oaVectorName &name)
oaSimpleName & operator= (const oaVectorBitName &name)
const oaNameMemoperator[] (oaUInt4 i) const
oaBoolean operator== (const oaSimpleName &name) const
oaBoolean operator== (const oaScalarName &name) const
oaBoolean operator== (const oaVectorName &name) const
oaBoolean operator== (const oaVectorBitName &name) const
oaBoolean operator!= (const oaSimpleName &name) const
oaBoolean operator!= (const oaScalarName &name) const
oaBoolean operator!= (const oaVectorName &name) const
oaBoolean operator!= (const oaVectorBitName &name) const

Friends

class oaBaseNameHashTbl
class oaNameTbl
class oaBundleName

Detailed Description

The oaSimpleName utility class provides a name that can represent either a scalar, vector bit, or vector name. The oaSimpleName object cannot represent a bundle name. See the oaScalarName, oaVectorBitName and oaVectorName classes for more specialized name classes

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.

For a more generic object that can represent a scalar, vector bit, vector, or bundle name, use the oaName object instead.

In general, when using oaName and related objects, it is best to choose the object type with closest match to the name. For example, where an application only uses scalar names, using oaScalarName object is the most performance efficient even though using oaSimpleName would work also.


Constructor & Destructor Documentation

oaSimpleName::oaSimpleName  
 

This function constructs an empty oaSimpleName object.

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

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

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

oaSimpleName::oaSimpleName const oaSimpleName &    name
 

This function constructs a copy of the specified oaSimpleName object.

oaSimpleName::oaSimpleName const oaScalarName &    name
 

This function constructs an oaSimpleName from the specified oaScalarName object.

oaSimpleName::oaSimpleName const oaVectorBitName &    name
 

This function constructs an oaSimpleName from the specified oaVectorBitName object.

oaSimpleName::oaSimpleName const oaVectorName &    name
 

This function constructs an oaSimpleName from the specified oaVectorName object.

oaSimpleName::~oaSimpleName   [inline]
 

This function destroys this oaSimpleName object and all of the associated data.


Member Function Documentation

void oaSimpleName::addHierMem const oaNameMem &    in
 

This function adds a hierarchical member to this name, inserting a copy of in after the existing members that represent a partial hierarchical path, and before the last member, which represents the local name. An exception is thrown if this name is empty.

Parameters:
in The member to be added
Exceptions:
oacInvalidName 

void oaSimpleName::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.

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 oaSimpleName::addHierPath const oaVectorBitName &    path
 

This function prepends a hierarchical path to this name. An exception is thrown if this name is empty.

Parameters:
path The path to add
Exceptions:
oacInvalidName 

void oaSimpleName::addHierPath const oaScalarName &    path
 

This function prepends a hierarchical path to this name. An exception is thrown if this name is empty.

Parameters:
path The path to add
Exceptions:
oacInvalidName 

void oaSimpleName::get oaString &    out const
 

This function returns this name mapped into the oaNative nameSpace.

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

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

This function returns this name mapped into the specified nameSpace. If the name cannot be properly mapped, an empty string is written to out.

An exception is thrown if the specified nameSpace does not support the type of this oaSimpleName. 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 place the mapped name
Exceptions:
oacVectorNameInvalid 
oacHierNameInvalid 
oacIndexedNameInvalid 

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

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

Parameters:
nSpace The nameSpace to which to map this name
bit The bit name to map to the string out
out The string in which to place the mapped name
Exceptions:
oacBitNotInRangeForName 

oaUInt4 oaSimpleName::getNumBits   const
 

This function returns the number of bits this name represents.

oaUInt4 oaSimpleName::getNumMembers   const [inline]
 

This function returns the number of hierarchical members in this name object.

oaUInt4 oaSimpleName::getRepeat   const [inline]
 

This function returns the repeat value for this oaSimpleName.

oaScalarName * oaSimpleName::getScalar   const [inline]
 

This function returns an oaScalarName if this oaSimpleName represents an oaScalarName. Otherwise, this function returns NULL.

oaNameType oaSimpleName::getType   const [inline]
 

This function returns the name type for this oaSimpleName.

oaVectorName * oaSimpleName::getVector   const [inline]
 

This function returns an oaVectorName if this oaSimpleName represents an oaVectorName. Otherwise, this function returns NULL.

oaVectorBitName * oaSimpleName::getVectorBit   const [inline]
 

This function returns an oaVectorBitName if this oaSimpleName represents an oaVectorBitName. Otherwise, this function returns NULL.

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

This function initializes the oaSimpleName object by deleting old data previously allocated, then evaluates the input string in the specified namespace, then re-initializes the object to the string specified by in. This allows reuse of the oaName object to improve application performance.

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

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

This function compares the specified oaVectorBitName object with this oaSimpleName 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 oaSimpleName::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 oaSimpleName::operator!= const oaScalarName &    name const [inline]
 

This function compares the specified oaScalarName object with this oaSimpleName 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 oaSimpleName::operator!= const oaSimpleName &    name const [inline]
 

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

Parameters:
name The oaSimpleName object to compare

oaSimpleName & oaSimpleName::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.

oaSimpleName & oaSimpleName::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.

oaSimpleName & oaSimpleName::operator= const oaScalarName &    name
 

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

oaSimpleName & oaSimpleName::operator= const oaSimpleName &    name
 

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

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

This function compares the specified oaVectorBitName object with this oaSimpleName 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 oaSimpleName::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 true; otherwise, this function returns false.

Parameters:
name The oaVectorName object to compare

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

This function compares the specified oaScalarName object with this oaSimpleName 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 oaSimpleName::operator== const oaSimpleName &    name const
 

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

Parameters:
name The oaSimpleName object to compare

const oaNameMem & oaSimpleName::operator[] oaUInt4    i const
 

This function returns an oaNameMem object that represents the specified member of this oaSimpleName. For example, an hierarchical name can be broken down to several members based on the hierarchical separator. This function can be used to return a member in that name.

Parameters:
i The name member to return
Exceptions:
oacInvalidNameIndex 


Friends And Related Function Documentation

friend class oaBaseNameHashTbl [friend]
 

friend class oaBundleName [friend]
 

friend class oaNameTbl [friend]
 


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

Return to top of page