21 #include "SheafSystem/partial_poset_member.h" 22 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/array_poset_dof_map.h" 25 #include "SheafSystem/namespace_poset.h" 26 #include "SheafSystem/pool.h" 27 #include "SheafSystem/poset.h" 28 #include "SheafSystem/poset_crg_state.h" 29 #include "SheafSystem/poset_dof_map.h" 30 #include "SheafSystem/poset_joiner.h" 31 #include "SheafSystem/poset_slicer.h" 32 #include "SheafSystem/poset_state.h" 33 #include "SheafSystem/poset_state_handle.h" 34 #include "SheafSystem/postorder_iterator.h" 35 #include "SheafSystem/primitives_poset.h" 36 #include "SheafSystem/primitives_poset_schema.h" 37 #include "SheafSystem/subposet.h" 38 #include "SheafSystem/subposet_member_iterator.h" 39 #include "SheafSystem/subposet_state.h" 40 #include "SheafSystem/zn_to_bool.h" 75 new_jem_state(const_cast<abstract_poset_member*>(&xother),
true,
true);
100 ensure(
is_same_state(&(const_cast<abstract_poset_member&>(xother))));
176 const tern& xnew_jem,
187 new_jrm_state(xhost, xexpansion, xexpansion_ct, xnew_jem, xauto_access);
212 ensure(
host() == xhost);
213 ensure(
index() == xhub_id);
233 ensure(
host() == xhost);
234 ensure(
index() ==~ xid);
247 require(!xname.empty());
257 ensure(
host() == xhost);
258 ensure(
name() == xname);
293 require(xschema != 0);
447 require(xschema != 0);
474 require(xother != 0);
poset_state_handle * host() const
The poset which this is a handle to a component of.
virtual bool is_restricted() const
True if handle is a restriction of the state, that is, if schema() is not the same as host()->schema(...
pod_index_type dof_tuple_id(bool xauto_access) const
The dof tuple index of this member.
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.
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...
virtual int dof_ct() const
The number of dofs in restricted schema of this poset member.
virtual partial_poset_member * clone() const
Make a new handle, no state instance of current.
A three state "bool". Does not provide the operations of ternary logic and is intended for use mostly...
A client handle for a general, abstract partially order set.
virtual schema_poset_member & schema()
The restricted schema for this poset member (mutable version).
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
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.
A client handle for a possibly restricted member of a poset. A partial_poset_member is a poset_me...
const scoped_index & index() const
The index of the component state this handle is attached to.
std::string name() const
A name for this.
The general, abstract map from dof ids to dof values.
schema_poset_member * clone(bool xnew_state, bool xauto_access=true) const
Make a new handle instance of current. Attach the new instance to a new state if xnew_state is true...
virtual void restrict_to(const abstract_poset_member *xschema)
Restricts this handle to the down set of xschema.
virtual bool invariant() const
Class invariant.
Abstract base class with useful features for all objects.
virtual schema_poset_member & unrestricted_schema()
The unrestricted schema for this poset member (mutable version).
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
bool has_same_host(const poset_component *xother) const
True if xother is attached to the same host as this or if both are unattached.
virtual void init_handle_data_members()
Initializes handle data members when attaching to a different member in a different host; intended to...
virtual void detach_from_state()
Detach this handle from its state, if any.
virtual partial_poset_member & operator=(const abstract_poset_member &xother)
Assignment operator; attaches this to the same state as xother.
bool leqv(pod_index_type xother_index) const
True if this is less than or equivalent to the member with index xother_index.
virtual void detach_from_state()
Detach this handle from its state, if any.
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.
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. ...
bool le(pod_index_type xother_index) const
True if this is less than or equal to the member with index xother_index.
static int row_dof_ct(const namespace_poset &xns, const poset_path &xpath, bool xauto_access=true)
The number of row dofs defined by the schema specified by xns and xpath. Synonym for dof_ct(xns...
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual schema_poset_member & schema()
The schema for this poset member (mutable version).
schema_poset_member * _schema
The restricted schema of this member.
virtual void detach_from_state()
Detach this handle from its state, if any.
bool invariant_check() const
True if invariant checking is enabled.
virtual void restrict_to_same(const abstract_poset_member *xother)
Restricts this handle to the same restriction as xother.
virtual bool invariant() const
Class invariant.
virtual void attach_handle_data_members()
Initializes _schema; intended to be redefined in derived classes to initialize derived data members...
int_type pod_index_type
The plain old data index type.
partial_poset_member()
Default constructor; creates a new, unattached partial_poset_member handle.
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.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
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 ~partial_poset_member()
Destructor; deletes a poset member and its attached state, if any.
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 ...
virtual void unrestrict()
Removes any restriction; schema to the schema of host.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
virtual bool is_same_restriction(const abstract_poset_member *xother) const
True if this is the same restriction as xother, that is, if schema().is_same_state(xother.schema()).
void enable_invariant_check() const
Enable invariant checking.
A client handle for a poset member which has been prepared for use as a schema.
virtual void new_jrm_state(bool xauto_access=true)
Creates a new jrm (join-reducible member) state in host() and attaches this to it.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.