SheafSystem  0.0.0.0
sheaf::postorder_member_iterator Class Reference

#include <postorder_member_iterator.h>

Inheritance diagram for sheaf::postorder_member_iterator:
sheaf::filtered_depth_first_member_iterator sheaf::any

Public Member Functions

 postorder_member_iterator ()
 Default constructor; creates an unattached iterator, with and all-pass filter. More...
 
 postorder_member_iterator (const postorder_member_iterator &xother)
 Copy constructor. More...
 
virtual postorder_member_iteratoroperator= (const filtered_depth_first_member_iterator &xother)
 Assignment operator. More...
 
postorder_member_iteratoroperator= (const postorder_member_iterator &xother)
 Assignment operator. More...
 
virtual ~postorder_member_iterator ()
 Destructor. More...
 
virtual bool is_ancestor_of (const any *other) const
 True if other conforms to this. More...
 
virtual postorder_member_iteratorclone () const
 Make a new instance of the same type as this. More...
 
bool invariant () const
 The class invariant. More...
 
 postorder_member_iterator (const abstract_poset_member &xanchor, bool xdown, bool xstrict)
 Creates an iterator anchored at xanchor, no filter. Iterates in direction xdown. If xstrict, iterate over strict up/down set only. More...
 
 postorder_member_iterator (const abstract_poset_member &xanchor, const subposet &xfilter, bool xdown, bool xstrict)
 Creates an iterator anchored at xanchor, filtered by xfilter. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only. More...
 
 postorder_member_iterator (const abstract_poset_member &xanchor, pod_index_type xfilter_index, bool xdown, bool xstrict)
 Creates an iterator anchored at xanchor, filtered by xfilter_index. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only. More...
 
 postorder_member_iterator (const abstract_poset_member &xanchor, const scoped_index &xfilter_index, bool xdown, bool xstrict)
 Creates an iterator anchored at xanchor, filtered by xfilter_index. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only. More...
 
 postorder_member_iterator (const abstract_poset_member &xanchor, const std::string &xfilter_name, bool xdown, bool xstrict)
 Creates an iterator anchored at xanchor, filtered by xfilter_name. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only. More...
 
- Public Member Functions inherited from sheaf::filtered_depth_first_member_iterator
 filtered_depth_first_member_iterator (const filtered_depth_first_member_iterator &xother)
 Copy constructor. More...
 
virtual ~filtered_depth_first_member_iterator ()
 Destructor. More...
 
depth_first_iterator::order_type order ()
 Iteration directions. More...
 
bool is_initialized () const
 True if this has been initialized for iteration with respect to a specific anchor. More...
 
virtual abstract_poset_memberanchor ()
 The poset member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More...
 
virtual const abstract_poset_memberanchor () const
 The poset member whose downset is being iterated over; the top member of the domain of iteration (const version). More...
 
virtual void put_anchor (const abstract_poset_member *xanchor)
 Set anchor() to *xanchor. More...
 
virtual void put_anchor (pod_index_type xanchor_hub_id)
 Set anchor() to member at xanchor_hub_id. More...
 
void put_anchor (const scoped_index &xanchor_id)
 Set anchor() to member at xanchor_id. More...
 
const subposetfilter () const
 The subposet which is the filter; Defines what is passed, not what is blocked. More...
 
void put_filter (const subposet &filter)
 Sets the subposet which is the filter. More...
 
void put_filter (const std::string &xfilter_name)
 Sets the subposet which is the filter. More...
 
void put_filter (pod_index_type xfilter_hub_id)
 Sets the subposet which is the filter. More...
 
void put_filter (const scoped_index &xfilter_id)
 Sets the subposet which is the filter. More...
 
bool descending () const
 True if iterating over down set of anchor. More...
 
void put_descending (bool xdescending)
 Set descending() to xdescending. More...
 
bool strict () const
 True if iterating over xstrict up/down set of anchor. More...
 
void put_strict (bool xstrict)
 Set strict() to xstrict. More...
 
bool is_done () const
 True if iteration finished. More...
 
virtual void next ()
 Makes this the next member of the iteration. More...
 
virtual void reset (bool xreset_markers=RESET)
 Restarts the iteration. More...
 
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...
 
bool has_visited (pod_index_type xhub_id) const
 True if this has already visited member with hub id xhub_id. More...
 
