SheafSystem
0.0.0.0
|
An abstract iterator over the id spaces of a interval. More...
#include <index_space_interval_iterator.h>
Friends | |
class | index_space_family |
class | index_space_family_iterator |
INDEX_SPACE_INTERVAL_ITERATOR FACET | |
typedef pod_index_type | pod_type |
The "plain old data" index type for this. More... | |
index_space_interval * | _host |
The host id space interval being iterated over. More... | |
bool | _only_persistent |
True if only the persistent id spaces are iterated over. More... | |
pod_type | _local_id |
The local id of the current id space in the iteration. More... | |
size_type | _ub |
The upper bound of the iteration. More... | |
virtual | ~index_space_interval_iterator () |
Destructor. More... | |
index_space_interval_iterator & | operator= (const index_space_interval_iterator &xother) |
Assignment operator. More... | |
bool | operator== (const index_space_interval_iterator &xother) const |
True if this is equivalent to xother. More... | |
index_space_interval_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... | |
const index_space_interval & | host () const |
The host id space interval being iterated over. More... | |
bool | only_persistent () const |
True if only the persistent id spaces are iterated over. More... | |
size_type | ub () const |
The upper bound of the id spaces. More... | |
void | next () |
Makes id_space() the next id space in the iteration. More... | |
bool | is_done () const |
True if iteration is finished. More... | |
void | reset () |
Restarts the iteration. More... | |
pod_type | index () const |
The index of the current id space in the iteration. More... | |
index_space_interval_iterator () | |
Default constructor; disabled. More... | |
index_space_interval_iterator (const index_space_interval_iterator &xother) | |
Copy constructor. More... | |
index_space_interval_iterator (bool xonly_persistent) | |
Constructor: Creates an instance with only_persistent() == xonly_persistent. More... | |
void | attach_to (index_space_interval &xhost) |
Attach this iterator to the host xhost. More... | |
void | detach () |
Detach this iterator. More... | |
bool | is_attached () const |
True, if this iterator is attached. More... | |
INDEX SPACE FACET | |
const index_space_family & | id_spaces () const |
The id space family for this (const version). More... | |
index_space_family & | id_spaces () |
The id space family for this (mutable version). More... | |
const hub_index_space_handle & | hub_id_space () const |
The hub id space. More... | |
size_type | ct () const |
The number of members. More... | |
pod_type | begin () const |
Beginning id of this space. More... | |
pod_type | end () const |
Ending id of this space. More... | |
bool | contains (pod_type xid) const |
True if this space contains id xid. More... | |
bool | contains_hub (pod_type xid) const |
True if this space contains an id equivalent to xid in the unglued hub id space. More... | |
bool | contains_unglued_hub (pod_type xid) const |
True if this space contains an id equivalent to xid in the unglued hub id space. More... | |
bool | contains_glued_hub (pod_type xid) const |
True if this space contains an id equivalent to xid in the glued hub id space. More... | |
bool | contains (pod_type xid, pod_type xhub_id) const |
True if this space contains an id xid equivalent to xhub_id in the hub id space. More... | |
pod_type | pod (pod_type xid) const |
The pod index in this space equivalent to xid in the hub id space. More... | |
pod_type | hub_pod (pod_type xid) const |
The pod index in the unglued hub id space equivalent to xid in this id space. More... | |
pod_type | unglued_hub_pod (pod_type xid) const |
The pod index in the unglued hub id space equivalent to xid in this id space. More... | |
pod_type | glued_hub_pod (pod_type xid) const |
The pod index in the glued hub id space equivalent to xid in this id space. More... | |
bool | is_persistent () const |
True if this id space should be written to disk. More... | |
HANDLE POOL FACET | |
index_space_handle & | get_id_space () const |
Allocates an id space handle from the handle pool attached to the current id space state. More... | |
void | release_id_space (index_space_handle &xid_space) const |
Returns the id space handle xid_space to the handle pool. More... | |
bool | allocated_id_space (index_space_handle &xid_space) const |
True if and only if id space handle xid_space was allocated by the handle pool. More... | |
ITERATOR POOL FACET | |
index_space_iterator & | get_id_space_iterator () const |
Allocates an id space iterator from the iterator pool attached to the current id space state. More... | |
void | release_id_space_iterator (index_space_iterator &xitr) const |
Returns the id space iterator xitr to the iterator pool. More... | |
bool | allocated_id_space_iterator (index_space_iterator &xitr) const |
True if and only if id space iterator xitr was allocated by the iterator pool. 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 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::any | |
any () | |
default constructor More... | |
An abstract iterator over the id spaces of a interval.
Definition at line 48 of file index_space_interval_iterator.h.
The "plain old data" index type for this.
Definition at line 64 of file index_space_interval_iterator.h.
|
virtual |
|
inlineprotected |
Default constructor; disabled.
Definition at line 127 of file index_space_interval_iterator.h.
Referenced by clone(), index(), and index_space_interval_iterator().
|
protected |
Copy constructor.
Definition at line 298 of file index_space_interval_iterator.cc.
References index_space_interval_iterator(), and invariant().
|
protected |
Constructor: Creates an instance with only_persistent() == xonly_persistent.
Definition at line 317 of file index_space_interval_iterator.cc.
References attach_to(), invariant(), is_attached(), and only_persistent().
bool sheaf::index_space_interval_iterator::allocated_id_space | ( | index_space_handle & | xid_space | ) | const |
True if and only if id space handle xid_space was allocated by the handle pool.
Definition at line 817 of file index_space_interval_iterator.cc.
References _host, sheaf::index_space_collection::allocated_id_space(), get_id_space_iterator(), is_attached(), and is_done().
Referenced by sheaf::index_space_family_iterator::allocated_id_space(), and release_id_space().
bool sheaf::index_space_interval_iterator::allocated_id_space_iterator | ( | index_space_iterator & | xitr | ) | const |
True if and only if id space iterator xitr was allocated by the iterator pool.
Definition at line 895 of file index_space_interval_iterator.cc.
References _host, sheaf::index_space_collection::allocated_id_space_iterator(), is_ancestor_of(), is_attached(), and is_done().
Referenced by sheaf::index_space_family_iterator::allocated_id_space_iterator(), and release_id_space_iterator().
|
protected |
Attach this iterator to the host xhost.
Definition at line 339 of file index_space_interval_iterator.cc.
References _host, _ub, sheaf::index_space_interval::begin(), detach(), sheaf::index_space_interval::end(), host(), invariant(), is_attached(), reset(), and ub().
Referenced by index_space_interval_iterator(), sheaf::index_space_family_iterator::next(), and sheaf::index_space_family_iterator::reset().
sheaf::index_space_handle::pod_type sheaf::index_space_interval_iterator::begin | ( | ) | const |
Beginning id of this space.
Definition at line 497 of file index_space_interval_iterator.cc.
References _host, _local_id, sheaf::index_space_interval::begin(), end(), is_attached(), and is_done().
Referenced by sheaf::index_space_family_iterator::begin(), and ct().
|
virtual |
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached, attach to the same state.
Reimplemented from sheaf::any.
Definition at line 101 of file index_space_interval_iterator.cc.
References host(), index_space_interval_iterator(), and sheaf::any::is_same_type().
Referenced by operator==().
bool sheaf::index_space_interval_iterator::contains | ( | pod_type | xid | ) | const |
True if this space contains id xid.
Definition at line 541 of file index_space_interval_iterator.cc.
References _host, _local_id, sheaf::index_space_interval::contains(), contains_hub(), is_attached(), and is_done().
Referenced by sheaf::index_space_family_iterator::contains(), contains_glued_hub(), end(), and pod().
True if this space contains an id xid equivalent to xhub_id in the hub id space.
Definition at line 629 of file index_space_interval_iterator.cc.
References _host, _local_id, sheaf::index_space_interval::contains(), is_attached(), is_done(), and pod().
bool sheaf::index_space_interval_iterator::contains_glued_hub | ( | pod_type | xid | ) | const |
True if this space contains an id equivalent to xid in the glued hub id space.
Definition at line 607 of file index_space_interval_iterator.cc.
References _host, _local_id, contains(), sheaf::index_space_collection::contains_glued_hub(), is_attached(), and is_done().
Referenced by sheaf::index_space_family_iterator::contains_glued_hub(), contains_unglued_hub(), and glued_hub_pod().
bool sheaf::index_space_interval_iterator::contains_hub | ( | pod_type | xid | ) | const |
True if this space contains an id equivalent to xid in the unglued hub id space.
Definition at line 563 of file index_space_interval_iterator.cc.
References _host, _local_id, sheaf::index_space_collection::contains_hub(), contains_unglued_hub(), is_attached(), and is_done().
Referenced by contains(), sheaf::index_space_family_iterator::contains_hub(), and hub_pod().
bool sheaf::index_space_interval_iterator::contains_unglued_hub | ( | pod_type | xid | ) | const |
True if this space contains an id equivalent to xid in the unglued hub id space.
Definition at line 585 of file index_space_interval_iterator.cc.
References _host, _local_id, contains_glued_hub(), sheaf::index_space_collection::contains_unglued_hub(), is_attached(), and is_done().
Referenced by contains_hub(), sheaf::index_space_family_iterator::contains_unglued_hub(), and unglued_hub_pod().
sheaf::size_type sheaf::index_space_interval_iterator::ct | ( | ) | const |
The number of members.
Definition at line 475 of file index_space_interval_iterator.cc.
References _host, _local_id, begin(), sheaf::index_space_collection::ct(), is_attached(), and is_done().
Referenced by sheaf::index_space_family_iterator::ct(), and hub_id_space().
|
protected |
Detach this iterator.
Definition at line 364 of file index_space_interval_iterator.cc.
References _host, invariant(), and is_attached().
Referenced by attach_to(), sheaf::index_space_family_iterator::next(), and sheaf::index_space_family_iterator::reset().
sheaf::index_space_handle::pod_type sheaf::index_space_interval_iterator::end | ( | ) | const |
Ending id of this space.
Definition at line 519 of file index_space_interval_iterator.cc.
References _host, _local_id, contains(), sheaf::index_space_interval::end(), is_attached(), and is_done().
Referenced by begin(), and sheaf::index_space_family_iterator::end().
sheaf::index_space_handle & sheaf::index_space_interval_iterator::get_id_space | ( | ) | const |
Allocates an id space handle from the handle pool attached to the current id space state.
Definition at line 772 of file index_space_interval_iterator.cc.
References _host, _local_id, sheaf::index_space_collection::get_id_space(), is_attached(), sheaf::index_space_handle::is_attached(), is_done(), and release_id_space().
Referenced by sheaf::index_space_family_iterator::get_id_space(), and is_persistent().
sheaf::index_space_iterator & sheaf::index_space_interval_iterator::get_id_space_iterator | ( | ) | const |
Allocates an id space iterator from the iterator pool attached to the current id space state.
Definition at line 850 of file index_space_interval_iterator.cc.
References _host, _local_id, sheaf::index_space_collection::get_id_space_iterator(), is_attached(), sheaf::index_space_iterator::is_attached(), is_done(), and release_id_space_iterator().
Referenced by allocated_id_space(), and sheaf::index_space_family_iterator::get_id_space_iterator().
sheaf::index_space_handle::pod_type sheaf::index_space_interval_iterator::glued_hub_pod | ( | pod_type | xid | ) | const |
The pod index in the glued hub id space equivalent to xid in this id space.
Definition at line 717 of file index_space_interval_iterator.cc.
References _host, _local_id, contains_glued_hub(), sheaf::index_space_collection::glued_hub_pod(), is_attached(), is_done(), is_persistent(), and sheaf::is_valid().
Referenced by sheaf::index_space_family_iterator::glued_hub_pod(), and unglued_hub_pod().
const sheaf::index_space_interval & sheaf::index_space_interval_iterator::host | ( | ) | const |
The host id space interval being iterated over.
Definition at line 123 of file index_space_interval_iterator.cc.
References _host, is_attached(), and only_persistent().
Referenced by attach_to(), clone(), and sheaf::index_space_family_iterator::host().
const sheaf::hub_index_space_handle & sheaf::index_space_interval_iterator::hub_id_space | ( | ) | const |
The hub id space.
Definition at line 454 of file index_space_interval_iterator.cc.
References ct(), sheaf::index_space_family::hub_id_space(), id_spaces(), and is_attached().
Referenced by id_spaces().
sheaf::index_space_handle::pod_type sheaf::index_space_interval_iterator::hub_pod | ( | pod_type | xid | ) | const |
The pod index in the unglued hub id space equivalent to xid in this id space.
Definition at line 673 of file index_space_interval_iterator.cc.
References _host, _local_id, contains_hub(), sheaf::index_space_collection::hub_pod(), is_attached(), is_done(), sheaf::is_valid(), and unglued_hub_pod().
Referenced by sheaf::index_space_family_iterator::hub_pod(), and pod().
const sheaf::index_space_family & sheaf::index_space_interval_iterator::id_spaces | ( | ) | const |
The id space family for this (const version).
Definition at line 412 of file index_space_interval_iterator.cc.
References _host, sheaf::index_space_interval::id_spaces(), and is_attached().
Referenced by hub_id_space(), and is_attached().
sheaf::index_space_family & sheaf::index_space_interval_iterator::id_spaces | ( | ) |
The id space family for this (mutable version).
Definition at line 433 of file index_space_interval_iterator.cc.
References _host, hub_id_space(), sheaf::index_space_interval::id_spaces(), and is_attached().
sheaf::index_space_interval_iterator::pod_type sheaf::index_space_interval_iterator::index | ( | ) | const |
The index of the current id space in the iteration.
Definition at line 275 of file index_space_interval_iterator.cc.
References _host, _local_id, sheaf::index_space_interval::family_scope(), index_space_interval_iterator(), is_attached(), is_done(), and sheaf::is_valid().
Referenced by sheaf::index_space_family_iterator::index(), invariant(), next(), and reset().
|
virtual |
Class invariant.
Reimplemented from sheaf::any.
Definition at line 949 of file index_space_interval_iterator.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), index(), sheaf::any::invariant(), sheaf::any::invariant_check(), is_attached(), is_done(), and sheaf::is_valid().
Referenced by attach_to(), detach(), index_space_interval_iterator(), is_ancestor_of(), next(), operator=(), and reset().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::any.
Definition at line 928 of file index_space_interval_iterator.cc.
References invariant().
Referenced by allocated_id_space_iterator(), operator=(), and operator==().
|
protected |
True, if this iterator is attached.
Definition at line 384 of file index_space_interval_iterator.cc.
References _host, and id_spaces().
Referenced by allocated_id_space(), allocated_id_space_iterator(), attach_to(), begin(), contains(), contains_glued_hub(), contains_hub(), contains_unglued_hub(), ct(), detach(), end(), get_id_space(), get_id_space_iterator(), glued_hub_pod(), host(), hub_id_space(), hub_pod(), id_spaces(), index(), index_space_interval_iterator(), invariant(), sheaf::index_space_family_iterator::is_done(), is_done(), is_persistent(), next(), sheaf::index_space_family_iterator::next_id_space(), pod(), release_id_space(), release_id_space_iterator(), reset(), ub(), and unglued_hub_pod().
bool sheaf::index_space_interval_iterator::is_done | ( | ) | const |
True if iteration is finished.
Definition at line 221 of file index_space_interval_iterator.cc.
References _local_id, is_attached(), sheaf::is_valid(), and reset().
Referenced by allocated_id_space(), allocated_id_space_iterator(), begin(), contains(), contains_glued_hub(), contains_hub(), contains_unglued_hub(), ct(), end(), get_id_space(), get_id_space_iterator(), glued_hub_pod(), hub_pod(), index(), invariant(), sheaf::index_space_family_iterator::is_done(), is_persistent(), sheaf::index_space_family_iterator::next(), next(), sheaf::index_space_family_iterator::next_id_space(), pod(), release_id_space(), release_id_space_iterator(), sheaf::index_space_family_iterator::reset(), and unglued_hub_pod().
bool sheaf::index_space_interval_iterator::is_persistent | ( | ) | const |
True if this id space should be written to disk.
Definition at line 739 of file index_space_interval_iterator.cc.
References _host, _local_id, get_id_space(), is_attached(), is_done(), and sheaf::index_space_collection::is_persistent().
Referenced by glued_hub_pod(), and sheaf::index_space_family_iterator::is_persistent().
void sheaf::index_space_interval_iterator::next | ( | ) |
Makes id_space() the next id space in the iteration.
Definition at line 184 of file index_space_interval_iterator.cc.
References _host, _local_id, _only_persistent, _ub, sheaf::index_space_interval::contains(), index(), sheaf::invalid_pod_index(), invariant(), is_attached(), is_done(), and sheaf::index_space_collection::is_persistent().
Referenced by sheaf::index_space_family_iterator::next(), sheaf::index_space_family_iterator::next_id_space(), and ub().
bool sheaf::index_space_interval_iterator::only_persistent | ( | ) | const |
True if only the persistent id spaces are iterated over.
Definition at line 144 of file index_space_interval_iterator.cc.
References _only_persistent, and ub().
Referenced by host(), index_space_interval_iterator(), and sheaf::index_space_family_iterator::only_persistent().
sheaf::index_space_interval_iterator & sheaf::index_space_interval_iterator::operator= | ( | const index_space_interval_iterator & | xother | ) |
Assignment operator.
Definition at line 52 of file index_space_interval_iterator.cc.
References _host, _local_id, _only_persistent, _ub, invariant(), is_ancestor_of(), and operator==().
Referenced by ~index_space_interval_iterator().
bool sheaf::index_space_interval_iterator::operator== | ( | const index_space_interval_iterator & | xother | ) | const |
True if this is equivalent to xother.
Definition at line 77 of file index_space_interval_iterator.cc.
References _host, _local_id, _only_persistent, _ub, clone(), and is_ancestor_of().
Referenced by operator=().
sheaf::index_space_handle::pod_type sheaf::index_space_interval_iterator::pod | ( | pod_type | xid | ) | const |
The pod index in this space equivalent to xid in the hub id space.
Definition at line 651 of file index_space_interval_iterator.cc.
References _host, _local_id, contains(), hub_pod(), is_attached(), is_done(), sheaf::is_valid(), and sheaf::index_space_collection::pod().
Referenced by contains(), and sheaf::index_space_family_iterator::pod().
void sheaf::index_space_interval_iterator::release_id_space | ( | index_space_handle & | xid_space | ) | const |
Returns the id space handle xid_space to the handle pool.
Definition at line 794 of file index_space_interval_iterator.cc.
References _host, allocated_id_space(), is_attached(), is_done(), and sheaf::index_space_collection::release_id_space().
Referenced by get_id_space(), and sheaf::index_space_family_iterator::release_id_space().
void sheaf::index_space_interval_iterator::release_id_space_iterator | ( | index_space_iterator & | xitr | ) | const |
Returns the id space iterator xitr to the iterator pool.
Definition at line 872 of file index_space_interval_iterator.cc.
References _host, allocated_id_space_iterator(), is_attached(), is_done(), and sheaf::index_space_collection::release_id_space_iterator().
Referenced by get_id_space_iterator(), and sheaf::index_space_family_iterator::release_id_space_iterator().
void sheaf::index_space_interval_iterator::reset | ( | ) |
Restarts the iteration.
Definition at line 242 of file index_space_interval_iterator.cc.
References _host, _local_id, _ub, sheaf::index_space_interval::contains(), index(), sheaf::invalid_pod_index(), invariant(), and is_attached().
Referenced by attach_to(), and is_done().
sheaf::size_type sheaf::index_space_interval_iterator::ub | ( | ) | const |
The upper bound of the id spaces.
Definition at line 163 of file index_space_interval_iterator.cc.
References _ub, is_attached(), and next().
Referenced by attach_to(), and only_persistent().
sheaf::index_space_handle::pod_type sheaf::index_space_interval_iterator::unglued_hub_pod | ( | pod_type | xid | ) | const |
The pod index in the unglued hub id space equivalent to xid in this id space.
Definition at line 695 of file index_space_interval_iterator.cc.
References _host, _local_id, contains_unglued_hub(), glued_hub_pod(), is_attached(), is_done(), sheaf::is_valid(), and sheaf::index_space_collection::unglued_hub_pod().
Referenced by hub_pod(), and sheaf::index_space_family_iterator::unglued_hub_pod().
|
protected |
The host id space interval being iterated over.
Definition at line 157 of file index_space_interval_iterator.h.
Referenced by allocated_id_space(), allocated_id_space_iterator(), attach_to(), begin(), contains(), contains_glued_hub(), contains_hub(), contains_unglued_hub(), ct(), detach(), end(), get_id_space(), get_id_space_iterator(), glued_hub_pod(), host(), hub_pod(), id_spaces(), index(), is_attached(), is_persistent(), next(), operator=(), operator==(), pod(), release_id_space(), release_id_space_iterator(), reset(), and unglued_hub_pod().
|
protected |
The local id of the current id space in the iteration.
Definition at line 167 of file index_space_interval_iterator.h.
Referenced by begin(), contains(), contains_glued_hub(), contains_hub(), contains_unglued_hub(), ct(), end(), get_id_space(), get_id_space_iterator(), glued_hub_pod(), hub_pod(), index(), is_done(), is_persistent(), next(), operator=(), operator==(), pod(), reset(), and unglued_hub_pod().
|
protected |
True if only the persistent id spaces are iterated over.
Definition at line 162 of file index_space_interval_iterator.h.
Referenced by next(), only_persistent(), operator=(), and operator==().
|
protected |
The upper bound of the iteration.
Definition at line 172 of file index_space_interval_iterator.h.
Referenced by attach_to(), next(), operator=(), operator==(), reset(), and ub().