21 #include "SheafSystem/abstract_product_structure.h" 22 #include "SheafSystem/explicit_index_space_handle.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/explicit_index_space_state.h" 25 #include "SheafSystem/hub_index_space_handle.h" 26 #include "SheafSystem/index_space_family.h" 27 #include "SheafSystem/index_space_iterator.h" 65 ensure((*
this) == xother);
89 ensure(
index() == xindex);
98 const std::string& xname)
113 ensure(
name() == xname);
151 ensure((*
this) == xother);
174 ensure(is_basic_query);
195 ensure(is_basic_query);
226 ensure((*
this) == xother);
249 ensure(*result == *
this);
281 ensure(is_basic_query);
302 ensure(is_basic_query);
323 ensure(is_basic_query);
344 ensure(is_basic_query);
365 ensure(is_basic_query);
386 ensure(is_basic_query);
407 ensure(is_basic_query);
428 ensure(is_basic_query);
449 ensure(is_basic_query);
533 ensure(is_basic_query);
565 ensure(is_basic_query);
601 bool result = (
_state != 0);
605 ensure(is_basic_query);
632 ensure(
index() == xindex);
655 ensure(&
host() == &xhost);
693 bool result = (
state(xhost, xlocal_id) != 0);
697 ensure(is_basic_query);
712 require(xstate != 0);
722 ensure(&
state() == xstate);
737 bool result = (xstate != 0);
741 ensure(is_basic_query);
767 ensure(is_basic_query);
788 ensure(is_basic_query);
861 ensure(is_basic_query);
883 ensure(is_basic_query);
904 ensure(is_basic_query);
958 ensure(is_basic_query);
979 ensure(is_basic_query);
1033 ensure(is_basic_query);
1054 ensure(is_basic_query);
1078 require(other != 0);
virtual pod_type glued_hub_pod(pod_type xid) const
The pod index in the hub id space equivalent to xid in this id space. synonym for unglued_hub_pod(xid...
virtual void release_id_space(index_space_handle &xid_space) const =0
Returns the id space handle xid_space to the handle pool.
virtual bool allocated_iterator(const index_space_iterator &xitr) const =0
True if and only if id space iterator xitr was allocated by the iterator pool.
const index_space_collection * collection(pod_type xid) const
Id space collection for id xid (const version).
virtual bool contains_glued_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the glued hub id space.
bool is_persistent() const
True if this id space should be written to disk.
virtual index_space_handle & get_id_space() const =0
Allocates an id space handle from the handle pool.
const index_space_collection & host() const
The host collection (const version).
size_type ct() const
The number of members.
virtual void attach_to(pod_type xindex)
Attach to the state with index xindex in the id space family id_spaces().
virtual pod_type index() const
Index of this space.
An abstract class that defines the product structure for an id space.
An abstract iterator over the ids of an id space.
virtual pod_type unglued_hub_pod(pod_type xid) const =0
The pod index in the unglued hub id space equivalent to xid in this id space.
pod_type end() const
Ending id of this space.
virtual explicit_index_space_handle * clone() const
Virtual constructor, makes a new instance of the same type as this. If the handle is attached...
virtual pod_type family_scope(pod_type xlocal_id) const =0
Id relative to the id space family equivalent to the local id xlocal_id.
virtual bool is_persistent() const
True if this id space should be written to disk.
explicit_index_space_handle & operator=(const explicit_index_space_handle &xother)
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother).
virtual void release_iterator(index_space_iterator &xitr) const =0
Returns the id space iterator xitr to the iterator pool.
const abstract_product_structure & product_structure() const
The product structure for this id space (const version).
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
virtual const index_space_family & id_spaces() const
The id space family for this (const version).
virtual void release_id_space() const
Returns this id space handle to the handle pool.
const index_space_family & id_spaces() const
The id space family for this (const version).
bool has_product_structure() const
True if this id space has a product structure.
virtual bool is_attached() const =0
True if this handle is attached to a state.
virtual index_space_iterator & get_iterator() const
Allocates an id space iterator from the iterator pool.
virtual explicit_index_space_state * explicit_state(pod_type xlocal_id) const =0
The explicit id space state for id xlocal_id. Returns null if there is no explicit id space for xloca...
virtual pod_type pod(pod_type xid) const
The pod index in this space equivalent to xid in the hub id space.
virtual pod_type local_scope(pod_type xspace_id) const =0
Id relative to this collection equivalent to the id space family id xspace_id.
explicit_index_space_state & state()
The explicit state (mutable version).
virtual bool contains_glued_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the hub id space.
virtual void new_product_structure(const abstract_product_structure &xproduct)
Creates a new product structure for this id space by cloning the product structure, xproduct.
Abstract base class with useful features for all objects.
virtual pod_type pod(pod_type xid) const =0
The pod index in this space equivalent to xid in the unglued hub id space.
virtual ~explicit_index_space_handle()
Destructor.
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
An implementation of class index_space_handle for an explicit_index_space_state.
virtual bool allocated_id_space() const
True if and only if this id space handle was allocated by the handle pool.
virtual index_space_handle & get_id_space() const
Allocates an id space handle from the handle pool.
std::string name() const
Name of this space.
pod_index_type pod_type
The "plain old data" index type for this.
pod_type begin() const
Beginning id of this space.
virtual bool is_attached() const
True if this handle is attached to a state.
virtual void delete_product_structure()
Deletes the product structure for this id space.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual bool invariant() const
Class invariant.
virtual bool contains_unglued_hub(pod_type xid) const
True if this space contains an id equivalent to xid in the unglued hub id space.
virtual bool contains_unglued_hub(pod_type xid) const =0
True if this space contains an id equivalent to xid in the unglued hub id space.
A collection of id space states. This is a virtual class with provides an interface for accessing the...
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual bool contains(pod_type xlocal_id) const =0
True if this collection contains the id space with local id xlocal_id.
virtual index_space_iterator & get_iterator() const =0
Allocates an id space iterator from the iterator pool.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual void detach()
Detach this handle form its state, if any.
virtual const abstract_product_structure & product_structure() const
The product structure for this id space (const version).
virtual pod_type unglued_hub_pod(pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in this id space.
virtual bool allocated_iterator(const index_space_iterator &xitr) const
True if and only if id space iterator xitr was allocated by the iterator pool.
virtual void delete_product_structure()
Deletes the product structure for this id space.
virtual void new_product_structure(const abstract_product_structure &xproduct)
Creates a new product structure for this id space by cloning the product structure, xproduct.
virtual pod_type begin() const
Beginning id of this space.
virtual bool is_attached() const =0
True if this iterator is attached to a state.
bool invariant_check() const
True if invariant checking is enabled.
virtual bool contains(pod_type xid) const =0
True if this space contains id xid.
virtual bool allocated_id_space(const index_space_handle &xid_space) const =0
True if and only if id space handle xid_space was allocated by the handle pool.
pod_type index() const
The index of this id space.
virtual bool conforms_to_state(const index_space_collection &xhost, pod_type xlocal_id) const
True if this conforms to the handle type required by the state with local scope id xlocal_id in the h...
virtual pod_type glued_hub_pod(pod_type xid) const
The pod index in the glued hub id space equivalent to xid in this id space.
virtual pod_type end() const
Ending id of this space.
virtual bool has_product_structure() const
True if this id space has a product structure.
virtual const index_space_collection & host() const
The host collection.
virtual size_type ct() const
The number of members.
virtual void release_iterator(index_space_iterator &xitr) const
Returns the id space iterator xitr to the iterator pool.
virtual bool invariant() const
Class invariant.
Factory and container for a family of id spaces.
explicit_index_space_handle()
Default constructor.
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 contains(pod_type xid) const
True if this space contains id xid.
explicit_index_space_state * _state
The explicit state.