oaGroupMember Class Reference

Inheritance diagram for oaGroupMember:

oaObject


Public Methods

void destroy ()
oaBoolean isLeader ()
oaGroupgetGroup ()
oaObjectgetObject ()
void moveAfter (oaGroupMember *member)
void moveToFirst ()

Static Public Methods

oaGroupMember * create (oaGroup *group, oaObject *object, oaBoolean isLeader=false)

Public Types

enum  { dtIndex = oacBaseGroupMemDataType }
enum  { domain = oacNoDomain }

Detailed Description

The oaGroupMember class implements group member objects. A group member object represents a relationship between a database object and a group.

This class represents the membership of a database object in a group. You can place most objects in a group or even another group, as long as they reside in the same database as the containing group. However, database classes (oaDesign, oaTech, oaDDObjectDB) cannot be group members and the paged parasitic objects cannot be included in a group. See oaGroup for more information.

A group can have a hierarchy domain specified when it is created. In this case, each member added to the group must be of the same domain as the group. If the group domain is unspecified, or if it is oacNoDomain, then members of any domain can be added to the group. See oaGroup and oaDomain for more information.

A collection of all the oaGroupMembers in a group is returned by oaGroup:getMembers and a collection of all the oaGroupMembers that include a given object is returned by oaObject::getGroupMems.

An instance of oaGroupMember is automatically destroyed when either the object it references or the group that owns it is destroyed.

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


Member Function Documentation

oaGroupMember * oaGroupMember::create oaGroup *    group,
oaObject *    object,
oaBoolean    isLeader = false
[static]
 

This function creates a group member for the specified object in the specified group. The object and the group must be in the same database. The object must also be in the same domain as the group if the group is restricted by domain. It is possible to specify this group member as the leader of the group if the group was created with the type oacSetGroupType and if it does not currently have a leader.

If the created group member is a leader, it becomes the first group member; otherwise, the created member becomes the last group member.

You can change the order of members in an ordered group by using oaGroupMember::moveToFirst and oaGroupMember::moveAfter functions. If you later call oaGroupMember::moveToFirst() to move a different member in front of the leader, an exception will be thrown.

Parameters:
group The group to which this group member belongs
object The object to include in the specified group
isLeader Specifies if this group member is set as the leader of the specified group; the default is false
Exceptions:
oacGroupMemberNotInSameDB 
oacGroupMemberNotInDomain 
oacInvalidGroupForSameObj 
oacInvalidGroupForLeader 
oacInvalidGroupLeader 
oacInvalidGroupObject 
oacInvalidObjForGroup 
oacMismatchDatabaseID 
oacMultipleGroupLeader 

void oaGroupMember::destroy  
 

This function removes this object from the given group and destroys this oaGroupMember object. The deleteWhen property of the related group is also checked to determine if the group itself should also be destroyed. If it is a deleteFirst type group, it is destroyed. If it is a deleteLast type group, it is destroyed only if this group member is the last one in the group.

oaGroup * oaGroupMember::getGroup  
 

This function returns the group of which owns this group member.

oaObject * oaGroupMember::getObject  
 

This function returns the object that is referred by this group member.

oaBoolean oaGroupMember::isLeader  
 

This function returns a boolean value indicating whether this group member is the leader of the group.

void oaGroupMember::moveAfter oaGroupMember *    member
 

This function moves this group member in an ordered group to the position behind the specified group member in the same group. If these two group members are the same, this function has no effect.

If you attempt to move the group leader after another member, an oacInvalidMoveLeader exception will be thrown.

If this object and member are not in the same group, an oacInvalidGroupForMemberMove exception will be thrown.

if the group to which this object belongs is not an ordered group, an oacInvalidGroupTypeForMemberMove exception will be thrown.

Parameters:
member The group member to move this groupMember after
Exceptions:
oacInvalidMoveLeader 
oacInvalidGroupForMemberMove 
oacInvalidGroupTypeForMemberMove 

void oaGroupMember::moveToFirst  
 

This function attempts to move this group member in an ordered group to the first group member in its group. The current first group member is moved to the second, and so on with the following group members.

If you attempt to move a group member in front of the group leader, an oacInvalidMoveLeader exception will be thrown.

If the group to which this object belongs is not an ordered group, an oacInvalidGroupTypeForMemberMove exception will be thrown.

Exceptions:
oacInvalidMoveLeader 
oacInvalidGroupTypeForMemberMove 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 

anonymous enum
 

Enumeration values:
domain 


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

Return to top of page