bool has_visited (const scoped_index &xid) const
 True if this has already visited member with id xid. More...
 
bool has_visited (const abstract_poset_member &xmbr) const
 True if this has already visited member xmbr. More...
 
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...
 
const scoped_indexgreater_index () const
 The index of the greater member of the current link. More...
 
const scoped_indexlesser_index () const
 The index of the lesser member of the current link lesser_index() == index() More...
 
abstract_poset_memberitem ()
 The the current member of the iteration (mutable version). More...
 
const abstract_poset_memberitem () const
 The the current member of the iteration (const version). More...
 
virtual bool item_is_ancestor_of (const abstract_poset_member &xmbr) const
 True if xmbr conforms to the type of item of this. More...
 
virtual bool anchor_is_ancestor_of (const abstract_poset_member &xmbr) const
 True if xmbr conforms to the type of anchor of this. 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

 postorder_member_iterator (filtered_depth_first_iterator *xitr, abstract_poset_member *xitem)
 Covariant constructor; supports virtual construction of data members. More...
 
- Protected Member Functions inherited from sheaf::filtered_depth_first_member_iterator
 filtered_depth_first_member_iterator (filtered_depth_first_iterator *xitr, abstract_poset_member *xitem)
 Covariant constructor; supports virtual construction of data members. 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 sheaf::filtered_depth_first_member_iterator
abstract_poset_member_item
 The member handle for the current item in the iteration. More...
 
filtered_depth_first_iterator_iterator
 The index iterator used to implement the iteration. More...
 

Detailed Description

Deprecated:
No replacement. Iterates in postorder over the intersection of a subposet filter with a directional (up or down) set of a poset member anchor. Attaches an a handle of type abstract_poset_member to the current member of the iteration.

Definition at line 44 of file postorder_member_iterator.h.

Constructor & Destructor Documentation

◆ postorder_member_iterator() [1/8]

sheaf::postorder_member_iterator::postorder_member_iterator ( )

Default constructor; creates an unattached iterator, with and all-pass filter.

Postcondition
  • !is_initialized()

Definition at line 29 of file postorder_member_iterator.cc.

References invariant(), and sheaf::filtered_depth_first_member_iterator::is_initialized().

Referenced by clone(), invariant(), and postorder_member_iterator().

◆ postorder_member_iterator() [2/8]

sheaf::postorder_member_iterator::postorder_member_iterator ( const postorder_member_iterator xother)

Copy constructor.

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

Definition at line 51 of file postorder_member_iterator.cc.

References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), operator=(), and sheaf::filtered_depth_first_member_iterator::strict().

◆ ~postorder_member_iterator()

sheaf::postorder_member_iterator::~postorder_member_iterator ( )
virtual

Destructor.

Definition at line 130 of file postorder_member_iterator.cc.

References is_ancestor_of().

Referenced by operator=().

◆ postorder_member_iterator() [3/8]

sheaf::postorder_member_iterator::postorder_member_iterator ( const abstract_poset_member xanchor,
bool  xdown,
bool  xstrict 
)

Creates an iterator anchored at xanchor, no filter. Iterates in direction xdown. If xstrict, iterate over strict up/down set only.

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 216 of file postorder_member_iterator.cc.

