SheafSystem  0.0.0.0
sheaf::poset_state Class Reference

The private state of a partially ordered set. More...

#include <poset_state.h>

Inheritance diagram for sheaf::poset_state:
sheaf::read_write_monitor sheaf::any

Friends

SHEAF_DLL_SPEC size_t deep_size (const poset_state &xp, bool xinclude_shallow, size_t xresults[4])
 The deep size of the referenced object of type poset_state. if xinclude_shallow, add the sizeof xp to the result. if xresults is not null, the deep size of the poset_state parts returned; xresults[0] is the deep_size of poset_crg_state, xresults[1] is the deep_size of poset_powerset_state, xresults[2] is the deep_size of poset_table_state. More...
 

POSET_STATE FACET

std::string _name
 The name of this poset. More...
 
poset_type _type_id
 Identifier for the type of poset. More...
 
poset_crg_state_crg
 The cover relation graph for this poset. More...
 
poset_powerset_state_powerset
 The set of subposets for this poset . More...
 
poset_table_state_table
 The table of dof tuples for this poset. More...
 
 poset_state (const abstract_poset_member *xschema, poset_type xtype_id, const std::string &xname)
 Constructor. More...
 
 ~poset_state ()
 Destructor. More...
 
const std::string & name () const
 The name of this poset. More...
 
void put_name (const std::string &xname)
 Sets name() to xname. More...
 
poset_type type_id () const
 Identifier for the type of this poset. More...
 
poset_crg_statecrg ()
 /// The name of the type of poset. More...
 
poset_powerset_statepowerset ()
 Set of subposets (powerset) More...
 
poset_table_statetable () const
 Table (dof tuples). More...
 
 poset_state ()
 Default constructor; private to disable default construction. More...
 

ANY FACET

virtual bool is_ancestor_of (const any *other) const
 True if other conforms to current. More...
 
virtual poset_stateclone () const
 Make a new instance of the same type as this. More...
 
virtual bool invariant () const
 Class invariant. More...
 

Additional Inherited Members

- Public Member Functions inherited from sheaf::read_write_monitor
bool is_read_accessible () const
 True if this thread has read-only or read-write access. More...
 
bool is_not_read_accessible () const
 True if this thread has neither read-only or read-write access or if access control is disabled. More...
 
bool is_read_write_accessible () const
 True if this thread has read-write access or if access control is not enabled. More...
 
bool is_not_read_write_accessible () const
 True if this thread does not have read-write access or if access control is not enabled. More...
 
bool is_read_only_accessible () const
 True if this thread has read-only access. More...
 
bool is_not_read_only_accessible () const
 True if this thread does not have read-only access. More...
 
int access_request_depth () const
 Number of times access has been granted without a corresponding release. More...
 
void get_read_access () const
 Get read access to the state associated with this. More...
 
void get_read_write_access (bool xrelease_read_only_access=false)
 Get read write access to the state associated with this. If release_read_only_access is requested, read only access will be released then read_write_access will be requested, finally the same level of read_access as before will be requested. More...
 
void release_access (bool xall=false) const
 Release access. If xall is true, release all levels of access. Otherwise, release one level of access. More...
 
bool is_mode_locked () const
 
int mode_lock_ct () const
 
void get_mode_lock ()
 
void release_mode_lock ()
 
 read_write_monitor ()
 Default Constructor. More...
 
virtual ~read_write_monitor ()
 Destructor. More...
 
bool is_modified () const
 True if any client has had read-write access to this object since the last call to clear_is_modified();. More...
 
void clear_is_modified ()
 Makes is_modified() false. 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 inherited from sheaf::read_write_monitor
static bool access_control_disabled ()
 True if access control mechanism is disabled. Default value is enabled (false) and access is controlled by the per-thread access control functions. Disabled (true) is equivalent to having read-write access at all times, irrespective of any access control requests. More...
 
static void enable_access_control ()
 Enables access control. Should only be invoked once at beginning of a program, before any other SheafSystem calls. Once enabled, access control can not be disabled. More...
 
- Protected Member Functions inherited from sheaf::read_write_monitor
bool access_guards_disabled () const
 True if access guards disabled. More...
 
void disable_access_guards ()
 Disables access gaurds; intended for use only within constructors of monitored objects, where no other client can possibly have access (yet). More...
 
void enable_access_guards ()
 Re-enables access guards. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Detailed Description

The private state of a partially ordered set.

Definition at line 49 of file poset_state.h.

Constructor & Destructor Documentation

◆ poset_state() [1/2]

sheaf::poset_state::poset_state ( const abstract_poset_member xschema,
poset_type  xtype_id,
const std::string &  xname 
)

