oaPurpose Class Reference

Inheritance diagram for oaPurpose:

oaTechObject oaObject


Public Methods

void destroy ()
oaPurposeNum getNumber () const
void getName (oaString &name) const
oaPurposeType getPurposeType () const
oaBoolean isReserved () const
void setNumber (oaPurposeNum number)
void setName (const oaString &name)

Static Public Methods

oaPurpose * create (oaTech *tech, const oaString &name, oaPurposeNum number)
oaPurpose * find (const oaTech *tech, const oaString &name)
oaPurpose * find (const oaTech *tech, oaPurposeNum number)
oaPurpose * find (const oaTech *tech, const oaString &name, oaBoolean local)
oaPurpose * find (const oaTech *tech, oaPurposeNum number, oaBoolean local)
oaPurpose * get (oaTech *tech, oaPurposeType type)

Public Types

enum  { dtIndex = oacPurposeDataType }

Detailed Description

The oaPurpose class defines a purpose that may be referenced along with a layer when creating physical design data. A purpose consists of a purpose type, a purpose name, and a purpose number.

Each technology database will have a set of predefined purposes which correspond to the 11 oaPurpose types. These predefined purposes are always available, and may not be changed nor removed. This set of predefined purposes consists of the following:

Type Name Number
oacDrawingPurposeType "drawing" oavPurposeNumberDrawing
oacFillPurposeType "fill" oavPurposeNumberFill
oacSlotPurposeType "slot" oavPurposeNumberSlot
oacOPCSerifPurposeType "OPCSerif" oavPurposeNumberOPCSerif
oacOPCAntiSerifPurposeType "OPCAntiSerif" oavPurposeNumberOPCAntiSerif
oacAnnotationPurposeType "annotation" oavPurposeNumberAnnotation
oacGapFillPurposeType "gapFill" oavPurposeNumberGapFill
oacRedundantPurposeType "redundant" oavPurposeNumberRedundant
oacAnyPurposeType "oaAny" oavPurposeNumberAny
oacNoPurposeType "oaNo" oavPurposeNumberNo
oacFillOPCPurposeType "oaFillOPC" oavPurposeNumberFillOPC

Additional purposes which are added into the tech database by users are of type oaPurposeTypeEnum::oacDrawingPurposeType.

The oaPurpose class can be observed by deriving from oaObserver<oaPurpose>.


Member Function Documentation

oaPurpose * oaPurpose::create oaTech *    tech,
const oaString &    name,
oaPurposeNum    num
[static]
 

This function creates a purpose with the specified name and number. The built-in purposes have a reserved range of purpose numbers, which are from 0xffff0000 to 0xffffffff, inclusive. Applications cannot create custom purposes that use purpose numbers in this reserved range. Any purpose number in the set of unsigned four-byte integers, that is not in the reserved range, is a valid purpose number. For additional information about how OpenAccess manages earlier databases that use purpose numbers in the reserved range, see the Scoping to Purpose section of the Creating and Modeling Process Rule Constraints article of the Programmers Guide.

Note: This function binds any LPPHeaders in open designs that reference the specified purpose number.

Exceptions:
oacPurposeNumberIsReserved 
oacPurposeNumberExists 
oacPurposeNameExists 

void oaPurpose::destroy  
 

This function destroys this purpose, removing it from the technology database. This function unbinds any lpp headers in open designs that are bound to this purpose.

Exceptions:
oacCannotDestroyReservedPurpose 

oaPurpose * oaPurpose::find const oaTech *    tech,
oaPurposeNum    number,
oaBoolean    local
[static]
 

This function searches for a purpose with the specified number. The local argument specifies whether (if true) to look only in the specified technology database or (if false) to look in the specified technology database and all of its referenced databases. If the purpose is found, a pointer to the purpose object is returned, otherwise NULL is returned.

Refer to Incremental Technology Databases in the Using Technology Databases section of the Programmers Guide for more information about referenced tech databases.

Parameters:
tech The technology database to search
number The purpose number to find
local Specifies whether (if true) to look only in the specified technology database or (if false) to look in the specified technology database and all of its referenced databases.

oaPurpose * oaPurpose::find const oaTech *    tech,
const oaString &    name,
oaBoolean    local
[static]
 

This function searches for a purpose with the specified name. The local argument specifies whether (if true) to look only in the specified technology database or (if false) to look in the specified technology database and all of its referenced databases. If the purpose is found, a pointer to the purpose object is returned, otherwise NULL is returned.

Refer to Incremental Technology Databases in the Using Technology Databases section of the Programmers Guide for more information about referenced tech databases.

Parameters:
tech The technology database to search
name The name of the purpose to find
local Specifies whether (if true) to look only in the specified technology database or (if false) to look in the specified technology database and all of its referenced databases.

oaPurpose * oaPurpose::find const oaTech *    tech,
oaPurposeNum    number
[static]
 

This function searches the specified technology database for a purpose with the specified number. If the specified technology database references other technology databases, those are searched as well and the first matching purpose is returned. To find a purpose in the current technology database only, refer to the find function that accepts the local argument.

If the function finds the specified purpose, it returns a pointer to the oaPurpose object. Otherwise, NULL is returned.

Refer to Incremental Technology Databases in the Using Technology Databases section of the Programmers Guide for more information about referenced tech databases.

Parameters:
tech The technology database to search
number The purpose number to find

oaPurpose * oaPurpose::find const oaTech *    tech,
const oaString &    name
[static]
 

This function searches the specified technology database for a purpose with the specified name. If the specified technology database references other technology databases, those are searched as well and the first matching purpose is returned. To find a purpose in the current technology database only, refer to the find function that accepts the local argument.

If the function finds the specified purpose, it returns a pointer to the oaPurpose object. Otherwise, NULL is returned.

Refer to Incremental Technology Databases in the Using Technology Databases section of the Programmers Guide for more information about referenced tech databases.

Parameters:
tech The technology database to search
name The name of the purpose to find

oaPurpose * oaPurpose::get oaTech *    tech,
oaPurposeType    type
[static]
 

This function returns the reserved purpose of the specified purposeType.

void oaPurpose::getName oaString &    name const
 

This function returns the name of this purpose.

oaPurposeNum oaPurpose::getNumber   const
 

This function returns the number of this purpose.

oaPurposeType oaPurpose::getPurposeType   const
 

This function returns the purpose type of this purpose.

oaBoolean oaPurpose::isReserved   const
 

This function returns true if this purpose is reserved.

void oaPurpose::setName const oaString &    name
 

This function sets the name of this purpose to the specified value.

Exceptions:
oacCannotChangeReservedPurpose 
oacPurposeNameExists 

void oaPurpose::setNumber oaPurposeNum    number
 

This function sets the number of this purpose to the specified value. If the specified purpose number exists, an oacPurposeNumberExists exception is thrown.

Note: If this function modifies a purpose number (a new number is set on a purpose, which replaces a previous number set on this purpose), this function will unbind any LPPHeaders that are bound to this purpose in those designs and will bind any LPPHeaders with the new purpose number.

Exceptions:
oacPurposeNumberIsReserved 
oacCannotChangeReservedPurpose 
oacPurposeNumberExists 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page