21 #include "SheafSystem/singleton_implicit_index_space_iterator.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/singleton_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 reset()
Restarts the iteration.
An abstract iterator over the ids of an id space.
An implementation of index_space_interval for an interval of implicit id spaces with a single id and ...
bool _is_done
True if the iteration is finished.
pod_type hub_offset() const
The offset from local id to hub id.
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.
singleton_implicit_index_space_iterator()
Default constructor.
virtual singleton_implicit_index_space_iterator * clone() const
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached...
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.
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.
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...
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual bool invariant() const
Class invariant.
const index_space_family & id_spaces() const
The id space family for this (const version).
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.
singleton_implicit_index_space_iterator & operator=(const singleton_implicit_index_space_iterator &xother)
Assignment operator.
An implementation of implicit_index_space_iterator for an implicit id space in an singleton_index_spa...
virtual bool invariant() const
Class invariant.
virtual bool is_attached() const
True if this iterator is attached to a state.
bool invariant_check() const
True if invariant checking is enabled.
const index_space_collection * _host
The host collection.
pod_type _local_id
The id of this space in the local host id space.
virtual ~singleton_implicit_index_space_iterator()
Destructor.
pod_type _pod
The current id in the iteration.
virtual void next()
Makes item() the next 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_begin
The hub beginning 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().
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...