21 #include "SheafSystem/constant_implicit_index_space_iterator.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/constant_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);
129 (void) implicit_index_space_iterator::operator=(xother);
139 ensure((*
this) == xother);
197 (void) this->
operator=(lother);
202 ensure((*
this) == xother);
253 ensure(*result == *
this);
368 ensure(&
host() == &xhost);
389 ensure(is_basic_query);
virtual void next()
Makes item() the next id in the iteration.
An abstract iterator over the ids of an id space.
bool _is_done
True if the iteration is finished.
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.
An implementation of index_space_interval for an interval of implicit id spaces with a single id and ...
An implementation of implicit_index_space_iterator for an implicit id space in an constant_index_spac...
void invalidate_ids()
Set is_done() and invalidate pod() and hub_pod().
virtual bool operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
virtual const index_space_collection & host() const
The host collection.
constant_implicit_index_space_iterator & operator=(const constant_implicit_index_space_iterator &xother)
Assignment operator.
virtual pod_type index() const
Index of this space.
virtual bool invariant() const
Class invariant.
virtual void detach()
Detach this iterator form its state, if any.
Abstract base class with useful features for all objects.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
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).
virtual ~constant_implicit_index_space_iterator()
Destructor.
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.
pod_type _hub_begin
The constant hub id.
constant_implicit_index_space_iterator()
Default constructor.
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.
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...
bool invariant_check() const
True if invariant checking is enabled.
const index_space_collection * _host
The host collection.
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...
virtual constant_implicit_index_space_iterator * clone() const
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached...
pod_type _local_id
The id of this space in the local host id space.
pod_type _pod
The current id in the iteration.
Factory and container for a family of id spaces.
pod_index_type pod_type
The "plain old data" index type for this.
pod_type hub_id() const
The constant hub id.
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.
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().