SheafSystem
0.0.0.0
|
#include <preorder_member_iterator.h>
Public Member Functions | |
preorder_member_iterator () | |
Default constructor; creates an unattached iterator, with and all-pass filter. More... | |
preorder_member_iterator (const preorder_member_iterator &xother) | |
Copy constructor. More... | |
virtual preorder_member_iterator & | operator= (const filtered_depth_first_member_iterator &xother) |
Assignment operator. More... | |
preorder_member_iterator & | operator= (const preorder_member_iterator &xother) |
Assignment operator. More... | |
virtual | ~preorder_member_iterator () |
Destructor. More... | |
virtual bool | is_ancestor_of (const any *other) const |
True if other conforms to this. More... | |
virtual preorder_member_iterator * | clone () const |
Make a new instance of the same type as this. More... | |
bool | invariant () const |
The class invariant. More... | |
preorder_member_iterator (const abstract_poset_member &xanchor, bool xdown, bool xstrict) | |
Creates an iterator anchored at xanchor, no filter. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only. More... | |
preorder_member_iterator (const abstract_poset_member &xanchor, const subposet &xfilter, bool xdown, bool xstrict) | |
Creates an iterator anchored at xanchor, filtered by xfilter. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only. More... | |
preorder_member_iterator (const abstract_poset_member &xanchor, pod_index_type xfilter_index, bool xdown, bool xstrict) | |
Creates an iterator anchored at xanchor, filtered by xfilter_index. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only. More... | |
preorder_member_iterator (const abstract_poset_member &xanchor, const scoped_index &xfilter_index, bool xdown, bool xstrict) | |
Creates an iterator anchored at xanchor, filtered by xfilter_index. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only. More... | |
preorder_member_iterator (const abstract_poset_member &xanchor, const std::string &xfilter_name, bool xdown, bool xstrict) | |
Creates an iterator anchored at xanchor, filtered by xfilter_name. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only. More... | |
void | truncate () |
Makes this the next member of the subset which is not less than old this, i.e. the depth-first descent is truncated and the cover of this is not visited. More... | |
Public Member Functions inherited from sheaf::filtered_depth_first_member_iterator | |
filtered_depth_first_member_iterator (const filtered_depth_first_member_iterator &xother) | |
Copy constructor. More... | |
virtual | ~filtered_depth_first_member_iterator () |
Destructor. More... | |
depth_first_iterator::order_type | order () |
Iteration directions. More... | |
bool | is_initialized () const |
True if this has been initialized for iteration with respect to a specific anchor. More... | |
virtual abstract_poset_member & | anchor () |
The poset member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More... | |
virtual const abstract_poset_member & | anchor () const |
The poset member whose downset is being iterated over; the top member of the domain of iteration (const version). More... | |
virtual void | put_anchor (const abstract_poset_member *xanchor) |
Set anchor() to *xanchor. More... | |
virtual void | put_anchor (pod_index_type xanchor_hub_id) |
Set anchor() to member at xanchor_hub_id. More... | |
void | put_anchor (const scoped_index &xanchor_id) |
Set anchor() to member at xanchor_id. More... | |
const subposet & | filter () const |
The subposet which is the filter; Defines what is passed, not what is blocked. More... | |
void | put_filter (const subposet &filter) |
Sets the subposet which is the filter. More... | |
void | put_filter (const std::string &xfilter_name) |
Sets the subposet which is the filter. More... | |
void | put_filter (pod_index_type xfilter_hub_id) |
Sets the subposet which is the filter. More... | |
void | put_filter (const scoped_index &xfilter_id) |
Sets the subposet which is the filter. More... | |
bool | descending () const |
True if iterating over down set of anchor. More... | |
void | put_descending (bool xdescending) |
Set descending() to xdescending. More... | |
bool | strict () const |
True if iterating over xstrict up/down set of anchor. More... | |
void | put_strict (bool xstrict) |
Set strict() to xstrict. More... | |
bool | is_done () const |
True if iteration finished. More... | |
virtual void | next () |
Makes this the next member of the iteration. More... | |
virtual void | reset (bool xreset_markers=RESET) |
Restarts the iteration. More... | |
int | ct (bool xreset=false) |
The number of members of the iteration set, from the current member to the end, inclusive. If xreset, reset before computing the count. More... | |
bool | has_visited (pod_index_type xhub_id) const |
True if this has already visited member with hub id xhub_id. More... | |
bool | has_visited (const scoped_index &xid) const |
True if this has already visited member with id xid. More... | |
bool | has_visited (const abstract_poset_member &xmbr) const |
True if this has already visited member xmbr. More... | |
void | put_has_visited (pod_index_type xhub_id, bool xvalue) |
Set the visited marker for hub id xhub_id to xvalue. Intended for use reseting iterator without having to reset entire collection of markers. More... | |
void | put_has_visited (const scoped_index &xid, bool xvalue) |
Set the visisted marker for id xid to xvalue. Intended for use reseting iterator without having to reset entire collection of markers. More... | |
const scoped_index & | greater_index () const |
The index of the greater member of the current link. More... | |
const scoped_index & | lesser_index () const |
The index of the lesser member of the current link lesser_index() == index() More... | |
abstract_poset_member & | item () |
The the current member of the iteration (mutable version). More... | |
const abstract_poset_member & | item () const |
The the current member of the iteration (const version). More... | |
virtual bool | item_is_ancestor_of (const abstract_poset_member &xmbr) const |
True if xmbr conforms to the type of item of this. More... | |
virtual bool | anchor_is_ancestor_of (const abstract_poset_member &xmbr) const |
True if xmbr conforms to the type of anchor of this. More... | |
Public Member Functions inherited from sheaf::any | |
bool | is_same_type (const any *other) const |
True if other is the same type as this. More... | |
virtual | ~any () |
Destructor. More... | |
bool | invariant_check () const |
True if invariant checking is enabled. More... | |
void | enable_invariant_check () const |
Enable invariant checking. More... | |
void | disable_invariant_check () const |
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More... | |
int | disable_invariance_check_request_depth () const |
Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from sheaf::filtered_depth_first_member_iterator | |
filtered_depth_first_member_iterator (filtered_depth_first_iterator *xitr, abstract_poset_member *xitem) | |
Covariant constructor; supports virtual construction of data members. More... | |
virtual void | update_item () |
Attaches the item handle to the current index, or detaches the item handle if is_done. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Protected Attributes inherited from sheaf::filtered_depth_first_member_iterator | |
abstract_poset_member * | _item |
The member handle for the current item in the iteration. More... | |
filtered_depth_first_iterator * | _iterator |
The index iterator used to implement the iteration. More... | |
Definition at line 44 of file preorder_member_iterator.h.
sheaf::preorder_member_iterator::preorder_member_iterator | ( | ) |
Default constructor; creates an unattached iterator, with and all-pass filter.
Definition at line 29 of file preorder_member_iterator.cc.
References invariant(), and sheaf::filtered_depth_first_member_iterator::is_initialized().
Referenced by clone(), invariant(), and preorder_member_iterator().
sheaf::preorder_member_iterator::preorder_member_iterator | ( | const preorder_member_iterator & | xother | ) |
Copy constructor.
Definition at line 49 of file preorder_member_iterator.cc.
References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), operator=(), and sheaf::filtered_depth_first_member_iterator::strict().
|
virtual |
Destructor.
Definition at line 129 of file preorder_member_iterator.cc.
References is_ancestor_of().
Referenced by operator=().
sheaf::preorder_member_iterator::preorder_member_iterator | ( | const abstract_poset_member & | xanchor, |
bool | xdown, | ||
bool | xstrict | ||
) |
Creates an iterator anchored at xanchor, no filter. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only.
Definition at line 215 of file preorder_member_iterator.cc.
References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::item_is_ancestor_of(), preorder_member_iterator(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::filtered_depth_first_member_iterator::strict().
sheaf::preorder_member_iterator::preorder_member_iterator | ( | const abstract_poset_member & | xanchor, |
const subposet & | xfilter, | ||
bool | xdown, | ||
bool | xstrict | ||
) |
Creates an iterator anchored at xanchor, filtered by xfilter. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only.
Definition at line 250 of file preorder_member_iterator.cc.
References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::item_is_ancestor_of(), preorder_member_iterator(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::filtered_depth_first_member_iterator::strict().
sheaf::preorder_member_iterator::preorder_member_iterator | ( | const abstract_poset_member & | xanchor, |
pod_index_type | xfilter_index, | ||
bool | xdown, | ||
bool | xstrict | ||
) |
Creates an iterator anchored at xanchor, filtered by xfilter_index. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only.
Definition at line 289 of file preorder_member_iterator.cc.
References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::item_is_ancestor_of(), preorder_member_iterator(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::filtered_depth_first_member_iterator::strict().
sheaf::preorder_member_iterator::preorder_member_iterator | ( | const abstract_poset_member & | xanchor, |
const scoped_index & | xfilter_index, | ||
bool | xdown, | ||
bool | xstrict | ||
) |
Creates an iterator anchored at xanchor, filtered by xfilter_index. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only.
Definition at line 327 of file preorder_member_iterator.cc.
References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::item_is_ancestor_of(), preorder_member_iterator(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::filtered_depth_first_member_iterator::strict().
sheaf::preorder_member_iterator::preorder_member_iterator | ( | const abstract_poset_member & | xanchor, |
const std::string & | xfilter_name, | ||
bool | xdown, | ||
bool | xstrict | ||
) |
Creates an iterator anchored at xanchor, filtered by xfilter_name. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only.
Definition at line 366 of file preorder_member_iterator.cc.
References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::item_is_ancestor_of(), sheaf::subposet::name(), sheaf::read_write_monitor_handle::state_is_read_accessible(), sheaf::filtered_depth_first_member_iterator::strict(), truncate(), and sheaf::poset_component::version_name().
|
virtual |
Make a new instance of the same type as this.
Implements sheaf::filtered_depth_first_member_iterator.
Definition at line 167 of file preorder_member_iterator.cc.
References invariant(), and preorder_member_iterator().
Referenced by is_ancestor_of().
|
virtual |
The class invariant.
Reimplemented from sheaf::filtered_depth_first_member_iterator.
Definition at line 188 of file preorder_member_iterator.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::filtered_depth_first_member_iterator::invariant(), sheaf::any::invariant_check(), and preorder_member_iterator().
Referenced by clone(), operator=(), and preorder_member_iterator().
|
virtual |
True if other conforms to this.
Reimplemented from sheaf::filtered_depth_first_member_iterator.
Definition at line 147 of file preorder_member_iterator.cc.
References clone().
Referenced by operator=(), and ~preorder_member_iterator().
|
virtual |
Assignment operator.
Reimplemented from sheaf::filtered_depth_first_member_iterator.
Definition at line 78 of file preorder_member_iterator.cc.
References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), invariant(), is_ancestor_of(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::operator=(), and sheaf::filtered_depth_first_member_iterator::strict().
Referenced by preorder_member_iterator().
sheaf::preorder_member_iterator & sheaf::preorder_member_iterator::operator= | ( | const preorder_member_iterator & | xother | ) |
Assignment operator.
Definition at line 107 of file preorder_member_iterator.cc.
References invariant(), is_ancestor_of(), and ~preorder_member_iterator().
void sheaf::preorder_member_iterator::truncate | ( | ) |
Makes this the next member of the subset which is not less than old this, i.e. the depth-first descent is truncated and the cover of this is not visited.
Definition at line 407 of file preorder_member_iterator.cc.
References sheaf::filtered_depth_first_member_iterator::_iterator, sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::depth_first_iterator::truncate(), and sheaf::filtered_depth_first_member_iterator::update_item().
Referenced by preorder_member_iterator().