21 #include "SheafSystem/interval_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_index_space_state.h" 63 ensure((*
this) == xother);
87 ensure(
index() == xindex);
96 const std::string& xname)
111 ensure(
name() == xname);
149 (void) explicit_index_space_iterator::operator=(xother);
159 ensure((*
this) == xother);
190 linterval_begin =
_itr->first + 1;
326 (void) this->
operator=(lother);
331 ensure((*
this) == xother);
355 result = result && (
_itr == lother.
_itr);
385 ensure(*result == *
this);
521 require(xstate != 0);
539 ensure(&
state() == xstate);
560 ensure(is_basic_query);
An STL map implementation of class scattered_insertion_index_space_state optimized to efficiently rep...
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.
interval_index_space_iterator()
Default constructor.
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.
void next_interval()
Advances the iteration to the beginning of the next interval.
void invalidate_ids()
Set is_done() and invalidate pod() and hub_pod().
virtual ~interval_index_space_iterator()
Destructor.
virtual bool invariant() const
Class invariant.
pod_type _interval_end
The end of the current interval.
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 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...
pod_type interval_begin() const
The begin of the current interval.
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...
pod_type _interval_begin
The begin of the current interval.
const index_space_family & id_spaces() const
The id space family for this (const version).
pod_type interval_end() const
The end of the current interval.
void update_interval_ids(pod_type xinterval_begin)
Update the interval ids with the beginning interval id, xinterval_begin.
virtual void next()
Makes item() the next id in the iteration.
An iterator over an id space in which the equivalence between the ids in the space and the hub id spa...
virtual void reset()
Restarts the iteration.
pod_type _hub_pod
The current hub id in the iteration.
virtual interval_index_space_iterator * clone() const
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached...
virtual void attach_to(explicit_index_space_state *xstate)
Attach to the explicit id space state xstate.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
to_hub_type::const_iterator _itr
The stl iterator over ids.
void invalidate_interval_ids()
Invalidate the interval ids.
bool invariant_check() const
True if invariant checking is enabled.
explicit_index_space_state * _state
The explicit state.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual bool invariant() const
Class invariant.
virtual void detach()
Detach this iterator form its state, if any.
interval_index_space_iterator & operator=(const interval_index_space_iterator &xother)
Assignment operator.
pod_type _pod
The current id in the iteration.
const to_hub_type * _to_hub
The interval to hub ids.
Factory and container for a family of id spaces.
virtual bool operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
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.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
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().