21 #include "SheafSystem/primary_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/primary_index_space_state.h" 63 ensure((*
this) == xother);
87 ensure(
index() == xindex);
96 const std::string& xname)
111 ensure(
name() == xname);
131 (void) explicit_index_space_iterator::operator=(xother);
141 ensure((*
this) == xother);
178 ensure(is_basic_query);
199 ensure(is_basic_query);
241 (void) this->
operator=(lother);
246 ensure((*
this) == xother);
270 result = result && (
_ct == lother.
_ct);
298 ensure(*result == *
this);
407 require(xstate != 0);
426 ensure(&
state() == xstate);
445 ensure(is_basic_query);
pod_type offset() const
The offset into the hub id space.
virtual void next()
Makes item() the next id in the iteration.
virtual void reset()
Restarts the iteration.
size_type ct() const
The number of members.
virtual pod_type index() const
Index of this space.
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 bool operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
pod_type _offset
The offset into the hub id space.
void invalidate_ids()
Set is_done() and invalidate pod() and hub_pod().
primary_index_space_iterator()
Default constructor.
virtual bool invariant() const
Class invariant.
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.
virtual ~primary_index_space_iterator()
Destructor.
bool is_done() const
True if iteration is finished.
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).
virtual void attach_to(explicit_index_space_state *xstate)
Attach to the explicit id space state xstate.
virtual bool operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
virtual primary_index_space_iterator * clone() const
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached...
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
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...
A computed implementation class explicit_index_space_state that is used for the terms of the primary ...
size_type _ct
The number of entries to iterate over.
primary_index_space_iterator & operator=(const primary_index_space_iterator &xother)
Assignment operator.
size_type ct() const
The number of entries to iterate over.
bool invariant_check() const
True if invariant checking is enabled.
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.
pod_type _pod
The current id in the iteration.
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...
Factory and container for a family of id spaces.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
pod_index_type pod_type
The "plain old data" index type for this.
An iterator over a gathered id space in which the equivlence between the ids in the space and the hub...
bool is_same_type(const any *other) const
True if other is the same type as this.
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().