References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::item_is_ancestor_of(), postorder_member_iterator(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::filtered_depth_first_member_iterator::strict().

◆ postorder_member_iterator() [4/8]

sheaf::postorder_member_iterator::postorder_member_iterator ( const abstract_poset_member xanchor,
const subposet xfilter,
bool  xdown,
bool  xstrict 
)

Creates an iterator anchored at xanchor, filtered by xfilter. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only.

Precondition
  • item_is_ancestor_of(xanchor)
  • xanchor.state_is_read_accessible()
  • xanchor.host()->includes_subposet(&xfilter)
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 251 of file postorder_member_iterator.cc.

References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::item_is_ancestor_of(), postorder_member_iterator(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::filtered_depth_first_member_iterator::strict().

◆ postorder_member_iterator() [5/8]

sheaf::postorder_member_iterator::postorder_member_iterator ( const abstract_poset_member xanchor,
pod_index_type  xfilter_index,
bool  xdown,
bool  xstrict 
)

Creates an iterator anchored at xanchor, filtered by xfilter_index. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only.

Precondition
  • item_is_ancestor_of(xanchor)
  • xanchor.state_is_read_accessible()
  • xanchor.host()->includes_subposet(xfilter_index)
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 289 of file postorder_member_iterator.cc.

References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::item_is_ancestor_of(), postorder_member_iterator(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::filtered_depth_first_member_iterator::strict().

◆ postorder_member_iterator() [6/8]

sheaf::postorder_member_iterator::postorder_member_iterator ( const abstract_poset_member xanchor,
const scoped_index xfilter_index,
bool  xdown,
bool  xstrict 
)

Creates an iterator anchored at xanchor, filtered by xfilter_index. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only.

Precondition
  • item_is_ancestor_of(xanchor)
  • xanchor.state_is_read_accessible()
  • xanchor.host()->includes_subposet(xfilter_index)
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 327 of file postorder_member_iterator.cc.

References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::item_is_ancestor_of(), postorder_member_iterator(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::filtered_depth_first_member_iterator::strict().

◆ postorder_member_iterator() [7/8]

sheaf::postorder_member_iterator::postorder_member_iterator ( const abstract_poset_member xanchor,
const std::string &  xfilter_name,
bool  xdown,
bool  xstrict 
)

Creates an iterator anchored at xanchor, filtered by xfilter_name. If xdown, iterate in the down direction, otherwise iterate up. If xstrict, iterate over strict up/down set only.

Precondition
  • item_is_ancestor_of(xanchor)
  • xanchor.state_is_read_accessible()
  • !xfilter_name.empty() ? xanchor.host()->includes_subposet(xfilter_name) : true
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 365 of file postorder_member_iterator.cc.

References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::item_is_ancestor_of(), sheaf::subposet::name(), postorder_member_iterator(), sheaf::read_write_monitor_handle::state_is_read_accessible(), sheaf::filtered_depth_first_member_iterator::strict(), and sheaf::poset_component::version_name().

◆ postorder_member_iterator() [8/8]

sheaf::postorder_member_iterator::postorder_member_iterator ( filtered_depth_first_iterator xitr,
abstract_poset_member xitem 
)
protected

Covariant constructor; supports virtual construction of data members.

Definition at line 405 of file postorder_member_iterator.cc.

Member Function Documentation

◆ clone()

sheaf::postorder_member_iterator * sheaf::postorder_member_iterator::clone ( ) const
virtual

Make a new instance of the same type as this.

Postcondition
  • result != 0

Implements sheaf::filtered_depth_first_member_iterator.

Definition at line 168 of file postorder_member_iterator.cc.

References invariant(), and postorder_member_iterator().

Referenced by is_ancestor_of().

◆ invariant()

◆ is_ancestor_of()

bool sheaf::postorder_member_iterator::is_ancestor_of ( const any other) const
virtual

True if other conforms to this.

Reimplemented from sheaf::filtered_depth_first_member_iterator.

Definition at line 148 of file postorder_member_iterator.cc.

References clone().

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

◆ operator=() [1/2]

sheaf::postorder_member_iterator & sheaf::postorder_member_iterator::operator= ( const filtered_depth_first_member_iterator xother)
virtual

Assignment operator.

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

Reimplemented from sheaf::filtered_depth_first_member_iterator.

Definition at line 78 of file postorder_member_iterator.cc.

References sheaf::filtered_depth_first_member_iterator::anchor(), sheaf::filtered_depth_first_member_iterator::descending(), sheaf::filtered_depth_first_member_iterator::filter(), invariant(), is_ancestor_of(), sheaf::filtered_depth_first_member_iterator::is_done(), sheaf::filtered_depth_first_member_iterator::is_initialized(), sheaf::any::is_same_type(), sheaf::filtered_depth_first_member_iterator::item(), sheaf::filtered_depth_first_member_iterator::operator=(), and sheaf::filtered_depth_first_member_iterator::strict().

Referenced by postorder_member_iterator().

◆ operator=() [2/2]

sheaf::postorder_member_iterator & sheaf::postorder_member_iterator::operator= ( const postorder_member_iterator xother)

Assignment operator.

Precondition
  • is_ancestor_of(&xother)
Not Implemented.
Postcondition

Definition at line 108 of file postorder_member_iterator.cc.

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


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