oaFigGroup Class Reference

Inheritance diagram for oaFigGroup:

oaFig oaBlockObject oaDesignObject oaObject


Public Methods

void getName (oaSimpleName &name) const
void getName (const oaNameSpace &ns, oaString &name) const
void getTransform (oaTransform &xform) const
void getOrigin (oaPoint &origin) const
oaOrient getOrient () const
oaFigGroupStatus getFigGroupStatus () const
oaBoolean hasDefaultConstraintGroup () const
oaConstraintGroupgetDefaultConstraintGroup () const
oaBoolean isOrdered () const
void setName (const oaSimpleName &name)
void setTransform (const oaTransform &xform)
void setOrigin (const oaPoint &origin)
void setOrient (oaOrient orient)
void setFigGroupStatus (oaFigGroupStatus status)
void setOrdered (oaBoolean ordered=true)
void destroyFigs (oaBoolean recurse=true)
oaCollection< oaFigGroupMem, oaFigGroup > getMembers () const

Static Public Methods

oaFigGroup * create (const oaBlock *block, const oaSimpleName &name, oaBoolean ordered=false)
oaFigGroup * create (const oaBlock *block, oaBoolean ordered=false)
oaFigGroup * find (const oaBlock *block, const oaSimpleName &name)

Public Types

enum  { dtIndex = oacFigGroupDataType }

Detailed Description

The FigGroup represents a collection of figures that can be used by graphical design-entry tools to hold a set of figures that can be easily replicated and reused. For example, a FigGroup can be used to treat a number of figures as a single figure, where the FigGroup behaves in many ways like an instance but without the overhead of referring to an external master, and yet it is still transparently accessible as flat geometry. Since FigGroups can be nested, they provide a general way to add hierarchy to a design’s geometry. FigGroups are also designed to support the creation of multiple copies of a group of figures, and they allow applications to maintain the correspondence between those copies. A FigGroup is purely geometric and does not contain connectivity objects or anything else that is not a figure. Any figure can belong to a FigGroup, and a FigGroup can be a member of another FigGroup. However, each figure can belong to, at most, a single FigGroup.

When a figure belongs to a FigGroup, it does not affect the caller’s ability to access, move, and change the figure as an individual object. It simply adds the ability to manipulate an entire set of figures together; functions including oaFig::move and oaFig::copy can be used for this purpose.

When a FigGroup is created its transform is set to an origin of (0,0) and an orientation of oacR0. When oaFig::move or oaFig::copy is called on a FigGroup, the transform specified is applied to each oaFig in the oaFigGroup and to the existing transform attribute of the FigGroup. See Using Transforms in the Programmers Guide for more information about applying transforms.

The bounding box of a FigGroup is the smallest rectangle that contains the bounding boxes of all of its constituent figures. FigGroups have an origin and an orientation much like instances. The use of these attributes is the responsibility of the application. For example, an application can use the origin of a FigGroup to determine what point to rotate the group around if a user requests a rotation. Modifying a FigGroups’s transform with setTransform(), setOrigin(), or setOrient() has no affect on the members of the FigGroup. When there are multiple copies of a FigGroup, these transform attributes are used to keep track of the geometric relationships between the copies. However, OpenAccess does not directly track which FigGroups are copies of each other, or if a FigGroup was modified since it was copied.

There are similarities between FigGroups and oaGroups that have leaders, but these are independent constructs. If a leader of an oaGroup is placed in a FigGroup, all of the followers that are oaFigs are also added to the FigGroup. When a group leader is removed from a FigGroup, its followers are also automatically removed. When a leader is moved, its followers are moved, and this is true whether the move is due to moving the leader itself, or due to moving a FigGroup that the leader belongs to. Similarly, when a leader is destroyed, all its followers are destroyed whether the action started with a destruction of the leader or started by calling destroyFigs() on a FigGroup that the leader belongs to. It should also be noted that not all of a leader's followers must be in the leader's FigGroup at all times. Although the followers are added as a leader is added to a FigGroup, it is possible to remove a follower from a FigGroup. Also note that if the followers of a leader are changed after that leader has already been added to a FigGroup, copying or moving that FigGroup will not include those changes.

A FigGroup can optionally be ordered; this option can be set by the ordered argument to create(), or by calling setOrdered() after creation. If a FigGroup is ordered, an iteration is guaranteed to produce its members in its defined order. The order starts as the order that members are added, and the order is manipulated using the moveAfter() and moveToFirst() functions on oaFigGroupMem. Note that while copy in most cases preserves ordering, in some cases it might fail to preserve ordering if the FigGroup contains both the leader and one or more followers from the same oaGroup.

A region query can be performed to produce the FigGroups that overlap a certain area by using the oaFigGroupQuery class.


Member Function Documentation

oaFigGroup * oaFigGroup::create const oaBlock *    block,
oaBoolean    ordered = false
[static]
 

