SheafSystem  0.0.0.0
binary_section_space_schema_member.h
Go to the documentation of this file.
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
20 
21 #ifndef BINARY_SECTION_SPACE_SCHEMA_MEMBER_H
22 #define BINARY_SECTION_SPACE_SCHEMA_MEMBER_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef SECTION_SPACE_SCHEMA_MEMBER_H
29 #include "SheafSystem/section_space_schema_member.h"
30 #endif
31 
32 #ifndef BINARY_SECTION_COMPONENT_ITERATOR_H
33 #include "SheafSystem/binary_section_component_iterator.h"
34 #endif
35 
36 #ifndef BINARY_SECTION_DOF_ITERATOR_H
37 #include "SheafSystem/binary_section_dof_iterator.h"
38 #endif
39 
40 // #ifndef BINARY_SECTION_SPACE_SCHEMA_POSET_H
41 // #include "SheafSystem/binary_section_space_schema_poset.h"
42 // #endif
43 
44 // #ifndef CLIENT_INDEX_H
45 // #include "SheafSystem/client_index.h"
46 // #endif
47 
48 namespace fiber_bundle
49 {
50 
51  class binary_section_space_schema_poset;
52  class sec_rep_descriptor;
53 
63 {
64 
65  // ===========================================================
67  // ===========================================================
69 
70 public:
71 
76 
80  static const poset_path& standard_schema_path();
81 
85  static void make_standard_schema(namespace_poset& xns);
86 
92  static host_type& new_host(namespace_type& xns,
93  const poset_path& xhost_path,
94  const poset_path& xschema_path,
95  const poset_path& xbase_path,
96  const poset_path& xfiber_path,
97  const poset_path& xrep_path,
98  bool xauto_access);
99 
105  template <typename S>
106  static poset_path standard_host_path(const poset_path& xbase_path,
107  const poset_path& xrep_path,
108  const std::string& xfiber_suffix);
109 
115  template <typename S>
116  static poset_path standard_member_path(const poset_path& xbase_path,
117  const poset_path& xrep_path,
118  const std::string& xfiber_suffix);
119 
124  template <typename S>
125  static bool standard_host_is_available(namespace_poset& xns,
126  const poset_path& xbase_path,
127  const poset_path& xrep_path,
128  const std::string& xfiber_suffix,
129  bool xauto_access);
130 
136  template <typename S>
137  static host_type& standard_host(namespace_type& xns,
138  const poset_path& xbase_path,
139  const poset_path& xrep_path,
140  const std::string& xfiber_suffix,
141  bool xauto_access);
142 
143 
150  template <typename S>
151  static poset_path standard_member(namespace_type& xns,
152  const poset_path& xbase_path,
153  const poset_path& xrep_path,
154  const std::string& xfiber_suffix,
155  bool xauto_access);
156 
157 protected:
158 
159 private:
160 
162 
163 
164  // ===========================================================
166  // ===========================================================
168 
169 public:
170 
175 
181 
185  virtual binary_section_space_schema_member& operator=(const abstract_poset_member& xother);
186 
191 
196 
202  inline binary_section_space_schema_member* clone(bool xnew_state,
203  bool xauto_access = true) const
204  {
205  return static_cast<binary_section_space_schema_member*>
206  (section_space_schema_member::clone(xnew_state, xauto_access));
207  }
208 
209  // NEW HANDLE, NEW STATE CONSTRUCTORS
210 
211  // None - section_space_schema_poset is immutable.
212 
213  // NEW HANDLE, EXISTING STATE CONSTRUCTORS
214 
220  pod_index_type xhub_id);
221 
227  const scoped_index& xid);
228 
234  const std::string& xname);
235 
241  pod_index_type xbase_space_id,
242  pod_index_type xfiber_schema_id);
243 
244 
250  const scoped_index& xbase_space_id,
251  const scoped_index& xfiber_schema_id);
252 
253 
259  const poset_path& xbase_path,
260  const poset_path& xfiber_schema_path);
261 
267  const poset_path& xpath,
268  bool xauto_access = true);
269 
270 
271  // EXISTING HANDLE, NEW STATE "CONSTRUCTORS"
272 
273  // None - section_space_schema_member is immutable
274 
275 protected:
276 
277 private:
278 
280 
281 
282  // ===========================================================
284  // ===========================================================
286 
287 public:
288 
292  virtual binary_section_component_iterator* component_iterator() const;
293 
294 protected:
295 
296 private:
297 
299 
300 
301  // ===========================================================
303  // ===========================================================
305 
306 public:
307 
314  virtual primitive_type dof_tuple_type(bool xis_table_dof) const;
315 
326  virtual dof_descriptor_array* dof_descriptors(bool xis_table_dof) const;
327 
332  virtual bool is_dof(bool xin_table_dofs) const;
333 
335 
339  virtual size_t size() const;
340 
342 
346  virtual size_t alignment() const;
347 
349 
353  virtual sheaf::primitive_type type() const;
354 
359  virtual binary_section_dof_iterator* dof_iterator(bool xis_table_dofs,
360  int xversion = CURRENT_MEMBER_VERSION) const;
361 
366  inline binary_section_dof_iterator* table_dof_iterator(int xversion = CURRENT_MEMBER_VERSION) const
367  {
368  return dof_iterator(true, xversion);
369  };
370 
374  inline binary_section_dof_iterator* row_dof_iterator(int xversion = CURRENT_MEMBER_VERSION) const
375  {
376  return dof_iterator(false, xversion);
377  };
378 
379 protected:
380 
384  virtual void update_row_cache(bool xupdate_id_map = false) const;
385 
386 private:
387 
389 
390 
391  // ===========================================================
393  // ===========================================================
395 
396 public:
397 
403  virtual index_iterator* get_decomposition(pod_index_type xindex) const;
404 
411  virtual pod_index_type get_int_id(pod_index_type xext_id,
412  const std::string& xid_space_name) const;
413 
420  virtual void get_ext_ids(const std::string& xid_space_name,
421  pod_index_type& xschema_poset_ext_id,
422  pod_index_type& xschema_member_ext_id,
423  pod_index_type& xbase_space_ext_id,
424  pod_index_type& xfiber_schema_ext_id,
425  pod_index_type& xlocal_schema_ext_id) const;
426 
427 
431  virtual schema_poset_member& ext_data_type_schema();
432 
437  virtual size_t ext_data_type_ct(bool xis_table_schema) const;
438 
439 protected:
440 
441 private:
442 
444 
445 
446  // ===========================================================
448  // ===========================================================
450 
451 public:
452 
457  virtual primitives_poset_dof_map& dof_map(bool xrequire_write_access = false);
458 
463  virtual const primitives_poset_dof_map& dof_map(bool xrequire_write_access = false) const;
464 
465 protected:
466 
467 private:
468 
470 
471 
472  // ===========================================================
474  // ===========================================================
476 
477 public:
478 
483  {
485  };
486 
491  {
493  };
494 
495 protected:
496 
497 private:
498 
500 
501 
502  // ===========================================================
504  // ===========================================================
506 
507 public:
508 
514  {
516  };
517 
523  {
525  };
526 
527 protected:
528 
529 private:
530 
532 
533 
534  // ===========================================================
536  // ===========================================================
538 
539 public:
540 
547  {
548  return static_cast<binary_section_space_schema_member*>(abstract_poset_member::l_join(other, xnew_jem));
549  };
550 
557  {
558  return static_cast<binary_section_space_schema_member*>(abstract_poset_member::l_meet(other, xnew_jem));
559  };
560 
566  inline binary_section_space_schema_member* l_not(bool xnew_jem = true) const
567  {
569  };
570 
571 protected:
572 
573 private:
574 
576 
577 
578  // ===========================================================
580  // ===========================================================
582 
583 public:
584 
586 
591  virtual void attach_to_state(pod_index_type xbase_space_id,
592  pod_index_type xfiber_schema_id);
593 
598  virtual void attach_to_state(const section_space_schema_poset* xhost,
599  pod_index_type xbase_space_id,
600  pod_index_type xfiber_schema_id);
601 
602 
607  virtual void attach_to_state(const section_space_schema_poset* xhost,
608  const poset_path& xbase_path,
609  const poset_path& xfiber_schema_path);
610 
611 protected:
612 
613 private:
614 
616 
617 
618  // ===========================================================
620  // ===========================================================
622 
623 public:
624 
629  {
631  }
632 
636  virtual bool host_is_ancestor_of(const poset_state_handle* other) const;
637 
638 protected:
639 
640 private:
641 
643 
644 
645  // ===========================================================
647  // ===========================================================
649 
650 public:
651 
655  virtual bool is_ancestor_of(const any* other) const;
656 
660  virtual binary_section_space_schema_member* clone() const;
661 
665  virtual bool invariant() const;
666 
667 protected:
668 
669 private:
670 
672 };
673 
674 } // namespace fiber_bundle
675 
676 #endif // BINARY_SECTION_SPACE_SCHEMA_MEMBER_H
binary_section_space_schema_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...
section_space_schema_poset * host() const
The poset which this is a handle to a component of.
Iterates in postorder over dofs of a schema member anchor. Attaches an a handle of type section_space...
A client handle for a poset member which has been prepared for use as a schema for a section space...
binary_section_space_schema_poset * host() const
The poset which this is a handle to a component of.
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.
The default name space; a poset which contains other posets as members.
virtual size_t size() const =0
The number of bytes in this dof.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
A client handle for a general, abstract partially order set.
binary_section_space_schema_member * least_jem() const
The smallest member which is join-equivalent to this.
A path defined by a poset name and a member name separated by a forward slash (&#39;/&#39;). For example: "cell_definitions/triangle".
Definition: poset_path.h:48
virtual sheaf::primitive_type type() const =0
The primitive type index of the dof defined by this.
virtual section_space_schema_member * clone() const =0
Make a new handle, no state instance of current.
A schema poset for a section space. A binary Cartesian product subspace of the binary tensor product ...
binary_section_space_schema_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...
virtual size_t alignment() const =0
The alignment for this dof.
Abstract base class with useful features for all objects.
Definition: any.h:39
binary_section_space_schema_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...
binary_section_space_schema_member * greatest_jem() const
The largest member which is join-equivalent to this.
binary_section_space_schema_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...
primitive_type
Type ids for sheaf primitives.
A map from schema poset member ids to dof values for primitives_poset members.
binary_section_space_schema_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...
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
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.
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...
binary_section_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).
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...
Iterates over the subset of Zn defined by the characteristic function host().
binary_section_space_schema_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
An abstract schema poset for a section space. A Cartesian product subspace of the tensor product of a...
Iterates in postorder over dofs of a schema member anchor. Attaches an a handle of type section_space...
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
binary_section_space_schema_poset host_type
The type of host poset.
A client handle for a poset member which has been prepared for use as a schema for a section space...
An abstract client handle for a member of a poset.
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...
binary_section_dof_iterator * row_dof_iterator(int xversion=CURRENT_MEMBER_VERSION) const
A postorder iterator over the row dofs defined by this.
Namespace for the fiber_bundles component of the sheaf system.
virtual void attach_to_state(pod_index_type xbase_space_id, pod_index_type xfiber_schema_id)=0
Attach to the state in host() with component ids xbase_id and xfiber_schema_id.
A client handle for a poset member which has been prepared for use as a schema.
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...