20 #include "SheafSystem/tuple_space.h" 22 #include "SheafSystem/abstract_poset_member.impl.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/fiber_bundles_namespace.h" 25 #include "SheafSystem/namespace_poset.impl.h" 26 #include "SheafSystem/namespace_poset_member.h" 27 #include "SheafSystem/poset_handle_factory.h" 28 #include "SheafSystem/tuple.h" 49 static const string& result = tuple::standard_schema_poset_name();
53 ensure(!result.empty());
70 static const poset_path& result = tuple::standard_schema_path();
74 ensure(result.
full());
75 ensure(result.
poset_name() == standard_schema_poset_name());
92 require(!xpath.
empty());
95 require(xschema_path.
full());
97 require(schema_poset_member::conforms_to(xns, xschema_path, standard_schema_path(), xauto_access));
99 require(xfactor_ct > 0);
107 table_type* ltable =
new table_type();
122 lmap->
put_dof(
"factor_ct", xfactor_ct);
126 ltable->new_state(xns, xpath, lschema, *lmap);
137 ensure(xns.
owns(result, xauto_access));
138 ensure(result.
path(
true) == xpath);
140 ensure(result.
schema(
true).
path(xauto_access) == xschema_path);
142 ensure(result.
factor_ct(
true) == xfactor_ct);
156 require(state_is_read_accessible());
177 require(state_is_auto_read_accessible(xauto_access));
186 int result = factor_ct();
232 :
poset(xtop, xbottom)
237 require(xbottom != 0);
257 fiber_bundle::tuple_space::
290 return TUPLE_SPACE_ID;
309 static const char* result =
"tuple_space";
333 result =
dynamic_cast<const tuple_space*
>(xother) != 0;
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 tuple_space * clone() const
Virtual constructor; creates a new handle of the same actual type as this, attached to the same state...
virtual bool invariant() const
Class invariant.
bool full() const
True if both poset name and member name are not empty.
virtual const char * class_name() const
The name of this class.
poset_path path(bool xauto_access=true) const
A path to this component.
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.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
poset_type
Identifiers for poset types.
static const poset_path & standard_schema_path()
The path to the standard schema for this class.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
virtual bool is_ancestor_of(const any *xother) const
True if other conforms to this.
static const std::string & standard_schema_poset_name()
The name of the standard schema poset for this class.
A Cartesian product space.
virtual void get_read_access() const
Get read access to the state associated with this.
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 ~tuple_space()
Destructor.
tuple_space()
Default constructor; creates a new tuple_space handle not attached to any state.
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
A client handle for a mutable partially ordered set.
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)
virtual poset_type type_id() const
Identifier for the type of this poset.
std::string poset_name() const
The poset name part of the path.
static tuple_space & new_table(namespace_type &xhost, const poset_path &xpath, const poset_path &xschema_path, int xfactor_ct, bool xauto_access)
Creates a new tuple_space in namespace xns with path xpath, schema specified by xschema_path, and table attribute factor_ct specified by xfactor_ct.
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
A member of a Cartesian product space; a tuple of attributes (persistent version).
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...
poset_state_handle()
Default constructor.
static poset_handle_factory & factory()
The poset handle factory.
virtual bool is_attached() const
True if this is attached to a state.
virtual void put_dof(pod_index_type xdof_id, const void *xdof, size_type xdof_size)
Sets the dof referred to by xdof_id to the value at xdof.
bool invariant_check() const
True if invariant checking is enabled.
T::table_dofs_type & table_dofs(T &x0)
The table dofs pod type for x0 (mutable version).
An array representation of abstract class poset_dof_map.
Namespace for the fiber_bundles component of the sheaf system.
bool is_same_type(const any *other) const
True if other is the same type as this.
virtual bool invariant() const
Class invariant.
void enable_invariant_check() const
Enable invariant checking.
int factor_ct() const
The number of factors in this product.
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...
A client handle for a poset member which has been prepared for use as a schema.