SheafSystem  0.0.0.0
group.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 GROUP_H
22 #define GROUP_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ANY_LITE_H
29 #include "SheafSystem/any_lite.h"
30 #endif
31 
32 #ifndef FIBER_BUNDLE_H
33 #include "SheafSystem/fiber_bundle.h"
34 #endif
35 
36 #ifndef PARTIAL_POSET_MEMBER_H
37 #include "SheafSystem/partial_poset_member.h"
38 #endif
39 
40 // #ifndef POSET_H
41 // #include "SheafSystem/poset.h"
42 // #endif
43 
44 
45 namespace sheaf
46 {
47  class poset;
48 }
49 
50 namespace fiber_bundle
51 {
52  using namespace sheaf;
53 
54  class fiber_bundles_namespace;
55 
56 //==============================================================================
57 // CLASS GROUP_LITE
58 //==============================================================================
59 
64 class SHEAF_DLL_SPEC group_lite : public any_lite
65 {
66  //============================================================================
68  //============================================================================
70 
71 public:
72 
76  group_lite();
77 
81  group_lite(const group_lite& xother);
82 
86  group_lite& operator=(const group_lite& xother);
87 
91  virtual ~group_lite();
92 
93 protected:
94 private:
95 
97 
98 
99  //============================================================================
101  //============================================================================
103 
104 public:
105 
109  virtual const std::string& class_name() const;
110 
114  static const std::string& static_class_name();
115 
119  virtual group_lite* clone() const;
120 
121 protected:
122 private:
123 
125 
126 
127  //============================================================================
129  //============================================================================
131 
132 public:
133 
137  virtual bool is_ancestor_of(const any_lite& xother) const;
138 
142  bool invariant() const;
143 
144 protected:
145 private:
146 
148 };
149 
150 //==============================================================================
151 // CLASS GROUP
152 //==============================================================================
153 
158 class SHEAF_DLL_SPEC group : public total_poset_member
159 {
160 
161  //============================================================================
163  //============================================================================
165 
166 public:
167 
172 
176  typedef poset host_type;
177 
181  template <typename F>
182  SHEAF_DLL_SPEC
183  static poset_path standard_host_path(const std::string& xsuffix);
184 
189  template <typename F>
190  SHEAF_DLL_SPEC
191  static bool standard_host_is_available(namespace_type& xns, const std::string& xsuffix, bool xauto_access);
192 
193 protected:
194 
195 private:
196 
198 
199 
200  //============================================================================
202  //============================================================================
204 
205 public:
206 
211 
215  virtual group& operator=(const abstract_poset_member& xother);
216 
220  group& operator=(const group& xother);
221 
225  virtual ~group();
226 
230  host_type* host() const;
231 
232 protected:
233 
237  group();
238 
239 private:
240 
241 
243 
244 
245  //============================================================================
247  //============================================================================
249 
250 public:
251 
255  virtual const std::string& class_name() const = 0;
256 
260  static const std::string& static_class_name();
261 
265  virtual group* clone() const = 0;
266 
267 
268 
274  inline group* clone(bool xnew_state, bool xauto_access = true) const
275  {
276  return static_cast<group*>(total_poset_member::clone(xnew_state, xauto_access));
277  }
278 
279 protected:
280 private:
281 
283 
284 
285  //===========================================================================
287  //===========================================================================
289 
290 public:
291 
295  virtual bool invariant() const;
296 
300  virtual bool is_ancestor_of(const any* other) const;
301 
302 protected:
303 private:
304 
306 };
307 
308 } // namespace fiber_bundle
309 
310 #endif // ifndef GROUP_H
311 
312 
313 
314 
315 
316 
fiber_bundles_namespace namespace_type
The type of namespace for this type of member.
Definition: group.h:171
virtual total_poset_member * clone() const
Make a new handle, no state instance of current.
The general, abstract mathematical group (volatile version).
Definition: group.h:64
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
group_lite volatile_type
The associated volatile type.
Definition: group.h:210
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
Abstract base class with useful features for all volatile objects.
Definition: any_lite.h:48
Abstract base class with useful features for all objects.
Definition: any.h:39
poset host_type
The type of host poset.
Definition: group.h:176
A client handle for a mutable partially ordered set.
Definition: poset.h:40
group * 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...
Definition: group.h:274
The general, abstract mathematical group (persistent version)
Definition: group.h:158
Namespace for the sheaves component of the sheaf system.
An abstract client handle for a member of a poset.
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...