SheafSystem  0.0.0.0
sheaf::member_member_poset_bounds Class Reference

A poset bounds pair with lower and upper bounds each specified by a single member. More...

#include <member_member_poset_bounds.h>

Inheritance diagram for sheaf::member_member_poset_bounds:
sheaf::poset_bounds sheaf::any

Public Member Functions

 member_member_poset_bounds ()
 Default constructor; private to prevent default construction. More...
 
 member_member_poset_bounds (const member_member_poset_bounds &xother)
 Copy constructor. More...
 
virtual member_member_poset_boundsclone () const
 Virtual constructor; makes a new instance of the same type as this. More...
 
virtual ~member_member_poset_bounds ()
 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...
 
virtual bool lb_contains_member (const scoped_index &xindex)
 True if the lower bound contains the member with index xindex. More...
 
virtual index_iterator lb_iterator ()
 An iterator for the members of the lower bound. More...
 
virtual bool ub_contains_member (const scoped_index &xindex)
 True if the upper bound contains the member with index xindex. More...
 
virtual index_iterator ub_iterator ()
 An iterator for the members of the upper bound. More...
 
bool is_attached ()
 True if lb() and ub() are attached. More...
 
virtual void attach_to_state (poset_state_handle *xhost)
 Attaches the lower and upper bounds. More...
 
virtual void detach_from_state ()
 Detaches the lower and upper bounds. More...
 
virtual poset_bounds_descriptor descriptor ()
 A descriptor for this. More...
 
 member_member_poset_bounds (int xlb_id, int xub_id)
 Constructs bounds with lower bound the singleton subposet specified by the member with index xlb_id and upper bound the singleton subposet specified by the member with index xub_id. More...
 
- Public Member Functions inherited from sheaf::poset_bounds
 poset_bounds ()
 Default constructor. More...
 
 poset_bounds (const poset_bounds &xother)
 Copy constructor. More...
 
 poset_bounds (const poset_bounds_descriptor &xdesc)
 Creates an instance to math descriptor xdesc. More...
 
virtual ~poset_bounds ()
 Destructor. More...
 
virtual poset_bounds_descriptor descriptor () const
 A descriptor for this. More...
 
poset_bounds_descriptor::specification_mode mode () const
 The specification mode. More...
 
pod_index_type lb_id () const
 The index of the lower bound member, if the lower bound contains a single member. More...
 
void put_lb_id (pod_index_type xlb_id)
 Sets the index of the lower bound member to xlb_ib, if the lower bound contains a single member. More...
 
void put_lb_id (const scoped_index &xlb_id)
 Sets the index of the lower bound member to xlb_ib, if the lower bound contains a single member. More...
 
bool lb_is_singleton () const
 True if the lower bound contains a single member. More...
 
bool bounded_below () const
 True if the lower bound is not the bottom. 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 member to xub_ib, if the upper bound contains a single member. More...
 
void put_ub_id (const scoped_index &xub_id)
 Sets the index of the upper bound member to xub_ib, if the upper bound contains a single member. More...
 
bool ub_is_singleton () const
 True if the upper bound contains a single member. More...
 
bool ub_is_decomposition () const
 True if the join of the members of the upper bound is equal to the external schema. More...
 
bool bounded_above () const
 True if the upper bound is not the top. 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...
 

Additional Inherited Members

- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 
- Protected Attributes inherited from sheaf::poset_bounds
poset_bounds_descriptor _descriptor
 A descriptor for this. More...
 
zn_to_bool_lb
 The lower bound. More...
 
bool _lb_is_singleton
 True if the lower bound contains a single member. More...
 
bool _bounded_below
 True if the lower bound is not the bottom. More...
 
zn_to_bool_ub
 The upper bound. More...
 
bool _ub_is_singleton
 True if the upper bound contains a single member. More...
 
bool _bounded_above
 True if the upper bound is not the top. More...
 

Detailed Description

A poset bounds pair with lower and upper bounds each specified by a single member.

Definition at line 35 of file member_member_poset_bounds.h.

Constructor & Destructor Documentation

◆ member_member_poset_bounds() [1/3]

sheaf::member_member_poset_bounds::member_member_poset_bounds ( )

Default constructor; private to prevent default construction.

Postcondition
  • !is_attached()

Definition at line 34 of file member_member_poset_bounds.cc.

References sheaf::poset_bounds::_bounded_above, sheaf::poset_bounds::_bounded_below, sheaf::poset_bounds::_lb_is_singleton, sheaf::poset_bounds::_ub_is_singleton, invariant(), and is_attached().

Referenced by clone(), and descriptor().

◆ member_member_poset_bounds() [2/3]

sheaf::member_member_poset_bounds::member_member_poset_bounds ( const member_member_poset_bounds xother)

Copy constructor.

Postcondition

Definition at line 62 of file member_member_poset_bounds.cc.

References clone(), and invariant().

◆ ~member_member_poset_bounds()

sheaf::member_member_poset_bounds::~member_member_poset_bounds ( )
virtual