This function creates a new oaFigGroup in the given block.

Parameters:
block The block in which the FigGroup is created.
ordered A Boolean value of true if this FigGroup is ordered, or false, if this FigGroup is not ordered.
Exceptions:
oacFigGroupNameExists 

oaFigGroup * oaFigGroup::create const oaBlock *    block,
const oaSimpleName &    name,
oaBoolean    ordered = false
[static]
 

This function creates a new oaFigGroup in the given block with the specified name.

Parameters:
block The block in which the FigGroup is created.
name The name of the FigGroup to be created.
ordered A Boolean value of true if this FigGroup is ordered, or false, if this FigGroup is not ordered.
Exceptions:
oacInvalidName 

void oaFigGroup::destroyFigs oaBoolean    recurse = true
 

This function destroys the constituent oaFigs of this oaFigGroup but does not destroy the FigGroup itself.

oaFigGroup * oaFigGroup::find const oaBlock *    block,
const oaSimpleName &    name
[static]
 

This function finds the oaFigGroup in the given block with the given name.

Parameters:
block The block to search for the specified FigGroup.
name The name of the FigGroup to find.

oaConstraintGroup * oaFigGroup::getDefaultConstraintGroup   const
 

This function retrieves the default constraint group for this FigGroup. It returns NULL if this FigGroup does not have a default constraint group. The default constraint group contains constraints that apply as a default to the figs that are contained within this figGroup, including any figs within nested figGroups.

oaFigGroupStatus oaFigGroup::getFigGroupStatus   const
 

This function returns the status of the oaFigGroup, which represents one of three states: normal, fixed, or locked. The status is not enforced by OpenAccess but is used by applications to indicate whether the contents of the FigGroup can be modified by both manual or automatic tools (normal), only by manual tools, (fixed), or cannot be modified by any tools (locked).

oaCollection< oaFigGroupMem, oaFigGroup > oaFigGroup::getMembers   const
 

This function returns a collection containing the oaFigGroupMem members of an oaFigGroup. Each oaFigGroupMem references one oaFig that belongs to the oaFigGroup.

void oaFigGroup::getName const oaNameSpace &    ns,
oaString &    name
const
 

This function retrieves the name of this oaFigGroup in the specified nameSpace.

Parameters:
ns The nameSpace in which the FigGroup name is retrieved.
name The name of this FigGroup in the nameSpace specified by ns.

void oaFigGroup::getName oaSimpleName &    name const
 

This function retrieves the name of this oaFigGroup.

Parameters:
name The retrieved name of this FigGroup.

oaOrient oaFigGroup::getOrient   const
 

This function returns the orientation of this FigGroup.

void oaFigGroup::getOrigin oaPoint &    origin const
 

This function gets the origin of this FigGroup.

Parameters:
origin The origin of this FigGroup.

void oaFigGroup::getTransform oaTransform &    xform const
 

This function gets the transform of this oaFigGroup. The transform contains both the origin and the orientation for the FigGroup.

Parameters:
xform The transform of this FigGroup.

oaBoolean oaFigGroup::hasDefaultConstraintGroup   const
 

This function returns a boolean value representing whether this FigGroup has a default constraint group.

oaBoolean oaFigGroup::isOrdered   const
 

This function returns true if FigGroup is ordered; otherwise, false is returned.

void oaFigGroup::setFigGroupStatus oaFigGroupStatus    status
 

This function sets the status of the oaFigGroup to one of three values, which are normal, fixed, or locked. The status is not enforced by OpenAccess but is used by applications to indicate whether the contents of the FigGroup can be modified by both manual or automatic tools (normal), only by manual tools, (fixed), or cannot be modified by any tools (locked).

Parameters:
status One of three values to represent normal, fixed, or locked.

void oaFigGroup::setName const oaSimpleName &    name
 

This function sets this oaFigGroup's name.

Parameters:
name The name to set on this FigGroup.
Exceptions:
oacFigGroupNameExists 

void oaFigGroup::setOrdered oaBoolean    ordered = true
 

This function sets whether the FigGroup is ordered.

Parameters:
ordered A Boolean value of true if this FigGroup is ordered, or false, if this FigGroup is not ordered.

void oaFigGroup::setOrient oaOrient    orient
 

This function sets the orientation of this FigGroup, but has no effect on the oaFigs that belong to this group.

Parameters:
orient The orientation to set on this FigGroup.

void oaFigGroup::setOrigin const oaPoint &    origin
 

This function sets the origin of this oaFigGroup, but has no effect on the oaFigs that belong to this group. The origin is defined relative to the origin of the oaBlock in which this oaFigGroup is defined.

Parameters:
origin The origin to set on this FigGroup.

void oaFigGroup::setTransform const oaTransform &    xform
 

This function sets the transform of this oaFigGroup, but has no effect on the oaFigs that belong to this group.

Parameters:
xform The transform to set on this FigGroup.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page