SheafSystem  0.0.0.0
poset.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 POSET_H
22 #define POSET_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef POSET_STATE_HANDLE_H
29 #include "SheafSystem/poset_state_handle.h"
30 #endif
31 
32 namespace sheaf
33 {
34 
35 class namespace_poset;
36 
40 class SHEAF_DLL_SPEC poset : public poset_state_handle
41 {
42 
43  friend class abstract_poset_member;
44  friend class namespace_poset;
45  friend class poset_component;
46  friend class poset_orderer;
47  friend class poset_traverser;
48  friend class storage_agent;
49 
50  // ===========================================================
52  // ===========================================================
54 
55 public:
56 
61 
66  static poset& new_table(namespace_type& xhost,
67  const poset_path& xpath,
68  const poset_path& xschema_path,
69  bool xauto_access);
70 
71 protected:
72 
76  poset();
77 
81  virtual ~poset();
82 
87 
91  poset(const poset& xother) { };
92 
97  {
98  return const_cast<poset&>(*this);
99  };
100 
101 private:
102 
106  static bool make_prototype();
107 
109 
110 
111  // ===========================================================
113  // ===========================================================
115 
116 public:
117 
121  virtual poset_type type_id() const;
122 
126  virtual const char* class_name() const;
127 
131  virtual void begin_jim_edit_mode(bool xauto_access = true);
132 
136  virtual void end_jim_edit_mode(bool xensure_lattice_invariant = true,
137  bool xauto_access = true);
138 
139 protected:
140 
141  // The using declaration is placed here as opposed to being at the beginning
142  // of the public "new_state" methods because putting it in the public section
143  // makes the following new_state method public also.
144 
146 
151  virtual void new_state(const poset_path& xpath, const schema_poset_member& xschema, array_poset_dof_map& xdof_map);
152 
153 private:
154 
156 
157 
158  // ===========================================================
160  // ===========================================================
162 
163 public:
164 
168  virtual bool is_ancestor_of(const any* other) const;
169 
174  virtual poset* clone() const;
175 
179  virtual bool invariant() const;
180 
181 protected:
182 
183 private:
184 
186 
187 };
188 
189 } // namespace sheaf
190 
191 #endif // POSET_H
192 
poset & operator=(const poset_state_handle &xother)
Assignment operator; disabled.
Definition: poset.h:96
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.
Abstract traverser (internal iterator) for poset.
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
Features shared by poset_member and subposet. Subposet and poset_member objects can be attached...
namespace_poset namespace_type
The type of namespace for this type of member.
Definition: poset.h:60
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
poset(const poset &xother)
Copy constructor; disabled.
Definition: poset.h:91
Namespace for the sheaves component of the sheaf system.
An abstract client handle for a member of a poset.
Traverser to ensure validity of order relation.
Definition: poset_orderer.h:46
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 ...
A client handle for a poset member which has been prepared for use as a schema.
Agent responsible for importing and exporting posets from an external name space which resides on dis...
Definition: storage_agent.h:74