SheafSystem  0.0.0.0
partial_poset_member.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 PARTIAL_POSET_MEMBER_H
22 #define PARTIAL_POSET_MEMBER_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ABSTRACT_POSET_MEMBER_H
29 #include "SheafSystem/abstract_poset_member.h"
30 #endif
31 
32 #ifndef SCHEMA_POSET_MEMBER_H
33 #include "SheafSystem/schema_poset_member.h"
34 #endif
35 
36 #ifndef STD_IOSTREAM_H
37 #include "SheafSystem/std_iostream.h"
38 #endif
39 
40 #ifndef STD_STRING_H
41 #include "SheafSystem/std_string.h"
42 #endif
43 
44 namespace sheaf
45 {
46 
47 class subposet;
48 class poset_dof_map;
49 class poset_member_dof_iterator;
50 class poset_member_iterator;
51 class storage_agent;
52 
60 class SHEAF_DLL_SPEC partial_poset_member : public abstract_poset_member
61 {
62  // ===========================================================
64  // ===========================================================
66 
67 public:
68 
74 
81  explicit partial_poset_member(const abstract_poset_member& xother, bool xnew_jem = false);
82 
86  virtual partial_poset_member& operator=(const abstract_poset_member& xother);
87 
91  partial_poset_member& operator=(const partial_poset_member& xother);
92 
96  virtual ~partial_poset_member();
97 
103  inline partial_poset_member* clone(bool xnew_state, bool xauto_access = true) const
104  {
105  return static_cast<partial_poset_member*>(abstract_poset_member::clone(xnew_state, xauto_access));
106  }
107 
108  // NEW HANDLE, NEW STATE CONSTRUCTORS
109 
116  poset_dof_map* xdof_map = 0,
117  bool xcopy_dof_map = false,
118  bool xauto_access = true);
119 
120  // partial_poset_member(poset_state_handle* xhost, block@<int@>* xexpansion);
121 
128  const scoped_index* xexpansion,
129  int xexpansion_ct,
130  const tern& xnew_jem,
131  bool xauto_access);
132 
133  // NEW HANDLE, EXISTING STATE CONSTRUCTORS
134 
140 
145  partial_poset_member(const poset_state_handle* xhost, const scoped_index& xid);
146 
151  partial_poset_member(const poset_state_handle* xhost, const std::string& xname);
152 
157  partial_poset_member(const namespace_poset* xnamespace,
158  const poset_path& xpath,
159  bool xauto_access = true);
160 
165 
166 protected:
167 
173  virtual void init_handle_data_members();
174 
179  virtual void attach_handle_data_members();
180 
181 private:
182 
184 
185 
186  // ===========================================================
188  // ===========================================================
190 
191 public:
192 
194 
198  virtual schema_poset_member& schema();
199 
203  virtual const schema_poset_member& schema() const;
204 
205 protected:
206 
211 
212 private:
213 
215 
216 
217  // ===========================================================
219  // ===========================================================
221 
222 public:
223 
224 protected:
225 
229  virtual void restrict_to(const abstract_poset_member* xschema);
230 
234  virtual void restrict_to_same(const abstract_poset_member* xother);
235 
239  virtual void unrestrict();
240 
241 private:
242 
244 
245 
246  // ===========================================================
248  // ===========================================================
250 
251 public:
252 
256  virtual int dof_ct() const;
257 
258 protected:
259 
260 private:
261 
263 
264 
265  // ===========================================================
267  // ===========================================================
269 
270 public:
271 
276  {
278  };
279 
284  {
286  };
287 
288 protected:
289 
290 private:
291 
293 
294 
295  // ===========================================================
297  // ===========================================================
299 
300 public:
301 
307  {
308  return static_cast<partial_poset_member*>(abstract_poset_member::p_join(other));
309  };
310 
316  {
317  return static_cast<partial_poset_member*>(abstract_poset_member::p_meet(other));
318  };
319 
320 protected:
321 
322 private:
323 
325 
326 
327  // ===========================================================
329  // ===========================================================
331 
332 public:
333 
339  inline partial_poset_member* l_join(partial_poset_member* other, bool xnew_jem = true)
340  {
341  return static_cast<partial_poset_member*>(abstract_poset_member::l_join(other, xnew_jem));
342  };
343 
349  inline partial_poset_member* l_meet(partial_poset_member* other, bool xnew_jem = true)
350  {
351  return static_cast<partial_poset_member*>(abstract_poset_member::l_meet(other, xnew_jem));
352  };
353 
359  inline partial_poset_member* l_not(bool xnew_jem = true) const
360  {
361  return static_cast<partial_poset_member*>(abstract_poset_member::l_not(xnew_jem));
362  };
363 
364 protected:
365 
366 private:
367 
369 
370 
371  // ===========================================================
373  // ===========================================================
375 
376 public:
377 
381  virtual void detach_from_state();
382 
383 
384 protected:
385 
386 private:
387 
389 
390 
391  // ===========================================================
393  // ===========================================================
395 
396 public:
397 
401  virtual bool is_ancestor_of(const any* other) const;
402 
406  virtual partial_poset_member* clone() const;
407 
411  virtual bool invariant() const;
412 
413 protected:
414 
415 private:
416 
418 };
419 
420 } // namespace sheaf
421 
422 #endif // PARTIAL_POSET_MEMBER_H
partial_poset_member * p_meet(partial_poset_member *other)
poset meet of this with other, auto-, pre-, and self-allocated versions the poset meet is the greates...
abstract_poset_member * p_join(abstract_poset_member *other) const
poset join of this with other, auto-allocated the poset join is the least upper bound in the poset ...
abstract_poset_member * greatest_jem() const
The largest member which is join-equivalent to this.
The default name space; a poset which contains other posets as members.
partial_poset_member * least_jem() const
The smallest member which is join-equivalent to this.
partial_poset_member * 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...
A three state "bool". Does not provide the operations of ternary logic and is intended for use mostly...
Definition: tern.h:45
A client handle for a general, abstract partially order set.
virtual abstract_poset_member * clone() const =0
Virtual constructor; makes a new unattached handle of the same type as this.
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 client handle for a possibly restricted member of a poset. A partial_poset_member is a poset_me...
The general, abstract map from dof ids to dof values.
Definition: poset_dof_map.h:59
partial_poset_member * greatest_jem() const
The largest member which is join-equivalent to this.
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
abstract_poset_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-allocated The lattice pseudo-complement is the largest latt...
abstract_poset_member * least_jem() const
The smallest member which is join-equivalent to this.
abstract_poset_member * l_meet(abstract_poset_member *other, bool xnew_jem=true)
lattice meet of this with other, auto-allocated the lattice meet is the greatest lower bound in the...
virtual schema_poset_member & schema()
The schema for this poset member (mutable version).
schema_poset_member * _schema
The restricted schema of this member.
partial_poset_member * l_meet(partial_poset_member *other, bool xnew_jem=true)
lattice meet of this with other, auto-, pre-, and self-allocated versions the lattice meet is the gre...
partial_poset_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
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.
An abstract client handle for a member of a poset.
partial_poset_member * l_join(partial_poset_member *other, bool xnew_jem=true)
lattice join of this with other, auto-, pre-, and self-allocated versions the lattice join is the lea...
abstract_poset_member * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-allocated the poset meet is the greatest lower bound in the pos...
partial_poset_member * p_join(partial_poset_member *other) const
poset join of this with other, auto-, pre-, and self-allocated versions the poset join is the least u...
A client handle for a poset member which has been prepared for use as a schema.
abstract_poset_member * l_join(abstract_poset_member *other, bool xnew_jem=true)
lattice join of this with other, auto-allocated the lattice join is the least upper bound in the la...