Encapsulates methods common to Alias objects that can belong to sets.
#include <AlSettable.h>
class AlSettable
virtual AlSet* firstSet() const;
virtual AlSet* nextSet( const AlSet* ) const;
virtual AlSet* prevSet( const AlSet* ) const;
virtual statusCode nextSetD( AlSet* ) const;
virtual statusCode prevSetD( AlSet* ) const;
virtual statusCode applyIteratorToSets( AlIterator*, int& );
statusCode removeFromAllSets();
statusCode removeFromSet( AlSet *set );
statusCode addToSet( AlSet *set );
AlSetMember* isSetMember( const AlSet *set ) const;
This class is a base class for all objects which can be contained in a set. It provides the methods necessary to access the set methods of these objects.
statusCode AlSettable::applyIteratorToSets( AlIterator* iter, int &rc )
Applies the given iterator to all the sets affected by this object. See the documentation for AlIterator.
Warning: be careful when using this iterator. If you modify the actual set during an iteration, it is possible that this routine will end up pointing to invalid data and send you garbage. This should not happen when simply applying transformations to a set. But deleting a set using this method is considered unsafe. If you do it, return immediately.
statusCode AlSettable::addToSet( AlSet *set )
sSuccess - successfully added to the set
sInsufficientMemory - not enough memory available
sObjectInSet - this object already belongs to this set
sObjectInAnotherSet - this set is exclusive and this object already belongs to another set
sObjectInExclusiveSet - this object already belongs to an exclusive set
sObjectAncestorInSet - an ancestor of this object already belongs to this set
sObjectDescendentInSet - a descendent of this object already belongs to this set
sInvalidArgument - set was NULL
sInvalidObject - this object was invalid