SheafSystem
0.0.0.0
|
An implementation of class primary_index_space_handle that has a reserved primary id space state. More...
#include <reserved_primary_index_space_handle.h>
Friends | |
class | reserved_primary_index_space_state |
RESERVED_PRIMARY_INDEX_SPACE_HANDLE FACET | |
reserved_primary_index_space_handle () | |
Default constructor. More... | |
reserved_primary_index_space_handle (const reserved_primary_index_space_handle &xother) | |
Copy constructor. More... | |
reserved_primary_index_space_handle (const index_space_family &xid_spaces, pod_type xindex) | |
Constructor: Attach to state with index xindex in the family xid_spaces. More... | |
reserved_primary_index_space_handle (const index_space_family &xid_spaces, const std::string &xname) | |
Constructor: Attach to state with name xname in the family xid_spaces. More... | |
reserved_primary_index_space_handle & | operator= (const reserved_primary_index_space_handle &xother) |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother). More... | |
virtual | ~reserved_primary_index_space_handle () |
Destructor. More... | |
reserved_primary_index_space_handle (reserved_primary_index_space_state &xstate) | |
Constructor: Attach to state xstate. More... | |
reserved_primary_index_space_state & | state () |
The reserved primary id space state (mutable version). More... | |
const reserved_primary_index_space_state & | state () const |
The reserved primary id space state (const version). More... | |
RESERVED PRIMARY INDEX SPACE FACET | |
pod_type | new_id () |
Allocate the next available id in this space. Returns the allocated id in the hub id space. More... | |
pod_type | new_hub_id (pod_type xhub_id) |
Allocate the hub id xhub_id in this space. Returns the allocated id in the hub id space. More... | |
pod_type | next_hub_id () const |
The next available hub id for allocation. More... | |
bool | is_next_id_available () const |
True if and only if the next id is available for allocation. More... | |
bool | is_hub_id_available (pod_type xhub_id) const |
True if and only if the hub id xhub_id is available for allocation. More... | |
INDEX_SPACE_HANDLE FACET | |
virtual reserved_primary_index_space_handle & | operator= (const index_space_handle &xother) |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother). More... | |
virtual reserved_primary_index_space_handle * | clone () const |
Virtual constructor, makes a new instance of the same type as this. If the handle is attached, attach to the same state. More... | |
HANDLE FACET | |
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 host id space collection xhost. More... | |
ANY FACET | |
virtual bool | is_ancestor_of (const any *other) const |
Conformance test; true if other conforms to this. More... | |
virtual bool | invariant () const |
Class invariant. More... | |
Additional Inherited Members | |
Public Types inherited from sheaf::index_space_handle | |
typedef pod_index_type | pod_type |
The "plain old data" index type for this. More... | |
Public Member Functions inherited from sheaf::primary_index_space_handle | |
primary_index_space_handle () | |
Default constructor. More... | |
primary_index_space_handle (const primary_index_space_handle &xother) | |
Copy constructor. More... | |
primary_index_space_handle (const index_space_family &xid_spaces, pod_type xindex) | |
Constructor: Attach to state with index xindex in the family xid_spaces. More... | |
primary_index_space_handle (const index_space_family &xid_spaces, const std::string &xname) | |
Constructor: Attach to state with name xname in the family xid_spaces. More... | |
primary_index_space_handle & | operator= (const primary_index_space_handle &xother) |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother). More... | |
virtual | ~primary_index_space_handle () |
Destructor. More... | |
pod_type | offset () const |
The offset into the hub id space. More... | |
void | extend (size_type xct) |
Extend this id space to have ct() == xct. More... | |
pod_type | hub_term_id () const |
The term id of this in the hub id space. More... | |
Public Member Functions inherited from sheaf::explicit_index_space_handle | |
explicit_index_space_handle () | |
Default constructor. More... | |
explicit_index_space_handle (const explicit_index_space_handle &xother) | |
Copy constructor. More... | |
explicit_index_space_handle (const index_space_family &xid_spaces, pod_type xindex) | |
Constructor: Attach to state with index xindex in the family xid_spaces. More... | |
explicit_index_space_handle (const index_space_family &xid_spaces, const std::string &xname) | |
Constructor: Attach to state with name xname in the family xid_spaces. More... | |
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). More... | |
virtual | ~explicit_index_space_handle () |
Destructor. More... | |
virtual const index_space_family & | id_spaces () const |
The id space family for this (const version). More... | |
virtual index_space_family & | id_spaces () |
The id space family for this (mutable version). More... | |
virtual size_type | ct () const |
The number of members. More... | |
virtual pod_type | begin () const |
Beginning id of this space. More... | |
virtual pod_type | end () const |
Ending id of this space. More... | |
virtual bool | contains (pod_type xid) const |
True if this space contains id xid. More... | |
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. More... | |
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. More... | |
virtual bool | contains (pod_type xid, pod_type xhub_id) const |
True if this space contains an id xid equivalent to xhub_id in the hub id space. More... | |
virtual pod_type | pod (pod_type xid) const |
The pod index in this space equivalent to xid in the hub id space. More... | |
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. More... | |
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). More... | |
virtual bool | is_persistent () const |
True if this id space should be written to disk. More... | |
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. More... | |
virtual void | delete_product_structure () |
Deletes the product structure for this id space. More... | |
virtual const abstract_product_structure & | product_structure () const |
The product structure for this id space (const version). More... | |
virtual abstract_product_structure & | product_structure () |
The product structure for this id space (mutable version). More... | |
virtual bool | has_product_structure () const |
True if this id space has a product structure. More... | |
virtual const index_space_collection & | host () const |
The host collection. More... | |
virtual pod_type | index () const |
Index of this space. More... | |
virtual bool | is_attached () const |
True if this handle is attached to a state. More... | |
virtual void | attach_to (pod_type xindex) |
Attach to the state with index xindex in the id space family id_spaces(). More... | |
virtual void | attach_to (const index_space_collection &xhost, pod_type xlocal_id) |
Attach to the state with local scope id, xlocal_id in the host id space collection xhost. More... | |
virtual void | detach () |
Detach this handle form its state, if any. More... | |
virtual index_space_handle & | get_id_space () const |
Allocates an id space handle from the handle pool. More... | |
virtual void | release_id_space () const |
Returns this id space handle to the handle pool. More... | |
virtual bool | allocated_id_space () const |
True if and only if this id space handle was allocated by the handle pool. More... | |
virtual index_space_iterator & | get_iterator () const |
Allocates an id space iterator from the iterator pool. More... | |
virtual void | release_iterator (index_space_iterator &xitr) const |
Returns the id space iterator xitr to the iterator pool. More... | |
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. More... | |
Public Member Functions inherited from sheaf::index_space_handle | |
virtual | ~index_space_handle () |
Destructor. More... | |
bool | operator== (const index_space_handle &xother) const |
True if this is a handle has the same state as xother. More... | |
const hub_index_space_handle & | hub_id_space () const |
The hub id space. More... | |
bool | is_empty () const |
True if there are no ids in the space. More... | |
bool | is_gathered () const |
True if begin() == 0 and end() == ct(). More... | |
bool | contains (const scoped_index &xid) const |
True if this space contains an id equivalent to xid. synonym for contains_hub(xid.hub_pod()). More... | |
bool | contains_hub (pod_type xid) const |
True if this space contains an id equivalent to xid in the unglued hub id space. synonym for contains_unglued_hub(xid) More... | |
bool | contains (pod_type xid, const scoped_index &xhub_id) const |
True if this space contains an id xid equivalent to xhub_id in the hub id space. synonym for contains(xid, xhub_id.hub_pod()). More... | |
pod_type | pod (const scoped_index &xid) const |
The pod index in this space equivalent to xid. synonym for pod(xid.hub_pod()). More... | |
pod_type | hub_pod (pod_type xid) const |
The pod index in the unglued hub id space equivalent to xid in this id space; synonym for unglued_hub_pod(pod_type). More... | |
template<typename T > | |
const T & | product_structure () const |
The product structure of type T for this id space (const version). More... | |
template<typename T > | |
T & | product_structure () |
The product structure of type T for this id space (mutable version). More... | |
template<typename T > | |
bool | product_structure_conforms_to () const |
True if the product structure for this id space conforms to type T. More... | |
std::string | name () const |
Name of this space. More... | |
void | put_name (const std::string &xname) |
Associate name xname with this id space. More... | |
void | attach_to (const index_space_family &xid_spaces, pod_type xindex) |
Attach to the state with index xindex in the id space family xid_spaces. More... | |
void | attach_to (const index_space_family &xid_spaces, const std::string &xname) |
Attach to the state with name xname in the id space family xid_spaces. More... | |
void | attach_to (const std::string &xname) |
Attach to the state with name xname in the id space family id_spaces(). More... | |
void | attach_to (const index_space_handle &xother) |
Attach to the state of the id space xother. More... | |
bool | conforms_to_state (const index_space_family &xid_spaces, pod_type xindex) const |
True if this conforms to the handle type required by the state with index xindex in the id space family, xid_spaces. More... | |
bool | conforms_to_state (const index_space_family &xid_spaces, const std::string &xname) const |
True if this conforms to the handle type required by the state with name xname in the id space family, xid_spaces. More... | |
bool | conforms_to_state (pod_type xid) const |
True if this conforms to the handle type required by the state with id xid. More... | |
bool | conforms_to_state (const std::string &xname) const |
True if this conforms to the handle type required by the state with name xname. More... | |
bool | conforms_to_state (const index_space_handle &xother) const |
True if this conforms to the handle type required by the state of xother. More... | |
Public Member Functions inherited from sheaf::any | |
bool | is_same_type (const any *other) const |
True if other is the same type as this. More... | |
virtual | ~any () |
Destructor. More... | |
bool | invariant_check () const |
True if invariant checking is enabled. More... | |
void | enable_invariant_check () const |
Enable invariant checking. More... | |
void | disable_invariant_check () const |
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More... | |
int | disable_invariance_check_request_depth () const |
Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More... | |
Protected Member Functions inherited from sheaf::primary_index_space_handle | |
primary_index_space_handle (primary_index_space_state &xstate) | |
Constructor: Attach to state xstate. More... | |
primary_index_space_state & | state () |
The primary id space state (mutable version). More... | |
const primary_index_space_state & | state () const |
The primary id space state (const version). More... | |
void | put_hub_term_id (pod_type xhub_term_id) |
Sets hub_term_id() to xhub_term_id. More... | |
Protected Member Functions inherited from sheaf::explicit_index_space_handle | |
explicit_index_space_state & | state () |
The explicit state (mutable version). More... | |
const explicit_index_space_state & | state () const |
The explicit state (const version). More... | |
void | attach_to (explicit_index_space_state *xstate) |
Attach to the explicit id space state xstate. More... | |
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. More... | |
explicit_index_space_state * | state (pod_type xindex) const |
The explicit id space state at id xindex in id space family id_spaces(). Returns null if no id space stae is available at index xindex. More... | |
explicit_index_space_state * | state (const index_space_collection &xhost, pod_type xlocal_id) const |
The explicit id space state with local scope id xlocal_id in the host id space collection xhost. More... | |
Protected Member Functions inherited from sheaf::index_space_handle | |
index_space_handle () | |
Default constructor. More... | |
index_space_handle (const index_space_handle &xother) | |
Copy constructor; disabled. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Protected Attributes inherited from sheaf::explicit_index_space_handle | |
explicit_index_space_state * | _state |
The explicit state. More... | |
An implementation of class primary_index_space_handle that has a reserved primary id space state.
Definition at line 41 of file reserved_primary_index_space_handle.h.
sheaf::reserved_primary_index_space_handle::reserved_primary_index_space_handle | ( | ) |
Default constructor.
Definition at line 33 of file reserved_primary_index_space_handle.cc.
References invariant().
Referenced by clone(), reserved_primary_index_space_handle(), and ~reserved_primary_index_space_handle().
sheaf::reserved_primary_index_space_handle::reserved_primary_index_space_handle | ( | const reserved_primary_index_space_handle & | xother | ) |
Copy constructor.
Definition at line 50 of file reserved_primary_index_space_handle.cc.
References invariant(), and reserved_primary_index_space_handle().
sheaf::reserved_primary_index_space_handle::reserved_primary_index_space_handle | ( | const index_space_family & | xid_spaces, |
pod_type | xindex | ||
) |
Constructor: Attach to state with index xindex in the family xid_spaces.
Definition at line 69 of file reserved_primary_index_space_handle.cc.
References sheaf::explicit_index_space_handle::attach_to(), conforms_to_state(), sheaf::index_space_family::contains(), sheaf::explicit_index_space_handle::id_spaces(), sheaf::explicit_index_space_handle::index(), invariant(), sheaf::explicit_index_space_handle::is_attached(), and reserved_primary_index_space_handle().
sheaf::reserved_primary_index_space_handle::reserved_primary_index_space_handle | ( | const index_space_family & | xid_spaces, |
const std::string & | xname | ||
) |
Constructor: Attach to state with name xname in the family xid_spaces.
Definition at line 94 of file reserved_primary_index_space_handle.cc.
References sheaf::explicit_index_space_handle::attach_to(), conforms_to_state(), sheaf::index_space_family::contains(), sheaf::explicit_index_space_handle::id_spaces(), invariant(), sheaf::explicit_index_space_handle::is_attached(), sheaf::index_space_handle::name(), and operator=().
|
virtual |
Destructor.
Definition at line 141 of file reserved_primary_index_space_handle.cc.
References reserved_primary_index_space_handle().
Referenced by operator=().
|
protected |
Constructor: Attach to state xstate.
Definition at line 159 of file reserved_primary_index_space_handle.cc.
References sheaf::explicit_index_space_handle::attach_to(), invariant(), sheaf::explicit_index_space_handle::is_attached(), and state().
|
virtual |
Virtual constructor, makes a new instance of the same type as this. If the handle is attached, attach to the same state.
Reimplemented from sheaf::primary_index_space_handle.
Definition at line 384 of file reserved_primary_index_space_handle.cc.
References conforms_to_state(), sheaf::any::is_same_type(), and reserved_primary_index_space_handle().
Referenced by operator=().
|
virtual |
True if this conforms to the handle type required by the state with local scope id xlocal_id in the host id space collection xhost.
Reimplemented from sheaf::primary_index_space_handle.
Definition at line 416 of file reserved_primary_index_space_handle.cc.
References sheaf::index_space_collection::contains(), is_ancestor_of(), and state().
Referenced by clone(), sheaf::reserved_primary_index_space_state::new_space(), operator=(), and reserved_primary_index_space_handle().
|
virtual |
Class invariant.
Reimplemented from sheaf::primary_index_space_handle.
Definition at line 471 of file reserved_primary_index_space_handle.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::primary_index_space_handle::invariant(), and sheaf::any::invariant_check().
Referenced by is_ancestor_of(), new_hub_id(), new_id(), operator=(), and reserved_primary_index_space_handle().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::primary_index_space_handle.
Definition at line 450 of file reserved_primary_index_space_handle.cc.
References invariant().
Referenced by conforms_to_state().
bool sheaf::reserved_primary_index_space_handle::is_hub_id_available | ( | pod_type | xhub_id | ) | const |
True if and only if the hub id xhub_id is available for allocation.
Definition at line 321 of file reserved_primary_index_space_handle.cc.
References sheaf::reserved_primary_index_space_state::is_hub_id_available(), operator=(), and state().
Referenced by is_next_id_available(), and new_hub_id().
bool sheaf::reserved_primary_index_space_handle::is_next_id_available | ( | ) | const |
True if and only if the next id is available for allocation.
Definition at line 302 of file reserved_primary_index_space_handle.cc.
References is_hub_id_available(), sheaf::reserved_primary_index_space_state::is_next_id_available(), and state().
Referenced by sheaf::primary_sum_index_space_state::new_id(), and next_hub_id().
sheaf::reserved_primary_index_space_handle::pod_type sheaf::reserved_primary_index_space_handle::new_hub_id | ( | pod_type | xhub_id | ) |
Allocate the hub id xhub_id in this space. Returns the allocated id in the hub id space.
Definition at line 258 of file reserved_primary_index_space_handle.cc.
References sheaf::explicit_index_space_handle::ct(), invariant(), is_hub_id_available(), sheaf::reserved_primary_index_space_state::new_hub_id(), next_hub_id(), and state().
Referenced by new_id().
sheaf::reserved_primary_index_space_handle::pod_type sheaf::reserved_primary_index_space_handle::new_id | ( | ) |
Allocate the next available id in this space. Returns the allocated id in the hub id space.
Definition at line 233 of file reserved_primary_index_space_handle.cc.
References sheaf::explicit_index_space_handle::ct(), invariant(), sheaf::explicit_index_space_handle::is_attached(), new_hub_id(), sheaf::reserved_primary_index_space_state::new_id(), next_hub_id(), and state().
Referenced by sheaf::primary_sum_index_space_state::new_id(), and state().
sheaf::reserved_primary_index_space_handle::pod_type sheaf::reserved_primary_index_space_handle::next_hub_id | ( | ) | const |
The next available hub id for allocation.
Definition at line 283 of file reserved_primary_index_space_handle.cc.
References is_next_id_available(), sheaf::reserved_primary_index_space_state::next_hub_id(), and state().
Referenced by new_hub_id(), new_id(), and sheaf::reserved_primary_index_space_state::new_space().
sheaf::reserved_primary_index_space_handle & sheaf::reserved_primary_index_space_handle::operator= | ( | const reserved_primary_index_space_handle & | xother | ) |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother).
Definition at line 120 of file reserved_primary_index_space_handle.cc.
References sheaf::explicit_index_space_handle::attach_to(), conforms_to_state(), invariant(), sheaf::explicit_index_space_handle::is_attached(), and ~reserved_primary_index_space_handle().
Referenced by is_hub_id_available(), and reserved_primary_index_space_handle().
|
virtual |
Assignment operator; attach this handle to the state of xother. synonym for attach_to(xother).
Reimplemented from sheaf::primary_index_space_handle.
Definition at line 362 of file reserved_primary_index_space_handle.cc.
References sheaf::explicit_index_space_handle::attach_to(), clone(), conforms_to_state(), invariant(), and sheaf::index_space_handle::is_attached().
|
protected |
The reserved primary id space state (mutable version).
Definition at line 180 of file reserved_primary_index_space_handle.cc.
References sheaf::explicit_index_space_handle::is_attached().
Referenced by conforms_to_state(), is_hub_id_available(), is_next_id_available(), new_hub_id(), new_id(), next_hub_id(), and reserved_primary_index_space_handle().
|
protected |
The reserved primary id space state (const version).
Definition at line 202 of file reserved_primary_index_space_handle.cc.
References sheaf::explicit_index_space_handle::is_attached(), and new_id().