SheafSystem
0.0.0.0
|
A description of a (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bounded i/o operation. More...
#include <poset_bounds_descriptor.h>
Public Types | |
enum | specification_mode { MEMBER_MEMBER, MEMBER_SUBPOSET, SUBPOSET_MEMBER, SUBPOSET_SUBPOSET, NOT_A_MODE } |
Enumeration for mode of specifying the lower and upper bounds. More... | |
Public Member Functions | |
poset_bounds_descriptor (const poset_bounds_descriptor &xother) | |
Copy constructor. More... | |
poset_bounds_descriptor & | operator= (const poset_bounds_descriptor &xother) |
Assignment operator. More... | |
bool | operator== (const poset_bounds_descriptor &xother) const |
Comparison operator. More... | |
virtual poset_bounds_descriptor * | clone () const |
Virtual constructor; makes a new instance of the same type as this. More... | |
virtual | ~poset_bounds_descriptor () |
Destructor. More... | |
virtual bool | invariant () const |
Class invariant. More... | |
virtual bool | is_ancestor_of (const any *other) const |
Conformance test; true if other conforms to this. More... | |
poset_bounds_descriptor (specification_mode xmode, pod_index_type xlb_id, pod_index_type xub_id) | |
Constructs an instance with mode() xmode, lb_id() xlbid, and ub_id() xub_id. More... | |
poset_bounds_descriptor (specification_mode xmode, const scoped_index &xlb_id, const scoped_index &xub_id) | |
Constructs an instance with mode() xmode, lb_id() xlbid, and ub_id() xub_id. More... | |
specification_mode | mode () const |
Specification mode for this. More... | |
bool | lb_is_member () const |
True if mode == MEMBER_MEMBER or MEMBER_SUBPOSET. More... | |
bool | ub_is_member () const |
True if mode == MEMBER_MEMBER or SUBPOSET_MEMBER. More... | |
pod_index_type | lb_id () const |
The index of the lower bound. More... | |
void | put_lb_id (pod_index_type xlb_id) |
Sets the index of the lower bound to xlb_id. More... | |
void | put_lb_id (const scoped_index &xlb_id) |
Sets the index of the lower bound to xlb_id. More... | |
pod_index_type | ub_id () const |
The index of the upper bound member, if the upper bound contains a single member. More... | |
void | put_ub_id (pod_index_type xub_id) |
Sets the index of the upper bound to xub_id. More... | |
void | put_ub_id (const scoped_index &xub_id) |
Sets the index of the upper bound to xub_id. More... | |
bool | lb_is_valid_for (const poset_state_handle &xposet) const |
True if the lower bound member or subposet mentioned in this descriptor exists in xposet. More... | |
bool | ub_is_valid_for (const poset_state_handle &xposet) const |
True if the upper bound member or subposet mentioned in this descriptor exists in xposet. More... | |
bool | is_valid_for (const poset_state_handle &xposet) const |
True if the members and/or subposets mentioned in this descriptor exist in xposet. More... | |
bool | lb_member_is_bottom () const |
True if lb_is_member() and lb_id() is sheaf_constants::BOTTOM_INDEX. More... | |
bool | ub_member_is_not_top () const |
True if ub_is_member() and ub_id() is not sheaf_constants::TOP_INDEX. 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... | |
Static Public Member Functions | |
static int | mode_to_int (specification_mode xmode) |
Converts mode xmode to an int. More... | |
static specification_mode | int_to_mode (int xmode) |
Converts int xmode to a mode. More... | |
Static Public Attributes | |
static const poset_bounds_descriptor & | BOTTOM_TOP = *(new poset_bounds_descriptor(MEMBER_MEMBER, BOTTOM_INDEX, TOP_INDEX)) |
An instance with lb() == {bottom} and ub() == {top}. More... | |
static const poset_bounds_descriptor & | BOTTOM_BOTTOM = *(new poset_bounds_descriptor(MEMBER_MEMBER, BOTTOM_INDEX, BOTTOM_INDEX)) |
An instance with lb() == {bottom} and ub() == {bottom}. More... | |
Protected Member Functions | |
poset_bounds_descriptor () | |
Default constructor. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Friends | |
class | poset_bounds |
A description of a (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bounded i/o operation.
Definition at line 48 of file poset_bounds_descriptor.h.
Enumeration for mode of specifying the lower and upper bounds.
Definition at line 99 of file poset_bounds_descriptor.h.
sheaf::poset_bounds_descriptor::poset_bounds_descriptor | ( | const poset_bounds_descriptor & | xother | ) |
Copy constructor.
Definition at line 52 of file poset_bounds_descriptor.cc.
References invariant(), and operator=().
|
virtual |
Destructor.
Definition at line 136 of file poset_bounds_descriptor.cc.
References invariant().
Referenced by clone().
sheaf::poset_bounds_descriptor::poset_bounds_descriptor | ( | specification_mode | xmode, |
pod_index_type | xlb_id, | ||
pod_index_type | xub_id | ||
) |
Constructs an instance with mode() xmode, lb_id() xlbid, and ub_id() xub_id.
Definition at line 285 of file poset_bounds_descriptor.cc.
References invariant(), lb_id(), mode(), poset_bounds_descriptor(), and ub_id().
sheaf::poset_bounds_descriptor::poset_bounds_descriptor | ( | specification_mode | xmode, |
const scoped_index & | xlb_id, | ||
const scoped_index & | xub_id | ||
) |
Constructs an instance with mode() xmode, lb_id() xlbid, and ub_id() xub_id.
Definition at line 309 of file poset_bounds_descriptor.cc.
References sheaf::scoped_index::hub_pod(), invariant(), lb_id(), mode(), and ub_id().
|
protected |
Default constructor.
Definition at line 29 of file poset_bounds_descriptor.cc.
References sheaf::invalid_pod_index(), invariant(), sheaf::is_valid(), lb_id(), mode(), and ub_id().
Referenced by clone(), int_to_mode(), poset_bounds_descriptor(), and ub_member_is_not_top().
|
virtual |
Virtual constructor; makes a new instance of the same type as this.
Reimplemented from sheaf::any.
Definition at line 115 of file poset_bounds_descriptor.cc.
References sheaf::any::is_same_type(), poset_bounds_descriptor(), and ~poset_bounds_descriptor().
Referenced by operator==().
|
static |
Converts int xmode to a mode.
Definition at line 251 of file poset_bounds_descriptor.cc.
References poset_bounds_descriptor().
Referenced by mode_to_int(), and sheaf::dof_tuple_col_bounds_record::transfer_internal_buffer_to_poset().
|
virtual |
Class invariant.
Reimplemented from sheaf::any.
Definition at line 153 of file poset_bounds_descriptor.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::any::invariant(), sheaf::any::invariant_check(), and is_ancestor_of().
Referenced by operator=(), operator==(), poset_bounds_descriptor(), and ~poset_bounds_descriptor().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::any.
Definition at line 188 of file poset_bounds_descriptor.cc.
References mode_to_int().
Referenced by invariant().
bool sheaf::poset_bounds_descriptor::is_valid_for | ( | const poset_state_handle & | xposet | ) | const |
True if the members and/or subposets mentioned in this descriptor exist in xposet.
Definition at line 559 of file poset_bounds_descriptor.cc.
References lb_is_valid_for(), lb_member_is_bottom(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and ub_is_valid_for().
Referenced by ub_is_valid_for().
sheaf::pod_index_type sheaf::poset_bounds_descriptor::lb_id | ( | ) | const |
The index of the lower bound.
Definition at line 402 of file poset_bounds_descriptor.cc.
References put_lb_id().
Referenced by sheaf::member_member_poset_bounds::descriptor(), sheaf::poset_bounds::lb_id(), lb_is_valid_for(), lb_member_is_bottom(), poset_bounds_descriptor(), put_lb_id(), sheaf::dof_tuple_col_bounds_record::transfer_poset_to_internal_buffer(), sheaf::poset_scaffold::translate_dof_tuple_col_bounds(), and ub_is_member().
bool sheaf::poset_bounds_descriptor::lb_is_member | ( | ) | const |
True if mode == MEMBER_MEMBER or MEMBER_SUBPOSET.
Definition at line 356 of file poset_bounds_descriptor.cc.
References mode(), and ub_is_member().
Referenced by lb_is_valid_for(), lb_member_is_bottom(), mode(), sheaf::dof_tuple_col_bounds_record::transfer_poset_to_internal_buffer(), and sheaf::poset_scaffold::translate_dof_tuple_col_bounds().
bool sheaf::poset_bounds_descriptor::lb_is_valid_for | ( | const poset_state_handle & | xposet | ) | const |
True if the lower bound member or subposet mentioned in this descriptor exists in xposet.
Definition at line 492 of file poset_bounds_descriptor.cc.
References sheaf::poset_state_handle::contains_member(), sheaf::poset_state_handle::includes_subposet(), lb_id(), lb_is_member(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and ub_is_valid_for().
Referenced by sheaf::poset_state_handle::bound_contains_member(), is_valid_for(), and put_ub_id().
bool sheaf::poset_bounds_descriptor::lb_member_is_bottom | ( | ) | const |
True if lb_is_member() and lb_id() is sheaf_constants::BOTTOM_INDEX.
Definition at line 585 of file poset_bounds_descriptor.cc.
References lb_id(), lb_is_member(), and ub_member_is_not_top().
Referenced by is_valid_for().
sheaf::poset_bounds_descriptor::specification_mode sheaf::poset_bounds_descriptor::mode | ( | ) | const |
Specification mode for this.
Definition at line 334 of file poset_bounds_descriptor.cc.
References lb_is_member().
Referenced by sheaf::member_member_poset_bounds::descriptor(), lb_is_member(), sheaf::poset_bounds::mode(), sheaf::poset_bounds::poset_bounds(), poset_bounds_descriptor(), sheaf::dof_tuple_col_bounds_record::transfer_poset_to_internal_buffer(), sheaf::poset_scaffold::translate_dof_tuple_col_bounds(), and ub_is_member().
|
static |
Converts mode xmode to an int.
Definition at line 211 of file poset_bounds_descriptor.cc.
References int_to_mode().
Referenced by is_ancestor_of(), and sheaf::dof_tuple_col_bounds_record::transfer_poset_to_internal_buffer().
sheaf::poset_bounds_descriptor & sheaf::poset_bounds_descriptor::operator= | ( | const poset_bounds_descriptor & | xother | ) |
Assignment operator.
Definition at line 68 of file poset_bounds_descriptor.cc.
References invariant(), and operator==().
Referenced by poset_bounds_descriptor().
bool sheaf::poset_bounds_descriptor::operator== | ( | const poset_bounds_descriptor & | xother | ) | const |
Comparison operator.
Definition at line 91 of file poset_bounds_descriptor.cc.
References clone(), and invariant().
Referenced by operator=().
void sheaf::poset_bounds_descriptor::put_lb_id | ( | pod_index_type | xlb_id | ) |
Sets the index of the lower bound to xlb_id.
Definition at line 409 of file poset_bounds_descriptor.cc.
References lb_id().
Referenced by lb_id(), sheaf::poset_bounds::put_lb_id(), sheaf::dof_tuple_col_bounds_record::transfer_poset_to_internal_buffer(), and sheaf::poset_scaffold::translate_dof_tuple_col_bounds().
void sheaf::poset_bounds_descriptor::put_lb_id | ( | const scoped_index & | xlb_id | ) |
Sets the index of the lower bound to xlb_id.
Definition at line 428 of file poset_bounds_descriptor.cc.
References sheaf::scoped_index::hub_pod(), lb_id(), and ub_id().
void sheaf::poset_bounds_descriptor::put_ub_id | ( | pod_index_type | xub_id | ) |
Sets the index of the upper bound to xub_id.
Definition at line 454 of file poset_bounds_descriptor.cc.
References ub_id().
Referenced by sheaf::poset_bounds::put_ub_id(), sheaf::dof_tuple_col_bounds_record::transfer_poset_to_internal_buffer(), sheaf::poset_scaffold::translate_dof_tuple_col_bounds(), and ub_id().
void sheaf::poset_bounds_descriptor::put_ub_id | ( | const scoped_index & | xub_id | ) |
Sets the index of the upper bound to xub_id.
Definition at line 473 of file poset_bounds_descriptor.cc.
References sheaf::scoped_index::hub_pod(), lb_is_valid_for(), and ub_id().
sheaf::pod_index_type sheaf::poset_bounds_descriptor::ub_id | ( | ) | const |
The index of the upper bound member, if the upper bound contains a single member.
Definition at line 447 of file poset_bounds_descriptor.cc.
References put_ub_id().
Referenced by sheaf::storage_agent::begin_write_transaction(), sheaf::member_member_poset_bounds::descriptor(), poset_bounds_descriptor(), put_lb_id(), put_ub_id(), sheaf::dof_tuple_col_bounds_record::transfer_poset_to_internal_buffer(), sheaf::poset_scaffold::translate_dof_tuple_col_bounds(), sheaf::poset_bounds::ub_id(), ub_is_valid_for(), ub_member_is_not_top(), and sheaf::storage_agent::write().
bool sheaf::poset_bounds_descriptor::ub_is_member | ( | ) | const |
True if mode == MEMBER_MEMBER or SUBPOSET_MEMBER.
Definition at line 379 of file poset_bounds_descriptor.cc.
References lb_id(), and mode().
Referenced by lb_is_member(), sheaf::dof_tuple_col_bounds_record::transfer_poset_to_internal_buffer(), sheaf::poset_scaffold::translate_dof_tuple_col_bounds(), ub_is_valid_for(), and ub_member_is_not_top().
bool sheaf::poset_bounds_descriptor::ub_is_valid_for | ( | const poset_state_handle & | xposet | ) | const |
True if the upper bound member or subposet mentioned in this descriptor exists in xposet.
Definition at line 530 of file poset_bounds_descriptor.cc.
References sheaf::poset_state_handle::contains_member(), sheaf::poset_state_handle::includes_subposet(), is_valid_for(), sheaf::read_write_monitor_handle::state_is_read_accessible(), ub_id(), and ub_is_member().
Referenced by sheaf::poset_state_handle::bound_contains_member(), is_valid_for(), and lb_is_valid_for().
bool sheaf::poset_bounds_descriptor::ub_member_is_not_top | ( | ) | const |
True if ub_is_member() and ub_id() is not sheaf_constants::TOP_INDEX.
Definition at line 609 of file poset_bounds_descriptor.cc.
References BOTTOM_BOTTOM, BOTTOM_TOP, poset_bounds_descriptor(), ub_id(), and ub_is_member().
Referenced by sheaf::storage_agent::begin_write_transaction(), lb_member_is_bottom(), and sheaf::storage_agent::write().
|
static |
An instance with lb() == {bottom} and ub() == {bottom}.
Definition at line 213 of file poset_bounds_descriptor.h.
Referenced by ub_member_is_not_top().
|
static |
An instance with lb() == {bottom} and ub() == {top}.
Definition at line 208 of file poset_bounds_descriptor.h.
Referenced by sheaf::poset_scaffold::poset_scaffold(), sheaf::storage_agent::transaction::transaction(), and ub_member_is_not_top().