oaAttrDisplay Class Reference

Inheritance diagram for oaAttrDisplay:

oaTextDisplay oaShape oaPinFig oaConnFig oaFig oaBlockObject oaDesignObject oaObject


Public Methods

void getText (const oaNameSpace &ns, oaString &text) const
oaObjectgetObject () const
oaAttrType getAttribute () const
void setObject (oaObject *object)

Static Public Methods

oaAttrDisplay * create (oaObject *object, oaAttrType attribute, oaLayerNum layerNum, oaPurposeNum purposeNum, const oaPoint &origin, oaTextAlign alignment, oaOrient orient, oaFont font, oaDist height, oaTextDisplayFormat format=oacNameTextDisplayFormat, oaBoolean overbar=false, oaBoolean visible=true, oaBoolean drafting=true)

Detailed Description

The oaAttrDisplay is a shape similar to an oaText object, except it presents a string that is the value of a specific, built-in attribute of the attached object. Whenever the value of the attribute changes, calling the getText function on this oaAttrDisplay object returns the updated text string that represents the new attribute value.

The oaAttrDisplay is contained in the design that contains the attached design object.

Note: The attribute is specified using one of many defined values. Each object type has its own set of values.


Member Function Documentation

oaAttrDisplay * oaAttrDisplay::create oaObject *    object,
oaAttrType    attribute,
oaLayerNum    layer,
oaPurposeNum    purpose,
const oaPoint &    origin,
oaTextAlign    alignment,
oaOrient    orient,
oaFont    font,
oaDist    height,
oaTextDisplayFormat    format = oacNameTextDisplayFormat,
oaBoolean    overbar = false,
oaBoolean    visible = true,
oaBoolean    drafting = true
[static]
 

This function creates an oaAttrDisplay object that displays the specified attribute of the specified object. The object must be contained in a design database, and the attribute must be an attribute type of the object.

The object on which an oaAttrDisplay can be created must be one of an oaNet, oaInst, oaTerm, oaInstTerm, oaAssignment, or oaDesign or an oacInvalidObjectForAttrDisplay exception is thrown.

Parameters:
object A pointer to the owner object, which must be one of an oaNet, oaInst, oaTerm, oaInstTerm, oaAssignment, or oaDesign.
attribute The attribute of interest on the owner object
layer The layer on which the attrDisplay is created
purpose The purpose on which the attrDisplay is created
origin The location of the origin of the attrDisplay
alignment The horizontal and vertical alignment of the display text with respect to the origin
orient The orientation of the text
font The font style in which the text is displayed
height The height of the display text in user units
format The format used to create the textDisplay
overbar A boolean value that indicates if an overbar is used in the display of this value
visible A boolean value that indicates if this attrDisplay is displayed; this allows the application to turn on or off the attrDisplay display without having to delete it from the database
drafting A boolean value that indicates if the text for this attrDisplay should always be drawn left to right or top to bottom (if drafting is true and the orientation of this attrDisplay is mirrored, the text is drawn backwards)
Exceptions:
oacNonDesignTextDisplay 
oacInvalidObjectForAttrDisplay 

oaAttrType oaAttrDisplay::getAttribute   const
 

This function returns the attribute displayed by this oaAttrDisplay object.

oaObject * oaAttrDisplay::getObject   const
 

This function returns the object whose attribute is displayed by this oaAttrDisplay object.

void oaAttrDisplay::getText const oaNameSpace &    ns,
oaString &    text
const
 

This function returns the value of this attribute display according to the given nameSpace. The nameSpace is only valid for name type attributes.

void oaAttrDisplay::setObject oaObject *    object
 

This function sets the object whose attribute is displayed by this attrDisplay object.

An exception will be thrown if the object is not in the same database as this attrDisplay object or its type is different from that of the object currently associated with this attrDisplay object.

Parameters:
object A pointer to the owner object, which must be in the same database as the attrDisplay object and whose type must be the same as that of the current owner object.
Exceptions:
oacInvalidObjectForAttrDisplay 


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

Return to top of page