21 #include "SheafSystem/primitives_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/primitives_index_space_state.h" 27 #include "SheafSystem/primitives_schema_member_index.h" 32 sheaf::PRIMITIVES_SCHEMA_MEMBER_INDEX_END - sheaf::PRIMITIVES_SCHEMA_MEMBER_INDEX_BEGIN;
36 const pod_type BEGIN = 0;
37 const pod_type END = CT;
39 const pod_type HUB_BEGIN = sheaf::PRIMITIVES_SCHEMA_MEMBER_INDEX_BEGIN;
40 const pod_type HUB_END = sheaf::PRIMITIVES_SCHEMA_MEMBER_INDEX_END;
77 ensure((*
this) == xother);
101 ensure(
index() == xindex);
110 const std::string& xname)
125 ensure(
name() == xname);
142 (void) explicit_index_space_iterator::operator=(xother);
152 ensure((*
this) == xother);
210 (void) this->
operator=(lother);
215 ensure((*
this) == xother);
238 ensure(*result == *
this);
336 require(xstate != 0);
353 ensure(&
state() == xstate);
372 ensure(is_basic_query);
virtual void reset()
Restarts the iteration.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
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.
primitives_index_space_iterator & operator=(const primitives_index_space_iterator &xother)
Assignment operator.
virtual void attach_to(explicit_index_space_state *xstate)
Attach to the explicit id space state xstate.
void invalidate_ids()
Set is_done() and invalidate pod() and hub_pod().
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.
A implementation of abstract class explicit_index_space_state for the primitives row dof id space...
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...
const index_space_family & id_spaces() const
The id space family for this (const version).
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual ~primitives_index_space_iterator()
Destructor.
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...
primitives_index_space_iterator()
Default constructor.
An iterator over the id space for the primitives row dof id space.
bool invariant_check() const
True if invariant checking is enabled.
pod_index_type pod_type
The "plain old data" index type for this.
virtual void next()
Makes item() the next id in the iteration.
An implementation of class index_space_iterator for an explicit_index_space_state.
virtual primitives_index_space_iterator * clone() const
Virtual constructor, makes a new instance of the same type as this. If the iterator is attached...
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.
Factory and container for a family of id spaces.
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_index_type pod_type
The "plain old data" index type for this.
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().