SheafSystem
0.0.0.0
|
An iterator over members of an id equivalence class. More...
#include <index_equivalence_iterator.h>
INDEX_EQUIVALENCE_ITERATOR FACET | |
typedef index_equivalence_class::member_type | member_type |
The member type for the equivalence id list. The first value in the pair is the index of the id space, the second value in the pair is the pod. More... | |
typedef index_equivalence_class::list_type::const_iterator | iterator_type |
The type of iterator for the equivalence id list. More... | |
const index_space_family * | _id_spaces |
The id space family to iterate over. More... | |
pod_index_type | _rep_id |
The representative of this equivalence class. More... | |
bool | _only_persistent |
True, if only persistent id spaces should be iterated over. More... | |
bool | _is_sorted |
True, if the ids are sorted in increasing space id order. More... | |
index_equivalence_class | _equivalence_class |
The equivalence class to iterate over. More... | |
iterator_type | _itr |
The current equivalence list iterator. More... | |
iterator_type | _end |
The end of the current list begin iterated over. More... | |
member_type | _item |
The current equivalence class member. More... | |
bool | _is_done |
True if iteration is finished. More... | |
index_equivalence_iterator (const index_space_family &xid_spaces, pod_index_type xrep_id, bool xonly_persistent, bool xsort_ids) | |
Creates an instance for the id equivalence iterator of representative xrep_id in id space family xid_spaces. If xonly_persistent, only iterate over the persistent id spaces. If xsort_ids, sort the ids in increased space id order. More... | |
index_equivalence_iterator (const index_space_family &xid_spaces, const scoped_index &xrep_id, bool xonly_persistent, bool xsort_ids) | |
Creates an instance for the id equivalence iterator of representative xrep_id in id space family xid_spaces. If xonly_persistent, only iterate over the persistent id spaces. If xsort_ids, sort the ids in increased space id order. More... | |
index_equivalence_iterator (const index_space_family &xid_spaces, bool xonly_persistent, bool xsort_ids) | |
Creates an instance for the id equivalence iterator of invalid representative id in id space family xid_spaces. If xonly_persistent, only iterate over the persistent id spaces. If xsort_ids, sort the ids in increased space id order. More... | |
virtual | ~index_equivalence_iterator () |
Destructor. More... | |
const index_space_family & | id_spaces () const |
The id space family of this equivalence class. More... | |
pod_index_type | rep_id () const |
The representative id in the top id space of this equivalence class. More... | |
void | rep_id (scoped_index &result) const |
The representative id of this equivalence class. More... | |
bool | only_persistent () const |
True, if only persistent id spaces should be iterated over. More... | |
bool | is_sorted () const |
True, if the ids are sorted in increasing space id order. More... | |
void | put_rep_id (pod_index_type xrep_id) |
Sets rep_id() to xrep_id. More... | |
void | put_rep_id (const scoped_index &xrep_id) |
Sets rep_id() to xrep_id. More... | |
const member_type & | item () const |
The current equivalence class member. More... | |
bool | is_done () const |
True if iteration is finished. More... | |
size_type | ct () const |
The number of items in the current equivalence list being iterated over. More... | |
void | next () |
Makes item() the next item in the equivalence class. More... | |
void | reset () |
Restarts the iteration. More... | |
index_equivalence_iterator () | |
Default constructor; disabled. More... | |
ANY FACET | |
virtual bool | is_ancestor_of (const any *other) const |
Conformance test; true if other conforms to this. More... | |
virtual index_equivalence_iterator * | clone () const |
Virtual constructor, makes a new instance of the same type as this. More... | |
index_equivalence_iterator & | operator= (const index_equivalence_iterator &xother) |
Assignment operator. 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 iterator over members of an id equivalence class.
Definition at line 48 of file index_equivalence_iterator.h.
|
protected |
The type of iterator for the equivalence id list.
Definition at line 167 of file index_equivalence_iterator.h.
The member type for the equivalence id list. The first value in the pair is the index of the id space, the second value in the pair is the pod.
Definition at line 63 of file index_equivalence_iterator.h.
sheaf::index_equivalence_iterator::index_equivalence_iterator | ( | const index_space_family & | xid_spaces, |
pod_index_type | xrep_id, | ||
bool | xonly_persistent, | ||
bool | xsort_ids | ||
) |
Creates an instance for the id equivalence iterator of representative xrep_id in id space family xid_spaces. If xonly_persistent, only iterate over the persistent id spaces. If xsort_ids, sort the ids in increased space id order.
Definition at line 33 of file index_equivalence_iterator.cc.
References _id_spaces, _is_sorted, _only_persistent, _rep_id, sheaf::explicit_index_space_handle::contains(), sheaf::index_space_family::hub_id_space(), id_spaces(), index_equivalence_iterator(), invariant(), is_sorted(), sheaf::is_valid(), only_persistent(), rep_id(), and reset().
sheaf::index_equivalence_iterator::index_equivalence_iterator | ( | const index_space_family & | xid_spaces, |
const scoped_index & | xrep_id, | ||
bool | xonly_persistent, | ||
bool | xsort_ids | ||
) |
Creates an instance for the id equivalence iterator of representative xrep_id in id space family xid_spaces. If xonly_persistent, only iterate over the persistent id spaces. If xsort_ids, sort the ids in increased space id order.
Definition at line 66 of file index_equivalence_iterator.cc.
References _id_spaces, _is_sorted, _only_persistent, _rep_id, sheaf::explicit_index_space_handle::contains(), sheaf::index_space_family::hub_id_space(), sheaf::scoped_index::hub_pod(), id_spaces(), index_equivalence_iterator(), invariant(), is_sorted(), sheaf::scoped_index::is_valid(), only_persistent(), rep_id(), and reset().
sheaf::index_equivalence_iterator::index_equivalence_iterator | ( | const index_space_family & | xid_spaces, |
bool | xonly_persistent, | ||
bool | xsort_ids | ||
) |
Creates an instance for the id equivalence iterator of invalid representative id in id space family xid_spaces. If xonly_persistent, only iterate over the persistent id spaces. If xsort_ids, sort the ids in increased space id order.
Definition at line 99 of file index_equivalence_iterator.cc.
References _id_spaces, _is_sorted, _only_persistent, _rep_id, id_spaces(), sheaf::invalid_pod_index(), invariant(), is_sorted(), only_persistent(), reset(), and ~index_equivalence_iterator().
|
virtual |
Destructor.
Definition at line 128 of file index_equivalence_iterator.cc.
References id_spaces().
Referenced by index_equivalence_iterator().
|
inlineprotected |
Default constructor; disabled.
Definition at line 172 of file index_equivalence_iterator.h.
Referenced by clone(), and index_equivalence_iterator().
|
virtual |
Virtual constructor, makes a new instance of the same type as this.
Reimplemented from sheaf::any.
Definition at line 400 of file index_equivalence_iterator.cc.
References _id_spaces, _is_sorted, _only_persistent, _rep_id, id_spaces(), index_equivalence_iterator(), sheaf::any::is_same_type(), is_sorted(), only_persistent(), operator=(), and rep_id().
Referenced by is_ancestor_of().
sheaf::size_type sheaf::index_equivalence_iterator::ct | ( | ) | const |
The number of items in the current equivalence list being iterated over.
Definition at line 259 of file index_equivalence_iterator.cc.
References _equivalence_class, _rep_id, sheaf::index_equivalence_class::equivalence_ct(), sheaf::is_valid(), and next().
Referenced by sheaf::member_record::external_size(), and is_done().
const sheaf::index_space_family & sheaf::index_equivalence_iterator::id_spaces | ( | ) | const |
The id space family of this equivalence class.
Definition at line 145 of file index_equivalence_iterator.cc.
References _id_spaces, and rep_id().
Referenced by clone(), index_equivalence_iterator(), invariant(), put_rep_id(), and ~index_equivalence_iterator().
|
virtual |
Class invariant.
Reimplemented from sheaf::any.
Definition at line 455 of file index_equivalence_iterator.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), id_spaces(), sheaf::any::invariant(), sheaf::any::invariant_check(), sheaf::is_valid(), and rep_id().
Referenced by index_equivalence_iterator(), next(), operator=(), put_rep_id(), and reset().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::any.
Definition at line 379 of file index_equivalence_iterator.cc.
References clone().
Referenced by reset().
bool sheaf::index_equivalence_iterator::is_done | ( | ) | const |
True if iteration is finished.
Definition at line 240 of file index_equivalence_iterator.cc.
References _is_done, and ct().
Referenced by item(), next(), and sheaf::operator<<().
bool sheaf::index_equivalence_iterator::is_sorted | ( | ) | const |
True, if the ids are sorted in increasing space id order.
Definition at line 173 of file index_equivalence_iterator.cc.
References _is_sorted, and put_rep_id().
Referenced by clone(), index_equivalence_iterator(), and only_persistent().
const sheaf::index_equivalence_iterator::member_type & sheaf::index_equivalence_iterator::item | ( | ) | const |
The current equivalence class member.
Definition at line 221 of file index_equivalence_iterator.cc.
References _item, and is_done().
Referenced by next(), sheaf::operator<<(), and put_rep_id().
void sheaf::index_equivalence_iterator::next | ( | ) |
Makes item() the next item in the equivalence class.
Definition at line 280 of file index_equivalence_iterator.cc.
References _end, _is_done, _item, _itr, invariant(), is_done(), item(), and reset().
Referenced by ct(), and sheaf::operator<<().
bool sheaf::index_equivalence_iterator::only_persistent | ( | ) | const |
True, if only persistent id spaces should be iterated over.
Definition at line 166 of file index_equivalence_iterator.cc.
References _only_persistent, and is_sorted().
Referenced by clone(), index_equivalence_iterator(), and rep_id().
sheaf::index_equivalence_iterator & sheaf::index_equivalence_iterator::operator= | ( | const index_equivalence_iterator & | xother | ) |
Assignment operator.
Definition at line 428 of file index_equivalence_iterator.cc.
References _end, _equivalence_class, _id_spaces, _is_done, _is_sorted, _item, _itr, _only_persistent, _rep_id, and invariant().
Referenced by clone().
void sheaf::index_equivalence_iterator::put_rep_id | ( | pod_index_type | xrep_id | ) |
Sets rep_id() to xrep_id.
Definition at line 180 of file index_equivalence_iterator.cc.
References _rep_id, invariant(), and rep_id().
Referenced by sheaf::member_record::has_equivalence_iterator(), is_sorted(), and sheaf::operator<<().
void sheaf::index_equivalence_iterator::put_rep_id | ( | const scoped_index & | xrep_id | ) |
Sets rep_id() to xrep_id.
Definition at line 200 of file index_equivalence_iterator.cc.
References _rep_id, sheaf::explicit_index_space_handle::contains(), sheaf::index_space_family::hub_id_space(), sheaf::scoped_index::hub_pod(), id_spaces(), invariant(), sheaf::scoped_index::is_valid(), item(), and rep_id().
sheaf::pod_index_type sheaf::index_equivalence_iterator::rep_id | ( | ) | const |
The representative id in the top id space of this equivalence class.
Definition at line 152 of file index_equivalence_iterator.cc.
References _rep_id.
Referenced by clone(), sheaf::member_record::has_equivalence_iterator(), id_spaces(), index_equivalence_iterator(), invariant(), and put_rep_id().
void sheaf::index_equivalence_iterator::rep_id | ( | scoped_index & | result | ) | const |
The representative id of this equivalence class.
Definition at line 159 of file index_equivalence_iterator.cc.
References _id_spaces, _rep_id, sheaf::index_space_family::hub_id_space(), only_persistent(), and sheaf::scoped_index::put().
void sheaf::index_equivalence_iterator::reset | ( | ) |
Restarts the iteration.
Definition at line 320 of file index_equivalence_iterator.cc.
References _end, _equivalence_class, _is_done, _item, _itr, _rep_id, sheaf::index_equivalence_class::equivalence_list(), invariant(), is_ancestor_of(), and sheaf::is_valid().
Referenced by sheaf::member_record::has_equivalence_iterator(), index_equivalence_iterator(), next(), and sheaf::operator<<().
|
protected |
The end of the current list begin iterated over.
Definition at line 207 of file index_equivalence_iterator.h.
Referenced by next(), operator=(), and reset().
|
protected |
The equivalence class to iterate over.
Definition at line 197 of file index_equivalence_iterator.h.
Referenced by ct(), operator=(), and reset().
|
protected |
The id space family to iterate over.
Definition at line 172 of file index_equivalence_iterator.h.
Referenced by clone(), id_spaces(), index_equivalence_iterator(), operator=(), and rep_id().
|
protected |
True if iteration is finished.
Definition at line 217 of file index_equivalence_iterator.h.
Referenced by is_done(), next(), operator=(), and reset().
|
protected |
True, if the ids are sorted in increasing space id order.
Definition at line 192 of file index_equivalence_iterator.h.
Referenced by clone(), index_equivalence_iterator(), is_sorted(), and operator=().
|
protected |
The current equivalence class member.
Definition at line 212 of file index_equivalence_iterator.h.
Referenced by item(), next(), operator=(), and reset().
|
protected |
The current equivalence list iterator.
Definition at line 202 of file index_equivalence_iterator.h.
Referenced by next(), operator=(), and reset().
|
protected |
True, if only persistent id spaces should be iterated over.
Definition at line 187 of file index_equivalence_iterator.h.
Referenced by clone(), index_equivalence_iterator(), only_persistent(), and operator=().
|
protected |
The representative of this equivalence class.
Definition at line 182 of file index_equivalence_iterator.h.
Referenced by clone(), ct(), index_equivalence_iterator(), operator=(), put_rep_id(), rep_id(), and reset().