21 #ifndef SCHEMA_POSET_MEMBER_H 22 #define SCHEMA_POSET_MEMBER_H 24 #ifndef SHEAF_DLL_SPEC_H 25 #include "SheafSystem/sheaf_dll_spec.h" 28 #ifndef TOTAL_POSET_MEMBER_H 29 #include "SheafSystem/total_poset_member.h" 32 #ifndef EXPLICIT_INDEX_SPACE_HANDLE_H 33 #include "SheafSystem/explcit_index_space_handle.h" 36 #ifndef STD_UNORDERED_MAP_H 37 #include "SheafSystem/std_unordered_map.h" 41 #include "SheafSystem/std_list.h" 44 #ifndef STD_IOSTREAM_H 45 #include "SheafSystem/std_iostream.h" 48 #ifndef PRIMITIVES_POSET_DOF_MAP_H 49 #include "SheafSystem/primitives_poset_dof_map.h" 53 #include "SheafSystem/std_string.h" 59 template <
typename T>
class block;
60 template <
class T>
class wsv_block;
63 class dof_descriptor_array;
65 class poset_member_dof_iterator;
66 class poset_member_iterator;
67 class poset_dof_iterator;
68 class schema_descriptor;
94 static const poset_path& standard_schema_path();
137 bool xnew_jem =
false,
138 bool xauto_access =
true);
173 bool xauto_access =
true);
182 bool xcopy_dof_map =
false,
183 bool xauto_access =
true);
193 const tern& xnew_jem,
202 const std::string& xname,
233 bool xauto_access =
true);
247 bool xauto_access =
true);
255 bool xauto_access =
true);
270 const std::string& xname,
283 bool xauto_access =
true);
292 bool xauto_access =
true);
301 bool xauto_access =
true);
307 int dof_ct(
bool xis_table_dof)
const;
313 int table_dof_ct()
const;
319 int row_dof_ct()
const;
333 size_t dof_tuple_ub(
bool xis_table_dof)
const;
339 size_t table_dof_tuple_ub()
const;
345 size_t row_dof_tuple_ub()
const;
382 bool dof_tuple_is_homogeneous(
bool xis_table_dof)
const;
390 return dof_tuple_is_homogeneous(
true);
399 return dof_tuple_is_homogeneous(
false);
407 static std::string dof_subposet_name(
const std::string& xname,
bool xis_table_dof);
416 return dof_subposet_name(xname,
true);
426 return dof_subposet_name(xname,
false);
434 std::string dof_subposet_name(
bool xis_table_dof)
const;
443 return dof_subposet_name(
true);
453 return dof_subposet_name(
false);
480 return xis_table_dof ? table_dof_subposet_index(): row_dof_subposet_index();
495 return contains_dof(xother,
true);
504 return contains_dof(xother,
false);
513 bool contains_dof(
pod_index_type xother_id,
bool xin_table_dofs)
const;
521 bool contains_dof(
const scoped_index& xother_id,
bool xin_table_dofs)
const;
529 bool contains_dof(
const std::string& xname,
bool xin_table_dofs)
const;
538 return contains_dof(xother_id,
true);
548 return contains_dof(xother_id.
hub_pod(),
true);
558 return contains_dof(xother_id,
false);
568 return contains_dof(xother_id.
hub_pod(),
false);
575 virtual bool is_dof(
bool xin_table_dofs)
const;
592 return is_dof(
false);
599 bool is_component()
const;
611 bool is_factor()
const;
622 virtual size_t size()
const;
627 virtual size_t alignment()
const;
640 int xversion = CURRENT_MEMBER_VERSION)
const;
648 return dof_iterator(
true, xversion);
656 return dof_iterator(
false, xversion);
680 bool conforms_to(
const poset_path& xpath)
const;
689 bool conforms_to(
const poset_path& xpath,
bool xis_table_dofs)
const;
706 bool table_conforms_to(
const poset_path& xpath)
const;
723 bool row_conforms_to(
const poset_path& xpath)
const;
734 bool xauto_access =
true);
761 bool xauto_access =
true);
774 bool xauto_access =
true);
783 const std::string& xname);
790 const std::string& xposet_name,
791 const std::string& xmember_name,
792 const std::string& xparent_name);
803 const std::string& xname,
804 const std::string xdof_names[],
806 const bool xis_table_dof[],
818 const std::string& xname,
819 const std::string xdof_names[],
833 const std::string& xname,
834 const std::string xdof_names[],
845 const std::string member_names[],
846 const int num_members,
847 const int member_dof_type,
848 const std::string& schema_poset_name,
849 const std::string& schema_member_name,
850 const std::string& schema_inherits_name);
858 const std::string member_names[],
859 const int num_members,
860 const int member_dof_type,
861 const std::string& schema_poset_name,
862 const std::string& schema_member_name,
863 const std::string& schema_inherits_name);
868 void force_cache_update();
902 virtual void attach_handle_data_members();
935 bool table_cache_consistent()
const;
940 virtual void update_table_cache()
const;
946 virtual bool initialize_table_dof_id_space()
const;
951 virtual void update_table_dof_id_space()
const;
956 virtual void update_table_dof_descriptors()
const;
974 bool row_cache_consistent()
const;
980 virtual void update_row_cache(
bool xupdate_id_space =
false)
const;
986 virtual bool initialize_row_dof_id_space()
const;
991 virtual void update_row_dof_id_space()
const;
996 virtual void update_row_dof_descriptors()
const;
1003 bool initialize_dof_id_space(
bool xis_table_dof)
const;
1010 void update_dof_id_space(
bool xis_table_dof)
const;
1016 void update_dof_descriptors(
bool xis_table_dof,
1073 const index_space_handle& dof_id_space(
bool xis_table_dofs,
bool xauto_access)
const;
1101 std::string name(
pod_index_type xdof_id,
bool xis_table_dof)
const;
1107 std::string name(
const scoped_index& xdof_id,
bool xis_table_dof,
bool xauto_access)
const;
1125 size_type size(
const std::string& xname,
bool xis_table_dof,
bool xauto_access)
const;
1143 size_type alignment(
const std::string& xname,
bool xis_table_dof,
bool xauto_access)
const;
1150 bool xis_table_dof)
const;
1157 bool xauto_access)
const;
1163 primitive_type type(
const std::string& xname,
bool xis_table_dof,
bool xauto_access)
const;
1176 bool xauto_access)
const;
1182 size_type offset(
const std::string& xname,
bool xis_table_dof,
bool xauto_access)
const;
1249 const std::string& xid_space_name)
const;
1257 virtual pod_index_type get_ext_id(
const std::string& xid_space_name)
const;
1265 virtual void get_ext_ids(
const std::string& xid_space_name,
1281 virtual size_t ext_data_type_ct(
bool xis_table_schema)
const;
1313 virtual bool dof_map_is_ancestor_of(
const poset_dof_map* xdof_map)
const;
1438 virtual void detach_from_state();
1457 virtual bool is_ancestor_of(
const any* other)
const;
1467 virtual bool invariant()
const;
1488 #endif // SCHEMA_POSET_MEMBER_H primitive_type row_dof_tuple_type() const
The type of row dofs defined by this. Synonym for dof_tuple_type(false).
poset_dof_iterator * table_dof_iterator(int xversion=CURRENT_MEMBER_VERSION) const
A postorder iterator over the table dofs defined by this. Synonym for dof_iterator(true).
bool row_dof_tuple_is_homogeneous() const
True if all the row dofs have the same type. Synonym for dof_tuple_is_homogeneous(false);.
virtual total_poset_member * clone() const
Make a new handle, no state instance of current.
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.
abstract_poset_member * p_join(abstract_poset_member *other) const
poset join of this with other, auto-allocated the poset join is the least upper bound in the poset ...
abstract_poset_member * greatest_jem() const
The largest member which is join-equivalent to this.
virtual int dof_ct() const
The number of dofs in the dof tuple for jims of this poset;.
poset_dof_iterator * row_dof_iterator(int xversion=CURRENT_MEMBER_VERSION) const
A postorder iterator over the row dofs defined by this.
schema_poset_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
The default name space; a poset which contains other posets as members.
The data structure representing the state of a subposet.
bool contains_table_dof(pod_index_type xother_id) const
True if xother_id is the index of a dof in the table dofs part of the schema defined by this...
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.
schema_poset_member * l_meet(abstract_poset_member *other, bool xnew_jem=true)
lattice meet of this with other, auto-, pre-, and self-allocated versions the lattice meet is the gre...
static std::string row_dof_subposet_name(const std::string &xname)
The standard name for the row dof subposet associated with the schema member with name xname...
A path defined by a poset name and a member name separated by a forward slash ('/'). For example: "cell_definitions/triangle".
index_space_handle * _row_dof_id_space
The row dof id space for the schema defined by this.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
std::string row_dof_subposet_name() const
The standard name for the row dof subposet associated with this schema member. Synonym for dof_subpos...
A (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bounded i/o operation...
index_space_handle * _table_dof_id_space
The table dof id space for the schema defined by this.
std::string name() const
A name for this.
The general, abstract map from dof ids to dof values.
schema_poset_member * p_join(abstract_poset_member *other) const
poset join of this with other, auto-, pre-, and self-allocated versions the poset join is the least u...
schema_poset_member * least_jem() const
The smallest member which is join-equivalent to this.
schema_poset_member * l_join(abstract_poset_member *other, bool xnew_jem=true)
lattice join of this with other, auto-, pre-, and self-allocated versions the lattice join is the lea...
virtual int dof_ct() const
The number of dofs in the dof tuple for jims of this poset;.
bool contains_row_dof(pod_index_type xother_id) const
True if xother_id is the index of a dof in the row dofs part of the schema defined by this...
bool contains_row_dof(const scoped_index &xother_id) const
True if xother_id is the index of a dof in the row dofs part of the schema defined by this...
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...
Abstract base class with useful features for all objects.
scoped_index _row_cache_index
The index with respect to which the cached row properties were evaluated.
schema_poset_member * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-, pre-, and self-allocated versions the poset meet is the greates...
primitive_type
Type ids for sheaf primitives.
A client handle for a mutable partially ordered set.
size_type _row_dof_ct
The number of row dofs defined by this schema.
A map from schema poset member ids to dof values for primitives_poset members.
An index within the external ("client") scope of a given id space.
size_type _row_dof_tuple_ub
The size in bytes of the row dof tuple defined by this schema.
dof_descriptor_array * _row_dof_descriptors
The dof_descriptors_array for the row dof tuple defined by this schema.
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.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
bool contains_table_dof(const scoped_index &xother_id) const
True if xother_id is the index of a dof in the table dofs part of the schema defined by this...
abstract_poset_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-allocated The lattice pseudo-complement is the largest latt...
abstract_poset_member * least_jem() const
The smallest member which is join-equivalent to this.
int _table_cache_version
The version with respect to which the cached table properties were evaluated.
dof_tuple_type
Identifiers for dof tuple types.
An array for storing structs which describe the size, alignment, and offset of dofs within a dof tupl...
int _row_cache_version
The version with respect to which the cached row properties were evaluated.
abstract_poset_member * l_meet(abstract_poset_member *other, bool xnew_jem=true)
lattice meet of this with other, auto-allocated the lattice meet is the greatest lower bound in the...
bool contains_row_dof(const schema_poset_member &xother) const
True if this is in the row dofs part of the schema defined by this. Synonym for contains_dof(xother, false).
A record_set which contains dof tuple records. Supports both record selection and record restriction ...
bool contains_table_dof(const schema_poset_member &xother) const
True if this is in the table dofs part of the schema defined by this. Synonym for contains_dof(xother...
size_type _table_dof_ct
The number of table dofs defined by this schema.
Iterates over the subset of Zn defined by the characteristic function host().
bool is_table_dof() const
True if this is in the table_dofs part of some schema. Synonym for is_dof(true).
Iterates in postorder over dofs of a schema member anchor. Attaches a handle of type schema_poset_mem...
int_type pod_index_type
The plain old data index type.
primitive_type table_dof_tuple_type() const
The type of table dofs defined by this. Synonym for dof_tuple_type(true).
static std::string table_dof_subposet_name(const std::string &xname)
The standard name for the table dof subposet associated with the schema member with name xname...
Namespace for the sheaves component of the sheaf system.
bool table_dof_tuple_is_homogeneous() const
True if all the table dofs have the same type. Synonym for dof_tuple_is_homogeneous(true);.
dof_descriptor_array * _table_dof_descriptors
The dof_descriptors_array for the table dof tuple defined by this schema.
size_type _table_dof_tuple_ub
The size in bytes of the table dof tuple defined by this schema.
scoped_index _row_dof_subposet_index
The index within host of the row dofs subposet associated with this.
schema_poset_member * greatest_jem() const
The largest member which is join-equivalent to this.
An abstract client handle for a member of a poset.
scoped_index _table_dof_subposet_index
The index within host of the table dofs subposet associated with this.
abstract_poset_member * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-allocated the poset meet is the greatest lower bound in the pos...
const scoped_index & dof_subposet_index(bool xis_table_dof) const
The index in host() of the subposet containing the the table dofs (xis_table_dof true) or row dofs in...
An array representation of abstract class poset_dof_map.
std::string table_dof_subposet_name() const
The standard name for the table dof subposet associated with this schema member. Synonym for dof_subp...
A client handle for a poset member which has been prepared for use as a schema.
scoped_index _table_cache_index
The index with respect to which the cached table properties were evaluated.
Whitespace-separated-value block; A block of objects of type T that can be conveniently initialized b...
A client handle for an unrestricted member of a poset. A total_poset_member is guaranteed not to be r...
abstract_poset_member * l_join(abstract_poset_member *other, bool xnew_jem=true)
lattice join of this with other, auto-allocated the lattice join is the least upper bound in the la...
bool is_row_dof() const
True if this is in in the row_dofs part of some schema. Synonym for is_dof(false).
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.