Destructor.

Definition at line 108 of file member_member_poset_bounds.cc.

References detach_from_state(), and invariant().

Referenced by clone().

◆ member_member_poset_bounds() [3/3]

sheaf::member_member_poset_bounds::member_member_poset_bounds ( int  xlb_id,
int  xub_id 
)

Constructs bounds with lower bound the singleton subposet specified by the member with index xlb_id and upper bound the singleton subposet specified by the member with index xub_id.

Postcondition
  • !is_attached()

Definition at line 382 of file member_member_poset_bounds.cc.

References sheaf::poset_bounds::_bounded_above, sheaf::poset_bounds::_bounded_below, sheaf::poset_bounds::_lb_is_singleton, sheaf::poset_bounds::_ub_is_singleton, invariant(), and is_attached().

Member Function Documentation

◆ attach_to_state()

void sheaf::member_member_poset_bounds::attach_to_state ( poset_state_handle xhost)
virtual

Attaches the lower and upper bounds.

Precondition
  • !is_attached()
  • xhost != 0
  • xhost->state_is_read_accessible()
  • xhost->contains_member(lb_id())
  • xhost->contains_member(ub_id())
Issue:
using zn_to_bool here wastes space.
Postcondition

Definition at line 294 of file member_member_poset_bounds.cc.

References sheaf::poset_state_handle::contains_member(), detach_from_state(), invariant(), is_attached(), sheaf::poset_bounds::lb_id(), sheaf::zn_to_bool::put(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_bounds::ub_id().

Referenced by is_attached().

◆ clone()

sheaf::member_member_poset_bounds * sheaf::member_member_poset_bounds::clone ( ) const
virtual

Virtual constructor; makes a new instance of the same type as this.

Postcondition
  • result != 0
  • is_same_type(result)
Todo:
make following executable when is_attached() const.
Postcondition
  • -unexecutable( "result->is_attached() == is_attached()" )

Reimplemented from sheaf::poset_bounds.

Definition at line 84 of file member_member_poset_bounds.cc.

References sheaf::any::is_same_type(), member_member_poset_bounds(), and ~member_member_poset_bounds().

Referenced by member_member_poset_bounds().

◆ descriptor()

sheaf::poset_bounds_descriptor sheaf::member_member_poset_bounds::descriptor ( )
virtual

A descriptor for this.

Postcondition
  • result.mode() == poset_bounds_descriptor::MEMBER_MEMBER

Definition at line 358 of file member_member_poset_bounds.cc.

References sheaf::poset_bounds::lb_id(), sheaf::poset_bounds_descriptor::lb_id(), member_member_poset_bounds(), sheaf::poset_bounds_descriptor::mode(), sheaf::poset_bounds::ub_id(), and sheaf::poset_bounds_descriptor::ub_id().

Referenced by detach_from_state().

◆ detach_from_state()

void sheaf::member_member_poset_bounds::detach_from_state ( )
virtual

Detaches the lower and upper bounds.

Postcondition
  • !is_attached()

Definition at line 327 of file member_member_poset_bounds.cc.

References descriptor(), invariant(), and is_attached().

Referenced by attach_to_state(), and ~member_member_poset_bounds().

◆ invariant()

◆ is_ancestor_of()

bool sheaf::member_member_poset_bounds::is_ancestor_of ( const any other) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::poset_bounds.

Definition at line 165 of file member_member_poset_bounds.cc.

References lb_contains_member().

Referenced by invariant().

◆ is_attached()

bool sheaf::member_member_poset_bounds::is_attached ( )

◆ lb_contains_member()

bool sheaf::member_member_poset_bounds::lb_contains_member ( const scoped_index xindex)
virtual

True if the lower bound contains the member with index xindex.

Precondition

Definition at line 189 of file member_member_poset_bounds.cc.

References is_attached(), sheaf::poset_bounds::lb_id(), and lb_iterator().

Referenced by is_ancestor_of().

◆ lb_iterator()

sheaf::index_iterator sheaf::member_member_poset_bounds::lb_iterator ( )
virtual

An iterator for the members of the lower bound.

Precondition

Definition at line 211 of file member_member_poset_bounds.cc.

References is_attached(), and ub_contains_member().

Referenced by lb_contains_member().

◆ ub_contains_member()

bool sheaf::member_member_poset_bounds::ub_contains_member ( const scoped_index xindex)
virtual

True if the upper bound contains the member with index xindex.

Precondition

Definition at line 231 of file member_member_poset_bounds.cc.

References is_attached(), sheaf::poset_bounds::ub_id(), and ub_iterator().

Referenced by lb_iterator().

◆ ub_iterator()

sheaf::index_iterator sheaf::member_member_poset_bounds::ub_iterator ( )
virtual

An iterator for the members of the upper bound.

Precondition

Definition at line 254 of file member_member_poset_bounds.cc.

References is_attached().

Referenced by ub_contains_member().


The documentation for this class was generated from the following files: