SheafSystem  0.0.0.0
fiber_bundle::binary_section_dof_iterator Class Reference

Iterates in postorder over dofs of a schema member anchor. Attaches an a handle of type section_space_schema_member to the current member of the iteration. More...

#include <binary_section_dof_iterator.h>

Inheritance diagram for fiber_bundle::binary_section_dof_iterator:
fiber_bundle::section_dof_iterator sheaf::poset_dof_iterator sheaf::poset_dof_iterator sheaf::any sheaf::any

Public Member Functions

 binary_section_dof_iterator ()
 Default constructor; creates an unattached iterator. Protected because this class is abstract. More...
 
 binary_section_dof_iterator (const binary_section_dof_iterator &xother)
 Copy constructor; attaches this to the same anchor as xother. Protected because this class is abstract. More...
 
virtual binary_section_dof_iteratoroperator= (const poset_dof_iterator &xother)
 Assignment operator. More...
 
binary_section_dof_iteratoroperator= (const binary_section_dof_iterator &xother)
 Assignment operator. More...
 
virtual ~binary_section_dof_iterator ()
 Destructor. More...
 
virtual bool is_ancestor_of (const any *other) const
 True if other conforms to this. More...
 
virtual binary_section_dof_iteratorclone () const
 Make a new instance of the same type as this. More...
 
virtual bool invariant () const
 The class invariant. More...
 
 binary_section_dof_iterator (const binary_section_space_schema_member &xanchor, bool xis_table_dof=false, int xversion=ANCHOR_VERSION)
 Creates an iterator over the table dofs (xis_table_dof == true) or rows dofs (xis_table_dof = false) of refinemement level xversion of schema xanchor. "Explicit" prevents interpretation as conversion from binary_section_space_schema_member. More...
 
binary_section_space_schema_memberanchor ()
 The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More...
 
const binary_section_space_schema_memberanchor () const
 The schema member whose downset is being iterated over; the top member of the domain of iteration (const version). More...
 
binary_section_space_schema_memberitem ()
 The the current member of the iteration (mutable version). More...
 
const binary_section_space_schema_memberitem () const
 The 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...
 
- Public Member Functions inherited from fiber_bundle::section_dof_iterator
section_dof_iteratoroperator= (const section_dof_iterator &xother)
 Assignment operator. More...
 
virtual ~section_dof_iterator ()
 Destructor. More...
 
virtual bool is_initialized () const
 True if this has been initialized for iteration with respect to a specific anchor. More...
 
section_space_schema_memberanchor ()
 The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More...
 
const section_space_schema_memberanchor () 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. 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...
 
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...
 
section_space_schema_memberitem ()
 The current member of the iteration (mutable version). More...
 
const section_space_schema_memberitem () const
 The current member of the iteration (const version). More...
 
section_dof_iteratoroperator= (const section_dof_iterator &xother)
 Assignment operator. More...
 
virtual ~section_dof_iterator ()
 Destructor. More...
 
section_space_schema_memberanchor ()
 The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More...
 
const section_space_schema_memberanchor () const
 The schema member whose downset is being iterated over; the top member of the domain of iteration (const version). More...
 
section_space_schema_memberitem ()
 The current member of the iteration (mutable version). More...
 
const section_space_schema_memberitem () const
 The current member of the iteration (const version). More...
 
- Public Member Functions inherited from sheaf::poset_dof_iterator
 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 ()
 Destructor. 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...
 
schema_poset_memberanchor ()
 The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More...
 
