20 #include "SheafSystem/preorder_member_iterator.h" 22 #include "SheafSystem/poset_state_handle.h" 23 #include "SheafSystem/preorder_iterator.h" 24 #include "SheafSystem/assert_contract.h" 25 #include "SheafSystem/total_poset_member.h" 66 ensure(unexecutable(
this is first member of iteration or
is_done()));
98 ensure(unexecutable(
this is first member of iteration or
is_done()));
236 ensure(
anchor().is_same_state(&xanchor));
240 ensure(
strict() == xstrict);
242 ensure(unexecutable(preorder - have visited all children of
this));
243 ensure(unexecutable(!
is_done() implies
this is first member));
274 ensure(
anchor().is_same_state(&xanchor));
276 ensure(
filter().is_same_state(&xfilter));
278 ensure(
strict() == xstrict);
280 ensure(unexecutable(preorder - have visited all children of
this));
281 ensure(unexecutable(!
is_done() implies
this is first member));
313 ensure(
anchor().is_same_state(&xanchor));
315 ensure(
filter().is_attached());
317 ensure(
strict() == xstrict);
319 ensure(unexecutable(preorder - have visited all children of
this));
320 ensure(unexecutable(!
is_done() implies
this is first member));
351 ensure(
anchor().is_same_state(&xanchor));
353 ensure(
filter().is_attached());
355 ensure(
strict() == xstrict);
357 ensure(unexecutable(preorder - have visited all children of
this));
358 ensure(unexecutable(!
is_done() implies
this is first member));
367 const std::string& xfilter_name,
390 ensure(
anchor().is_same_state(&xanchor));
392 ensure(!xfilter_name.empty() ?
396 ensure(
strict() == xstrict);
398 ensure(unexecutable(preorder - have visited all children of
this));
399 ensure(unexecutable(!
is_done() implies
this is first member));
virtual abstract_poset_member & anchor()
The poset member whose downset is being iterated over; the top member of the domain of iteration (mut...
void truncate()
Makes this the next member of the subset which is not less than old this, i.e. the depth-first descen...
poset_state_handle * host() const
The poset which this is a handle to a component of.
A client handle for a subposet.
void truncate()
Makes this the next member of the subset which is not less than old this, i.e. the depth-first descen...
bool invariant() const
The class invariant.
abstract_poset_member & item()
The the current member of the iteration (mutable version).
filtered_depth_first_iterator * _iterator
The index iterator used to implement the iteration.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
virtual bool includes_subposet(pod_index_type xsubposet_hub_id, bool xauto_access=true) const
True if this poset includes subposet with hub id xsubposet_hub_id.
virtual void update_item()
Attaches the item handle to the current index, or detaches the item handle if is_done.
virtual filtered_depth_first_member_iterator & operator=(const filtered_depth_first_member_iterator &xother)
Assignment operator.
preorder_member_iterator()
Default constructor; creates an unattached iterator, with and all-pass filter.
virtual bool item_is_ancestor_of(const abstract_poset_member &xmbr) const
True if xmbr conforms to the type of item of this.
Abstract base class with useful features for all objects.
bool is_done() const
True if iteration finished.
bool invariant() const
The class invariant.
bool descending() const
True if iterating over down set of anchor.
An index within the external ("client") scope of a given id space.
const subposet & filter() const
The subposet which is the filter; Defines what is passed, not what is blocked.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
bool strict() const
True if iterating over xstrict up/down set of anchor.
bool invariant_check() const
True if invariant checking is enabled.
virtual ~preorder_member_iterator()
Destructor.
int_type pod_index_type
The plain old data index type.
virtual preorder_member_iterator & operator=(const filtered_depth_first_member_iterator &xother)
Assignment operator.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
An abstract client handle for a member of a poset.
std::string version_name() const
The subposet name for the filter associated with version().
bool is_same_type(const any *other) const
True if other is the same type as this.
void enable_invariant_check() const
Enable invariant checking.
bool is_initialized() const
True if this has been initialized for iteration with respect to a specific anchor.
virtual preorder_member_iterator * clone() const
Make a new instance of the same type as this.
A client handle for an unrestricted member of a poset. A total_poset_member is guaranteed not to be r...