21 #include "SheafSystem/abstract_product_structure.h" 22 #include "SheafSystem/index_space_collection.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" 28 #include "SheafSystem/scoped_index.h" 87 ensure(is_basic_query);
108 ensure(is_basic_query);
211 ensure((*
this) == xother);
232 ensure(is_basic_query);
262 ensure(is_basic_query);
283 ensure(is_basic_query);
302 ensure(is_basic_query);
325 ensure(is_basic_query);
342 bool result = (
ct(xlocal_id) == 0);
346 ensure(is_basic_query);
369 ensure(is_basic_query);
392 ensure(is_basic_query);
409 bool result = (
begin(xlocal_id) == 0) && (
end(xlocal_id) ==
ct(xlocal_id));
413 ensure(is_basic_query);
436 ensure(is_basic_query);
457 ensure(is_basic_query);
478 ensure(is_basic_query);
501 ensure(is_basic_query);
523 ensure(is_basic_query);
544 ensure(is_basic_query);
567 ensure(is_basic_query);
700 ensure(is_basic_query);
778 ensure(is_basic_query);
802 ensure(is_basic_query);
825 ensure(is_basic_query);
880 ensure(is_basic_query);
901 ensure(is_basic_query);
956 ensure(is_basic_query);
977 ensure(is_basic_query);
1001 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 bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
virtual void new_product_structure(pod_type xlocal_id, const abstract_product_structure &xproduct)=0
Creates a new product structure for the id space with id xlocal_id by cloning the product structure...
virtual bool allocated_id_space_iterator(const index_space_iterator &xitr) const =0
True if and only if id space iterator xitr was allocated by the iterator pool.
An abstract class that defines the product structure for an id space.
An abstract iterator over the ids of an id space.
bool is_empty(pod_type xlocal_id) const
True if there are no ids in the space with id xlocal_id.
virtual bool contains_family(pod_type xspace_id) const =0
True if this collection contains the id space with family id xspace_id.
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 size_type deep_size(bool xinclude_shallow) const =0
The deep size of this.
bool contains_glued_hub(pod_type xlocal_id, pod_type xid) const
True if the space with id xlocal_id contains an id equivalent to xid in the glued hub id space...
virtual void delete_product_structure(pod_type xlocal_id)=0
Deletes the product structure for the id space with id xlocal_id.
virtual pod_type end(pod_type xlocal_id) const =0
Ending id of the space with id xlocal_id.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
pod_index_type pod_type
The "plain old data" index type for this.
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.
virtual index_space_collection & operator=(const index_space_collection &xother)=0
Assignment operator.
virtual bool is_attached() const =0
True if this handle is attached to a state.
An implementation of class sum_index_space_handle that has a primary sum id space state...
virtual bool contains_unglued_hub(pod_type xlocal_id, pod_type xid) const =0
True if the space with id xlocal_id contains an id equivalent to xid in the unglued hub id space...
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 const index_space_family & id_spaces() const =0
The id space family for this (const version).
const hub_index_space_handle & hub_id_space() const
The hub id space.
virtual bool has_product_structure(pod_type xlocal_id) const =0
True if the id space with id xlocal_id has a product structure.
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.
Abstract base class with useful features for all objects.
virtual pod_type begin(pod_type xlocal_id) const =0
Beginning id of the space with id xlocal_id.
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
An index within the external ("client") scope of a given id space.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
virtual size_type ct(pod_type xlocal_id) const =0
The number of members for the id space with id xlocal_id.
virtual pod_type pod(pod_type xlocal_id, pod_type xid) const =0
The pod index in the space with id xlocal_id equivalent to xid in the hub id space.
pod_type glued_hub_pod(pod_type xlocal_id, pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in the id space with id xlocal_id...
virtual bool is_persistent(pod_type xlocal_id) const =0
True if the id space with id xlocal_id should be written to disk.
virtual pod_type unglued_hub_pod(pod_type xlocal_id, pod_type xid) const =0
The pod index in the glued hub id space equivalent to xid in the id space with id xlocal_id...
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 const abstract_product_structure & product_structure(pod_type xlocal_id) const =0
The product structure for the id space with id xlocal_id (const version).
virtual bool contains(pod_type xlocal_id) const =0
True if this collection contains the id space with local id xlocal_id.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual bool operator==(const index_space_collection &xother) const =0
True if this is equivalent to xother.
virtual ~index_space_collection()
Destructor.
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.
bool is_gathered(pod_type xlocal_id) const
True if begin(xlocal_id) == 0 and end(xlocal_id) == ct(xlocal_id).
virtual index_space_handle & get_id_space(pod_type xlocal_id) const =0
Allocates an id space handle from the handle pool attached to state with id xlocal_id.
virtual index_space_iterator & get_id_space_iterator(pod_type xlocal_id) const =0
Allocates an id space iterator from the iterator pool attached to state with id xlocal_id.
virtual void release_id_space_iterator(index_space_iterator &xitr) const =0
Returns the id space iterator xitr to the iterator pool.
Factory and container for a family of id spaces.
pod_type hub_pod(pod_type xlocal_id, pod_type xid) const
The pod index in the glued hub id space equivalent to xid in the id space with id xlocal_id...
index_space_collection()
Default constructor.
bool contains_hub(pod_type xlocal_id, pod_type xid) const
True if the space with id xlocal_id contains an id equivalent to xid in the hub id space...
virtual bool invariant() const
Class invariant.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
void enable_invariant_check() const
Enable invariant checking.
virtual void release_id_space(index_space_handle &xid_space) const =0
Returns the id space handle xid_space to the handle pool.
const hub_index_space_handle & hub_id_space() const
The hub id space of this family.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.