21 #include "SheafSystem/namespace_poset.h" 23 #include "SheafSystem/array_index_space_handle.h" 24 #include "SheafSystem/array_index_space_state.h" 25 #include "SheafSystem/array_index_space_interval.h" 26 #include "SheafSystem/array_poset_dof_map.h" 27 #include "SheafSystem/assert_contract.h" 28 #include "SheafSystem/constant_index_space_interval.h" 29 #include "SheafSystem/error_message.h" 30 #include "SheafSystem/explicit_crg_interval.h" 31 #include "SheafSystem/explicit_index_space_interval.h" 32 #include "SheafSystem/hash_index_space_state.h" 33 #include "SheafSystem/index_space_iterator.h" 34 #include "SheafSystem/interval_index_space_state.h" 35 #include "SheafSystem/list_index_space_state.h" 36 #include "SheafSystem/namespace_poset_dof_map.h" 37 #include "SheafSystem/namespace_poset_member.h" 38 #include "SheafSystem/scattered_insertion_index_space_handle.h" 39 #include "SheafSystem/offset_index_space_state.h" 40 #include "SheafSystem/poset_handle_factory.h" 41 #include "SheafSystem/poset_path.h" 42 #include "SheafSystem/poset_type.h" 43 #include "SheafSystem/postorder_member_iterator.h" 44 #include "SheafSystem/postorder_iterator.h" 45 #include "SheafSystem/primary_index_space_state.h" 46 #include "SheafSystem/primary_sum_index_space_state.h" 47 #include "SheafSystem/primitives_index_space_state.h" 48 #include "SheafSystem/ragged_array_index_space_interval.h" 49 #include "SheafSystem/refinable_poset.h" 50 #include "SheafSystem/reserved_primary_index_space_state.h" 51 #include "SheafSystem/singleton_index_space_state.h" 52 #include "SheafSystem/singleton_index_space_interval.h" 53 #include "SheafSystem/standard_member_hack_crg_interval.h" 54 #include "SheafSystem/std_list.h" 55 #include "SheafSystem/std_set.h" 56 #include "SheafSystem/std_sstream.h" 57 #include "SheafSystem/subposet_member_iterator.h" 58 #include "SheafSystem/tern.h" 59 #include "SheafSystem/total_poset_member.h" 74 list<sheaf::pod_index_type>& xrev_post,
92 if(!xvisited[lprereq_id])
94 xvisited.
put(lprereq_id,
true);
95 traverse_prereqs(xns, lprereq_id, xrev_post, xvisited);
99 xrev_post.push_front(xid);
101 lns_mbr.detach_from_state();
125 require(precondition_of(
new_state(xname)));
135 ensure(postcondition_of(
new_state(xname)));
196 _primitives.detach_from_state();
206 lposet_state = _primitives_schema.
state_obj();
262 sheaf::namespace_poset::
305 ensure(result.
full());
427 bool xauto_access)
const 434 require(xauto_access ||
466 bool xauto_access)
const 473 require(xauto_access ||
493 require(xpath.
full());
495 require(xauto_access ||
528 const std::string xmember_names[],
529 int xmember_names_ct,
530 bool xauto_access)
const 536 require(!xposet_name.empty());
537 require(xmember_names != 0);
538 require_for_all(i, 0, xmember_names_ct, !xmember_names[i].empty());
540 require(xauto_access ||
568 require(xpath.
full());
570 require(xauto_access ||
867 lposet->terminate_access();
927 lns_mbr.put_poset(xposet);
936 lns_mbr.new_jim_state(
this, 0,
false,
false);
937 lns_mbr.put_name(xposet_name,
true,
false);
948 lns_mbr.put_poset(xposet);
962 lns_mbr.detach_from_state();
998 lns_mbr.new_jim_state(
this, 0,
false,
false);
999 lns_mbr.put_name(xposet_name,
true,
false);
1010 lns_mbr.put_poset(xposet);
1052 if(lmbr_schema_id == PRIMITIVES_SCHEMA_INDEX)
1056 new_link(SCHEMA_DEFINITIONS_INDEX, lmbr_id);
1071 new_link(TOP_INDEX, lgeneral_sets_id);
1287 return _current_namespace;
1298 _current_namespace = xns;
1314 sheaf::namespace_poset::
1315 _current_namespace = 0;
1352 static bool lposet_prototypes_initialized =
false;
1354 if(!lposet_prototypes_initialized)
1358 namespace_poset::make_prototype();
1359 namespace_poset_schema::make_prototype();
1360 poset::make_prototype();
1361 primitives_poset::make_prototype();
1362 primitives_poset_schema::make_prototype();
1363 refinable_poset::make_prototype();
1367 lposet_prototypes_initialized =
true;
1369 #ifdef DIAGNOSTIC_OUTPUT 1370 cout <<
"Initialized sheaves poset prototypes" << endl;
1390 static bool lcrg_interval_prototypes_initialized =
false;
1392 if(!lcrg_interval_prototypes_initialized)
1396 explicit_crg_interval::make_prototype();
1397 standard_member_hack_crg_interval::make_prototype();
1401 lcrg_interval_prototypes_initialized =
true;
1403 #ifdef DIAGNOSTIC_OUTPUT 1404 cout <<
"Initialized sheaves crg interval prototypes" << endl;
1423 static bool ldof_map_prototypes_initialized =
false;
1425 if(!ldof_map_prototypes_initialized)
1429 array_poset_dof_map::make_prototype();
1430 namespace_poset_dof_map::make_prototype();
1431 primitives_poset_dof_map::make_prototype();
1435 ldof_map_prototypes_initialized =
true;
1437 #ifdef DIAGNOSTIC_OUTPUT 1438 cout <<
"Initialized sheaves dof map prototypes" << endl;
1457 static bool lid_space_prototypes_initialized =
false;
1459 if(!lid_space_prototypes_initialized)
1463 array_index_space_state::make_prototype();
1464 hash_index_space_state::make_prototype();
1465 interval_index_space_state::make_prototype();
1466 list_index_space_state::make_prototype();
1467 offset_index_space_state::make_prototype();
1468 primary_index_space_state::make_prototype();
1469 primary_sum_index_space_state::make_prototype();
1470 primitives_index_space_state::make_prototype();
1471 reserved_primary_index_space_state::make_prototype();
1472 singleton_index_space_state::make_prototype();
1474 array_index_space_interval::make_prototype();
1475 constant_index_space_interval::make_prototype();
1476 explicit_index_space_interval::make_prototype();
1477 ragged_array_index_space_interval::make_prototype();
1478 singleton_index_space_interval::make_prototype();
1482 lid_space_prototypes_initialized =
true;
1484 #ifdef DIAGNOSTIC_OUTPUT 1485 cout <<
"Initialized sheaves id space prototypes" << endl;
1534 return NAMESPACE_POSET_ID;
1545 static const char* result =
"namespace_poset";
1598 define_old_variable(
int old_access_request_depth =
1600 define_old_variable(
int old_primitives_access_request_depth =
1615 old_access_request_depth + 1);
1619 old_primitives_access_request_depth + 1);
1638 define_old_variable(
int old_primitives_access_request_depth =
1655 old_primitives_access_request_depth + 1);
1803 _primitives_schema.new_state();
1819 _primitives.new_state(&(_primitives_schema.
top()));
1863 ensure(
name() == xname);
1896 primitives().attach_to_state(
this, PRIMITIVES_INDEX);
1994 ensure(!result.
empty());
1995 ensure(!result.
full());
2045 require(xdof_map != 0);
2055 ensure(result ? (dynamic_cast<const namespace_poset_dof_map*>(xdof_map) != 0) :
true);
2079 assertion(result_ptr != 0);
2217 typedef set<pod_index_type> lmax_mbrs_type;
2219 lmax_mbrs_type lmax_mbrs;
2249 lmax_mbrs.erase(lprereq_id);
2263 list<pod_index_type> lrev_post;
2264 lmax_mbrs_type::iterator lmax_mbrs_itr = lmax_mbrs.begin();
2268 while(lmax_mbrs_itr != lmax_mbrs.end())
2270 lmbr_id = *lmax_mbrs_itr;
2273 if(
is_jim(lmbr_id,
false))
2277 ::traverse_prereqs(
this, lmbr_id, lrev_post, lvisited);
2283 lvisited.
put(lmbr_id,
true);
2284 lrev_post.push_front(lmbr_id);
2290 #ifdef DIAGNOSTIC_OUTPUT 2291 list<pod_index_type>::iterator lrev_post_itr = lrev_post.begin();
2292 while(lrev_post_itr != lrev_post.end())
2294 cout <<
" " << *lrev_post_itr;
2297 cout << endl << endl;
2306 while(!lrev_post.empty())
2310 #ifdef DIAGNOSTIC_OUTPUT 2311 cout << endl <<
"deleting ns mbr: " << lns_mbr.
index()
2312 <<
" " << lns_mbr.
name()
2316 if(lns_mbr.
is_jim(
false))
2331 lrev_post.pop_front();
2403 ldefn_mbrs[0] = _primitives_schema.
index();
2407 ldefn_mbr.
put_name(
"schema definitions",
true,
false);
2422 ensure(_primitives.
host() ==
this);
2423 ensure(_primitives.
index() == PRIMITIVES_INDEX);
2425 ensure(_primitives_schema.
host() ==
this);
2426 ensure(_primitives_schema.
index() == PRIMITIVES_SCHEMA_INDEX);
2497 ensure(result.
name() ==
"member_poset_id_space");
2560 ensure(result.
name() ==
"member_poset_id_space");
2659 ensure(
name() == xname);
2737 ensure(result != 0);
2761 invariance(
host() == 0);
2807 require(unexecutable(acquires and releases read access));
2813 os << endl << endl <<
"#### BEGIN NAMESPACE " << ns.
name() <<
" ###################" << endl;
2817 os << static_cast<const poset_state_handle&>(ns) << endl;
2821 while(!itr.is_done())
2839 os <<
"#### END NAMESPACE " << ns.
name() <<
" ###################" << endl << endl;
2845 ensure(unexecutable(access request depth == old access request depth));
2857 size_t lmemory_parts[4];
2865 result = xinclude_shallow ?
sizeof(xp) : 0;
2868 for (
int i=0; i<4; i++)
2881 result +=
deep_size(*lpsh, xinclude_shallow, xresults);
2885 while(!litr.is_done())
2896 result +=
deep_size(*lpsh, xinclude_shallow, lmemory_parts);
2901 for (
int i=0; i<4; i++)
2902 xresults[i] += lmemory_parts[i];
2912 ensure(result >= 0);
poset_table_state & table() const
The table of dof tuples of this poset.
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...
void to_stream(std::ostream &xos=std::cout)
Write instance information to an ostream (default = stdout).
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 ...
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...
void insert_prototype(const poset_state_handle *xprototype)
Sets xprototype as the prototype for its client class.
virtual const char * class_name() const
The name of this class.
const index_space_handle & get_member_poset_id_space(bool xauto_access) const
Allocates a handle for the id space for member posets from the pool of id space handles.
bool state_is_not_read_only_accessible() const
True if this is attached and the state is not accessible for read only access.
bool has_standard_member_ct() const
True if poset is in its initial state, that is, it contains just the standard members.
scoped_index insert_poset(const poset_state_handle &xposet, const std::string &xposet_name, bool xauto_link)
Inserts xposet into this namespace with member name xposet_name.
bool path_is_auto_read_write_available(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath does not exist or exists and is auto read-write accessible...
virtual void new_link(pod_index_type xgreater, pod_index_type xlesser)
Insert a cover link from greater to lesser (that is, hub id xgreater covers hub id xlesser)...
bool full() const
True if both poset name and member name are not empty.
virtual int member_ct() const
The number of members of this poset.
abstract_poset_member & top()
The top member of the poset (mutable version)
The private state of a partially ordered set.
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
void put_name(const std::string &xname)
Sets name() to xname. Intended for use only by storage_agent::begin_read_transaction(namespace_poset&...
An abstract iterator over the ids of an id space.
void release_id_space(index_space_handle &xid_space) const
Returns the id space handle xid_space to the handle pool.
virtual poset_path path(bool xauto_access=true) const
The path of this poset.
virtual poset_state * state_obj() const
State object for this poset.
namespace_poset_schema & namespace_schema()
The namespace poset schema within this namespace (mutable version)
const scoped_index & index() const
The member index of this poset within the namespace host()
virtual void get_read_access() const
Get read access to the state associated with this.
void put_row_dof_tuple(poset_dof_map *xdof_tuple)
Sets the dof tuple at index xindex to xdof_tuple.
pod_index_type member_poset_schema_id(const scoped_index &xindex, bool xauto_access) const
The index of the schema of the member poset with index xindex.
namespace_poset * clone() const
Virtual constructor; creates a new handle of the same actual type as this, attached to the same state...
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 contains_members(const scoped_index *xmbrs, int xmbrs_ct, bool xauto_access=true) const
True if this poset contains poset member(s) with indices in xmbrs.
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.
pod_index_type member_dof_tuple_id(pod_index_type xmbr_hub_id, bool xauto_access) const
The dof tuple hub id of the member with hub id xmbr_hub_id.
virtual schema_poset_member & schema()
The schema on which this is allocated (mutable version).
bool contains_poset_subposet(const poset_path &xpath, bool xauto_access=true) const
True if this contains the poset and subposet specified by xpath.
virtual void initialize_standard_members()
Creates the members common to every poset, for instance, top() and bottom().
void release_member_poset_id_space(index_space_handle &xid_space, bool xauto_access) const
Returns the handle for the id space for member posets to the pool of id space handles.
bool contains_poset_member(pod_index_type xposet_hub_id, pod_index_type xmember_hub_id, bool xauto_access=true) const
True if this contains a poset with hub id xposet_hub_id which contains a member with hub id xmember_h...
bool state_is_auto_read_accessible(bool xauto_access) const
True if the state is auto accessible for read, that is, if the state is already accessible for read o...
static const std::string & standard_name()
The standard name for an instance of this class.
A client handle for a general, abstract partially order set.
virtual bool includes_subposet(pod_index_type xsubposet_hub_id, bool xauto_access=true) const
True if this poset includes subposet with hub id xsubposet_hub_id.
index_space_handle & get_id_space(const std::string &xname) const
Allocates an id space handle from the handle pool attached to state with name xname.
primitives_poset & primitives()
The poset of primitives for this namespace (mutable version)
const scoped_index & index() const
The current item in the subset.
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
void initialize_table_dofs(void *xtable_dofs, size_t xtable_dof_ub)
Initializes the table dofs ("class variables")
const index_space_family & member_id_spaces(bool xauto_access) const
Collection of member id spaces for this (const version).
virtual void initialize_standard_subposets(const std::string &xname)
Creates the subposets common to every poset (e.g. whole() and jims()).
void put_standard_row_dof_tuple_ct(int xct)
Sets the number of standard row dof tuples automatically allocated by the constructor.
abstract_poset_member * _top
Top member of poset.
void put(int i, bool value)
Sets i-th member to value.
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...
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
poset_state_handle * poset_pointer() const
The pointer to the poset associated with this namespace member.
virtual void attach_handle_data_members()
Initializes the handle data members when this handle is attached to a state. Intended to be redefined...
index_space_iterator & get_member_poset_id_space_iterator(bool xauto_access) const
Allocates a iterator for the id space for member posets. from the pool of id space iterators...
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.
void invalidate()
Make this id invalid.
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...
const scoped_index & index() const
The index of the component state this handle is attached to.
namespace_poset * _name_space
The namespace this poset resides in.
virtual void virtual_initialize_prototypes()
Initialize all the prototypes needed by various factory methods; virtual version. ...
std::string name() const
A name for this.
The general, abstract map from dof ids to dof values.
virtual bool is_attached() const =0
True if this handle is attached to a state.
void clear_member_id_spaces(bool xauto_access)
Deletes all non-standard id spaces.
namespace_poset * host() const
The namespace this poset resides in. Obsolete; use name_space() instead.
virtual void put_member_name(pod_index_type xmbr_hub_id, const std::string &xname, bool xunique, bool xauto_access=false)
Make xname a name for the member with hub id xmbr_hub_id. if xunique, make xname the only name...
static namespace_poset * current_namespace()
The current default namespace.
virtual const scoped_index & new_row_dof_map()
Creates a new row dof map appropriate for jims of this.
index_space_iterator & get_id_space_iterator(const std::string &xname) const
Allocates an id space iterator from the iterator pool attached to state with name xname...
virtual void attach_handle_data_members()
Initializes the handle data members when this handle is attached to a state.
abstract_poset_member * _bottom
Bottom members of poset.
primitives_poset_schema & primitives_schema()
The schema poset for the primitives poset (mutable version)
virtual pod_index_type new_member(bool xis_jim, pod_index_type xtuple_hub_id)
Create a disconnected member with is_jim == xis_jim and the dof tuple identified by hub id xtuple_hub...
static void initialize_dof_map_prototypes()
Initialize the prototypes needed by dof map factory method,.
static void initialize_poset_prototypes()
Initialize the prototypes needed by poset factory method,.
void next()
Makes item the next member of the subset.
A client handle for a member of a namespace poset.
virtual void detach_from_state()
Detach this handle from its state.
void put_name(const std::string &xname)
Sets name() to xname.
void initialize_member_poset_id_space()
Creates the member poset id space.
static void initialize_prototypes()
Initialize all the prototypes needed by various factory methods,.
virtual void delete_state(bool xauto_access=false)
Detachs this from its state and then deletes the state.
bool poset_state_is_read_write_accessible(const poset_path &xpath, bool xauto_access=true) const
True if the poset referred to by xpath is read-write accessible.
std::string to_string()
Get instance information as a string.
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.
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
std::string name() const
Name of this space.
void put_scope(const index_space_handle &xid_space)
Sets the scope to xid_space.
virtual void initialize_namespace(namespace_poset &xns, const std::string &xposet_name, bool xauto_link=true)
Installs this as a member of xns. If xauto_link, automatically links the member into an appropriate g...
virtual int standard_member_ct() const
The number of standard members automatically allocated by the constructor.
virtual schema_poset_member & schema()
The schema for this poset (mutable version).
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...
namespace_poset_member & top()
The top member of the poset (mutable version)
void new_state(const std::string &xname)
Creates a new namespace state with name xname and attaches this to it.
virtual namespace_poset_dof_map & row_dof_map(pod_index_type xtuple_hub_id, bool xrequire_write_access=false) const
The map from row dof client_ids to row dof values for dof tuple hub id xtuple_hub_id.
bool has_standard_subposet_ct() const
True if poset is in its initial state, that is, it contains just the standard subposets.
void update_standard_member_id_spaces()
Update the initially allocated id spaces.
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...
static void initialize_crg_interval_prototypes()
Initialize the prototypes needed by crg interval factory method,.
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.
std::string name() const
Name of this space.
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)
void release_id_space_iterator(index_space_iterator &xitr) const
Returns the id space iterator xitr to the iterator pool.
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.
SHEAF_DLL_SPEC size_t deep_size(const dof_descriptor_array &xp, bool xinclude_shallow=true)
The deep size of the referenced object of type dof_descriptor_array.
poset_state_handle * poset_pointer() const
The pointer to the poset associated with this namespace member.
virtual void get_read_access() const
Get read access to the state associated with this.
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.
size_type row_dof_tuple_ct() const
The number of row_dof_tuples of this poset.
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_dof_map * row_dof_tuple(pod_index_type xindex)
The row dof tuple with index xindex.
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 poset_type type_id() const
Identifier for the type of this poset.
virtual const subposet & whole() const
The "improper" subset containing all members of this poset.
void clear()
Removes all members except the standard members.
virtual bool is_ancestor_of(const any *other) const
True if other conforms to this.
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.
void put_standard_member_ct(int xct)
Sets the number of standard members automatically allocated by the constructor.
virtual void begin_jim_edit_mode(bool xauto_access=true)
Allow editing of jims and jim order relation.
scoped_index _index
The member index of this poset in the namespace.
void attach_to_state(const poset_state_handle *xother)
Attach this handle to the same state as xother.
virtual std::string name() const
The name of this poset.
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...
virtual pod_index_type prereq_id(int xi) const
The id of the xi-th prerequisite poset for this.
void delete_poset(pod_index_type xhub_id, bool xauto_access)
Delete the poset with hub id xhub_id.
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 void initialize_id_space_prototypes()
Initialize the prototypes needed by id space factory method,.
bool path_is_auto_read_available(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath does not exist or exists and is auto read accessible.
const hub_index_space_handle & member_hub_id_space(bool xauto_access) const
The member hub id space.
bool path_is_auto_read_write_accessible(const poset_path &xpath, bool xauto_access) const
True if the state referred to xpath exists and is auto read-write accessible.
virtual void end_jim_edit_mode(bool xensure_lattice_invariant=true, bool xauto_access=true)
prevent editing of jims and jim order relation
Iterates over the subset of Zn defined by the characteristic function host().
static poset_handle_factory & factory()
The poset handle factory.
bool poset_state_is_read_accessible(const poset_path &xpath, bool xauto_access=true) const
True if the poset referred to by xpath is read accessible.
virtual void detach_from_state()
Detach this handle from its state, if any.
virtual bool is_attached() const
True if this is attached to a state.
namespace_poset_member & bottom()
The bottom member of the poset (mutable version)
int access_request_depth() const
The number of times access has been requested and granted without being released. ...
poset_state * _state
State object for this poset.
bool invariant() const
Class invariant.
virtual bool is_attached() const =0
True if this iterator is attached to a state.
bool invariant_check() const
True if invariant checking is enabled.
virtual std::string name() const
The name of this poset.
virtual ~namespace_poset()
Destructor.
int_type pod_index_type
The plain old data index type.
std::string member_name() const
The member name part of the path.
virtual scoped_index member_index_ub() const
The upper bound on the member_index;.
bool is_done() const
True if iteration finished.
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const dof_descriptor_array &p)
Insert dof_descriptor_array& p into ostream& os.
A handle for a scattered_insertion_index_space_state.
virtual void link_poset(const namespace_poset_member &xmbr)
Links xmbr into the appropriate group.
static array_index_space_handle new_space(index_space_family &xid_spaces, const std::string &xname, bool xis_persistent, size_type xcapacity)
Create a new array id space in the id space family xid_spaces at the next available id space index wi...
virtual bool is_jim(pod_index_type xmbr_hub_id, bool xin_current_version=true) const
True if the member with hub id xmbr_hub_id is a jim in the current version (xin_current_version == tr...
void push_back(const scoped_index &xhub_id)
Make the next id in this space equivalent to xhub_id in the hub id space. synonym for push_back(xhub_...
virtual void detach_from_state()
Detaches this from its state.
static poset_path primitives_schema_path()
The path for the primitives schema.
static const std::string & standard_name()
The standard name for an instance of this class.
virtual void end_jim_edit_mode(bool xensure_lattice_invariant=true, bool xauto_access=true)
Prevent editing of jims and jim order relation.
bool contains_poset_members(const std::string &xposet_name, const std::string xmember_names[], int xmember_names_ct, bool xauto_access=true) const
True if this contains a poset with name xposet_name which contains all members with names in array xm...
virtual void initialize_additional_members()
Creates additional members for this namespace.
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.
static bool is_valid_name(const std::string &xname)
True if xname is not empty and contains only name legal characters.
A map from schema poset member ids to dof values for namespace_poset members.
virtual void get_read_access() const
Get read access to the state associated with this.
virtual void initialize_namespace(namespace_poset &xns, bool xauto_link=true)
Installs this as a member of xns.
void put_current_namespace(namespace_poset *xns)
Sets the current default namespace to xns.
bool in_jim_edit_mode() const
True if editing jims and jim order relation is allowed.
static const std::string & standard_name()
The standard name for an instance of this class.
virtual void initialize_standard_members()
Creates the standard members for this namespace.
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
bool is_same_type(const any *other) const
True if other is the same type as this.
namespace_poset_schema _namespace_schema
The schema poset for this namespace.
void reset()
Restarts the iteration, makes item the first member of the subset.
void enable_invariant_check() const
Enable invariant checking.
void release_member_poset_id_space_iterator(index_space_iterator &xid_space, bool xauto_access) const
Returns the iterator for the id space for member posets to the pool of id space iterators.
bool contains_row_dof_tuple(pod_index_type xtuple_hub_id) const
True if this contains a tuple with hub id xtuple_hub_id.
void put_poset_pointer(const poset_state_handle *xposet)
Set the pointer to the poset associated with this namespace member to xposet.
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.
namespace_poset()
Default constructor; creates an unattached namespace handle.
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...
virtual bool row_dof_map_conforms(const poset_dof_map *xdof_map) const
True if xdof_map conforms to (is derived from) the type of row dof map required by this poset...
const scoped_index & index() const
The index of this in host() dof tuple table.
virtual index_iterator indexed_member_iterator() const
An iterator for members of this poset; index version.
A client handle for an unrestricted member of a poset. A total_poset_member is guaranteed not to be r...
virtual void begin_jim_edit_mode(bool xauto_access=true)
Allow editing of jims and jim order relation.
const int PREREQ_IDS_UB
Number of prerequisites ids. Must be consistent with PREREQ_ID_*_INDEX below.
virtual array_poset_dof_map & table_dof_map(bool xrequire_write_access=false)
The map from table dof client_ids to table dof values for this poset (mutable version) ...
virtual const scoped_index & member_id(bool xauto_access) const
An id in the member hub id space; intended for copying to initialize ids to the member id space...
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.