SheafSystem
0.0.0.0
|
#include <filtered_depth_first_member_iterator.h>
Public Member Functions | |
filtered_depth_first_member_iterator (const filtered_depth_first_member_iterator &xother) | |
Copy constructor. More... | |
virtual filtered_depth_first_member_iterator & | operator= (const filtered_depth_first_member_iterator &xother) |
Assignment operator. More... | |
virtual | ~filtered_depth_first_member_iterator () |
Destructor. More... | |
virtual bool | is_ancestor_of (const any *other) const |
True if other conforms to this. More... | |
virtual filtered_depth_first_member_iterator * | clone () const =0 |
Make a new instance of the same type as this. More... | |
bool | invariant () const |
The class invariant. 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... | |
Protected Member Functions | |
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 | |
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 48 of file filtered_depth_first_member_iterator.h.
sheaf::filtered_depth_first_member_iterator::filtered_depth_first_member_iterator | ( | const filtered_depth_first_member_iterator & | xother | ) |
Copy constructor.
Definition at line 37 of file filtered_depth_first_member_iterator.cc.
References _item, _iterator, anchor(), sheaf::filtered_depth_first_iterator::clone(), sheaf::abstract_poset_member::clone(), descending(), filter(), invariant(), is_done(), is_initialized(), sheaf::any::is_same_type(), item(), operator=(), and strict().
|
virtual |
Destructor.
Definition at line 109 of file filtered_depth_first_member_iterator.cc.
References _item, _iterator, sheaf::poset_component::detach_from_state(), and is_ancestor_of().
Referenced by operator=().
|
protected |
Covariant constructor; supports virtual construction of data members.
Definition at line 931 of file filtered_depth_first_member_iterator.cc.
References _item, _iterator, is_done(), item(), and update_item().
|
virtual |
The poset member whose downset is being iterated over; the top member of the domain of iteration (mutable version).
Definition at line 231 of file filtered_depth_first_member_iterator.cc.
References _iterator, sheaf::depth_first_iterator::anchor(), and is_initialized().
Referenced by ct(), filtered_depth_first_member_iterator(), has_visited(), is_initialized(), operator=(), sheaf::postorder_member_iterator::operator=(), sheaf::preorder_member_iterator::operator=(), sheaf::postorder_member_iterator::postorder_member_iterator(), sheaf::preorder_member_iterator::preorder_member_iterator(), put_anchor(), put_filter(), put_has_visited(), and reset().
|
virtual |
The poset member whose downset is being iterated over; the top member of the domain of iteration (const version).
Definition at line 252 of file filtered_depth_first_member_iterator.cc.
References _iterator, sheaf::depth_first_iterator::anchor(), is_initialized(), and put_anchor().
|
virtual |
True if xmbr conforms to the type of anchor of this.
Definition at line 908 of file filtered_depth_first_member_iterator.cc.
Referenced by item_is_ancestor_of().
|
pure virtual |
Make a new instance of the same type as this.
Reimplemented from sheaf::any.
Implemented in sheaf::postorder_member_iterator, and sheaf::preorder_member_iterator.
int sheaf::filtered_depth_first_member_iterator::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.
Definition at line 661 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), sheaf::depth_first_iterator::ct(), has_visited(), is_done(), is_initialized(), and update_item().
Referenced by reset().
bool sheaf::filtered_depth_first_member_iterator::descending | ( | ) | const |
True if iterating over down set of anchor.
Definition at line 498 of file filtered_depth_first_member_iterator.cc.
References _iterator, sheaf::depth_first_iterator::descending(), and put_descending().
Referenced by filtered_depth_first_member_iterator(), operator=(), sheaf::postorder_member_iterator::operator=(), sheaf::preorder_member_iterator::operator=(), sheaf::postorder_member_iterator::postorder_member_iterator(), sheaf::preorder_member_iterator::preorder_member_iterator(), put_anchor(), put_descending(), put_filter(), and reset().
const sheaf::subposet & sheaf::filtered_depth_first_member_iterator::filter | ( | ) | const |
The subposet which is the filter; Defines what is passed, not what is blocked.
Definition at line 356 of file filtered_depth_first_member_iterator.cc.
References _iterator, sheaf::depth_first_iterator::filter(), is_initialized(), and put_filter().
Referenced by filtered_depth_first_member_iterator(), operator=(), sheaf::preorder_member_iterator::operator=(), sheaf::postorder_member_iterator::operator=(), sheaf::postorder_member_iterator::postorder_member_iterator(), sheaf::preorder_member_iterator::preorder_member_iterator(), put_anchor(), put_filter(), and reset().
const sheaf::scoped_index & sheaf::filtered_depth_first_member_iterator::greater_index | ( | ) | const |
The index of the greater member of the current link.
Definition at line 799 of file filtered_depth_first_member_iterator.cc.
References _iterator, sheaf::depth_first_iterator::greater_index(), is_initialized(), and lesser_index().
Referenced by put_has_visited().
bool sheaf::filtered_depth_first_member_iterator::has_visited | ( | pod_index_type | xhub_id | ) | const |
True if this has already visited member with hub id xhub_id.
Definition at line 687 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), sheaf::depth_first_iterator::has_visited(), and is_initialized().
Referenced by ct(), has_visited(), and put_has_visited().
bool sheaf::filtered_depth_first_member_iterator::has_visited | ( | const scoped_index & | xid | ) | const |
True if this has already visited member with id xid.
Definition at line 710 of file filtered_depth_first_member_iterator.cc.
References anchor(), has_visited(), sheaf::scoped_index::hub_pod(), and is_initialized().
bool sheaf::filtered_depth_first_member_iterator::has_visited | ( | const abstract_poset_member & | xmbr | ) | const |
True if this has already visited member xmbr.
Definition at line 727 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), sheaf::depth_first_iterator::has_visited(), sheaf::poset_component::host(), sheaf::poset_component::is_attached(), is_initialized(), and put_has_visited().
|
virtual |
The class invariant.
Reimplemented from sheaf::any.
Reimplemented in sheaf::postorder_member_iterator, and sheaf::preorder_member_iterator.
Definition at line 151 of file filtered_depth_first_member_iterator.cc.
References _item, _iterator, sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::any::invariant(), sheaf::any::invariant_check(), is_initialized(), sheaf::depth_first_iterator::is_initialized(), and order().
Referenced by filtered_depth_first_member_iterator(), sheaf::postorder_member_iterator::invariant(), sheaf::preorder_member_iterator::invariant(), is_ancestor_of(), next(), operator=(), put_anchor(), put_filter(), and reset().
|
virtual |
True if other conforms to this.
Reimplemented from sheaf::any.
Reimplemented in sheaf::postorder_member_iterator, and sheaf::preorder_member_iterator.
Definition at line 132 of file filtered_depth_first_member_iterator.cc.
References invariant().
Referenced by operator=(), and ~filtered_depth_first_member_iterator().
bool sheaf::filtered_depth_first_member_iterator::is_done | ( | ) | const |
True if iteration finished.
Definition at line 578 of file filtered_depth_first_member_iterator.cc.
References _iterator, sheaf::depth_first_iterator::is_done(), is_initialized(), and next().
Referenced by ct(), filtered_depth_first_member_iterator(), next(), operator=(), sheaf::postorder_member_iterator::operator=(), sheaf::preorder_member_iterator::operator=(), sheaf::postorder_member_iterator::postorder_member_iterator(), sheaf::preorder_member_iterator::preorder_member_iterator(), put_anchor(), put_filter(), put_strict(), reset(), sheaf::preorder_member_iterator::truncate(), and update_item().
bool sheaf::filtered_depth_first_member_iterator::is_initialized | ( | ) | const |
True if this has been initialized for iteration with respect to a specific anchor.
Definition at line 208 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), and sheaf::depth_first_iterator::is_initialized().
Referenced by anchor(), ct(), filter(), filtered_depth_first_member_iterator(), greater_index(), has_visited(), invariant(), is_done(), item(), lesser_index(), next(), operator=(), sheaf::preorder_member_iterator::operator=(), sheaf::postorder_member_iterator::operator=(), order(), sheaf::postorder_member_iterator::postorder_member_iterator(), sheaf::preorder_member_iterator::preorder_member_iterator(), put_anchor(), put_filter(), put_has_visited(), reset(), sheaf::preorder_member_iterator::truncate(), and update_item().
sheaf::abstract_poset_member & sheaf::filtered_depth_first_member_iterator::item | ( | ) |
The the current member of the iteration (mutable version).
Definition at line 843 of file filtered_depth_first_member_iterator.cc.
References _item, and is_initialized().
Referenced by filtered_depth_first_member_iterator(), lesser_index(), next(), operator=(), sheaf::postorder_member_iterator::operator=(), sheaf::preorder_member_iterator::operator=(), sheaf::postorder_member_iterator::postorder_member_iterator(), sheaf::preorder_member_iterator::preorder_member_iterator(), reset(), and update_item().
const sheaf::abstract_poset_member & sheaf::filtered_depth_first_member_iterator::item | ( | ) | const |
The the current member of the iteration (const version).
Definition at line 862 of file filtered_depth_first_member_iterator.cc.
References _item, is_initialized(), and item_is_ancestor_of().
|
virtual |
True if xmbr conforms to the type of item of this.
Definition at line 884 of file filtered_depth_first_member_iterator.cc.
References anchor_is_ancestor_of().
Referenced by item(), sheaf::postorder_member_iterator::postorder_member_iterator(), and sheaf::preorder_member_iterator::preorder_member_iterator().
const sheaf::scoped_index & sheaf::filtered_depth_first_member_iterator::lesser_index | ( | ) | const |
The index of the lesser member of the current link lesser_index() == index()
Definition at line 818 of file filtered_depth_first_member_iterator.cc.
References _iterator, is_initialized(), item(), and sheaf::depth_first_iterator::lesser_index().
Referenced by greater_index().
|
virtual |
Makes this the next member of the iteration.
Definition at line 600 of file filtered_depth_first_member_iterator.cc.
References _iterator, invariant(), is_done(), is_initialized(), item(), sheaf::depth_first_iterator::next(), reset(), and update_item().
Referenced by is_done().
|
virtual |
Assignment operator.
Reimplemented in sheaf::postorder_member_iterator, and sheaf::preorder_member_iterator.
Definition at line 68 of file filtered_depth_first_member_iterator.cc.
References _item, _iterator, anchor(), sheaf::filtered_depth_first_iterator::clone(), sheaf::abstract_poset_member::clone(), descending(), sheaf::poset_component::detach_from_state(), filter(), invariant(), is_ancestor_of(), is_done(), is_initialized(), sheaf::any::is_same_type(), item(), strict(), and ~filtered_depth_first_member_iterator().
Referenced by filtered_depth_first_member_iterator(), sheaf::preorder_member_iterator::operator=(), and sheaf::postorder_member_iterator::operator=().
sheaf::depth_first_iterator::order_type sheaf::filtered_depth_first_member_iterator::order | ( | ) |
Iteration directions.
The order of the iteration. Determines which actions are exported to the client.
Definition at line 185 of file filtered_depth_first_member_iterator.cc.
References _iterator, is_initialized(), and sheaf::depth_first_iterator::order().
Referenced by invariant().
|
virtual |
Set anchor() to *xanchor.
Definition at line 273 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), descending(), filter(), invariant(), is_done(), is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_iterator::put_anchor(), strict(), update_item(), and sheaf::poset_component::version().
Referenced by anchor(), and put_anchor().
|
virtual |
Set anchor() to member at xanchor_hub_id.
Definition at line 307 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), invariant(), is_done(), is_initialized(), put_anchor(), sheaf::filtered_depth_first_iterator::put_anchor(), and update_item().
void sheaf::filtered_depth_first_member_iterator::put_anchor | ( | const scoped_index & | xanchor_id | ) |
Set anchor() to member at xanchor_id.
Definition at line 333 of file filtered_depth_first_member_iterator.cc.
References anchor(), filter(), sheaf::scoped_index::hub_pod(), invariant(), is_done(), is_initialized(), and put_anchor().
void sheaf::filtered_depth_first_member_iterator::put_descending | ( | bool | xdescending | ) |
Set descending() to xdescending.
Definition at line 517 of file filtered_depth_first_member_iterator.cc.
References _iterator, descending(), sheaf::filtered_depth_first_iterator::put_descending(), and strict().
Referenced by descending().
void sheaf::filtered_depth_first_member_iterator::put_filter | ( | const subposet & | filter | ) |
Sets the subposet which is the filter.
Definition at line 375 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), descending(), filter(), invariant(), is_done(), is_initialized(), sheaf::filtered_depth_first_iterator::put_filter(), strict(), and update_item().
Referenced by filter(), and put_filter().
void sheaf::filtered_depth_first_member_iterator::put_filter | ( | const std::string & | xfilter_name | ) |
Sets the subposet which is the filter.
Definition at line 406 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), descending(), filter(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), invariant(), is_done(), is_initialized(), sheaf::subposet::name(), put_filter(), sheaf::filtered_depth_first_iterator::put_filter(), strict(), update_item(), and sheaf::poset_component::version_name().
void sheaf::filtered_depth_first_member_iterator::put_filter | ( | pod_index_type | xfilter_hub_id | ) |
Sets the subposet which is the filter.
Definition at line 439 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), descending(), filter(), invariant(), is_done(), is_initialized(), put_filter(), sheaf::filtered_depth_first_iterator::put_filter(), strict(), and update_item().
void sheaf::filtered_depth_first_member_iterator::put_filter | ( | const scoped_index & | xfilter_id | ) |
Sets the subposet which is the filter.
Definition at line 470 of file filtered_depth_first_member_iterator.cc.
References anchor(), descending(), filter(), sheaf::scoped_index::hub_pod(), invariant(), is_done(), is_initialized(), put_filter(), and strict().
void sheaf::filtered_depth_first_member_iterator::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.
Definition at line 751 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), has_visited(), is_initialized(), and sheaf::depth_first_iterator::put_has_visited().
Referenced by has_visited(), and put_has_visited().
void sheaf::filtered_depth_first_member_iterator::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.
Definition at line 775 of file filtered_depth_first_member_iterator.cc.
References anchor(), greater_index(), has_visited(), sheaf::scoped_index::hub_pod(), is_initialized(), and put_has_visited().
void sheaf::filtered_depth_first_member_iterator::put_strict | ( | bool | xstrict | ) |
Set strict() to xstrict.
Definition at line 557 of file filtered_depth_first_member_iterator.cc.
References _iterator, is_done(), sheaf::filtered_depth_first_iterator::put_strict(), and strict().
Referenced by strict().
|
virtual |
Restarts the iteration.
Definition at line 626 of file filtered_depth_first_member_iterator.cc.
References _iterator, anchor(), ct(), descending(), filter(), invariant(), is_done(), is_initialized(), item(), sheaf::depth_first_iterator::reset(), strict(), and update_item().
Referenced by next().
bool sheaf::filtered_depth_first_member_iterator::strict | ( | ) | const |
True if iterating over xstrict up/down set of anchor.
Definition at line 538 of file filtered_depth_first_member_iterator.cc.
References _iterator, put_strict(), and sheaf::depth_first_iterator::strict().
Referenced by filtered_depth_first_member_iterator(), operator=(), sheaf::postorder_member_iterator::operator=(), sheaf::preorder_member_iterator::operator=(), sheaf::postorder_member_iterator::postorder_member_iterator(), sheaf::preorder_member_iterator::preorder_member_iterator(), put_anchor(), put_descending(), put_filter(), put_strict(), and reset().
|
protectedvirtual |
Attaches the item handle to the current index, or detaches the item handle if is_done.
Definition at line 959 of file filtered_depth_first_member_iterator.cc.
References _item, _iterator, sheaf::depth_first_iterator::anchor(), sheaf::abstract_poset_member::attach_to_state(), sheaf::poset_component::detach_from_state(), sheaf::poset_component::host(), sheaf::depth_first_iterator::index(), is_done(), sheaf::depth_first_iterator::is_done(), is_initialized(), and item().
Referenced by ct(), filtered_depth_first_member_iterator(), next(), put_anchor(), put_filter(), reset(), and sheaf::preorder_member_iterator::truncate().
|
protected |
The member handle for the current item in the iteration.
Definition at line 309 of file filtered_depth_first_member_iterator.h.
Referenced by filtered_depth_first_member_iterator(), invariant(), item(), operator=(), update_item(), and ~filtered_depth_first_member_iterator().
|
protected |
The index iterator used to implement the iteration.
Definition at line 314 of file filtered_depth_first_member_iterator.h.
Referenced by anchor(), ct(), descending(), filter(), filtered_depth_first_member_iterator(), greater_index(), has_visited(), invariant(), is_done(), is_initialized(), lesser_index(), next(), operator=(), order(), put_anchor(), put_descending(), put_filter(), put_has_visited(), put_strict(), reset(), strict(), sheaf::preorder_member_iterator::truncate(), update_item(), and ~filtered_depth_first_member_iterator().