SheafSystem  0.0.0.0
sec_rep_space.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 SEC_REP_SPACE_H
22 #define SEC_REP_SPACE_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef SCATTERED_INSERTION_INDEX_SPACE_HANDLE_H
29 #include "SheafSystem/scattered_insertion_index_space_handle.h"
30 #endif
31 
32 #ifndef POSET_H
33 #include "SheafSystem/poset.h"
34 #endif
35 
36 #ifndef SECTION_SPACE_SCHEMA_MEMBER_H
37 #include "SheafSystem/section_space_schema_member.h"
38 #endif
39 
40 namespace sheaf
41 {
42  class abstract_poset_member;
43  class namespace_poset;
44  class poset_member;
45 }
46 
47 namespace fiber_bundle
48 {
49 
50 using namespace sheaf;
51 
52 class binary_section_space_schema_member;
53 class sec_rep_descriptor;
54 class sec_rep_space_member;
55 class section_dof_map;
56 
61 class SHEAF_DLL_SPEC sec_rep_space : public poset_state_handle
62 {
63  friend class sheaf::namespace_poset; // Qualification needed by g++ 4.2.2
64  friend class fiber_bundles_namespace;
65 
66  // ===========================================================
68  // ===========================================================
70 
71 public:
72 
76  static const std::string& static_class_name();
77 
81  abstract_poset_member& base();
82 
86  const abstract_poset_member& base() const;
87 
91  int db() const;
92 
96  int df() const;
97 
101  schema_poset_member& fiber_schema();
102 
106  const schema_poset_member& fiber_schema() const;
107 
111  schema_poset_member& fiber_schema(bool xauto_access);
112 
116  const schema_poset_member& fiber_schema(bool xauto_access) const;
117 
121  subposet& discretization();
122 
126  const subposet& discretization() const;
127 
132  int discretization_ct() const;
133 
138  int multiplicity() const;
139 
143  subposet& evaluation();
144 
148  const subposet& evaluation() const;
149 
153  std::string evaluator_family() const;
154 
158  std::string url() const;
159 
163  sec_rep_descriptor& rep();
164 
168  const sec_rep_descriptor& rep() const;
169 
173  static bool rep_is_valid(const abstract_poset_member* xbase, const sec_rep_descriptor* xrep);
174 
175 protected:
176 
180  sec_rep_space();
181 
185  sec_rep_space(const sec_rep_space& xother) { };
186 
191 
196  {
197  return const_cast<sec_rep_space&>(*this);
198  };
199 
203  virtual ~sec_rep_space();
204 
205 private:
206 
210  static bool make_prototype();
211 
213 
214 
215  // ===========================================================
217  // ===========================================================
219 
220 public:
221 
225  bool is_multisection(pod_index_type xhub_id, bool xauto_access) const;
226 
230  bool is_multisection(const scoped_index& xid, bool xauto_access) const;
231 
236  std::string branch_id_space_name(pod_index_type xhub_id, bool xauto_access) const;
237 
242  std::string branch_id_space_name(const scoped_index& xid, bool xauto_access) const;
243 
247  const scattered_insertion_index_space_handle& multisection_id_space(bool xauto_access) const;
248 
252  scattered_insertion_index_space_handle& multisection_id_space(bool xauto_access);
253 
258  scattered_insertion_index_space_handle& get_branch_id_space(pod_index_type xhub_id, bool xauto_access);
259 
264  scattered_insertion_index_space_handle& get_branch_id_space(const scoped_index& xid, bool xauto_access);
265 
269  void release_branch_id_space(index_space_handle& xid_space, bool xauto_access) const;
270 
274  bool allocated_branch_handle(index_space_handle& xid_space, bool xauto_access) const;
275 
280  index_space_iterator& get_branch_id_space_iterator(pod_index_type xhub_id, bool xauto_access) const;
281 
286  index_space_iterator& get_branch_id_space_iterator(const scoped_index& xid, bool xauto_access) const;
287 
291  void release_branch_id_space_iterator(index_space_iterator& xitr, bool xauto_access) const;
292 
296  bool allocated_branch_iterator(index_space_iterator& xitr, bool xauto_access) const;
297 
298 protected:
299 
304 
305 private:
306 
308 
309 
310  // ===========================================================
312  // ===========================================================
314 
315 public:
316 
320  virtual poset_type type_id() const;
321 
325  virtual const char* class_name() const;
326 
330  virtual void begin_jim_edit_mode(bool xauto_access = true);
331 
335  virtual void end_jim_edit_mode(bool xensure_lattice_invariant = true,
336  bool xauto_access = true);
337 
338 protected:
339 
341 
346  virtual void new_state(const poset_path& xpath, const schema_poset_member& xschema, array_poset_dof_map& xdof_map);
347 
348 private:
349 
351 
352 
353  // ===========================================================
355  // ===========================================================
357 
358 public:
359 
363  sec_rep_space_member& top();
364 
368  const sec_rep_space_member& top() const;
369 
373  sec_rep_space_member& bottom();
374 
378  const sec_rep_space_member& bottom() const;
379 
380 protected:
381 
382 private:
383 
385 
386 
387  // ===========================================================
389  // ===========================================================
391 
392 public:
393 
398 
402  virtual section_space_schema_member& schema();
403 
407  virtual const section_space_schema_member& schema() const;
408 
412  section_space_schema_member& schema(bool xauto_access);
413 
417  const section_space_schema_member& schema(bool xauto_access) const;
418 
422  virtual bool schema_is_ancestor_of(const schema_poset_member* xother_schema) const;
423 
427  virtual int dof_ct(bool xis_table_dof) const;
428 
433  virtual bool row_dof_map_conforms(const poset_dof_map* xdof_map) const;
434 
438  virtual size_t dof_tuple_ub(bool xis_table_dof) const;
439 
443  virtual const scoped_index& new_row_dof_map();
444 
450  virtual const scoped_index& new_row_dof_map(pod_index_type xbase_id,
451  int xbase_version);
452 
458  const scoped_index& new_row_dof_map(const scoped_index& xbase_id,
459  int xbase_version);
460 
464  section_dof_map& member_dof_map(pod_index_type xmbr_index,
465  bool xrequire_write_access = false);
466 
470  section_dof_map& member_dof_map(const scoped_index& xmbr_index,
471  bool xrequire_write_access = false);
472 
476  const section_dof_map& member_dof_map(pod_index_type xmbr_index,
477  bool xrequire_write_access = false) const;
478 
482  const section_dof_map& member_dof_map(const scoped_index& xmbr_index,
483  bool xrequire_write_access = false) const;
484 
485 protected:
486 
487 private:
488 
490 
491 
492  // ===========================================================
494  // ===========================================================
496 
497 public:
498 
502  virtual sec_rep_space* clone() const;
503 
507  virtual bool is_ancestor_of(const any* other) const;
508 
512  bool invariant() const;
513 
514 protected:
515 
516 private:
517 
519 
520 };
521 
522 } // namespace fiber_bundle
523 
524 #endif // ifndef SEC_REP_SPACE_H
A client handle for a subposet.
Definition: subposet.h:86
A client handle for a poset member which has been prepared for use as a schema for a section space...
The abstract map from section dof ids to section dof values of heterogeneous type.
An abstract iterator over the ids of an id space.
The default name space; a poset which contains other posets as members.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
poset_type
Identifiers for poset types.
Definition: poset_type.h:41
A client handle for a general, abstract partially order set.
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
A member of a sec_rep_space; a section.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
The general, abstract map from dof ids to dof values.
Definition: poset_dof_map.h:59
sec_rep_space & operator=(const sec_rep_space &xother)
Assignment operator; disabled.
Abstract base class with useful features for all objects.
Definition: any.h:39
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
sec_rep_space(const sec_rep_space &xother)
Copy constructor; disabled.
scattered_insertion_index_space_handle _multisection_id_space
The sequence id space for multisections.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
A handle for a scattered_insertion_index_space_state.
Namespace for the sheaves component of the sheaf system.
A client handle for a poset member which has been prepared for use as a schema for a section space...
binary_section_space_schema_member schema_type
The type of schema member for this class.
An abstract client handle for a member of a poset.
An array representation of abstract class poset_dof_map.
void new_state(namespace_poset &xns, const poset_path &xpath, const schema_poset_member &xschema, array_poset_dof_map &xdof_map)
Creates a new poset state with schema xschema and table dof map xdof_map, attaches this to the state ...
Namespace for the fiber_bundles component of the sheaf system.
A client handle for a poset member which has been prepared for use as a schema.
A description for a section representation scheme.
A handle for a poset whose members are numerical representations of sections of a fiber bundle...
Definition: sec_rep_space.h:61