SheafSystem  0.0.0.0
sec_rep_descriptor.h
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 
18 // Interface for class sec_rep_descriptor
19 
20 #ifndef SEC_REP_DESCRIPTOR_H
21 #define SEC_REP_DESCRIPTOR_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifdef STD_STRING_H
28 #include "SheafSystem/std_string.h"
29 #endif
30 
31 #ifndef TOTAL_POSET_MEMBER
32 #include "SheafSystem/total_poset_member.h"
33 #endif
34 
35 #ifndef ARRAY_POSET_DOF_MAP
36 #include "SheafSystem/array_poset_dof_map.h"
37 #endif
38 
39 namespace sheaf
40 {
41 class any;
42 class namespace_poset;
43 class poset;
44 class poset_state_handle;
45 }
46 
47 namespace fiber_bundle
48 {
49 
50 using namespace sheaf;
51 
52 class eval_family;
53 class fiber_bundles_namespace;
54 class sec_rep_descriptor_poset;
55 class sec_rep_space;
56 
60 class SHEAF_DLL_SPEC sec_rep_descriptor: public total_poset_member
61 {
62 
63  // ===========================================================
65  // ===========================================================
67 
68 public:
69 
74 
79 
83  static const poset_path& standard_schema_path();
84 
88  static void make_standard_schema(namespace_poset& xns);
89 
93  static const poset_path& standard_host_path();
94 
100  static host_type& new_host(namespace_type& xns,
101  const poset_path& xhost_path,
102  const poset_path& xschema_path,
103  const poset_path& xprototypes_path,
104  bool xauto_access);
105 
112  static host_type& standard_host(namespace_type& xns, bool xauto_access);
113 
114 protected:
115 
116 private:
117 
119 
120  // ===========================================================
122  // ===========================================================
124 
125 public:
126 
130  virtual sec_rep_descriptor& operator=(const abstract_poset_member& xother);
131 
135  sec_rep_descriptor& operator=(const sec_rep_descriptor& xother);
136 
137  // CANONICAL MEMBERS
138 
144 
149  sec_rep_descriptor(const sec_rep_descriptor& xother, bool xnew_jem);
150 
154  virtual sec_rep_descriptor* clone() const;
155 
161  inline sec_rep_descriptor* clone(bool xnew_state, bool xauto_access = true) const
162  {
163  return static_cast<sec_rep_descriptor*>(total_poset_member::clone(xnew_state, xauto_access));
164  }
165 
169  virtual ~sec_rep_descriptor();
170 
174  virtual bool invariant() const;
175 
179  virtual bool is_ancestor_of(const any* other) const;
180 
181  // NEW HANDLE, NEW STATE CONSTRUCTORS
182 
186  sec_rep_descriptor(poset *xhost,
187  const std::string& xdiscretization_subposet_name,
188  const std::string& xmultivalued_subposet_name,
189  const std::string& xevaluation_subposet_name,
190  const std::string& xevaluation_method_name,
191  const std::string& xurl,
192  int xmultiplicity,
193  bool xeval_is_above_disc,
194  bool xauto_access);
195 
196  // NEW HANDLE, EXISTING STATE CONSTRUCTORS
197 
202  sec_rep_descriptor(const poset *xhost, pod_index_type xindex);
203 
208  sec_rep_descriptor(const poset *xhost, const scoped_index& xindex);
209 
214  sec_rep_descriptor(const poset *xhost, const std::string& xname);
215 
221  const poset_path& xpath,
222  bool xauto_access = true);
223 
229  sec_rep_descriptor(const namespace_poset* xnamespace,
230  pod_index_type xposet_id,
231  pod_index_type xmember_id,
232  bool xauto_access = true);
233 
239  sec_rep_descriptor(const namespace_poset* xnamespace,
240  const scoped_index& xposet_id,
241  const scoped_index& xmember_id,
242  bool xauto_access = true);
243 
244 
245  // EXISTING HANDLE, NEW STATE "CONSTRUCTORS"
246 
248 
255  virtual void new_jim_state(poset_dof_map* xdof_map = 0,
256  bool xcopy_dof_map = false,
257  bool xauto_access = true);
258 
263  virtual void new_jim_state(poset_state_handle* xhost,
264  poset_dof_map* xdof_map = 0,
265  bool xcopy_dof_map = false,
266  bool xauto_access = true);
267 
268 
272  void new_jim_state(poset *xhost,
273  const std::string& xdiscretization_subposet_name,
274  const std::string& xmultivalued_subposet_name,
275  const std::string& xevaluation_subposet_name,
276  const std::string& xevaluation_method_name,
277  const std::string& xurl,
278  int xmultiplicity,
279  bool xeval_is_above_disc,
280  bool xauto_access);
281 
282  // DEGREE OF FREEDOM (DOF) TUPLE INTERFACE
283 
287  virtual array_poset_dof_map& dof_map(bool xrequire_write_access = false);
288 
292  virtual const array_poset_dof_map& dof_map(bool xrequire_write_access = false) const;
293 
298  virtual bool dof_map_is_ancestor_of(const poset_dof_map* xdof_map) const;
299 
300  // SEC_REP_DESCRIPTOR FACET
301 
305  std::string discretization_subposet_name() const;
306 
310  void put_discretization_subposet_name(const std::string& xname);
311 
315  std::string multivalued_subposet_name() const;
316 
320  void put_multivalued_subposet_name(const std::string& xname);
321 
325  std::string evaluation_subposet_name() const;
326 
330  void put_evaluation_subposet_name(const std::string& xname);
331 
335  std::string evaluator_family_name() const;
336 
340  void put_evaluator_family_name(const std::string& xname);
341 
345  std::string url() const;
346 
350  void put_url(const std::string& xurl);
351 
356  int multiplicity() const;
357 
362  void put_multiplicity(int xmultiplicity);
363 
368  bool eval_is_above_disc() const;
369 
373  void put_eval_is_above_disc(bool xvalue);
374 
382  eval_family* evaluators() const;
383 
384 protected:
385 
390  virtual void attach_handle_data_members();
391 
392 private:
396  class SHEAF_DLL_SPEC row_dof_tuple
397  {
398  public:
399 
403  char* discretization_subposet_name;
404 
408  char* multivalued_subposet_name;
409 
413  char* evaluation_subposet_name;
414 
418  char* evaluator_family_name;
419 
423  char* url;
424 
428  int multiplicity;
429 
433  size_type eval_is_above_disc;
434 
438  row_dof_tuple(const std::string& xdiscretization_subposet_name,
439  const std::string& xmultivalued_subposet_name,
440  const std::string& xevaluation_subposet_name,
441  const std::string& xevaluator_family_name,
442  const std::string& xurl,
443  int xmultiplicity,
444  size_type xeval_is_above_disc);
445 
449  static void copy_string_dof(char*& xdof, const std::string& xdof_value);
450 
451  };
452 
456  inline const row_dof_tuple* row_dof_tuple_ptr() const
457  {
458  return reinterpret_cast<const row_dof_tuple*>(dof_map(false).dof_tuple());
459  };
460 
464  inline row_dof_tuple* row_dof_tuple_ptr()
465  {
466  return reinterpret_cast<row_dof_tuple*>(dof_map(true).dof_tuple());
467  };
468 
472  eval_family* _evaluators;
473 
475 
476 };
477 
478 } // namespace fiber_bundle
479 
480 #endif // ifndef SEC_REP_DESCRIPTOR_H
481 
482 
483 
484 
485 
486 
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.
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...
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
The general, abstract map from dof ids to dof values.
Definition: poset_dof_map.h:59
The poset for sec_rep_descriptors.
Abstract base class with useful features for all objects.
Definition: any.h:39
A client handle for a mutable partially ordered set.
Definition: poset.h:40
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
A family of compatible section evaluators, one for each member of some family of cell types; a map fr...
Definition: eval_family.h:67
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
sec_rep_descriptor_poset host_type
The type of host poset.
fiber_bundles_namespace namespace_type
The type of namespace for this type of member.
virtual void * dof_tuple()
The dof tuple (mutable version).
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
Namespace for the sheaves component of the sheaf system.
sec_rep_descriptor * 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...
An abstract client handle for a member of a poset.
An array representation of abstract class poset_dof_map.
Namespace for the fiber_bundles component of the sheaf system.
A client handle for an unrestricted member of a poset. A total_poset_member is guaranteed not to be r...
A description for a section representation scheme.