21 #include "SheafSystem/reserved_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/reserved_primary_index_space_state.h" 36 : _is_active_only(true)
64 ensure((*
this) == xother);
89 ensure(
index() == xindex);
98 const std::string& xname)
114 ensure(
name() == xname);
135 (void) explicit_index_space_iterator::operator=(xother);
145 ensure((*
this) == xother);
182 ensure(is_basic_query);
201 ensure(is_basic_query);
269 (void) this->
operator=(lother);
274 ensure((*
this) == xother);
298 result = result && (
_end == lother.
_end);
327 ensure(*result == *
this);
436 require(xstate != 0);
458 ensure(&
state() == xstate);
477 ensure(is_basic_query);
size_type ct() const
The number of members.
bool _is_active_only
True if and only the active interval of the id space is iterated over. Otherwise, all the ids in the ...
virtual pod_type index() const
Index of this space.
reserved_primary_index_space_iterator & operator=(const reserved_primary_index_space_iterator &xother)
Assignment operator.
An abstract iterator over the ids of an id space.
bool _is_done
True if the iteration is finished.
A computed implementation of abstract class primary_index_space_state. This representation is used fo...
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 operator==(const index_space_iterator &xother) const
True if this is equivalent to xother.
virtual reserved_primary_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 ~reserved_primary_index_space_iterator()
Destructor.
virtual void reset()
Restarts 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...
virtual void next()
Makes item() the next id in the iteration.
explicit_index_space_state & state()
The explicit state (mutable version).
pod_type offset() const
The offset into the hub id space.
Abstract base class with useful features for all objects.
pod_type _end
The end id in the iteration.
std::string name() const
Name of this space.
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 offset() const
The offset into the hub id space.
const index_space_family & id_spaces() const
The id space family for this (const version).
reserved_primary_index_space_iterator()
Default constructor.
pod_type _offset
The offset into the hub id space.
An iterator over a reserved term in the primary sum id space in which the equivlence between the ids ...
bool is_active_only() const
True if and only the active interval of the id space is iterated over. Otherwise, all the ids in the ...
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 void attach_to(explicit_index_space_state *xstate)
Attach to the explicit id space state xstate.
bool invariant_check() const
True if invariant checking is enabled.
pod_type next_hub_id() const
The next available hub id for allocation.
explicit_index_space_state * _state
The explicit state.
virtual bool invariant() const
Class invariant.
void put_is_active_only(bool xis_active_only)
Set the iteration mode. If xis_active_only, only the active interval of the id space is iterated over...
virtual void detach()
Detach this iterator form its state, if any.
virtual bool invariant() const
Class invariant.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
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.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
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().