21 #include "SheafSystem/namespace_poset_member.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/namespace_poset.h" 25 #include "SheafSystem/postorder_iterator.h" 26 #include "SheafSystem/tern.h" 58 new_jem_state(const_cast<namespace_poset_member*>(&xother),
true,
true);
131 const tern& xnew_jem,
165 ensure(
host() == xhost);
166 ensure(
index() == xhub_id);
185 ensure(
host() == xhost);
186 ensure(
index() ==~ xid);
197 require(!xname.empty());
207 ensure(
host() == xhost);
208 ensure(
name() == xname);
502 require(xrequire_write_access ?
527 require(xrequire_write_access ?
554 require(xdof_map != 0);
592 ensure( (
_host != 0) == (result != 0) );
613 ensure(result == (dynamic_cast<const namespace_poset*>(xother) != 0));
virtual bool invariant() const
Class invariant.
const char * poset_class() const
The class of the poset associated with this namespace member.
virtual bool is_jim(bool xin_current_version=true) const
True if this member is join irreducible in the current version of the host (xin_current_version == tr...
virtual bool invariant() const
Class invariant.
virtual void new_jim_state(poset_dof_map *xdof_map=0, bool xcopy_dof_map=false, bool xauto_access=true)
Creates a new jim (join-irreducible member) state in host() and attaches this to it. If xdof_map == 0 a new dof map is created. If xdof_map != 0 and xcopy_dof_map == false, xdof_map is used as the dof map. If xdof_map != 0 and xcopy_dof_map is true, a copy of xdof_map is used.
const scoped_index & index() const
The member index of this poset within the namespace host()
The default name space; a poset which contains other posets as members.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
poset_type
Identifiers for poset types.
poset_type poset_type_id() const
The type id of the poset associated with this namespace member.
poset_state_handle * _host
The host poset for this component.
A client handle for a general, abstract partially order set.
A three state "bool". Does not provide the operations of ternary logic and is intended for use mostly...
void put_poset_type_id(poset_type xtype_id)
Set the type id of the poset associated with this namespace member to xtype_id.
bool is_same_state(const poset_state_handle *xhost, pod_index_type xhub_id) const
True is this is attached to state with hub id xhub_id in host xhost.
poset_state_handle * poset_pointer() const
The pointer to the poset associated with this namespace member.
virtual namespace_poset_dof_map & dof_map(bool xrequire_write_access=false)
The map from client_ids to dof values for this poset member (mutable version)
const scoped_index & index() const
The index of the component state this handle is attached to.
virtual ~namespace_poset_member()
Destructor; deletes a poset member and its attached state, if any.
std::string name() const
A name for this.
The general, abstract map from dof ids to dof values.
int poset_prereq_id(int xi) const
The id of the xi-th prerequisite poset for the poset associated with this namespace member...
void put_poset_class(const char *xclass)
Set the class of the poset associated with this namespace member to xclass.
A client handle for a member of a namespace poset.
virtual poset_type type_id() const
Identifier for the type of this poset.
void put_poset_class(const char *xclass)
Set the class of the poset associated with this namespace member to xclass.
Abstract base class with useful features for all objects.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
void put_poset_pointer(const poset_state_handle *xposet)
Set the pointer to the poset associated with this namespace member to xposet.
pod_index_type poset_prereq_id(int xi) const
The id of the xi-th prerequisite poset for the poset associated with this namespace member...
const char * poset_class() const
The class of the poset associated with this namespace member.
bool is_external() const
True if this has a corresponding member in a name space, but is not yet attached to a state...
bool state_is_read_write_accessible() const
True if this is attached and if the state is accessible for read and write or access control is disab...
void put_poset_prereq_id(int xi, int xid)
Set the id of the xi-th prerequisite poset for the poset associated with this namespace member...
An index within the external ("client") scope of a given id space.
virtual bool is_attached() const
True if this handle is attached to a non-void state.
poset_state_handle * poset_pointer() const
The pointer to the poset associated with this namespace member.
virtual bool host_is_ancestor_of(const poset_state_handle *xther) const
True if xother conforms to host.
namespace_poset_member()
Default constructor; creates a new, unattached namespace_poset_member handle.
virtual const char * class_name() const
The name of this class.
void put_poset(const poset_state_handle &xposet)
Sets the poset_pointer, poset_type_id, and poset_class to the corresponding values of xposet...
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
void put_poset_type_id(poset_type xtype_id)
Set the type id of the poset associated with this namespace member to xtype_id.
virtual namespace_poset_member * clone() const
Make a new handle, no state instance of current.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual pod_index_type prereq_id(int xi) const
The id of the xi-th prerequisite poset for this.
namespace_poset * name_space() const
The namespace this poset resides in.
virtual bool is_attached() const
True if this is attached to a state.
virtual bool dof_map_is_ancestor_of(const poset_dof_map *xdof_map) const
True if xdof_map conforms to (is derived from) the type of dof map required by this handle...
void put_poset_prereq_id(int xi, pod_index_type xid)
Sets the xi-th poset_prereq_ids to xid.
bool invariant_check() const
True if invariant checking is enabled.
poset_type poset_type_id() const
The type id of the poset associated with this namespace member.
int_type pod_index_type
The plain old data index type.
namespace_poset * host() const
The name space poset this is a member of.
void attach_to_state(const namespace_poset *xns, const poset_path &xpath, bool xauto_access=true)
Attach to the state specified by path xpath in the namespace xns.
A map from schema poset member ids to dof values for namespace_poset members.
An abstract client handle for a member of a poset.
virtual poset_dof_map & dof_map(bool xrequire_write_access=false)
The map from schema member ids or client ids to dof values for this poset member (mutable version) ...
virtual namespace_poset_member & operator=(const abstract_poset_member &xother)
Assignment operator; attaches this to the same state as xother.
virtual void new_jem_state(abstract_poset_member *xother, bool xgreatest, bool xauto_access)
Creates a new jrm state in host() which is the greatest jem (xgreatest true) or least jem (xgreatest ...
void enable_invariant_check() const
Enable invariant checking.
void put_poset_pointer(const poset_state_handle *xposet)
Set the pointer to the poset associated with this namespace member to xposet.
bool poset_is_external() const
True if the poset associated with this member is external.
virtual void new_jrm_state(bool xauto_access=true)
Creates a new jrm (join-reducible member) state in host() and attaches this to it.
const int PREREQ_IDS_UB
Number of prerequisites ids. Must be consistent with PREREQ_ID_*_INDEX below.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.