SheafSystem
0.0.0.0
|
A block of ids all in the same id space. More...
#include <id_block.h>
Public Member Functions | |
virtual bool | is_ancestor_of (const any *other) const |
Conformance test; true if other conforms to this. More... | |
virtual id_block * | clone () const |
Virtual constructor, makes a new instance of the same type as this. More... | |
id_block & | operator= (const id_block &xother) |
Assignment operator. More... | |
virtual bool | invariant () const |
Class invariant. More... | |
id_block (const id_block &xother) | |
Copy constructor. More... | |
virtual | ~id_block () |
Destructor. More... | |
id_block (const poset_state_handle &xhost, const index_space_handle &xid_space, int xub, const scoped_index *xids=0, int xct=0) | |
Creates an instance with host() == xhost, id space == xid_space, ub() == xub, and xct ids copied from xids. More... | |
poset_state_handle & | host () |
The poset that id_space resides in (mutable version). More... | |
const poset_state_handle & | host () const |
The poset that id_space resides in (const version). More... | |
const index_space_handle & | id_space () const |
The id space the ids in this block belong to. More... | |
void | put_id_space (const index_space_handle &xnew_id_space, bool xauto_access) |
Sets space() to xid_space and translates the ids. More... | |
void | put_member_id_space (bool xauto_access) |
Sets space() to host().member_id_space() and translates the ids. More... | |
bool | is_member_hub_id_space () const |
True if space() == host().member_hub_id_space(). More... | |
Public Member Functions inherited from sheaf::block< scoped_index > | |
block (index_type xub=0) | |
Creates an instance with ub() == xub; storage is uninitialized. More... | |
block (index_type xub, size_type xct, const scoped_index *xitems) | |
Creates an instance with ub() == xub; storage is initialized with xct items copied from xitems. More... | |
block (const block &xother) | |
Copy constructor. More... | |
block & | operator= (const block &xother) |
Assignment operator. More... | |
~block () | |
Destructor. More... | |
Public Member Functions inherited from sheaf::auto_block< T, S > | |
pointer_type | base () const |
The underlying storage array. More... | |
size_type | ct () const |
The number of items currently in use. More... | |
bool | invariant () const |
The class invariant. More... | |
reference_type | item (index_type xindex) const |
The item at index xindex. More... | |
reference_type | operator[] (index_type xindex) const |
The item at index xindex. More... | |
index_type | ub () const |
The upper bound on the storage array. The number of items current allocated in the storage array. More... | |
auto_block (index_type xub=0) | |
Creates an instance with ub() == xub; storage is uninitialized. More... | |
auto_block (index_type xub, size_type xct, const T *xitems) | |
Creates an instance with ub() == xub; storage is initialized with xct items copied from xitems. More... | |
auto_block (const auto_block &xother) | |
Copy constructor. More... | |
auto_block & | operator= (const auto_block &xother) |
Assignment operator. More... | |
virtual | ~auto_block () |
Destructor. More... | |
void | force_item (index_type xindex, const_reference_type xitem) |
Puts the item xitem at index xindex, resizing if necessary; any other new storage allocated is uninitialized. More... | |
void | reserve (index_type xub) |
Makes ub() at least xub; if new storage is allocated, it is uninitialized. More... | |
void | set_ct (size_type xct) |
Sets ct() == xct. More... | |
void | set_item (index_type xindex, const_reference_type xitem) |
Puts the item xitem at index xindex, but will not resize. More... | |
void | assign (const_reference_type xitem) |
Sets the values of all items to xitem. More... | |
void | assign (index_type xbegin, index_type xend, const_reference_type xitem) |
Sets the values of items with xbegin <= index < xend to xitem. More... | |
reference_type | back () const |
The last item in the auto_block. More... | |
void | push_back (const_reference_type item) |
Insert item at the end of the items in the auto_block. More... | |
void | push_back (const auto_block &xother) |
Appends xother to the back of this. More... | |
void | pop_back () |
Remove item at the back. More... | |
void | clear () |
Remove all items. More... | |
void | initialize (index_type xindex) |
Invokes the initialization policy on the item at xindex. More... | |
void | initialize (index_type xbegin, index_type xend) |
Invokes the initialization policy on the range [xbegin, xend). More... | |
Additional Inherited Members | |
Public Types inherited from sheaf::block< scoped_index > | |
typedef auto_block< scoped_index, un_block_initialization_policy< scoped_index > > | base_type |
typedef base_type::index_type | index_type |
typedef base_type::size_type | size_type |
Public Types inherited from sheaf::auto_block< T, S > | |
typedef T | value_type |
The type of value stored in the container. More... | |
typedef S | initialization_policy |
The value initialization policy. More... | |
typedef T & | reference_type |
A type that behaves as a reference to the container's value type. More... | |
typedef const T & | const_reference_type |
A type that behaves as a const reference to the container's value type. More... | |
typedef T * | pointer_type |
A type that behaves as a pointer to the container's value type. More... | |
typedef const T * | const_pointer_type |
A type that behaves as a const pointer to the container's value type. More... | |
typedef sheaf::pod_index_type | index_type |
The containers index type. More... | |
typedef signed long int | difference_type |
A signed integral type used to represent the difference of two indices or iterators. More... | |
typedef unsigned long int | size_type |
An unsigned integral type used to represent sizes and capacities. More... | |
Protected Attributes inherited from sheaf::auto_block< T, S > | |
pointer_type | _base |
Start of storage for this. More... | |
index_type | _ub |
The index upper bound. More... | |
size_type | _ct |
The number of items currently stored. More... | |
A block of ids all in the same id space.
Definition at line 48 of file id_block.h.
sheaf::id_block::id_block | ( | const id_block & | xother | ) |
Copy constructor.
Definition at line 135 of file id_block.cc.
References sheaf::index_space_handle::get_id_space(), invariant(), and ~id_block().
|
virtual |
Destructor.
Definition at line 159 of file id_block.cc.
References sheaf::index_space_handle::release_id_space().
Referenced by id_block().
sheaf::id_block::id_block | ( | const poset_state_handle & | xhost, |
const index_space_handle & | xid_space, | ||
int | xub, | ||
const scoped_index * | xids = 0 , |
||
int | xct = 0 |
||
) |
Creates an instance with host() == xhost, id space == xid_space, ub() == xub, and xct ids copied from xids.
Definition at line 180 of file id_block.cc.
References sheaf::index_space_family::contains(), sheaf::auto_block< T, S >::ct(), sheaf::index_space_handle::get_id_space(), host(), id_space(), sheaf::index_space_handle::index(), sheaf::poset_state_handle::is_attached(), sheaf::auto_block< T, S >::item(), sheaf::poset_state_handle::member_id_spaces(), and sheaf::auto_block< T, S >::ub().
|
virtual |
Virtual constructor, makes a new instance of the same type as this.
Definition at line 55 of file id_block.cc.
References host(), id_space(), operator=(), and sheaf::auto_block< T, S >::ub().
Referenced by is_ancestor_of().
sheaf::poset_state_handle & sheaf::id_block::host | ( | ) |
The poset that id_space resides in (mutable version).
Definition at line 216 of file id_block.cc.
Referenced by clone(), id_block(), invariant(), is_member_hub_id_space(), sheaf::operator<<(), put_id_space(), and put_member_id_space().
const sheaf::poset_state_handle & sheaf::id_block::host | ( | ) | const |
The poset that id_space resides in (const version).
Definition at line 224 of file id_block.cc.
References id_space().
const sheaf::index_space_handle & sheaf::id_block::id_space | ( | ) | const |
The id space the ids in this block belong to.
Definition at line 233 of file id_block.cc.
References put_id_space().
Referenced by clone(), host(), id_block(), is_member_hub_id_space(), sheaf::operator<<(), put_id_space(), and put_member_id_space().
|
virtual |
Class invariant.
Definition at line 110 of file id_block.cc.
References host().
Referenced by id_block(), is_member_hub_id_space(), and operator=().
|
virtual |
Conformance test; true if other conforms to this.
Definition at line 35 of file id_block.cc.
References clone().
bool sheaf::id_block::is_member_hub_id_space | ( | ) | const |
True if space() == host().member_hub_id_space().
Definition at line 328 of file id_block.cc.
References sheaf::block< T >::block(), sheaf::auto_block< T, S >::ct(), host(), id_space(), invariant(), sheaf::poset_state_handle::member_hub_id_space(), and sheaf::operator<<().
Referenced by fiber_bundle::mesh_partition::part(), put_member_id_space(), and fiber_bundle::mesh_partition::put_part().
sheaf::id_block & sheaf::id_block::operator= | ( | const id_block & | xother | ) |
Assignment operator.
Definition at line 82 of file id_block.cc.
References sheaf::index_space_handle::get_id_space(), invariant(), and sheaf::block< T >::operator=().
Referenced by clone().
void sheaf::id_block::put_id_space | ( | const index_space_handle & | xnew_id_space, |
bool | xauto_access | ||
) |
Sets space() to xid_space and translates the ids.
Definition at line 241 of file id_block.cc.
References sheaf::auto_block< T, S >::_ct, sheaf::index_space_handle::get_id_space(), sheaf::poset_state_handle::get_read_write_access(), host(), id_space(), sheaf::index_space_handle::index(), sheaf::auto_block< T, S >::item(), sheaf::poset_state_handle::member_hub_id_space(), sheaf::index_space_handle::pod(), put_member_id_space(), sheaf::poset_state_handle::release_access(), and sheaf::index_space_handle::release_id_space().
Referenced by id_space(), and put_member_id_space().
void sheaf::id_block::put_member_id_space | ( | bool | xauto_access | ) |
Sets space() to host().member_id_space() and translates the ids.
Definition at line 306 of file id_block.cc.
References host(), id_space(), is_member_hub_id_space(), and put_id_space().
Referenced by put_id_space().