SheafSystem  0.0.0.0
primitives_poset_schema.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 PRIMITIVES_POSET_SCHEMA_H
22 #define PRIMITIVES_POSET_SCHEMA_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef POSET_H
29 #include "SheafSystem/poset.h"
30 #endif
31 
32 #ifndef POSET_MEMBER_H
33 #include "SheafSystem/poset_member.h"
34 #endif
35 
36 #ifndef POSET_STATE_HANDLE_H
37 #include "SheafSystem/poset_state_handle.h"
38 #endif
39 
40 namespace sheaf
41 {
42 
43 class namespace_poset;
44 class subposet;
45 
49 class SHEAF_DLL_SPEC primitives_poset_schema : public poset_state_handle
50 {
51 
52  friend class namespace_poset;
53  friend class primitives_poset;
54 
55  // ===========================================================
57  // ===========================================================
59 
60 public:
61 
65  static const std::string& standard_name();
66 
67 protected:
68 
69 private:
70 
75 
80 
84  subposet* _table_dof_subposet;
85 
89  subposet* _row_dof_subposet;
90 
94  static bool make_prototype();
95 
97 
98 
99  // ===========================================================
101  // ===========================================================
103 
104 public:
105 
109  virtual poset_type type_id() const;
110 
114  virtual const char* class_name() const;
115 
120  virtual bool row_dof_map_conforms(const poset_dof_map* xdof_map) const;
121 
125  virtual void get_read_access() const;
126 
133  virtual void get_read_write_access(bool xrelease_read_only_access = false);
134 
139  virtual void release_access(bool xall = false) const;
140 
144  virtual pod_index_type prereq_id(int xi) const;
145 
146 protected:
147 
151  virtual void initialize_standard_members();
152 
157  virtual void initialize_standard_subposets(const std::string& xname);
158 
164  virtual void schematize(subposet* xtable_dof_subposet,
165  subposet* xrow_dof_subposet,
166  bool xall_members = true);
167 
172  virtual void terminate_access();
173 
174 private:
175 
177 
181  void new_state();
182 
184 
185 
186  // ===========================================================
188  // ===========================================================
190 
191 public:
192 
196  virtual bool is_ancestor_of(const any* other) const;
197 
201  bool invariant() const;
202 
203 protected:
204 
205 private:
206 
210  virtual primitives_poset_schema* clone() const;
211 
213 };
214 
215 } // namespace sheaf
216 
217 #endif // ifndef PRIMITIVES_POSET_SCHEMA_H
A client handle for a subposet.
Definition: subposet.h:86
The default name space; a poset which contains other posets as members.
poset_type
Identifiers for poset types.
Definition: poset_type.h:41
A client handle for a general, abstract partially order set.
The general, abstract map from dof ids to dof values.
Definition: poset_dof_map.h:59
The poset containing the primitive type definitions.
Abstract base class with useful features for all objects.
Definition: any.h:39
The schema poset for the primitives.
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.
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 ...