SheafSystem
0.0.0.0
|
An iterator over an id space in which the equivalence between the ids in the space and the hub id space is stored in intervals. More...
#include <interval_index_space_iterator.h>
Friends | |
class | interval_index_space_state |
INTERVAL_INDEX_SPACE_ITERATOR FACET | |
typedef std::map< pod_type, pod_type > | to_hub_type |
The type of the id maps. More... | |
const to_hub_type * | _to_hub |
The interval to hub ids. More... | |
to_hub_type::const_iterator | _itr |
The stl iterator over ids. More... | |
pod_type | _interval_begin |
The begin of the current interval. More... | |
pod_type | _interval_end |
The end of the current interval. More... | |
interval_index_space_iterator () | |
Default constructor. More... | |
interval_index_space_iterator (const interval_index_space_iterator &xother) | |
Copy constructor. More... | |
interval_index_space_iterator (const index_space_family &xid_spaces, pod_type xindex) | |
Constructor: Attach to state with index xindex in the family xid_spaces. More... | |
interval_index_space_iterator (const index_space_family &xid_spaces, const std::string &xname) | |
Constructor: Attach to state with name xname in the family xid_spaces. More... | |
interval_index_space_iterator & | operator= (const interval_index_space_iterator &xother) |
Assignment operator. More... | |
virtual | ~interval_index_space_iterator () |
Destructor. More... | |
void | next_interval () |
Advances the iteration to the beginning of the next interval. More... | |
pod_type | interval_begin () const |
The begin of the current interval. More... | |
pod_type | interval_end () const |
The end of the current interval. More... | |
void | update_interval_ids (pod_type xinterval_begin) |
Update the interval ids with the beginning interval id, xinterval_begin. More... | |
void | invalidate_interval_ids () |
Invalidate the interval ids. More... | |
INDEX_SPACE_ITERATOR FACET | |
virtual interval_index_space_iterator & | operator= (const index_space_iterator &xother) |
Assignment operator. More... | |
virtual bool | operator== (const index_space_iterator &xother) const |
True if this is equivalent to xother. More... | |
virtual interval_index_space_iterator * | clone () const |
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached, attach to the same state. More... | |
ITERATOR FACET | |
virtual void | next () |
Makes item() the next id in the iteration. More... | |
virtual void | reset () |
Restarts the iteration. More... | |
HANDLE FACET | |
virtual void | attach_to (explicit_index_space_state *xstate) |
Attach to the explicit id space state xstate. More... | |
virtual bool | conforms_to_state (explicit_index_space_state *xstate) const |
True if this conforms to the iterator type required by the explicit id space state xstate. More... | |
ANY FACET | |
virtual bool | is_ancestor_of (const any *other) const |
Conformance test; true if other conforms to this. More... | |
virtual bool | invariant () const |
Class invariant. More... | |
Additional Inherited Members | |
Public Types inherited from sheaf::index_space_iterator | |
typedef pod_index_type | pod_type |
The "plain old data" index type for this. More... | |
Public Member Functions inherited from sheaf::explicit_index_space_iterator | |
virtual | ~explicit_index_space_iterator () |
Destructor. More... | |
virtual const index_space_collection & | host () const |
The host collection. More... | |
virtual pod_type | index () const |
Index of this space. More... | |
virtual bool | is_attached () const |
True if this iterator is attached to a state. More... | |
virtual void | attach_to (pod_type xindex) |
Attach to the state with index xindex in the id space family id_spaces(). More... | |
virtual void | attach_to (const index_space_collection &xhost, pod_type xlocal_id) |
Attach to the state with local scope id, xlocal_id in the host id space collection xhost. More... | |
virtual void | detach () |
Detach this iterator form its state, if any. More... | |
virtual bool | conforms_to_state (const index_space_collection &xhost, pod_type xlocal_id) const |
True if this conforms to the handle type required by the state with local scope id xlocal_id in the host id space collection xhost. More... | |
Public Member Functions inherited from sheaf::index_space_iterator | |
virtual | ~index_space_iterator () |
Destructor. More... | |
bool | is_done () const |
True if iteration is finished. More... | |
void | force_is_done () |
Makes is_done() true. More... | |
pod_type | pod () const |
The current id in the iteration. More... | |
pod_type | hub_pod () const |
The current unglued hub id in the iteration. synonym for unglued_hub_pod(). More... | |
pod_type | unglued_hub_pod () const |
The current unglued hub id in the iteration. More... | |
pod_type | glued_hub_pod () const |
The current glued hub id in the iteration. More... | |
const index_space_family & | id_spaces () const |
The id space family for this (const version). More... | |
const hub_index_space_handle & | hub_id_space () const |
The hub id space. More... | |
std::string | name () const |
Name of this space. More... | |
void | attach_to (const index_space_family &xid_spaces, pod_type xindex) |
Attach to the state with index xindex in the id space family xid_spaces. More... | |
void | attach_to (const index_space_family &xid_spaces, const std::string &xname) |
Attach to the state with name xname in the id space family xid_spaces. More... | |
void | attach_to (const std::string &xname) |
Attach to the state with name xname in the id space family id_spaces(). More... | |
void | attach_to (const index_space_handle &xid_space) |
Attach to the state of the id space xid_space. More... | |
bool | conforms_to_state (const index_space_family &xid_spaces, pod_type xindex) const |
True if this conforms to the handle type required by the state with index xindex in the id space family, xid_spaces. More... | |
bool | conforms_to_state (const index_space_family &xid_spaces, const std::string &xname) const |
True if this conforms to the handle type required by the state with name xname in the id space family, xid_spaces. More... | |
bool | conforms_to_state (pod_type xid) const |
True if this conforms to the handle type required by the state with id xid. More... | |
bool | conforms_to_state (const std::string &xname) const |
True if this conforms to the handle type required by the state with name xname. 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 inherited from sheaf::explicit_index_space_iterator | |
explicit_index_space_iterator () | |
Default constructor. More... | |
explicit_index_space_iterator (const explicit_index_space_iterator &xother) | |
Copy constructor. More... | |
explicit_index_space_iterator & | operator= (const explicit_index_space_iterator &xother) |
Assignment operator. More... | |
explicit_index_space_state & | state () |
The explicit state (mutable version). More... | |
const explicit_index_space_state & | state () const |
The explicit state (const version). More... | |
explicit_index_space_state * | state (pod_type xindex) const |
The explicit id space state at id xindex in id space family id_spaces(). Returns null if no id space stae is available at index xindex. More... | |
explicit_index_space_state * | state (const index_space_collection &xhost, pod_type xlocal_id) const |
The explicit id space state with local scope id xlocal_id in the host id space collection xhost. More... | |
Protected Member Functions inherited from sheaf::index_space_iterator | |
index_space_iterator () | |
Creates an iterator for the id space. More... | |
index_space_iterator (const index_space_iterator &xother) | |
Copy constructor. More... | |
void | invalidate_ids () |
Set is_done() and invalidate pod() and hub_pod(). More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Protected Attributes inherited from sheaf::explicit_index_space_iterator | |
explicit_index_space_state * | _state |
The explicit state. More... | |
Protected Attributes inherited from sheaf::index_space_iterator | |
bool | _is_done |
True if the iteration is finished. More... | |
pod_type | _pod |
The current id in the iteration. More... | |
pod_type | _hub_pod |
The current hub id in the iteration. More... | |
An iterator over an id space in which the equivalence between the ids in the space and the hub id space is stored in intervals.
Definition at line 48 of file interval_index_space_iterator.h.
|
protected |
The type of the id maps.
Definition at line 112 of file interval_index_space_iterator.h.
sheaf::interval_index_space_iterator::interval_index_space_iterator | ( | ) |
Default constructor.
Definition at line 35 of file interval_index_space_iterator.cc.
References invariant(), and sheaf::explicit_index_space_iterator::is_attached().
Referenced by clone(), and interval_index_space_iterator().
sheaf::interval_index_space_iterator::interval_index_space_iterator | ( | const interval_index_space_iterator & | xother | ) |
Copy constructor.
Definition at line 52 of file interval_index_space_iterator.cc.
References interval_index_space_iterator(), and invariant().
sheaf::interval_index_space_iterator::interval_index_space_iterator | ( | const index_space_family & | xid_spaces, |
pod_type | xindex | ||
) |
Constructor: Attach to state with index xindex in the family xid_spaces.
Definition at line 71 of file interval_index_space_iterator.cc.
References attach_to(), conforms_to_state(), sheaf::index_space_iterator::id_spaces(), sheaf::explicit_index_space_iterator::index(), interval_index_space_iterator(), invariant(), and sheaf::explicit_index_space_iterator::is_attached().
sheaf::interval_index_space_iterator::interval_index_space_iterator | ( | const index_space_family & | xid_spaces, |
const std::string & | xname | ||
) |
Constructor: Attach to state with name xname in the family xid_spaces.
Definition at line 95 of file interval_index_space_iterator.cc.
References attach_to(), conforms_to_state(), sheaf::index_space_iterator::id_spaces(), invariant(), sheaf::explicit_index_space_iterator::is_attached(), sheaf::index_space_iterator::name(), and ~interval_index_space_iterator().
|
virtual |
Destructor.
Definition at line 119 of file interval_index_space_iterator.cc.
References operator=().
Referenced by interval_index_space_iterator().
|
protectedvirtual |
Attach to the explicit id space state xstate.
Implements sheaf::explicit_index_space_iterator.
Definition at line 517 of file interval_index_space_iterator.cc.
References sheaf::explicit_index_space_iterator::_state, _to_hub, conforms_to_state(), sheaf::index_space_iterator::hub_pod(), invariant(), sheaf::explicit_index_space_iterator::is_attached(), sheaf::index_space_iterator::is_done(), sheaf::is_valid(), sheaf::index_space_iterator::pod(), reset(), and sheaf::explicit_index_space_iterator::state().
Referenced by interval_index_space_iterator(), and reset().
|
virtual |
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached, attach to the same state.
Implements sheaf::explicit_index_space_iterator.
Definition at line 371 of file interval_index_space_iterator.cc.
References interval_index_space_iterator(), sheaf::any::is_same_type(), and next().
Referenced by operator==().
|
protectedvirtual |
True if this conforms to the iterator type required by the explicit id space state xstate.
Implements sheaf::explicit_index_space_iterator.
Definition at line 550 of file interval_index_space_iterator.cc.
References is_ancestor_of().
Referenced by attach_to(), and interval_index_space_iterator().
sheaf::interval_index_space_iterator::pod_type sheaf::interval_index_space_iterator::interval_begin | ( | ) | const |
The begin of the current interval.
Definition at line 226 of file interval_index_space_iterator.cc.
References _interval_begin, and interval_end().
Referenced by sheaf::interval_index_space_record::externalize(), next_interval(), and update_interval_ids().
sheaf::interval_index_space_iterator::pod_type sheaf::interval_index_space_iterator::interval_end | ( | ) | const |
The end of the current interval.
Definition at line 233 of file interval_index_space_iterator.cc.
References _interval_end, and update_interval_ids().
Referenced by sheaf::interval_index_space_record::externalize(), interval_begin(), and update_interval_ids().
|
protected |
Invalidate the interval ids.
Definition at line 275 of file interval_index_space_iterator.cc.
References _interval_begin, _interval_end, sheaf::invalid_pod_index(), sheaf::index_space_iterator::invalidate_ids(), and operator=().
Referenced by next_interval(), and update_interval_ids().
|
virtual |
Class invariant.
Reimplemented from sheaf::explicit_index_space_iterator.
Definition at line 601 of file interval_index_space_iterator.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::explicit_index_space_iterator::invariant(), and sheaf::any::invariant_check().
Referenced by attach_to(), interval_index_space_iterator(), is_ancestor_of(), next(), next_interval(), operator=(), operator==(), and reset().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::explicit_index_space_iterator.
Definition at line 580 of file interval_index_space_iterator.cc.
References invariant().
Referenced by conforms_to_state(), operator=(), and operator==().
|
virtual |
Makes item() the next id in the iteration.
Implements sheaf::index_space_iterator.
Definition at line 405 of file interval_index_space_iterator.cc.
References sheaf::index_space_iterator::_hub_pod, _interval_end, sheaf::index_space_iterator::_pod, sheaf::index_space_iterator::hub_pod(), invariant(), sheaf::explicit_index_space_iterator::is_attached(), sheaf::index_space_iterator::is_done(), next_interval(), sheaf::index_space_iterator::pod(), and reset().
Referenced by clone().
void sheaf::interval_index_space_iterator::next_interval | ( | ) |
Advances the iteration to the beginning of the next interval.
Definition at line 168 of file interval_index_space_iterator.cc.
References sheaf::index_space_iterator::_is_done, _itr, _to_hub, interval_begin(), invalidate_interval_ids(), invariant(), sheaf::index_space_iterator::is_done(), sheaf::is_valid(), and update_interval_ids().
Referenced by sheaf::interval_index_space_record::externalize(), next(), and operator=().
sheaf::interval_index_space_iterator & sheaf::interval_index_space_iterator::operator= | ( | const interval_index_space_iterator & | xother | ) |
Assignment operator.
Definition at line 136 of file interval_index_space_iterator.cc.
References _interval_begin, _interval_end, _itr, _to_hub, sheaf::explicit_index_space_iterator::detach(), invariant(), sheaf::explicit_index_space_iterator::is_attached(), and next_interval().
Referenced by invalidate_interval_ids(), and ~interval_index_space_iterator().
|
virtual |
Assignment operator.
Reimplemented from sheaf::explicit_index_space_iterator.
Definition at line 315 of file interval_index_space_iterator.cc.
References invariant(), is_ancestor_of(), and operator==().
|
virtual |
True if this is equivalent to xother.
Reimplemented from sheaf::explicit_index_space_iterator.
Definition at line 340 of file interval_index_space_iterator.cc.
References _interval_begin, _interval_end, _itr, _to_hub, clone(), invariant(), is_ancestor_of(), sheaf::explicit_index_space_iterator::is_attached(), and sheaf::explicit_index_space_iterator::operator==().
Referenced by operator=().
|
virtual |
Restarts the iteration.
Implements sheaf::index_space_iterator.
Definition at line 449 of file interval_index_space_iterator.cc.
References sheaf::index_space_iterator::_is_done, _itr, _to_hub, attach_to(), sheaf::index_space_iterator::invalidate_ids(), invariant(), sheaf::explicit_index_space_iterator::is_attached(), sheaf::is_valid(), and update_interval_ids().
Referenced by attach_to(), and next().
|
protected |
Update the interval ids with the beginning interval id, xinterval_begin.
Definition at line 242 of file interval_index_space_iterator.cc.
References sheaf::index_space_iterator::_hub_pod, _interval_begin, _interval_end, _itr, sheaf::index_space_iterator::_pod, sheaf::index_space_iterator::hub_pod(), interval_begin(), interval_end(), invalidate_interval_ids(), sheaf::index_space_iterator::is_done(), sheaf::is_valid(), and sheaf::index_space_iterator::pod().
Referenced by interval_end(), next_interval(), and reset().
|
protected |
The begin of the current interval.
Definition at line 137 of file interval_index_space_iterator.h.
Referenced by interval_begin(), invalidate_interval_ids(), operator=(), operator==(), and update_interval_ids().
|
protected |
The end of the current interval.
Definition at line 142 of file interval_index_space_iterator.h.
Referenced by interval_end(), invalidate_interval_ids(), next(), operator=(), operator==(), and update_interval_ids().
|
protected |
The stl iterator over ids.
Definition at line 132 of file interval_index_space_iterator.h.
Referenced by next_interval(), operator=(), operator==(), reset(), and update_interval_ids().
|
protected |
The interval to hub ids.
Definition at line 127 of file interval_index_space_iterator.h.
Referenced by attach_to(), next_interval(), operator=(), operator==(), and reset().