Basic Interface to Alias set structures.
#include <AlSet.h>
class AlSet : public AlObject
AlSet();
virtual ~AlSet();
virtual statusCode deleteObject();
virtual AlObject *copyWrapper() const;
statusCode create( const boolean );
virtual AlObjectType type() const;
virtual const char* name() const;
virtual statusCode setName( const char* );
AlSet* nextSet() const;
AlSet* prevSet() const;
statusCode nextSetD();
statusCode prevSetD();
boolean isEmpty() const;
boolean isExclusive() const;
int numberOfMembers() const;
AlSetMember *firstMember() const;
statusCode applyIteratorToMembers( AlIterator* iter, int& );
// Obsolete .. Moved to AlSettable, AlSetMember
statusCode addMember( const AlSettable * );
statusCode removeMember( AlSettable *);
statusCode removeMember( AlSetMember *);
AlSetMember *hasMember( const AlSettable* ) const;
static statusCode removeFromAllSets( AlSettable* );
A set can be described as a storable list. A set can contain any combination of cameras, DAG nodes, curve CVs and surface CVs, or polyset vertices. A set can be exclusive or multi - exclusive means that a member of a set can be in no other set; multi means that a member of a set can be in any other non-exclusive set.
You can access the members of a set by traversing a set's list of members.
If you remove all members of a set, the empty AlSet object must be explicitly deleted. If you store an empty set, it will be lost when you retrieve your wire file into the interactive Alias package.
The following classes can be grouped into sets: AlDagNode, AlPerspectiveCamera, AlCurveCV, AlPolysetVertex and AlSurfaceCV.
Constructs an AlSet wrapper object. Use the create() method to initialize an AlSet.
Deletes an AlSet wrapper object.
Removes all the set members from the set, and then deletes the set itself.
sSuccess - the set was deleted
sFailure - the set could not be deleted
sInvalidObject - the set is invalid
Returns an exact duplicate of the AlSet wrapper object.
Does any initialization and allocation of data for an AlSet. If the 'exclusive' flag is set to TRUE, then this set is made an exclusive set (i.e., the members of this set are not allowed to be members of any other set). If it is set to FALSE, then the set is designated as "multiple" (i.e., the members of this set can be in any other non-exclusive set).
< exclusive - state to set the exclusive flag for this set (see above)
sInsufficientMemory - no memory
Returns the class identifier 'kSetType'.
Returns the name of the object.
Changes the name of the set to a new name. If the given name is not a unique one, then a unique name is generated based on the given name and assigned to the set. In this case, a status code of sNameChangedToUniqueOne is returned. It is illegal for the new name to be NULL.
< newName - new name of the object
sSuccess - name was changed successfully
sFailure - name was not changed
sNameChangedToUniqueOne - name was changed to be a unique version of the given name
sInvalidArgument - 'newName' was NULL
sInvalidObject - the set was invalid
Returns a pointer to the next AlSet in the set list or NULL if there are no more sets.
Returns a pointer to the previous AlSet in the set list or NULL if there are no previous sets.
Destructively sets the wrapper to point to the next set in the set list. If the next set cannot be found, the wrapper is unaffected.
sSuccess - the wrapper points to the next set
sFailure - there is no next set
sInvalidObject - the set is invalid
Destructively points the wrapper to the previous set in the set list. If the previous set cannot be found, the wrapper is unaffected.
sSuccess - the wrapper points to the previous set
sFailure - there is no previous set
sInvalidObject - the set is invalid
Returns TRUE if the set is empty (ie. it has zero members). Otherwise, it returns FALSE.
Returns TRUE if the set is exclusive and FALSE if the set is "multiple".
Returns the number of members belonging to this set. This method returns -1 if the set is invalid.
Returns a pointer to the AlSetMember that is the first member in the list of members of this set. Returns NULL if this set has no members. Note that this operation is a O(lg n) operation and is provided for convience. If you intend to perform an operation on every element in the set, use an iterator.
Applies the given iterator to each member of this set. See the documentation for AlIterator.
< iter - the iterator to apply to each set member
> rc - the result of the last application of the iterator
sSuccess - applyIteratorToMembers exited normally
sInvalidArgument - 'iter' was NULL
sFailure - applyIteratorToMembers exited abnormally
sInvalidObject - the set is invalid
Adds the given AlDagNode to this set. If this set is exclusive, then the given AlDagNode must not belong to any other set. The given AlDagNode also must not belong to any exclusive sets. If the given AlDagNode already belongs to this set, then nothing is added.
< dagNode - the DAG node to be added to the set
sSuccess - DAG node was successfully added to the set
sInsufficientMemory - not enough memory available
sObjectInSet - the given DAG node already belongs to this set
sObjectInAnotherSet - this set is exclusive and the given DAG node already belongs to another set
sObjectInExclusiveSet - the given DAG node already belongs to an exclusive set
sObjectAncestorInSet - an ancestor of the given DAG node already belongs to this set
sObjectDescendentInSet - a descendent of the given DAG node already belongs to this set
sInvalidArgument - 'setobj' was NULL
sInvalidObject - the set was invalid
Removes the given object from this set. If the given DAG node was not found in the set, then nothing is removed.
< setobj - the object to remove from this set
sSuccess - the object was removed successfully
sInvalidArgument - setobj was NULL
sObjectNotAMember - the object was not found in this set
sInvalidObject - the set is invalid
Removes the given object from this set. If the given DAG node was not found in the set, then nothing is removed.
< setobj - the object to remove from this set
sSuccess - the object was removed successfully
sInvalidArgument - setMember was invalid
sObjectNotAMember - the object was not found in this set
sInvalidObject - the set is invalid
Returns a pointer to the AlSetMember that refers to the given AlDagNode IF the AlDagNode is a member of this set. Otherwise, returns NULL.
< AlSettable *setobj - the object to test membership for
Removes this object from all sets in the universe that it may be in.
< setobj - the object to remove from all sets
sSuccess - the object was removed from all sets