Constructor.

Precondition
  • xschema != 0 ? xschema->is_attached() : true
Postcondition
  • !crg()->jim_edit_mode()
  • xschema != 0 ? table()->schema().is_same_state(xschema) : true

Definition at line 36 of file poset_state.cc.

References _crg, _name, _powerset, _table, _type_id, crg(), sheaf::any::disable_invariant_check(), sheaf::poset_crg_state::end(), sheaf::poset_component::is_attached(), powerset(), table(), and ~poset_state().

◆ ~poset_state()

sheaf::poset_state::~poset_state ( )

Destructor.

Definition at line 141 of file poset_state.cc.

References _crg, _powerset, _table, and name().

Referenced by poset_state().

◆ poset_state() [2/2]

sheaf::poset_state::poset_state ( )
inlineprotected

Default constructor; private to disable default construction.

Definition at line 121 of file poset_state.h.

Member Function Documentation

◆ clone()

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

Make a new instance of the same type as this.

Todo:
implement poset_state::clone

Not Implemented.

Postcondition
  • result != 0

Reimplemented from sheaf::read_write_monitor.

Definition at line 311 of file poset_state.cc.

References invariant().

Referenced by is_ancestor_of().

◆ crg()

sheaf::poset_crg_state * sheaf::poset_state::crg ( )

/// The name of the type of poset.

Cover relation graph

Postcondition
  • result != 0

Definition at line 218 of file poset_state.cc.

References _crg, and powerset().

Referenced by fiber_bundle::section_space_schema_poset::initialize_standard_members(), poset_state(), and type_id().

◆ invariant()

◆ is_ancestor_of()

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

True if other conforms to current.

Reimplemented from sheaf::read_write_monitor.

Definition at line 292 of file poset_state.cc.

References clone().

Referenced by table().

◆ name()

const std::string & sheaf::poset_state::name ( ) const

The name of this poset.

Definition at line 168 of file poset_state.cc.

References _name, and put_name().

Referenced by put_name(), and ~poset_state().

◆ powerset()

sheaf::poset_powerset_state * sheaf::poset_state::powerset ( )

Set of subposets (powerset)

Postcondition
  • result != 0

Definition at line 239 of file poset_state.cc.

References _powerset, and table().

Referenced by crg(), and poset_state().

◆ put_name()

void sheaf::poset_state::put_name ( const std::string &  xname)

Sets name() to xname.

Precondition
  • poset_path::is_valid_name(xname)
Postcondition

Definition at line 175 of file poset_state.cc.

References _name, sheaf::poset_path::is_valid_name(), name(), and type_id().

Referenced by name(), and sheaf::namespace_poset::put_name().

◆ table()

◆ type_id()

sheaf::poset_type sheaf::poset_state::type_id ( ) const

Identifier for the type of this poset.

Definition at line 199 of file poset_state.cc.

References _type_id, and crg().

Referenced by put_name().

Friends And Related Function Documentation

◆ deep_size

SHEAF_DLL_SPEC size_t deep_size ( const poset_state xp,
bool  xinclude_shallow,
size_t  xresults[4] 
)
friend

The deep size of the referenced object of type poset_state. if xinclude_shallow, add the sizeof xp to the result. if xresults is not null, the deep size of the poset_state parts returned; xresults[0] is the deep_size of poset_crg_state, xresults[1] is the deep_size of poset_powerset_state, xresults[2] is the deep_size of poset_table_state.

Referenced by sheaf::deep_size().

Member Data Documentation

◆ _crg

poset_crg_state* sheaf::poset_state::_crg
protected

The cover relation graph for this poset.

Definition at line 136 of file poset_state.h.

Referenced by crg(), invariant(), poset_state(), and ~poset_state().

◆ _name

std::string sheaf::poset_state::_name
protected

The name of this poset.

Definition at line 121 of file poset_state.h.

Referenced by name(), poset_state(), and put_name().

◆ _powerset

poset_powerset_state* sheaf::poset_state::_powerset
protected

The set of subposets for this poset .

Definition at line 141 of file poset_state.h.

Referenced by invariant(), poset_state(), powerset(), and ~poset_state().

◆ _table

poset_table_state* sheaf::poset_state::_table
protected

The table of dof tuples for this poset.

Definition at line 146 of file poset_state.h.

Referenced by invariant(), poset_state(), table(), and ~poset_state().

◆ _type_id

poset_type sheaf::poset_state::_type_id
protected

Identifier for the type of poset.

Definition at line 131 of file poset_state.h.

Referenced by poset_state(), and type_id().


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