21 #include "SheafSystem/abstract_poset_member.h" 22 #include "SheafSystem/array_poset_dof_map.h" 24 #include "SheafSystem/namespace_poset.impl.h" 25 #include "SheafSystem/poset.h" 26 #include "SheafSystem/poset_handle_factory.h" 27 #include "SheafSystem/poset_member_iterator.h" 28 #include "SheafSystem/poset_state.h" 29 #include "SheafSystem/poset_type.h" 30 #include "SheafSystem/schema_poset_member.h" 31 #include "SheafSystem/subposet.h" 50 require(!xpath.
empty());
53 require(xschema_path.
full());
60 typedef poset table_type;
62 table_type* ltable =
new table_type();
81 ltable->new_state(xns, xpath, lschema, *lmap);
88 poset& result = *ltable;
92 ensure(xns.
owns(result, xauto_access));
95 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
149 require(xbottom != 0);
219 static const char* result =
"poset";
291 require(unexecutable(
"xschema.is_same_state(xdof_map.schema())"));
377 ensure(
version() == COARSEST_COMMON_REFINEMENT_VERSION);
407 result =
dynamic_cast<const poset*
>(xother) != 0;
void put_version(int xversion)
Set the current level to xversion.
virtual 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...
virtual poset_path path(bool xauto_access=true) const
The path of this poset.
bool state_is_auto_read_write_accessible(bool xauto_access) const
True if state is auto accessible for read and write, that is, if the state is already accessible for ...
void insert_prototype(const poset_state_handle *xprototype)
Sets xprototype as the prototype for its client class.
virtual bool invariant() const
Class invariant.
bool has_standard_member_ct() const
True if poset is in its initial state, that is, it contains just the standard members.
bool full() const
True if both poset name and member name are not empty.
The private state of a partially ordered set.
static poset & new_table(namespace_type &xhost, const poset_path &xpath, const poset_path &xschema_path, bool xauto_access)
Creates a new poset in namespace xns with path xpath and schema specified by xschema_path.
virtual poset * clone() const
Virtual constructor; creates a new handle of the same actual type as this, attached to the same state...
void initialize_table_dof_tuple(array_poset_dof_map *xdof_tuple)
Installs xdof_tuple as the table dof tuple.
poset_path path(bool xauto_access=true) const
A path to this component.
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...
bool path_is_auto_read_accessible(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath exists and is auto read accessible.
poset_type
Identifiers for poset types.
virtual void initialize_standard_members()
Creates the members common to every poset, for instance, top() and bottom().
A client handle for a general, abstract partially order set.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
virtual void initialize_standard_subposets(const std::string &xname)
Creates the subposets common to every poset (e.g. whole() and jims()).
virtual int version() const
The current version.
virtual void get_read_access() const
Get read access to the state associated with this.
virtual namespace_poset * name_space() const
The namespace of host()
poset()
Default constructor; creates a new poset handle not attached to any state.
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
Abstract base class with useful features for all objects.
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
virtual ~poset()
Destructor.
void update_standard_member_id_spaces()
Update the initially allocated id spaces.
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...
A client handle for a mutable partially ordered set.
bool has_standard_row_dof_tuple_ct() const
True if poset is in its initial state, that is, it contains just the standard row_dof_tuples.
bool owns(const poset_state_handle &xposet, bool xauto_access) const
True if and only if this contains the poset xposet. synonym for contains_poset(xposet.poset_path(true), xauto_access)
std::string poset_name() const
The poset name part of the path.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
virtual void begin_jim_edit_mode(bool xauto_access=true)
Allow editing of jims and jim order relation.
bool empty() const
True if both poset name and member name are empty.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
virtual void release_access(bool xall=false) const
Release access. If xall is true, release all levels of access. Otherwise, release one level of access...
poset_state_handle()
Default constructor.
bool contains_poset(pod_index_type xhub_id, bool xauto_access=true) const
True if this contains a poset with hub id xhub_id..
static poset_handle_factory & factory()
The poset handle factory.
virtual bool is_attached() const
True if this is attached to a state.
virtual const char * class_name() const
The name of this class.
virtual void new_state(const poset_path &xpath, const schema_poset_member &xschema, array_poset_dof_map &xdof_map)
Creates a new poset state with path xpath, schema xschema and table dof map xdof_map, attaches this to the state.
poset_state * _state
State object for this poset.
bool invariant_check() const
True if invariant checking is enabled.
virtual void end_jim_edit_mode(bool xensure_lattice_invariant=true, bool xauto_access=true)
Prevent editing of jims and jim order relation.
virtual void end_jim_edit_mode(bool xensure_lattice_invariant=true, bool xauto_access=true)
Prevent editing of jims and jim order relation.
bool is_same_state(const poset_state_handle *xother) const
True if this is attached to the same state as xother.
An abstract client handle for a member of a poset.
bool in_jim_edit_mode() const
True if editing jims and jim order relation is allowed.
An array representation of abstract class poset_dof_map.
virtual void initialize_handle_data_members(const namespace_poset &xns)
Initializes the handle data members that depend on the table dofs and are required to get access when...
void enable_invariant_check() const
Enable invariant checking.
bool state_is_not_read_accessible() const
True if this is attached and if the state is accessible for read or if access control is disabled...
virtual bool invariant() const
Class invariant.
A client handle for a poset member which has been prepared for use as a schema.
virtual poset_type type_id() const
Identifier for the type of this poset.
virtual bool schema_is_ancestor_of(const schema_poset_member *xother_schema) const
True if xother_schema conforms to the type of schema required by this.
virtual void begin_jim_edit_mode(bool xauto_access=true)
Allow editing of jims and jim order relation.