21 #include "SheafSystem/index_space_family_iterator.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/hub_index_space_handle.h" 24 #include "SheafSystem/index_space_interval.h" 25 #include "SheafSystem/index_space_iterator.h" 35 bool xonly_persistent)
36 : _id_spaces(&xid_spaces),
37 _id_space_itr(xonly_persistent)
89 ensure((*
this) == xother);
112 ensure(is_basic_query);
134 ensure(*result == *
this);
153 ensure(is_basic_query);
225 ensure(is_basic_query);
305 ensure(is_basic_query);
347 ensure(is_basic_query);
368 ensure((*
this) == xother);
432 ensure(is_basic_query);
451 ensure(is_basic_query);
472 ensure(is_basic_query);
493 ensure(is_basic_query);
514 ensure(is_basic_query);
535 ensure(is_basic_query);
556 ensure(is_basic_query);
577 ensure(is_basic_query);
598 ensure(is_basic_query);
619 ensure(is_basic_query);
724 ensure(is_basic_query);
778 ensure(is_basic_query);
799 ensure(is_basic_query);
853 ensure(is_basic_query);
874 ensure(is_basic_query);
virtual bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
const index_space_family * _id_spaces
The index space family.
bool contains_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the unglued hub id space.
void release_id_space(index_space_handle &xid_space) const
Returns the id space handle xid_space to the handle pool.
void release_id_space_iterator(index_space_iterator &xitr) const
Returns the id space iterator xitr to the iterator pool.
pod_type hub_pod(pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in this id space.
std::string name(pod_type xid) const
The name for id xid.
void reset()
Restarts the iteration.
bool contains_unglued_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the unglued hub id space.
void detach()
Detach this iterator.
pod_type hub_pod(pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in this id space.
An abstract iterator over the ids of an id space.
bool is_attached() const
True, if this iterator is attached.
void next()
Makes id_space() the next id space in the iteration.
pod_type pod(pod_type xid) const
The pod index in this space equivalent to xid in the hub id space.
index_space_family_iterator()
Default constructor; disabled.
bool contains_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the unglued hub id space.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
pod_type end() const
Ending id of this space.
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.
virtual bool invariant() const
Class invariant.
index_space_iterator & get_id_space_iterator() const
Allocates an id space iterator from the iterator pool attached to the current id space state...
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.
pod_type begin() const
Beginning id of this space.
virtual bool is_attached() const =0
True if this handle is attached to a state.
An implementation of class sum_index_space_handle that has a primary sum id space state...
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.
bool is_persistent() const
True if this id space should be written to disk.
index_space_family_iterator & operator=(const index_space_family_iterator &xother)
Assignment operator.
pod_type pod(pod_type xid) const
The pod index in this space equivalent to xid in the hub id space.
pod_type end() const
Ending id of this space.
bool is_done() const
True if iteration is finished.
An abstract iterator over the id spaces of a interval.
Abstract base class with useful features for all objects.
bool contains(pod_type xid) const
True if this space contains id xid.
An implemenation of index_space_collection that adds an interface for the interval [begin()...
index_space_handle & get_id_space() const
Allocates an id space handle from the handle pool attached to the current id space state...
virtual ~index_space_family_iterator()
Destructor.
bool contains_unglued_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the unglued hub id space.
void release_id_space_iterator(index_space_iterator &xitr) const
Returns the id space iterator xitr to the iterator pool.
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.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
bool contains_glued_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the glued hub id space.
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.
pod_index_type pod_type
The "plain old data" index type for this.
bool only_persistent() const
True if only the persistent id spaces are iterated over.
std::string name() const
The name of the current id space in the iteration.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
size_type ct() const
The number of members.
const index_space_family & id_spaces() const
The id space family for this (const version).
interval_map_type _intervals
Map from id to id space interval.
bool only_persistent() const
True if only the persistent id spaces are iterated over.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
bool is_persistent() const
True if this id space should be written to disk.
bool operator==(const index_space_family_iterator &xother) const
True if this is equivalent to xother.
index_space_interval_iterator _id_space_itr
The iterator over id spaces for the current id space interval.
pod_type index() const
The index of the current id space in the iteration.
void attach_to(index_space_interval &xhost)
Attach this iterator to the host xhost.
const index_space_interval & host() const
The host id space interval being iterated over.
pod_type begin() const
Beginning id of this space.
void release_id_space(index_space_handle &xid_space) const
Returns the id space handle xid_space to the handle pool.
virtual bool is_attached() const =0
True if this iterator is attached to a state.
bool invariant_check() const
True if invariant checking is enabled.
void next()
Makes id_space() the next id space in the iteration.
size_type ct() const
The number of members.
index_space_iterator & get_id_space_iterator() const
Allocates an id space iterator from the iterator pool attached to the current id space state...
const_interval_iterator_type _interval_itr
The stl iterator over the intervals.
pod_type index() const
The index of the current id space in the iteration.
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.
bool contains_glued_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the glued hub id space.
index_space_family_iterator * clone() const
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached...
Factory and container for a family of id spaces.
bool is_done() const
True if iteration is finished.
const index_space_interval & host() const
The current host id space interval being iterated over.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
bool is_same_type(const any *other) const
True if other is the same type as this.
const hub_index_space_handle & hub_id_space() const
The hub id space.
void enable_invariant_check() const
Enable invariant checking.
void next_id_space()
Increment to the next id space in the interval.
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.
const hub_index_space_handle & hub_id_space() const
The hub id space of this family.
index_space_handle & get_id_space() const
Allocates an id space handle from the handle pool attached to the current id space state...
bool contains(pod_type xid) const
True if this space contains id xid.
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.
pod_index_type pod_type
The "plain old data" index type for this.