9 #ifndef BINARY_SECTION_SPACE_SCHEMA_MEMBER_IMPL_H 10 #define BINARY_SECTION_SPACE_SCHEMA_MEMBER_IMPL_H 12 #ifndef SHEAF_DLL_SPEC_H 13 #include "SheafSystem/sheaf_dll_spec.h" 16 #ifndef BINARY_SECTION_SPACE_SCHEMA_MEMBER_H 17 #include "SheafSystem/binary_section_space_schema_member.h" 20 #ifndef ASSERT_CONTRACT_H 21 #include "SheafSystem/assert_contract.h" 24 #ifndef BASE_SPACE_POSET_H 25 #include "SheafSystem/base_space_poset.h" 28 #ifndef BINARY_SECTION_SPACE_SCHEMA_POSET_H 29 #include "SheafSystem/binary_section_space_schema_poset.h" 32 #ifndef FIBER_BUNDLES_NAMESPACE_H 33 #include "SheafSystem/fiber_bundles_namespace.h" 36 #ifndef SEC_REP_DESCRIPTOR_POSET_H 37 #include "SheafSystem/sec_rep_descriptor_poset.h" 41 #include "SheafSystem/tuple.h" 55 require(xbase_path.
full());
56 require(xrep_path.
empty() || xrep_path.
full());
61 typedef typename S::fiber_type fiber_type;
63 poset_path lstd_fiber_path(fiber_type::template standard_host_path<fiber_type>(xfiber_suffix));
64 poset_path lrep_path = !xrep_path.
empty() ? xrep_path : S::standard_rep_path();
66 std::string lposet_name(lstd_fiber_path.
poset_name());
67 lposet_name +=
"_on_";
71 lposet_name +=
"_schema";
78 ensure(!result.
full());
95 require(xbase_path.
full());
96 require(xrep_path.
empty() || xrep_path.
full());
101 typedef typename S::fiber_type fiber_type;
103 poset_path result(standard_host_path<S>(xbase_path, xrep_path, xfiber_suffix));
105 std::string lmember_name =
106 standard_member_name(fiber_type::standard_schema_path().member_name(),
113 ensure(result.
full());
123 template <
typename S>
129 const std::string& xfiber_suffix,
139 require(xbase_path.
full());
142 require(xrep_path.
empty() || xrep_path.
full());
149 poset_path lstd_path(standard_host_path<S>(xbase_path, xrep_path, xfiber_suffix));
162 template <
typename S>
168 const std::string& xfiber_suffix,
177 require(xbase_path.
full());
180 require(xrep_path.
full());
184 require(S::fiber_type::template standard_host_is_available<typename S::fiber_type>(xns, xfiber_suffix, xauto_access));
186 require(standard_host_is_available<S>(xns, xbase_path, xrep_path, xfiber_suffix, xauto_access));
190 typedef typename S::fiber_type fiber_type;
191 typedef typename S::fiber_type::host_type fiber_host_type;
193 poset_path lstd_path(standard_host_path<S>(xbase_path, xrep_path, xfiber_suffix));
209 fiber_host_type& lfiber_space = fiber_type::standard_host(xns, xfiber_suffix, xauto_access);
214 poset_path lstd_schema_path(host_type::standard_schema_path());
216 lresult_ptr = &new_host(xns, lstd_path, lstd_schema_path, xbase_path, lfiber_path, xrep_path, xauto_access);
223 ensure(xns.
owns(result, xauto_access));
224 ensure(result.
path(
true) == standard_host_path<S>(xbase_path, xrep_path, xfiber_suffix));
226 ensure(result.
schema(
true).
path(xauto_access) == host_type::standard_schema_path());
229 ensure(result.
fiber_space_path(
true) == S::fiber_type::template standard_host_path<typename S::fiber_type>(xfiber_suffix));
230 ensure(result.
rep_path(
true) == xrep_path);
238 template <
typename S>
244 const std::string& xfiber_suffix,
251 require(precondition_of(standard_host<S>(xns, xbase_path, xrep_path, xfiber_suffix, xauto_access)));
257 host_type& lhost = standard_host<S>(xns, xbase_path, xrep_path, xfiber_suffix, xauto_access);
262 poset_path result(standard_member_path<S>(xbase_path, xrep_path, xfiber_suffix));
266 lmbr.
put_name(result.member_name(),
true,
true);
271 ensure(postcondition_of(standard_host<S>(xns, xbase_path, xrep_path, xfiber_suffix, xauto_access)));
273 ensure(result == standard_member_path<S>(xbase_path, xrep_path, xfiber_suffix));
274 ensure(xns.contains_path(result, xauto_access));
282 #endif // ifndef BINARY_SECTION_SPACE_SCHEMA_MEMBER_IMPL_H 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 ...
static host_type & standard_host(namespace_type &xns, const poset_path &xbase_path, const poset_path &xrep_path, const std::string &xfiber_suffix, bool xauto_access)
The standard host of a schema for sections of type S with base space sepcified by xbase_path...
A client handle for a poset member which has been prepared for use as a schema for a section space...
bool full() const
True if both poset name and member name are not empty.
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 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...
static poset_path standard_member_path(const poset_path &xbase_path, const poset_path &xrep_path, const std::string &xfiber_suffix)
The standard path for a schema member for sections of type S with base space sepcified by xbase_path...
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
poset_state_handle & member_poset(pod_index_type xhub_id, bool xauto_access=true) const
The poset_state_handle object referred to by hub id xhub_id.
The poset for sec_rep_descriptors.
poset_path rep_path(bool xauto_access) const
The path to the representation for section spaces on this schema..
poset & fiber_space()
The fiber space for section spaces on this schema.
The lattice of closed cells of a cellular space; a lattice representation of a computational mesh...
bool path_is_available(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath does not exist or exists and conforms to poset type P...
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
void put_member_name(const std::string &xname)
Sets member_name() to xname.
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.
bool contains_path(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset or poset member specified by xpath.
virtual void put_name(const std::string &xname, bool xunique, bool xauto_access)
Make xname a name for this; if xunique, make xname the only name.
static bool standard_host_is_available(namespace_poset &xns, const poset_path &xbase_path, const poset_path &xrep_path, const std::string &xfiber_suffix, bool xauto_access)
True if and only if the host specified by standard_host_path<S>(xbase_path, xrep_path, xfiber_suffix) does not exist, or it exists and conforms to host_type.
bool empty() const
True if both poset name and member name are empty.
poset_path base_space_path(bool xauto_access) const
The path to the base space for section spaces on this schema.
static poset_path standard_host_path(const poset_path &xbase_path, const poset_path &xrep_path, const std::string &xfiber_suffix)
The standard path for the host of a schema for sections of type S with base space specified by xbase_...
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. ...
poset_path fiber_space_path(bool xauto_access) const
The path to the fiber space for section spaces on this schema.
static poset_path standard_member(namespace_type &xns, const poset_path &xbase_path, const poset_path &xrep_path, const std::string &xfiber_suffix, bool xauto_access)
The path for standard schema member for sections of type S with base space sepcified by xbase_path...
std::string member_name() const
The member name part of the path.
static bool is_valid_name(const std::string &xname)
True if xname is not empty and contains only name legal characters.
std::string path() const
The full path as a string.
Namespace for the fiber_bundles component of the sheaf system.
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...