21 #include "SheafSystem/hub_index_space_iterator.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/explicit_index_space_handle.h" 25 #include "SheafSystem/index_space_family.h" 26 #include "SheafSystem/interval_set_iterator.h" 27 #include "SheafSystem/primary_sum_index_space_state.h" 65 ensure((*
this) == xother);
90 ensure(
index() == xindex);
99 const std::string& xname)
115 ensure(
name() == xname);
135 (void) explicit_index_space_iterator::operator=(xother);
145 ensure((*
this) == xother);
207 (void) this->
operator=(lother);
212 ensure((*
this) == xother);
236 result = result && (
_rem == lother.
_rem);
264 ensure(*result == *
this);
379 require(xstate != 0);
406 ensure(&
state() == xstate);
425 ensure(is_basic_query);
An iterator over the integers in an interval_set.
virtual pod_type index() const
Index of this space.
virtual void next()
Makes item() the next id in the iteration.
An abstract iterator over the ids of an id space.
rem_type _rem
The reflexive reduction of the rem map.
bool _is_done
True if the iteration is finished.
pod_type pod() const
The current id in the iteration.
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 bool invariant() const
Class invariant.
void invalidate_ids()
Set is_done() and invalidate pod() and hub_pod().
interval_set_iterator * _mbr_itr
Iterator over the members.
void reset()
Restarts the iteration.
hub_index_space_iterator()
Default constructor.
explicit_index_space_state & state()
The explicit state (mutable version).
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.
interval_set _members
Set of members in the domain of this map.
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
const index_space_family & id_spaces() const
The id space family for this (const version).
pod_type item() const
The current integer of the iteration.
virtual hub_index_space_iterator * clone() const
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached...
virtual void reset()
Restarts the iteration.
virtual ~hub_index_space_iterator()
Destructor.
hub_index_space_iterator & operator=(const hub_index_space_iterator &xother)
Assignment operator.
pod_type _hub_pod
The current hub id in the iteration.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual bool operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
void next()
Makes item() the next integer in the iteration.
interval_set_iterator * iterator(bool xis_full_iterator) const
Iterator for this set. If xis_full_iterator, iterate over the members in the set. Otherwise...
bool invariant_check() const
True if invariant checking is enabled.
virtual bool conforms_to_state(explicit_index_space_state *xstate) const
True if this conforms to the iterator type required by the explicit id space state xstate...
explicit_index_space_state * _state
The explicit state.
virtual bool invariant() const
Class invariant.
virtual void detach()
Detach this iterator form its state, if any.
An implementation of class sum_index_space_state intended for use as the sum of the primary id spaces...
pod_type _pod
The current id in the iteration.
Factory and container for a family of id spaces.
An iterator over an id space which is the sum of the primary id spaces.
virtual void attach_to(explicit_index_space_state *xstate)
Attach to the explicit id space state xstate.
pod_index_type pod_type
The "plain old data" index type for this.
const rem_type * _rem
The reflexive reduction of the rem map.
bool is_same_type(const any *other) const
True if other is the same type as this.
bool is_done() const
True if iteration is finished.
void enable_invariant_check() const
Enable invariant checking.
virtual bool is_attached() const
True if this iterator is attached to a state.
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().