21 #include "SheafSystem/array_implicit_index_space_iterator.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/array_index_space_interval.h" 25 #include "SheafSystem/index_space_family.h" 62 ensure((*
this) == xother);
86 ensure(
index() == xindex);
95 const std::string& xname)
110 ensure(
name() == xname);
130 (void) implicit_index_space_iterator::operator=(xother);
140 ensure((*
this) == xother);
198 (void) this->
operator=(lother);
203 ensure((*
this) == xother);
227 result = result && (
_end == lother.
_end);
255 ensure(*result == *
this);
372 require(reinterpret_cast<const array_index_space_interval&>(xhost).ids_per_space() > 0);
397 ensure(&
host() == &xhost);
418 ensure(is_basic_query);
const pod_type * _to_hub
The array to hub ids.
An abstract iterator over the ids of an id space.
bool _is_done
True if the iteration is finished.
const block< pod_type > & hub_ids() const
The array of hub ids.
pod_type pod() const
The current id in the iteration.
virtual pod_type family_scope(pod_type xlocal_id) const =0
Id relative to the id space family equivalent to the local id xlocal_id.
virtual bool invariant() const
Class invariant.
void invalidate_ids()
Set is_done() and invalidate pod() and hub_pod().
pod_type _end
The end of this id space.
virtual const index_space_collection & host() const
The host collection.
virtual bool operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual pod_type index() const
Index of this space.
virtual void detach()
Detach this iterator form its state, if any.
Abstract base class with useful features for all objects.
std::string name() const
Name of this space.
bool is_done() const
True if iteration is finished.
const index_space_family & id_spaces() const
The id space family for this (const version).
An implementation of implicit_index_space_iterator for an implicit id space in an array_index_space_i...
array_implicit_index_space_iterator()
Default constructor.
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...
size_type ids_per_space() const
The number of ids per id space.
pod_type _hub_pod
The current hub id in the iteration.
A collection of id space states. This is a virtual class with provides an interface for accessing the...
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual bool contains(pod_type xlocal_id) const =0
True if this collection contains the id space with local id xlocal_id.
virtual bool invariant() const
Class invariant.
virtual void reset()
Restarts the iteration.
virtual bool is_attached() const
True if this iterator is attached to a state.
bool invariant_check() const
True if invariant checking is enabled.
array_implicit_index_space_iterator & operator=(const array_implicit_index_space_iterator &xother)
Assignment operator.
const index_space_collection * _host
The host collection.
virtual ~array_implicit_index_space_iterator()
Destructor.
pod_type _local_id
The id of this space in the local host id space.
pod_type _pod
The current id in the iteration.
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 h...
Factory and container for a family of id spaces.
virtual array_implicit_index_space_iterator * clone() const
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached...
pod_index_type pod_type
The "plain old data" index type for this.
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.
virtual bool operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
void enable_invariant_check() const
Enable invariant checking.
An implementation of index_space_interval for an interval of implicit id spaces in which the hub ids ...
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().
virtual void next()
Makes item() the next id in the iteration.