21 #include "SheafSystem/abstract_product_structure.h" 22 #include "SheafSystem/forwarding_index_space_handle.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/hub_index_space_handle.h" 25 #include "SheafSystem/index_space_family.h" 26 #include "SheafSystem/index_space_iterator.h" 66 ensure((*
this) == xother);
90 ensure(
index() == xindex);
99 const std::string& xname)
114 ensure(
name() == xname);
136 ensure((*
this) == xother);
185 ensure((*
this) == xother);
208 ensure(*result == *
this);
240 ensure(is_basic_query);
266 ensure(is_basic_query);
287 ensure(is_basic_query);
308 ensure(is_basic_query);
329 ensure(is_basic_query);
350 ensure(is_basic_query);
371 ensure(is_basic_query);
392 ensure(is_basic_query);
413 ensure(is_basic_query);
497 ensure(is_basic_query);
581 ensure(is_basic_query);
604 ensure(is_basic_query);
625 ensure(is_basic_query);
657 ensure(is_basic_query);
697 ensure(is_basic_query);
725 ensure(
index() == xindex);
749 ensure(&
host() == &xhost);
791 ensure(is_basic_query);
845 ensure(is_basic_query);
866 ensure(is_basic_query);
920 ensure(is_basic_query);
941 ensure(is_basic_query);
virtual void attach_to(pod_type xindex)
Attach to the state with index xindex in the id space family id_spaces().
const index_space_collection * collection(pod_type xid) const
Id space collection for id xid (const version).
forwarding_index_space_handle()
Default constructor.
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.
pod_type _local_id
The id of this space in the local scope of the host collection.
An abstract iterator over the ids of an id space.
virtual void detach()
Detach this handle form its state, if any.
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 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 void release_id_space() const
Returns this id space handle to the handle pool.
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 size_type ct() const
The number of members.
forwarding_index_space_handle & operator=(const forwarding_index_space_handle &xother)
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother).
virtual pod_type end(pod_type xlocal_id) const =0
Ending id of the space with id xlocal_id.
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...
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
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 bool is_persistent() const
True if this id space should be written to disk.
virtual bool is_attached() const =0
True if this handle is attached to a state.
const hub_index_space_handle & hub_id_space() const
The hub id space.
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 const index_space_family & id_spaces() const =0
The id space family for this (const version).
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 unglued_hub_pod(pod_type xid) const
The pod index in the unglued hub id space equivalent to xid in this 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.
virtual bool allocated_id_space() const
True if and only if this id space handle was allocated by the handle pool.
virtual forwarding_index_space_handle * clone() const
Virtual constructor, makes a new instance of the same type as this. If the handle is attached...
virtual ~forwarding_index_space_handle()
Destructor.
Abstract base class with useful features for all objects.
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(pod_type xlocal_id) const =0
Beginning id of the space with id xlocal_id.
virtual bool invariant() const
Class invariant.
std::string name() const
Name of this space.
pod_index_type pod_type
The "plain old data" index type for this.
An implementation of class index_space_handle for an forwarding_index_space_state.
virtual 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 void delete_product_structure()
Deletes the product structure for this id space.
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...
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual bool has_product_structure() const
True if this id space has a product structure.
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_attached() const
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 void release_iterator(index_space_iterator &xitr) const
Returns the id space iterator xitr to the iterator pool.
virtual index_space_handle & get_id_space() const
Allocates an id space handle from the handle pool.
const index_space_collection * _host
The host collection.
virtual pod_type index() const
Index 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 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 const abstract_product_structure & product_structure() const
The product structure for this id space (const version).
virtual void release_id_space_iterator(index_space_iterator &xitr) const =0
Returns the id space iterator xitr to the iterator pool.
virtual bool contains(pod_type xid) const
True if this space contains id xid.
virtual pod_type end() const
Ending id of this space.
virtual const index_space_collection & host() const
The host collection.
virtual pod_type begin() const
Beginning id of this space.
virtual bool invariant() const
Class invariant.
Factory and container for a family of id spaces.
virtual pod_type pod(pod_type xid) const
The pod index in this space equivalent to xid in the hub id space.
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.
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.
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...
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.
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.