21 #include "SheafSystem/array_index_space_handle.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/index_space_family.h" 24 #include "SheafSystem/array_index_space_state.h" 35 const std::string& xname,
41 require(!xname.empty());
42 require(!xid_spaces.
contains(xname));
43 require(xcapacity >= 0);
55 ensure(&result.
id_spaces() == &xid_spaces);
60 ensure(result.
name() == xname);
62 ensure(result.
capacity() >= xcapacity);
109 ensure((*
this) == xother);
122 require(xid_spaces.
contains(xindex));
134 ensure(
index() == xindex);
143 const std::string& xname)
147 require(xid_spaces.
contains(xname));
159 ensure(
name() == xname);
181 ensure((*
this) == xother);
219 ensure(&
state() == &xstate);
241 ensure(is_basic_query);
263 ensure(is_basic_query);
305 ensure((*
this) == xother);
326 ensure(*result == *
this);
360 ensure(is_basic_query);
virtual bool invariant() const
Class invariant.
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.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual bool is_persistent() const
True if this id space should be written to disk.
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...
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).
An array implementation of class scattered_insertion_index_space_state. This representation is intend...
virtual bool is_attached() const =0
True if this handle is attached to a state.
Abstract base class with useful features for all objects.
std::string name() const
Name of this space.
pod_index_type pod_type
The "plain old data" index type for this.
array_index_space_handle & operator=(const array_index_space_handle &xother)
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother).
virtual bool is_attached() const
True if this handle is attached to a state.
virtual ~array_index_space_handle()
Destructor.
An array implementation of class scattered_insertion_index_space_handle. This representation is inten...
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
array_index_space_state & state()
The array id space state (mutable version).
virtual bool invariant() const
Class invariant.
virtual array_index_space_handle * clone() const
Virtual constructor, makes a new instance of the same type as this. If the handle is attached...
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.
size_type capacity() const
The number of ids reserved in memory.
static array_index_space_handle new_space(index_space_family &xid_spaces, const std::string &xname, bool xis_persistent, size_type xcapacity)
Create a new array id space in the id space family xid_space with name xname, persistence xis_persist...
bool invariant_check() const
True if invariant checking is enabled.
A handle for a scattered_insertion_index_space_state.
bool contains(pod_type xid) const
True, if this contains an id space with id xid.
static array_index_space_handle new_space(index_space_family &xid_spaces, const std::string &xname, bool xis_persistent, size_type xcapacity)
Create a new array id space in the id space family xid_spaces at the next available id space index wi...
Factory and container for a family of id spaces.
array_index_space_handle()
Default constructor.
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.