SheafSystem
0.0.0.0
|
Iterates in postorder over components of a section_space_schema_member anchor. The components of a section_space_schema_member m are those members m' <= m such that m'.base_space().is_same_state(m.base_space()) and m'.fiber_schema().is_component(). Attaches an a handle of type section_space_schema_member to the current member of the iteration. More...
#include <section_component_iterator.h>
Public Member Functions | |
section_component_iterator () | |
Default constructor; creates an unattached iterator, with and all-pass filter. More... | |
section_component_iterator (const section_component_iterator &xother) | |
Copy constructor. More... | |
virtual section_component_iterator & | operator= (const section_component_iterator &xother) |
Assignment operator. More... | |
virtual | ~section_component_iterator () |
Destructor. More... | |
virtual bool | is_ancestor_of (const any *other) const |
True if other conforms to this. More... | |
virtual section_component_iterator * | clone () const =0 |
Make a new instance of the same type as this. More... | |
bool | invariant () const |
The class invariant. More... | |
section_component_iterator (const section_space_schema_member &xanchor) | |
Creates an iterator anchored at xanchor. More... | |
bool | is_initialized () const |
True if this has been initialized for iteration with respect to a specific anchor. More... | |
section_space_schema_member & | anchor () |
The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More... | |
const section_space_schema_member & | anchor () const |
The schema member whose downset is being iterated over; the top member of the domain of iteration (const version). More... | |
void | put_anchor (const section_space_schema_member *xanchor) |
Sets anchor to member xanchor. More... | |
bool | is_done () const |
True if iteration finished. More... | |
virtual void | next () |
Makes this the next member of the subset. More... | |
virtual void | reset (bool xreset_markers=RESET) |
Restarts the iteration over the down set of anchor() If xreset_markers, set !has_visited for all members. More... | |
virtual 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... | |
virtual bool | has_visited (pod_index_type xhub_id) const |
True if this has already visited hub id xhub_id. More... | |
bool | has_visited (const scoped_index &xid) const |
True if this has already visited id xid. More... | |
virtual bool | has_visited (const section_space_schema_member &xmbr) const |
True if this has already visited xmbr. More... | |
virtual 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... | |
section_space_schema_member & | item () |
The the current member of the iteration (mutable version). More... | |
const section_space_schema_member & | item () const |
The the current member of the iteration (const version). More... | |
virtual bool | item_is_ancestor_of (const section_space_schema_member &xmbr) const |
True if xmbr conforms to the type of item of this. More... | |
virtual const scoped_index & | index () const |
The index of the current member of the iteration. 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 | |
virtual void | reset_anchor (const section_space_schema_member &xanchor) |
Creates anchor if needed and attaches it to xanchor. Abstract in this class; intended to be redefined in descendants. More... | |
virtual void | reset_item ()=0 |
Creates item if needed and attaches it to the current index. 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 | |
section_space_schema_member * | _anchor |
The schema member whose downset is being iterated over; the top member of the domain of iteration. More... | |
section_space_schema_member * | _item |
The member handle for the current item in the iteration. More... | |
postorder_iterator | _itr |
The index iterator used to implement the iteration. More... | |
Iterates in postorder over components of a section_space_schema_member anchor. The components of a section_space_schema_member m are those members m' <= m such that m'.base_space().is_same_state(m.base_space()) and m'.fiber_schema().is_component(). Attaches an a handle of type section_space_schema_member to the current member of the iteration.
Definition at line 59 of file section_component_iterator.h.
fiber_bundle::section_component_iterator::section_component_iterator | ( | ) |
Default constructor; creates an unattached iterator, with and all-pass filter.
Definition at line 31 of file section_component_iterator.cc.
Referenced by invariant().
fiber_bundle::section_component_iterator::section_component_iterator | ( | const section_component_iterator & | xother | ) |
Copy constructor.
Definition at line 54 of file section_component_iterator.cc.
References _anchor, _item, _itr, anchor(), fiber_bundle::section_space_schema_member::clone(), is_initialized(), item(), and operator=().
|
virtual |
Destructor.
Definition at line 140 of file section_component_iterator.cc.
References is_ancestor_of().
Referenced by operator=().
|
explicit |
Creates an iterator anchored at xanchor.
Definition at line 223 of file section_component_iterator.cc.
References is_initialized(), and sheaf::read_write_monitor_handle::state_is_read_accessible().
fiber_bundle::section_space_schema_member & fiber_bundle::section_component_iterator::anchor | ( | ) |
The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version).
Definition at line 284 of file section_component_iterator.cc.
Referenced by is_initialized(), fiber_bundle::binary_section_component_iterator::operator=(), operator=(), and section_component_iterator().
const fiber_bundle::section_space_schema_member & fiber_bundle::section_component_iterator::anchor | ( | ) | const |
The schema member whose downset is being iterated over; the top member of the domain of iteration (const version).
Definition at line 303 of file section_component_iterator.cc.
References is_done().
|
pure virtual |
Make a new instance of the same type as this.
Reimplemented from sheaf::any.
Implemented in fiber_bundle::binary_section_component_iterator.
|
virtual |
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 434 of file section_component_iterator.cc.
References has_visited().
Referenced by put_anchor().
|
virtual |
True if this has already visited hub id xhub_id.
Definition at line 460 of file section_component_iterator.cc.
Referenced by ct(), and has_visited().
bool fiber_bundle::section_component_iterator::has_visited | ( | const scoped_index & | xid | ) | const |
True if this has already visited id xid.
Definition at line 486 of file section_component_iterator.cc.
References has_visited(), and sheaf::scoped_index::hub_pod().
|
virtual |
True if this has already visited xmbr.
Definition at line 504 of file section_component_iterator.cc.
References fiber_bundle::section_space_schema_member::fiber_schema(), fiber_bundle::section_space_schema_member::host(), sheaf::poset_component::is_attached(), and put_has_visited().
|
virtual |
The index of the current member of the iteration.
Definition at line 645 of file section_component_iterator.cc.
References reset_anchor().
Referenced by item_is_ancestor_of().
|
virtual |
The class invariant.
Reimplemented from sheaf::any.
Definition at line 190 of file section_component_iterator.cc.
References section_component_iterator().
Referenced by fiber_bundle::binary_section_component_iterator::invariant(), and is_ancestor_of().
|
virtual |
True if other conforms to this.
Reimplemented from sheaf::any.
Reimplemented in fiber_bundle::binary_section_component_iterator.
Definition at line 170 of file section_component_iterator.cc.
References invariant().
Referenced by ~section_component_iterator().
bool fiber_bundle::section_component_iterator::is_done | ( | ) | const |
True if iteration finished.
Definition at line 324 of file section_component_iterator.cc.
References next().
Referenced by anchor(), fiber_bundle::binary_section_component_iterator::binary_section_component_iterator(), fiber_bundle::binary_section_component_iterator::operator=(), and fiber_bundle::binary_section_component_iterator::reset_item().
bool fiber_bundle::section_component_iterator::is_initialized | ( | ) | const |
True if this has been initialized for iteration with respect to a specific anchor.
Definition at line 263 of file section_component_iterator.cc.
References anchor().
Referenced by fiber_bundle::binary_section_component_iterator::anchor(), fiber_bundle::binary_section_component_iterator::binary_section_component_iterator(), fiber_bundle::binary_section_component_iterator::item(), fiber_bundle::binary_section_component_iterator::operator=(), operator=(), fiber_bundle::binary_section_component_iterator::reset_item(), and section_component_iterator().
fiber_bundle::section_space_schema_member & fiber_bundle::section_component_iterator::item | ( | ) |
The the current member of the iteration (mutable version).
Definition at line 583 of file section_component_iterator.cc.
Referenced by fiber_bundle::binary_section_component_iterator::operator=(), operator=(), put_has_visited(), and section_component_iterator().
const fiber_bundle::section_space_schema_member & fiber_bundle::section_component_iterator::item | ( | ) | const |
The the current member of the iteration (const version).
Definition at line 602 of file section_component_iterator.cc.
References item_is_ancestor_of().
|
virtual |
True if xmbr conforms to the type of item of this.
Reimplemented in fiber_bundle::binary_section_component_iterator.
Definition at line 623 of file section_component_iterator.cc.
References index().
Referenced by item().
|
virtual |
Makes this the next member of the subset.
Definition at line 346 of file section_component_iterator.cc.
References reset().
Referenced by is_done().
|
virtual |
Assignment operator.
Reimplemented in fiber_bundle::binary_section_component_iterator.
Definition at line 93 of file section_component_iterator.cc.
References _anchor, _item, _itr, anchor(), fiber_bundle::section_space_schema_member::attach_to_state(), fiber_bundle::section_space_schema_member::clone(), is_initialized(), item(), and ~section_component_iterator().
Referenced by section_component_iterator().
void fiber_bundle::section_component_iterator::put_anchor | ( | const section_space_schema_member * | xanchor | ) |
Sets anchor to member xanchor.
Definition at line 399 of file section_component_iterator.cc.
References ct(), fiber_bundle::section_space_schema_member::fiber_schema(), fiber_bundle::section_space_schema_member::host(), fiber_bundle::section_space_schema_poset::is_schematized(), and sheaf::read_write_monitor_handle::state_is_read_accessible().
Referenced by fiber_bundle::binary_section_component_iterator::binary_section_component_iterator(), and reset().
|
virtual |
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 531 of file section_component_iterator.cc.
Referenced by has_visited().
void fiber_bundle::section_component_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 556 of file section_component_iterator.cc.
References sheaf::scoped_index::hub_pod(), and item().
|
virtual |
Restarts the iteration over the down set of anchor() If xreset_markers, set !has_visited for all members.
Definition at line 374 of file section_component_iterator.cc.
References put_anchor().
Referenced by fiber_bundle::binary_section_component_iterator::binary_section_component_iterator(), and next().
|
protectedvirtual |
Creates anchor if needed and attaches it to xanchor. Abstract in this class; intended to be redefined in descendants.
Definition at line 668 of file section_component_iterator.cc.
References fiber_bundle::section_space_schema_member::attach_to_state(), fiber_bundle::section_space_schema_member::clone(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and update_item().
Referenced by index().
|
protectedpure virtual |
Creates item if needed and attaches it to the current index.
Implemented in fiber_bundle::binary_section_component_iterator.
|
protectedvirtual |
Attaches the item handle to the current index, or detaches the item handle if is_done.
Definition at line 705 of file section_component_iterator.cc.
Referenced by reset_anchor(), and fiber_bundle::binary_section_component_iterator::reset_item().
|
protected |
The schema member whose downset is being iterated over; the top member of the domain of iteration.
Definition at line 226 of file section_component_iterator.h.
Referenced by fiber_bundle::binary_section_component_iterator::invariant(), operator=(), and section_component_iterator().
|
protected |
The member handle for the current item in the iteration.
Definition at line 242 of file section_component_iterator.h.
Referenced by operator=(), fiber_bundle::binary_section_component_iterator::reset_item(), and section_component_iterator().
|
protected |
The index iterator used to implement the iteration.
Definition at line 247 of file section_component_iterator.h.
Referenced by operator=(), and section_component_iterator().