alias_api.AlSettable

class alias_api.AlSettable

Bases: pybind11_object

Encapsulates methods common to Alias objects which can belong to sets.

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.

Note that this class relies on the fact the classes derived from it overload the extractType function in AlObject. In theory, we should be introducing a new base class, AlTypeable, which has a pure virtual extractType method. But this introduces a lot of extra code. Let’s just assume for now that if AlFoo inherits AlSettable, then AlFoo provides a working extractType method.

add_to_set(self: alias_api.AlSettable, arg0: AlSet) int

Adds this object to the set

Parameters

set (AlSet) – set to add to

Returns

The status of the operation: Success - successfully added to the set. InsufficientMemory - not enough memory available. ObjectInSet - this object already belongs to this set ObjectInAnotherSet - this set is exclusive and this object already belongs to another set. ObjectInExclusiveSet - this object already belongs to an exclusive set. ObjectAncestorInSet - an ancestor of this object already belongs to this set. ObjectDescendentInSet - a descendent of this object already belongs to this set. InvalidArgument - set was NULL or, this object is a AlSurfaceCV and is the target of a construction history. InvalidObject - this object was invalid

Return type

AlStatusCode

apply_iterator_to_sets(self: alias_api.AlSettable, arg0: AlIterator) tuple[int, int]

Apply the given iterator to all the sets affect 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.

Parameters

iter (AlIterator) – the iterator to apply to each set

Returns

A tuple containing: (1) the status of the application of the iterator

Success - the applyIteratorToSets exited normally Failure - applyIteratorToSets exited abnormally InvalidArgument - iter is NULL

  1. the return value of the last application of the iterator’s function

Return type

tuple<AlStatusCode, int>

first_set(self: alias_api.AlSettable) AlSet

Finds and returns the first set of which this object is a member. If no such set can be found, None is returned.

is_set_member(self: alias_api.AlSettable, arg0: AlSet) AlSetMember

Returns the AlSetMember object if it is a member of the set.

Parameters

set (AlSet) – the object to test membership in.

Returns

The AlSetMember object representing the set membership.

Return type

AlSetMember

next_set(self: alias_api.AlSettable, arg0: AlSet) AlSet

Finds and returns the set following the given one of which this object is a member. If no such set can be found, None is returned.

Parameters

last_set (AlSet) – Set to walk forward from

Returns

The next set of which this object is a member

Return type

AlSet

prev_set(self: alias_api.AlSettable, arg0: AlSet) AlSet

Finds and returns the set preceding the given one of which this object is a member. If no such set can be found, None is returned.

Parameters

last_set (AlSet) – Set to walk forward from

Returns

The previous set of which this object is a member

Return type

AlSet

remove_from_all_sets(self: alias_api.AlSettable) int

Removes this object from all sets in the universe that it may be in.

Returns

The status of the operation Success - object was removed from all sets

remove_from_set(self: alias_api.AlSettable, arg0: AlSet) int

Removes this object from the set. If the given dag node was not found in the set, then nothing is removed.

Parameters

set (AlSet) – the set to remove from.

Returns

The status of the operation: Success - if this object was removed successfully InvalidArgument - set was invalid ObjectNotAMember - if the object was not found in this set InvalidObject - the set is invalid

Return type

AlStatusCode