SheafSystem  0.0.0.0
fiber_bundle::binary_section_component_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_component_iterator.h>

Inheritance diagram for fiber_bundle::binary_section_component_iterator:
fiber_bundle::section_component_iterator sheaf::any

Public Member Functions

 binary_section_component_iterator ()
 Default constructor; creates an unattached iterator. Protected because this class is abstract. More...
 
 binary_section_component_iterator (const binary_section_component_iterator &xother)
 Copy constructor; attaches this to the same anchor as xother. Protected because this class is abstract. More...
 
virtual binary_section_component_iteratoroperator= (const section_component_iterator &xother)
 Assignment operator. More...
 
binary_section_component_iteratoroperator= (const binary_section_component_iterator &xother)
 Assignment operator. More...
 
virtual ~binary_section_component_iterator ()
 Destructor. More...
 
virtual bool is_ancestor_of (const any *other) const
 True if other conforms to this. More...
 
virtual binary_section_component_iteratorclone () const
 Make a new instance of the same type as this. More...
 
bool invariant () const
 The class invariant. More...
 
 binary_section_component_iterator (const binary_section_space_schema_member &xanchor)
 Creates an iterator anchored at xanchor. 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. More...
 
const binary_section_space_schema_memberitem () const
 The the current member of the iteration. 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...
 
- Public Member Functions inherited from fiber_bundle::section_component_iterator
 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 ()
 Destructor. 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_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...
 
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_memberitem ()
 The the current member of the iteration (mutable version). More...
 
const section_space_schema_memberitem () const
 The the current member of the iteration (const version). More...
 
virtual const scoped_indexindex () 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_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_component_iterator
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 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...
 

Additional Inherited Members

- Protected Attributes inherited from fiber_bundle::section_component_iterator
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...
 

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_component_iterator.h.

Constructor & Destructor Documentation

◆ binary_section_component_iterator() [1/3]

fiber_bundle::binary_section_component_iterator::binary_section_component_iterator ( )

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

Postcondition
  • !is_initialized()

Definition at line 29 of file binary_section_component_iterator.cc.

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

Referenced by clone(), and invariant().

◆ binary_section_component_iterator() [2/3]

fiber_bundle::binary_section_component_iterator::binary_section_component_iterator ( const binary_section_component_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 51 of file binary_section_component_iterator.cc.

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

◆ ~binary_section_component_iterator()

fiber_bundle::binary_section_component_iterator::~binary_section_component_iterator ( )
virtual

Destructor.

Definition at line 127 of file binary_section_component_iterator.cc.

References is_ancestor_of().

Referenced by operator=().

◆ binary_section_component_iterator() [3/3]

fiber_bundle::binary_section_component_iterator::binary_section_component_iterator ( const binary_section_space_schema_member xanchor)
explicit

Creates an iterator anchored at xanchor.

Precondition
  • item_is_ancestor_of(xanchor)
  • xanchor.state_is_read_accessible()
Postcondition
  • -unexecutable( postorder - have visited all children of this )
  • -unexecutable( !is_done() implies this is first member )
  • item().is_attached() == !is_done()

Definition at line 221 of file binary_section_component_iterator.cc.

References anchor(), invariant(), fiber_bundle::section_component_iterator::is_done(), fiber_bundle::section_component_iterator::is_initialized(), sheaf::any::is_same_type(), item(), item_is_ancestor_of(), fiber_bundle::section_component_iterator::put_anchor(), fiber_bundle::section_component_iterator::reset(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

Member Function Documentation

◆ anchor()

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

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

Precondition

Definition at line 257 of file binary_section_component_iterator.cc.

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

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

◆ clone()

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

Make a new instance of the same type as this.

Postcondition
  • result != 0

Implements fiber_bundle::section_component_iterator.

Definition at line 169 of file binary_section_component_iterator.cc.

References binary_section_component_iterator(), and invariant().

Referenced by is_ancestor_of().

◆ invariant()

◆ is_ancestor_of()

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

True if other conforms to this.

Reimplemented from fiber_bundle::section_component_iterator.

Definition at line 149 of file binary_section_component_iterator.cc.

References clone().

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

◆ item()

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

◆ item_is_ancestor_of()

bool fiber_bundle::binary_section_component_iterator::item_is_ancestor_of ( const section_space_schema_member xmbr) const
virtual

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

Reimplemented from fiber_bundle::section_component_iterator.

Definition at line 305 of file binary_section_component_iterator.cc.

References reset_item().

Referenced by binary_section_component_iterator(), and item().

◆ operator=() [1/2]

fiber_bundle::binary_section_component_iterator & fiber_bundle::binary_section_component_iterator::operator= ( const section_component_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_component_iterator.

Definition at line 77 of file binary_section_component_iterator.cc.

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

Referenced by binary_section_component_iterator().

◆ operator=() [2/2]

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

Assignment operator.

Precondition
  • is_ancestor_of(&xother)
Not Implemented.
Postcondition

Definition at line 104 of file binary_section_component_iterator.cc.

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

◆ reset_item()

void fiber_bundle::binary_section_component_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_component_iterator.

Definition at line 333 of file binary_section_component_iterator.cc.

References fiber_bundle::section_component_iterator::_item, fiber_bundle::section_component_iterator::is_done(), fiber_bundle::section_component_iterator::is_initialized(), item(), and fiber_bundle::section_component_iterator::update_item().

Referenced by item_is_ancestor_of().


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