const schema_poset_memberanchor () 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 (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...
 
bool has_visited (const scoped_index &xindex) const
 True if this has already visited id xid. 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_memberitem ()
 The current member of the iteration (mutable version). More...
 
const schema_poset_memberitem () const
 The current member of the iteration (const version). More...
 
virtual const scoped_indexindex ()
 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. Abstract in this class; intended to be redefined in descendants. More...
 
virtual void update_item ()
 Attaches the item handle to the current index, or detaches the item handle if is_done. More...
 
void initialize (const binary_section_space_schema_member &xanchor, bool xis_table_dof, int xversion)
 Initializes the iteration. More...
 
- Protected Member Functions inherited from fiber_bundle::section_dof_iterator
 section_dof_iterator ()
 Default constructor; creates an unattached iterator. Protected because this class is abstract. More...
 
 section_dof_iterator (const section_dof_iterator &xother)
 Copy constructor; attaches this to the same anchor as xother. Protected because this class is abstract. More...
 
 section_dof_iterator ()
 Default constructor; creates an unattached iterator. Protected because this class is abstract. More...
 
 section_dof_iterator (const section_dof_iterator &xother)
 Copy constructor; attaches this to the same anchor as xother. Protected because this class is abstract. More...
 
 section_dof_iterator (const section_space_schema_member &xanchor, bool xis_table_dof=false, int xversion=ANCHOR_VERSION)
 Creates an iterator over the table dofs (xis_table_dof == true) or rows dofs (xis_table_dof = false) of refinemement level xversion of schema xanchor. "Explicit" prevents interpretation as conversion from section_space_schema_member. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Additional Inherited Members

- Public Types inherited from sheaf::poset_dof_iterator
enum  anchor_version_index { ANCHOR_VERSION = CURRENT_MEMBER_VERSION, ANCHOR_HOST_VERSION = CURRENT_HOST_VERSION }
 Identifiers for anchor version. More...
 
- Protected Attributes inherited from fiber_bundle::section_dof_iterator
depth_first_iterator_discretization_itr
 The discretization iterator. More...
 
- Protected Attributes inherited from sheaf::poset_dof_iterator
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...
 

Detailed Description

Iterates in postorder over dofs of a schema member anchor. Attaches an a handle of type section_space_schema_member to the current member of the iteration.

Definition at line 41 of file binary_section_dof_iterator.h.

Constructor & Destructor Documentation

◆ binary_section_dof_iterator() [1/3]

fiber_bundle::binary_section_dof_iterator::binary_section_dof_iterator ( )

Default constructor; creates an unattached iterator. Protected because this class is abstract.

Postcondition
  • !is_initialized()

Definition at line 32 of file binary_section_dof_iterator.cc.

References invariant(), and fiber_bundle::section_dof_iterator::is_initialized().

Referenced by clone(), and invariant().

◆ binary_section_dof_iterator() [2/3]

fiber_bundle::binary_section_dof_iterator::binary_section_dof_iterator ( const binary_section_dof_iterator xother)

Copy constructor; attaches this to the same anchor as xother. Protected because this class is abstract.

Postcondition
  • -unexecutable( this is first member of iteration or is_done() )

Definition at line 54 of file binary_section_dof_iterator.cc.

References anchor(), invariant(), fiber_bundle::section_dof_iterator::is_done(), fiber_bundle::section_dof_iterator::is_initialized(), sheaf::any::is_same_type(), item(), and operator=().

◆ ~binary_section_dof_iterator()

fiber_bundle::binary_section_dof_iterator::~binary_section_dof_iterator ( )
virtual

Destructor.

Definition at line 129 of file binary_section_dof_iterator.cc.

References is_ancestor_of().

Referenced by operator=().

◆ binary_section_dof_iterator() [3/3]

fiber_bundle::binary_section_dof_iterator::binary_section_dof_iterator ( const binary_section_space_schema_member xanchor,
bool  xis_table_dof = false,
int  xversion = ANCHOR_VERSION 
)
explicit

Creates an iterator over the table dofs (xis_table_dof == true) or rows dofs (xis_table_dof = false) of refinemement level xversion of schema xanchor. "Explicit" prevents interpretation as conversion from binary_section_space_schema_member.

Precondition
  • item_is_ancestor_of(xanchor)
  • xanchor.state_is_read_accessible()
  • xanchor.host()->is_schematized(false)
  • xanchor.has_version(xversion)
Postcondition
  • anchor().version() == xanchor.unaliased_version(xversion)
  • -unexecutable( !is_done() implies this is first member )
  • item().is_attached() == !is_done()

Definition at line 220 of file binary_section_dof_iterator.cc.

References anchor(), sheaf::poset_component::has_version(), fiber_bundle::binary_section_space_schema_member::host(), initialize(), invariant(), fiber_bundle::section_dof_iterator::is_done(), fiber_bundle::section_dof_iterator::is_initialized(), sheaf::any::is_same_type(), fiber_bundle::section_space_schema_poset::is_schematized(), item(), item_is_ancestor_of(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_component::unaliased_version().

Member Function Documentation

◆ anchor() [1/2]

fiber_bundle::binary_section_space_schema_member & fiber_bundle::binary_section_dof_iterator::anchor ( )

The schema member whose downset is being iterated over; the top member of the domain of iteration (mutable version).

Precondition

Definition at line 257 of file binary_section_dof_iterator.cc.

References fiber_bundle::section_dof_iterator::is_initialized().

Referenced by binary_section_dof_iterator(), initialize(), operator=(), and update_item().

◆ anchor() [2/2]

const fiber_bundle::binary_section_space_schema_member & fiber_bundle::binary_section_dof_iterator::anchor ( ) const

The schema member whose downset is being iterated over; the top member of the domain of iteration (const version).

Precondition

Definition at line 280 of file binary_section_dof_iterator.cc.

References fiber_bundle::section_dof_iterator::is_initialized(), and item().

◆ clone()

fiber_bundle::binary_section_dof_iterator * fiber_bundle::binary_section_dof_iterator::clone ( ) const
virtual

Make a new instance of the same type as this.

Postcondition
  • result != 0

Implements fiber_bundle::section_dof_iterator.

Definition at line 168 of file binary_section_dof_iterator.cc.

References binary_section_dof_iterator(), and invariant().

Referenced by is_ancestor_of().

◆ initialize()

void fiber_bundle::binary_section_dof_iterator::initialize ( const binary_section_space_schema_member xanchor,
bool  xis_table_dof,
int  xversion 
)
protected

◆ invariant()

bool fiber_bundle::binary_section_dof_iterator::invariant ( ) const
virtual

◆ is_ancestor_of()

bool fiber_bundle::binary_section_dof_iterator::is_ancestor_of ( const any other) const
virtual

True if other conforms to this.

Reimplemented from fiber_bundle::section_dof_iterator.

Definition at line 148 of file binary_section_dof_iterator.cc.

References clone().

Referenced by operator=(), and ~binary_section_dof_iterator().

◆ item() [1/2]

fiber_bundle::binary_section_space_schema_member & fiber_bundle::binary_section_dof_iterator::item ( )

The the current member of the iteration (mutable version).

Precondition

Definition at line 305 of file binary_section_dof_iterator.cc.

References fiber_bundle::section_dof_iterator::is_initialized().

Referenced by anchor(), binary_section_dof_iterator(), initialize(), operator=(), reset_item(), and update_item().

◆ item() [2/2]

const fiber_bundle::binary_section_space_schema_member & fiber_bundle::binary_section_dof_iterator::item ( ) const

The the current member of the iteration (const version).

Precondition

Definition at line 326 of file binary_section_dof_iterator.cc.

References fiber_bundle::section_dof_iterator::is_initialized(), and item_is_ancestor_of().

◆ item_is_ancestor_of()

bool fiber_bundle::binary_section_dof_iterator::item_is_ancestor_of ( const schema_poset_member xmbr) const
virtual

True if xmbr conforms to the type of item of this.

Reimplemented from fiber_bundle::section_dof_iterator.

Definition at line 348 of file binary_section_dof_iterator.cc.

References reset_item().

Referenced by binary_section_dof_iterator(), initialize(), and item().

◆ operator=() [1/2]

fiber_bundle::binary_section_dof_iterator & fiber_bundle::binary_section_dof_iterator::operator= ( const poset_dof_iterator xother)
virtual

Assignment operator.

Precondition
  • is_ancestor_of(&xother)
Postcondition
  • -unexecutable( this is first member of iteration or is_done() )

Reimplemented from fiber_bundle::section_dof_iterator.

Definition at line 80 of file binary_section_dof_iterator.cc.

References anchor(), sheaf::poset_dof_iterator::anchor(), invariant(), is_ancestor_of(), fiber_bundle::section_dof_iterator::is_done(), fiber_bundle::section_dof_iterator::is_initialized(), sheaf::poset_dof_iterator::is_initialized(), sheaf::any::is_same_type(), item(), and sheaf::poset_dof_iterator::item().

Referenced by binary_section_dof_iterator().

◆ operator=() [2/2]

fiber_bundle::binary_section_dof_iterator & fiber_bundle::binary_section_dof_iterator::operator= ( const binary_section_dof_iterator xother)

Assignment operator.

Precondition
  • is_ancestor_of(&xother)
Not Implemented.
Postcondition

Definition at line 106 of file binary_section_dof_iterator.cc.

References invariant(), is_ancestor_of(), and ~binary_section_dof_iterator().

◆ reset_item()

void fiber_bundle::binary_section_dof_iterator::reset_item ( )
protectedvirtual

Creates item if needed and attaches it to the current index. Abstract in this class; intended to be redefined in descendants.

Postcondition
  • !is_done() == item().is_attached()

Implements fiber_bundle::section_dof_iterator.

Definition at line 375 of file binary_section_dof_iterator.cc.

References sheaf::poset_dof_iterator::_item, fiber_bundle::section_dof_iterator::is_done(), fiber_bundle::section_dof_iterator::is_initialized(), item(), and update_item().

Referenced by item_is_ancestor_of().

◆ update_item()

void fiber_bundle::binary_section_dof_iterator::update_item ( )
protectedvirtual

Attaches the item handle to the current index, or detaches the item handle if is_done.

Precondition
Issue:
resets host, which is unnecessary except when called from reset_item. Would be more efficient to just reset indices; avoids call to _item.init_handle_data_members
Postcondition
  • !is_done() == item().is_attached()

Implements fiber_bundle::section_dof_iterator.

Definition at line 407 of file binary_section_dof_iterator.cc.

References fiber_bundle::section_dof_iterator::_discretization_itr, sheaf::poset_dof_iterator::_itr, anchor(), fiber_bundle::binary_section_space_schema_member::attach_to_state(), fiber_bundle::section_space_schema_member::detach_from_state(), sheaf::depth_first_iterator::index(), initialize(), fiber_bundle::section_dof_iterator::is_done(), sheaf::depth_first_iterator::is_done(), fiber_bundle::section_dof_iterator::is_initialized(), and item().

Referenced by reset_item().


The documentation for this class was generated from the following files: