SheafSystem  0.0.0.0
fiber_bundle::product_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 <product_section_dof_iterator.h>

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

Public Member Functions

 product_section_dof_iterator ()
 Default constructor; creates an unattached iterator. Protected because this class is abstract. More...
 
 product_section_dof_iterator (const product_section_dof_iterator &xother)
 Copy constructor; attaches this to the same anchor as xother. Protected because this class is abstract. More...
 
virtual product_section_dof_iteratoroperator= (const poset_dof_iterator &xother)
 Assignment operator. More...
 
product_section_dof_iteratoroperator= (const product_section_dof_iterator &xother)
 Assignment operator. More...
 
virtual ~product_section_dof_iterator ()
 Destructor. More...
 
virtual bool is_ancestor_of (const any *other) const
 True if other conforms to this. More...
 
virtual product_section_dof_iteratorclone () const
 Make a new instance of the same type as this. More...
 
virtual bool invariant () const
 The class invariant. More...
 
 product_section_dof_iterator (const product_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 product_section_space_schema_member. More...
 
product_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 product_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...
 
product_section_space_schema_memberitem ()
 The the current member of the iteration (mutable version). More...
 
const product_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...
 
- 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...
 
virtual void update_item ()=0
 Attaches the item handle to the current index, or detaches the item handle if is_done. 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 product_section_dof_iterator.h.

Constructor & Destructor Documentation

◆ product_section_dof_iterator() [1/3]

fiber_bundle::product_section_dof_iterator::product_section_dof_iterator ( )

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

Postcondition
  • !is_initialized()

Definition at line 31 of file product_section_dof_iterator.cc.

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

Referenced by clone(), and invariant().

◆ product_section_dof_iterator() [2/3]

fiber_bundle::product_section_dof_iterator::product_section_dof_iterator ( const product_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 49 of file product_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=().

◆ ~product_section_dof_iterator()

fiber_bundle::product_section_dof_iterator::~product_section_dof_iterator ( )
virtual

Destructor.

Definition at line 119 of file product_section_dof_iterator.cc.

References is_ancestor_of().

Referenced by operator=().

◆ product_section_dof_iterator() [3/3]

fiber_bundle::product_section_dof_iterator::product_section_dof_iterator ( const product_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 product_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 205 of file product_section_dof_iterator.cc.

References sheaf::poset_dof_iterator::_anchor, sheaf::poset_dof_iterator::_is_table_dof, sheaf::poset_dof_iterator::_item, anchor(), sheaf::poset_component::has_version(), fiber_bundle::product_section_space_schema_member::host(), 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(), fiber_bundle::section_dof_iterator::put_anchor(), fiber_bundle::section_dof_iterator::reset(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_component::unaliased_version().

Member Function Documentation

◆ anchor() [1/2]

fiber_bundle::product_section_space_schema_member & fiber_bundle::product_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 243 of file product_section_dof_iterator.cc.

References fiber_bundle::section_dof_iterator::is_initialized().

Referenced by operator=(), and product_section_dof_iterator().

◆ anchor() [2/2]

const fiber_bundle::product_section_space_schema_member & fiber_bundle::product_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 265 of file product_section_dof_iterator.cc.

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

◆ clone()

fiber_bundle::product_section_dof_iterator * fiber_bundle::product_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 155 of file product_section_dof_iterator.cc.

References invariant(), and product_section_dof_iterator().

Referenced by is_ancestor_of().

◆ invariant()

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

◆ is_ancestor_of()

bool fiber_bundle::product_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 136 of file product_section_dof_iterator.cc.

References clone().

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

◆ item() [1/2]

fiber_bundle::product_section_space_schema_member & fiber_bundle::product_section_dof_iterator::item ( )

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

Precondition

Definition at line 289 of file product_section_dof_iterator.cc.

References fiber_bundle::section_dof_iterator::is_initialized().

Referenced by anchor(), operator=(), product_section_dof_iterator(), and reset_item().

◆ item() [2/2]

const fiber_bundle::product_section_space_schema_member & fiber_bundle::product_section_dof_iterator::item ( ) const

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

Precondition

Definition at line 309 of file product_section_dof_iterator.cc.

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

◆ item_is_ancestor_of()

bool fiber_bundle::product_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 329 of file product_section_dof_iterator.cc.

References reset_item().

Referenced by item(), and product_section_dof_iterator().

◆ operator=() [1/2]

fiber_bundle::product_section_dof_iterator & fiber_bundle::product_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 73 of file product_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 product_section_dof_iterator().

◆ operator=() [2/2]

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

Assignment operator.

Precondition
  • is_ancestor_of(&xother)
Not Implemented.
Postcondition

Definition at line 98 of file product_section_dof_iterator.cc.

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

◆ reset_item()

void fiber_bundle::product_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 353 of file product_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 fiber_bundle::section_dof_iterator::update_item().

Referenced by item_is_ancestor_of().


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