Public Member Functions
Group Class Reference

Detailed Description

The Group class represents a collection of related objects.

#include <xsi_group.h>

Inheritance diagram for Group:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Group ()
 ~Group ()
 Group (const CRef &in_ref)
 Group (const Group &in_obj)
bool IsA (siClassID in_ClassID) const
siClassID GetClassID () const
Groupoperator= (const Group &in_obj)
Groupoperator= (const CRef &in_ref)
bool IsMember (const CRef &in_ref, bool in_branchmember=false) const
CRefArray GetMembers () const
CRefArray GetExpandedMembers () const
CStatus AddMember (const CRef &in_ref, bool in_branchmember=false)
CStatus AddMembers (const CRefArray &in_refs, bool in_branchmember=false)
CStatus RemoveMember (const CRef &in_ref)
CStatus RemoveMembers (const CRefArray &in_refs)
CStatus RemoveAllMembers (void)

Constructor & Destructor Documentation

Group ( )

Constructs a Group object.

~Group ( )

Destroys a Group object.

Group ( const CRef in_ref)

Constructs a Group object from a CRef object.

Parameters:
in_refA reference to a group.
Group ( const Group in_obj)

Constructs a new Group object from an existing Group object.

Parameters:
in_objAn existing Group object to copy into this Group object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID) const [virtual]

Returns true if this object supports the functionality of a specified class. For example, a Group is a type of SceneItem, so a Group object supports SceneItem functionality.

Parameters:
in_ClassIDTest if this object supports this class.
Returns:
True if this object supports the specified class, and false otherwise.

Reimplemented from SceneItem.

Reimplemented in Layer, and Partition.

siClassID GetClassID ( ) const [virtual]

Returns the class ID for this object.

Returns:
The class ID.

Reimplemented from SceneItem.

Reimplemented in Layer, and Partition.

Group& operator= ( const Group in_obj)

Assigns a Group object to an existing Group object.

Parameters:
in_objA Group object to be copied into this object.
Returns:
The reinitialized Group object.
Group& operator= ( const CRef in_ref)

Assigns a CRef to this Group object. The Group object is cleared if the CRef is not a reference to an object that supports the Group class.

Parameters:
in_refA reference to an object that supports the Group class.
Returns:
The reinitialized Group object.

Reimplemented from SceneItem.

Reimplemented in Layer, and Partition.

bool IsMember ( const CRef in_ref,
bool  in_branchmember = false 
) const

Tests whether an object is a member of the group. For large numbers of objects, it is faster to enumerate the group members and use SIObject::IsEqualTo to find the object you're looking for and ProjectItem::GetBranchFlag to check whether the object was added as a branch member.

Parameters:
in_refThe object to find in the group.
in_branchmemberIf True, check if the object is a branch member.
Returns:
True if the object is a member, and False otherwise.
Since:
5.0
CRefArray GetMembers ( ) const

Returns the SceneItem objects, such as X3DObject and Cluster, that represent the group members.

Returns:
An array containing the members of the group.
Since:
5.0
CRefArray GetExpandedMembers ( ) const

Returns the SceneItem objects, such as X3DObject and Cluster, for the group members and the children of any branch members.

Returns:
An array containing the members of the group.
Since:
5.0
CStatus AddMember ( const CRef in_ref,
bool  in_branchmember = false 
)

Adds a single member to the group.

Parameters:
in_refThe object to add to the group.
in_branchmemberIf set to true, the object is added as a branch member. All objects in a branch member's hierarchy inherit properties applied to the group.
Since:
5.0
CStatus AddMembers ( const CRefArray in_refs,
bool  in_branchmember = false 
)

Adds the specified members to the group.

Parameters:
in_refsAn array of objects to add to the group.
in_branchmemberIf set to true, the objects are added as branch members. All objects in a branch member's hierarchy inherit properties applied to the group.
Since:
5.0
CStatus RemoveMember ( const CRef in_ref)

Removes a single member from the group.

Parameters:
in_refThe member to remove.
Since:
5.0
CStatus RemoveMembers ( const CRefArray in_refs)

Removes the specified members from the group.

Parameters:
in_refsAn array of members to remove.
Since:
5.0
CStatus RemoveAllMembers ( void  )

Removes all members from the group.

Since:
5.0

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