SheafSystem
0.0.0.0
|
Iterates in postorder over dofs of a schema member anchor. Attaches a handle of type schema_poset_member to the current member of the iteration. More...
#include <poset_dof_iterator.h>
Public Types | |
enum | anchor_version_index { ANCHOR_VERSION = CURRENT_MEMBER_VERSION, ANCHOR_HOST_VERSION = CURRENT_HOST_VERSION } |
Identifiers for anchor version. More... | |
Public Member Functions | |
poset_dof_iterator () | |
Default constructor; creates an unattached iterator, with and all-pass filter. More... | |
poset_dof_iterator (const poset_dof_iterator &xother) | |
Copy constructor. More... | |
virtual poset_dof_iterator & | operator= (const poset_dof_iterator &xother) |
Assignment operator. More... | |
virtual | ~poset_dof_iterator () |
Destructor. More... | |
virtual bool | is_ancestor_of (const any *other) const |
True if other conforms to this. More... | |
virtual poset_dof_iterator * | clone () const |
Make a new instance of the same type as this. More... | |
virtual bool | invariant () const |
The class invariant. More... | |
poset_dof_iterator (const schema_poset_member &xanchor, bool xis_table_dof=false, int xversion=ANCHOR_VERSION) | |
Creates an iterator over the table dofs (is_table_dof true) or row dofs (xis_table_dof false) of version xversion in schema xanchor. "Explicit" prevents interpretation as conversion from schema_poset_member. More... | |
virtual bool | is_initialized () const |
True if this has been initialized for iteration with respect to a specific anchor. More... | |
schema_poset_member & | anchor () |
The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More... | |
const schema_poset_member & | anchor () const |
The schema member whose downset is being iterated over; the top member of the domain of iteration (const version). More... | |
virtual void | put_anchor (const schema_poset_member *xanchor, int xversion) |
Set anchor() to xversion of *xanchor. Forces reset of markers, since the host may be different. More... | |
virtual void | put_anchor (pod_index_type xindex) |
Set anchor() to the member with hub id xhub_id in host(). Does not change version; does not force reset of markers. More... | |
void | put_anchor (const scoped_index &xid) |
Set anchor() to the member with id xid in host(). Does not change version; does not force reset of markers. More... | |
virtual bool | is_done () const |
True if iteration finished. More... | |
virtual void | force_is_done () |
Force the iterator to be done. 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 &xindex) const |
True if this has already visited id xid. More... | |
virtual bool | has_visited (const schema_poset_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 visisted 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... | |
schema_poset_member & | item () |
The current member of the iteration (mutable version). More... | |
const schema_poset_member & | item () const |
The current member of the iteration (const version). More... | |
virtual bool | item_is_ancestor_of (const schema_poset_member &xmbr) const |
True if xmbr conforms to the type of item of this. More... | |
virtual const scoped_index & | index () |
The index of the current member of the iteration. More... | |
bool | is_table_dof () const |
True if iterating over table dofs. 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_item () |
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 | |
schema_poset_member * | _anchor |
The schema member whose downset is being iterated over; the top member of the domain of iteration. More... | |
schema_poset_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... | |
bool | _is_table_dof |
True if iterating over table dofs. More... | |
Iterates in postorder over dofs of a schema member anchor. Attaches a handle of type schema_poset_member to the current member of the iteration.
Definition at line 35 of file poset_dof_iterator.h.
Identifiers for anchor version.
Definition at line 84 of file poset_dof_iterator.h.
sheaf::poset_dof_iterator::poset_dof_iterator | ( | ) |
Default constructor; creates an unattached iterator, with and all-pass filter.
Definition at line 31 of file poset_dof_iterator.cc.
Referenced by invariant().
sheaf::poset_dof_iterator::poset_dof_iterator | ( | const poset_dof_iterator & | xother | ) |
Copy constructor.
Definition at line 55 of file poset_dof_iterator.cc.
References _anchor, _is_table_dof, _item, _itr, anchor(), sheaf::schema_poset_member::clone(), is_initialized(), is_table_dof(), item(), operator=(), and sheaf::poset_component::version().
|
virtual |
Destructor.
Definition at line 146 of file poset_dof_iterator.cc.
References is_ancestor_of().
Referenced by operator=().
|
explicit |
Creates an iterator over the table dofs (is_table_dof true) or row dofs (xis_table_dof false) of version xversion in schema xanchor. "Explicit" prevents interpretation as conversion from schema_poset_member.
Definition at line 250 of file poset_dof_iterator.cc.
References sheaf::poset_component::has_version(), is_initialized(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_component::unaliased_version().
sheaf::schema_poset_member & sheaf::poset_dof_iterator::anchor | ( | ) |
The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version).
Definition at line 317 of file poset_dof_iterator.cc.
Referenced by is_initialized(), operator=(), fiber_bundle::section_dof_iterator::operator=(), fiber_bundle::binary_section_dof_iterator::operator=(), fiber_bundle::product_section_dof_iterator::operator=(), and poset_dof_iterator().
const sheaf::schema_poset_member & sheaf::poset_dof_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 338 of file poset_dof_iterator.cc.
References put_anchor().
|
virtual |
Make a new instance of the same type as this.
Reimplemented from sheaf::any.
Reimplemented in fiber_bundle::binary_section_dof_iterator, fiber_bundle::product_section_dof_iterator, fiber_bundle::section_dof_iterator, and fiber_bundle::section_dof_iterator.
Definition at line 196 of file poset_dof_iterator.cc.
References invariant().
Referenced by is_ancestor_of().
|
virtual |
The number of members of the iteration set, from the current member to the end, inclusive. If xreset, reset before computing the count.
Reimplemented in fiber_bundle::section_dof_iterator.
Definition at line 582 of file poset_dof_iterator.cc.
References has_visited().
Referenced by sheaf::arg_list::conforms_to_extension(), and reset().
|
virtual |
Force the iterator to be done.
Reimplemented in fiber_bundle::section_dof_iterator.
Definition at line 506 of file poset_dof_iterator.cc.
References next().
Referenced by sheaf::arg_list::conforms_to(), sheaf::schema_poset_member::conforms_to(), sheaf::schema_poset_member::dof_tuple_type(), and is_done().
|
virtual |
True if this has already visited hub id xhub_id.
Reimplemented in fiber_bundle::section_dof_iterator.
Definition at line 608 of file poset_dof_iterator.cc.
Referenced by ct(), and has_visited().
bool sheaf::poset_dof_iterator::has_visited | ( | const scoped_index & | xindex | ) | const |
True if this has already visited id xid.
Definition at line 632 of file poset_dof_iterator.cc.
References has_visited(), and sheaf::scoped_index::hub_pod().
|
virtual |
True if this has already visited xmbr.
Reimplemented in fiber_bundle::section_dof_iterator.
Definition at line 649 of file poset_dof_iterator.cc.
References sheaf::poset_component::host(), sheaf::poset_component::is_attached(), and put_has_visited().
|
virtual |
The index of the current member of the iteration.
Definition at line 791 of file poset_dof_iterator.cc.
References is_table_dof().
Referenced by sheaf::dof_tuple_record_set::externalize_all_dofs(), fiber_bundle::sparse_field_dof_map::get_discretization_dofs(), fiber_bundle::sparse_field_dof_map::get_dof_tuple(), sheaf::dof_tuple_record_set::internalize_all_dofs(), sheaf::poset_table_state::invariant(), item_is_ancestor_of(), sheaf::dof_tuple_record_set::populate_internal_dof_map(), fiber_bundle::sparse_field_dof_map::put_discretization_dofs(), fiber_bundle::sparse_field_dof_map::put_dof_tuple(), and sheaf::schema_poset_member::update_dof_id_space().
|
virtual |
The class invariant.
Reimplemented from sheaf::any.
Reimplemented in fiber_bundle::binary_section_dof_iterator, fiber_bundle::product_section_dof_iterator, fiber_bundle::section_dof_iterator, and fiber_bundle::section_dof_iterator.
Definition at line 217 of file poset_dof_iterator.cc.
References poset_dof_iterator().
Referenced by clone().
|
virtual |
True if other conforms to this.
Reimplemented from sheaf::any.
Reimplemented in fiber_bundle::binary_section_dof_iterator, fiber_bundle::product_section_dof_iterator, fiber_bundle::section_dof_iterator, and fiber_bundle::section_dof_iterator.
Definition at line 176 of file poset_dof_iterator.cc.
References clone().
Referenced by ~poset_dof_iterator().
|
virtual |
True if iteration finished.
Reimplemented in fiber_bundle::section_dof_iterator.
Definition at line 485 of file poset_dof_iterator.cc.
References force_is_done().
Referenced by sheaf::arg_list::conforms_to(), sheaf::schema_poset_member::conforms_to(), sheaf::dof_tuple_record_set::create_int_data_type(), sheaf::schema_poset_member::dof_tuple_type(), sheaf::dof_tuple_record_set::externalize_all_dofs(), fiber_bundle::sparse_field_dof_map::get_discretization_dofs(), sheaf::poset_dof_map::get_dof_tuple(), sheaf::dof_tuple_record_set::internalize_all_dofs(), sheaf::poset_table_state::invariant(), operator=(), fiber_bundle::section_dof_iterator::operator=(), sheaf::dof_tuple_record_set::populate_internal_dof_map(), put_anchor(), sheaf::poset_dof_map::put_defaults(), fiber_bundle::sparse_field_dof_map::put_discretization_dofs(), sheaf::poset_dof_map::put_dof_tuple(), sheaf::poset_dof_map::to_string(), and sheaf::schema_poset_member::update_dof_id_space().
|
virtual |
True if this has been initialized for iteration with respect to a specific anchor.
Reimplemented in fiber_bundle::section_dof_iterator.
Definition at line 294 of file poset_dof_iterator.cc.
References anchor().
Referenced by operator=(), fiber_bundle::section_dof_iterator::operator=(), fiber_bundle::product_section_dof_iterator::operator=(), fiber_bundle::binary_section_dof_iterator::operator=(), and poset_dof_iterator().
bool sheaf::poset_dof_iterator::is_table_dof | ( | ) | const |
True if iterating over table dofs.
Definition at line 812 of file poset_dof_iterator.cc.
References reset_item().
Referenced by index(), operator=(), fiber_bundle::section_dof_iterator::operator=(), poset_dof_iterator(), and fiber_bundle::section_dof_iterator::section_dof_iterator().
sheaf::schema_poset_member & sheaf::poset_dof_iterator::item | ( | ) |
The current member of the iteration (mutable version).
Definition at line 725 of file poset_dof_iterator.cc.
Referenced by sheaf::arg_list::conforms_to(), sheaf::schema_poset_member::conforms_to(), sheaf::dof_tuple_record_set::create_int_data_type(), sheaf::schema_poset_member::dof_tuple_type(), sheaf::dof_tuple_record_set::externalize_all_dofs(), sheaf::poset_dof_map::get_dof_tuple(), sheaf::dof_tuple_record_set::internalize_all_dofs(), sheaf::poset_table_state::invariant(), operator=(), fiber_bundle::section_dof_iterator::operator=(), fiber_bundle::binary_section_dof_iterator::operator=(), fiber_bundle::product_section_dof_iterator::operator=(), poset_dof_iterator(), sheaf::poset_dof_map::put_defaults(), sheaf::poset_dof_map::put_dof_tuple(), put_has_visited(), and sheaf::poset_dof_map::to_string().
const sheaf::schema_poset_member & sheaf::poset_dof_iterator::item | ( | ) | const |
The current member of the iteration (const version).
Definition at line 746 of file poset_dof_iterator.cc.
References item_is_ancestor_of().
|
virtual |
True if xmbr conforms to the type of item of this.
Reimplemented in fiber_bundle::section_dof_iterator, fiber_bundle::binary_section_dof_iterator, fiber_bundle::product_section_dof_iterator, and fiber_bundle::section_dof_iterator.
Definition at line 769 of file poset_dof_iterator.cc.
References index().
Referenced by item().
|
virtual |
Makes this the next member of the subset.
Reimplemented in fiber_bundle::section_dof_iterator.
Definition at line 527 of file poset_dof_iterator.cc.
References reset().
Referenced by sheaf::arg_list::conforms_to(), sheaf::schema_poset_member::conforms_to(), sheaf::dof_tuple_record_set::create_int_data_type(), sheaf::schema_poset_member::dof_tuple_type(), sheaf::dof_tuple_record_set::externalize_all_dofs(), force_is_done(), fiber_bundle::sparse_field_dof_map::get_discretization_dofs(), sheaf::poset_dof_map::get_dof_tuple(), sheaf::dof_tuple_record_set::internalize_all_dofs(), sheaf::poset_table_state::invariant(), sheaf::dof_tuple_record_set::populate_internal_dof_map(), sheaf::poset_dof_map::put_defaults(), fiber_bundle::sparse_field_dof_map::put_discretization_dofs(), sheaf::poset_dof_map::put_dof_tuple(), sheaf::poset_dof_map::to_string(), and sheaf::schema_poset_member::update_dof_id_space().
|
virtual |
Assignment operator.
Reimplemented in fiber_bundle::binary_section_dof_iterator, fiber_bundle::product_section_dof_iterator, fiber_bundle::section_dof_iterator, and fiber_bundle::section_dof_iterator.
Definition at line 96 of file poset_dof_iterator.cc.
References _item, anchor(), sheaf::abstract_poset_member::attach_to_state(), sheaf::schema_poset_member::clone(), is_done(), is_initialized(), is_table_dof(), item(), sheaf::poset_component::version(), and ~poset_dof_iterator().
Referenced by poset_dof_iterator().
|
virtual |
Set anchor() to xversion of *xanchor. Forces reset of markers, since the host may be different.
Reimplemented in fiber_bundle::section_dof_iterator.
Definition at line 359 of file poset_dof_iterator.cc.
References sheaf::abstract_poset_member::attach_to_state(), sheaf::schema_poset_member::clone(), sheaf::poset_component::has_version(), sheaf::poset_component::host(), sheaf::poset_state_handle::is_schematized(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_component::unaliased_version().
Referenced by anchor(), and put_anchor().
|
virtual |
Set anchor() to the member with hub id xhub_id in host(). Does not change version; does not force reset of markers.
Definition at line 417 of file poset_dof_iterator.cc.
References put_anchor().
void sheaf::poset_dof_iterator::put_anchor | ( | const scoped_index & | xid | ) |
Set anchor() to the member with id xid in host(). Does not change version; does not force reset of markers.
Definition at line 458 of file poset_dof_iterator.cc.
References sheaf::scoped_index::hub_pod(), and is_done().
|
virtual |
Set the visisted marker for hub id xhub_id to xvalue. Intended for use reseting iterator without having to reset entire collection of markers.
Reimplemented in fiber_bundle::section_dof_iterator.
Definition at line 675 of file poset_dof_iterator.cc.
Referenced by has_visited().
void sheaf::poset_dof_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 699 of file poset_dof_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.
Reimplemented in fiber_bundle::section_dof_iterator.
Definition at line 554 of file poset_dof_iterator.cc.
References ct().
Referenced by sheaf::poset_table_state::invariant(), and next().
|
protectedvirtual |
Creates item if needed and attaches it to the current index.
Reimplemented in fiber_bundle::section_dof_iterator, fiber_bundle::binary_section_dof_iterator, fiber_bundle::product_section_dof_iterator, and fiber_bundle::section_dof_iterator.
Definition at line 833 of file poset_dof_iterator.cc.
References update_item().
Referenced by is_table_dof().
|
protectedvirtual |
Attaches the item handle to the current index, or detaches the item handle if is_done.
Reimplemented in fiber_bundle::section_dof_iterator, and fiber_bundle::binary_section_dof_iterator.
Definition at line 861 of file poset_dof_iterator.cc.
Referenced by reset_item().
|
protected |
The schema member whose downset is being iterated over; the top member of the domain of iteration.
Definition at line 235 of file poset_dof_iterator.h.
Referenced by fiber_bundle::binary_section_dof_iterator::invariant(), fiber_bundle::product_section_dof_iterator::invariant(), poset_dof_iterator(), and fiber_bundle::product_section_dof_iterator::product_section_dof_iterator().
|
protected |
True if iterating over table dofs.
Definition at line 261 of file poset_dof_iterator.h.
Referenced by fiber_bundle::binary_section_dof_iterator::initialize(), poset_dof_iterator(), and fiber_bundle::product_section_dof_iterator::product_section_dof_iterator().
|
protected |
The member handle for the current item in the iteration.
Definition at line 251 of file poset_dof_iterator.h.
Referenced by operator=(), poset_dof_iterator(), fiber_bundle::product_section_dof_iterator::product_section_dof_iterator(), fiber_bundle::product_section_dof_iterator::reset_item(), and fiber_bundle::binary_section_dof_iterator::reset_item().
|
protected |
The index iterator used to implement the iteration.
Definition at line 256 of file poset_dof_iterator.h.
Referenced by fiber_bundle::section_dof_iterator::operator=(), poset_dof_iterator(), fiber_bundle::section_dof_iterator::section_dof_iterator(), and fiber_bundle::binary_section_dof_iterator::update_item().