Inheritance diagram for oaGroup:
Public Methods | |
void | destroy () |
void | getName (oaString &name) const |
oaDomain | getGroupDomain () const |
oaGroupType | getGroupType () const |
oaGroupDeleteWhen | getDeleteWhen () const |
oaBoolean | isUniqueName () const |
oaBoolean | isOrdered () const |
oaBoolean | isEmpty () const |
void | setName (const oaString &name) |
void | setGroupType (oaGroupType type) |
void | setDeleteWhen (oaGroupDeleteWhen deleteWhen) |
void | setUniqueName (oaBoolean value) |
void | setOrdered (oaBoolean value) |
void | setLeader (oaGroupMember *leader=NULL) |
oaBoolean | hasDefaultConstraintGroup () const |
oaConstraintGroup * | getDefaultConstraintGroup () const |
oaObject * | getOwner () |
oaGroupMember * | getLeader () |
oaGroupDef * | getDef () const |
oaCollection< oaGroupMember, oaGroup > | getMembers () const |
Static Public Methods | |
oaGroup * | create (oaObject *database, const oaString &name, oaGroupType groupType=oacSetGroupType, oaBoolean isUniqueName=true, oaBoolean isOrdered=false, oaGroupDeleteWhen deleteWhen=oacNeverGroupDeleteWhen) |
oaGroup * | create (oaObject *database, const oaString &name, oaDomain domain, oaGroupType groupType=oacSetGroupType, oaBoolean isUniqueName=true, oaBoolean isOrdered=false, oaGroupDeleteWhen deleteWhen=oacNeverGroupDeleteWhen) |
oaGroup * | create (oaObject *database, const oaString &name, oaGroupDef *groupDef, oaGroupType groupType=oacSetGroupType, oaBoolean isUniqueName=true, oaBoolean isOrdered=false, oaGroupDeleteWhen deleteWhen=oacNeverGroupDeleteWhen) |
oaGroup * | create (oaObject *database, const oaString &name, oaDomain domain, oaGroupDef *groupDef, oaGroupType groupType=oacSetGroupType, oaBoolean isUniqueName=true, oaBoolean isOrdered=false, oaGroupDeleteWhen deleteWhen=oacNeverGroupDeleteWhen) |
Public Types | |
enum | { dtIndex = oacBaseGroupDataType } |
enum | { domain = oacNoDomain } |
Groups are designed specifically for applications that need to extend the data model by adding new relationships, which are usually specific to the application. An application creates a group by using the oaGroup::create function and adds objects to groups by using the oaGroupMember::create function. You can also set certain attributes to manage a group.
An example of using a group is an application that clusters together multiple shapes and stores this relationship persistently. The application creates the group and adds the required shapes.
All groups have a name. When you create a group, you can indicate that the group name must be unique within a given database, and you can set or reset the unique name attribute after a group is created by using the oaGroup::setUniqueName function. If a group is marked as requiring a unique name, the database validates that no other group has the same name. The database also ensures that no other group is ever assigned the same name.
A group can be restricted to having members of a particular hierarchy domain by specifying this to the create API using the oaDomain argument. If the domain specified is oacNoDomain, then the group is not restricted; this is the same as not specifying a domain. If any other domain type is specified then all of the members of the group must be of the same domain.
Groups can either be sets or collections as specified with the oaGroupType enum. A given object may only appear once in a set whereas an object may appear in a collection multiple times. Only sets may have leaders.
A group of type set can optionally have a leader. A group leader can be specified when you create a group and set or reset after a group is created using the oaGroup::setLeader function. Specifying a group leader is useful when a group implements a set of objects that must be manipulated together. If an object of a group is designated the leader, other objects of the group are designated as followers. If a destroy, move, or copy operation, or an addition to or removal from an oaFigGroup are applied to an oaGroup leader, the same operation also applies to the followers--for example, if the leader is destroyed, its followers are destroyed.
Note: The leader/follower relationship only applies to destroy, move, or copy operations, or to additions or removals from an oaFigGroup. Other operations performed on the leader do not apply to its followers.
The members of a group can be ordered by using the oaGroup::setOrdered function. The default order of group members corresponds to the order in which they are added, with the first member added being the first in the order. You can change the order of members in an ordered group by using oaGroupMember::moveToFirst and oaGroupMember::moveAfter functions.
Also note that oaGroup::setLeader moves its object to the first group position. If you later call oaGroupMember::moveToFirst() on a member of an ordered group to move a different member in front of the leader, an exception will be thrown.
Groups can be constructed in oaDesign, oaTech and oaWafer databases. Any object in a given database may be placed in a group in that database except for the database itself and the following paged parasitic objects: oaDevice, oaNode, oaParasiticNetwork, and oaSubNetwork. All members of a group must be objects in the same database the group was created in.
The database can automatically delete a group when a particular event occurs. This is controlled by the oaGroupDeleteWhen enum. You can use it to specify that the group is automatically deleted whenever any member is deleted, or when it becomes empty, or that it is never deleted automatically, only by oaGroup::destroy.
The use of groups and other database extensions should be considered carefully. These extensions are not part of the standard OpenAccess data model and can interfere with the interoperability of tools in a flow. See the Extending the Database section of the Programmers Guide for another method of adding extensions that can be more compact and higher performance.
The collection of groups in a given database is implemented by the getGroups function in each database class. See oaDesign::getGroups, oaDMData::getGroups, oaLib::getGroups and oaTech::getGroups.
The oaGroup class can be observed by deriving from oaObserver<oaGroup>.
|
This function creates a group for the specified object with the specified attributes. If isUniqueName is true and the specified name is not unique among all groups on the specified object, an exception will be thrown. When a domain other than oacNoDomain is specified, objects added to the group are restricted to the domain specified.
|
|
This function creates a group for the specified object with the specified attributes. If isUniqueName is true and the specified name is not unique among all groups on the specified object, an exception will be thrown.
|
|
This function creates a group in the specified database, which must be a design, technology, or design-data database. This variant allows the specification of a hierarchy domain that the group is restricted to.
|
|
This function creates a group in the specified database, which must be a design, technology database, or design library database.
|
|
This function destroys this group. All of the oaGroupMember objects in the group are destroyed as well as the group. This doesn't affect the database objects that the oaGroupMembers point to. |
|
This function returns a pointer to the group def to which this group refers. |
|
This function returns the constraint group for this oaGroup. If no constraints exist on the oaGroup, a new constraint group is created. Constraints in this constraint group apply to the objects which are members of the group.
|
|
This function returns the deleteWhen attribute of this group. This attribute indicates the event, if any, that causes this group to be destroyed. |
|
This function returns the hierarchy domain that this group is restricted to. If no domain has been specified, oacNoDomain is returned. |
|
This function returns whether this group is a collection or a set (see oaGroupTypeEnum). |
|
This function returns the leader member of this group. If the group doesn't have a leader, NULL is returned. |
|
This function returns a collection of all the groupMembers in this group. |
|
This function returns the name of this group in name. |
|
This function returns a pointer to the database that contains this group. |
|
This function returns a Boolean indicating whether there are constraints associated with this oaGroup.
|
|
This function returns a boolean value indicating whether this group has any group members. |
|
This function returns a boolean value indicating whether the objects in this group are ordered. |
|
This function returns a boolean value indicating whether the name of this group must be unique. |
|
This function sets the event type that determines when, if ever, this group will be deleted. |
|
This function sets whether this group is a collection or a set (see oaGroupTypeEnum).
|
|
This function sets the specified group member to the leader of this group. If this group already has a leader, the leader is reset. If the specified group member is already the leader of this group, this function does nothing. If NULL is specified and this group has a leader, this group is set to be leaderless. Note that this function moves the leader to the first group position. If you later call oaGroupMember::moveToFirst() on a member of an ordered group to move a different member in front of the leader, an exception will be thrown.
|
|
This function sets the name of this group to name.
|
|
This function sets the boolean value indicating whether the objects in this group are ordered. |
|
This function sets the boolean value indicating whether the name of this group must be unique in the database that owns the group.
|
|
|
|
|
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.