SheafSystem  0.0.0.0
total_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 TOTAL_POSET_MEMBER_H
22 #define TOTAL_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 POSET_PATH_H
33 #include "SheafSystem/poset_path.h"
34 #endif
35 
36 #ifndef STD_STRING_H
37 #include "SheafSystem/std_string.h"
38 #endif
39 
40 namespace sheaf
41 {
42 
43 class subposet;
44 class poset_dof_map;
45 class poset_member_dof_iterator;
46 class poset_member_iterator;
47 class storage_agent;
48 
54 class SHEAF_DLL_SPEC total_poset_member : public abstract_poset_member
55 {
56  // ===========================================================
58  // ===========================================================
60 
61 public:
62 
67 
74  explicit total_poset_member(const abstract_poset_member& xother, bool xnew_jem = false);
75 
79  virtual total_poset_member& operator=(const abstract_poset_member& xother);
80 
84  total_poset_member& operator=(const total_poset_member& xother);
85 
89  virtual ~total_poset_member();
90 
96  inline total_poset_member* clone(bool xnew_state, bool xauto_access = true) const
97  {
98  return static_cast<total_poset_member*>(abstract_poset_member::clone(xnew_state, xauto_access));
99  }
100 
101  // NEW HANDLE, NEW STATE CONSTRUCTORS
102 
109  explicit total_poset_member(poset_state_handle* xhost,
110  poset_dof_map* xdof_map = 0,
111  bool xcopy_dof_map = false,
112  bool xauto_access = true);
113 
120  const scoped_index* xexpansion,
121  int xexpansion_ct,
122  const tern& xnew_jem,
123  bool xauto_access);
124 
125  // NEW HANDLE, EXISTING STATE CONSTRUCTORS
126 
132 
137  total_poset_member(const poset_state_handle* xhost, const scoped_index& xid);
138 
143  total_poset_member(const poset_state_handle* xhost, const std::string& xname);
144 
150  total_poset_member(const namespace_poset* xnamespace,
151  const poset_path& xpath,
152  bool xauto_access = true);
153 
154 protected:
155 
156 private:
157 
159 
160 
161  // ===========================================================
163  // ===========================================================
165 
166 public:
167 
169 
173  virtual schema_poset_member& schema();
174 
178  virtual const schema_poset_member& schema() const;
179 
180 protected:
181 
182 private:
183 
185 
186 
187  // ===========================================================
189  // ===========================================================
191 
192 public:
193 
198  virtual bool is_restricted() const;
199 
200 protected:
201 
202 private:
203 
205 
206 
207  // ===========================================================
209  // ===========================================================
211 
212 public:
213 
217  virtual int dof_ct() const;
218 
219 protected:
220 
221 private:
222 
224 
225 
226  // ===========================================================
228  // ===========================================================
230 
231 public:
232 
237  {
239  };
240 
245  {
247  };
248 
249 protected:
250 
251 private:
252 
254 
255 
256  // ===========================================================
258  // ===========================================================
260 
261 public:
262 
268  {
269  return static_cast<total_poset_member*>(abstract_poset_member::p_join(other));
270  };
271 
277  {
278  return static_cast<total_poset_member*>(abstract_poset_member::p_meet(other));
279  };
280 
281 protected:
282 
283 private:
284 
286 
287 
288  // ===========================================================
290  // ===========================================================
292 
293 public:
294 
300  inline total_poset_member* l_join(abstract_poset_member* other, bool xnew_jem = true)
301  {
302  return static_cast<total_poset_member*>(abstract_poset_member::l_join(other, xnew_jem));
303  };
304 
310  inline total_poset_member* l_meet(abstract_poset_member* other, bool xnew_jem = true)
311  {
312  return static_cast<total_poset_member*>(abstract_poset_member::l_meet(other, xnew_jem));
313  };
314 
320  inline total_poset_member* l_not(bool xnew_jem = true) const
321  {
322  return static_cast<total_poset_member*>(abstract_poset_member::l_not(xnew_jem));
323  };
324 
325 protected:
326 
327 private:
328 
330 
331 
332  // ===========================================================
334  // ===========================================================
336 
337 public:
338 
342  virtual bool is_ancestor_of(const any* other) const;
343 
347  virtual total_poset_member* clone() const;
348 
352  virtual bool invariant() const;
353 
354 protected:
355 
356 private:
357 
359 };
360 
361 
362 // ===========================================================
363 // NON-MEMBER FUNCTIONS
364 // ===========================================================
365 
366 } // namespace sheaf
367 
368 #endif // TOTAL_POSET_MEMBER_H
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.
total_poset_member * p_meet(abstract_poset_member *other)
poset meet of this with other, auto-, pre-, and self-allocated versions the poset meet is the greates...
The default name space; a poset which contains other posets as members.
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.
total_poset_member * greatest_jem() const
The largest member which is join-equivalent to this.
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
The general, abstract map from dof ids to dof values.
Definition: poset_dof_map.h:59
Abstract base class with useful features for all objects.
Definition: any.h:39
total_poset_member * least_jem() const
The smallest member which is join-equivalent to this.
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).
total_poset_member * l_join(abstract_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...
total_poset_member * l_meet(abstract_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...
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.
total_poset_member * p_join(abstract_poset_member *other) const
poset join of this with other, auto-, pre-, and self-allocated versions the poset join is the least u...
An abstract client handle for a member of a poset.
total_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...
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...
A client handle for a poset member which has been prepared for use as a schema.
total_poset_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-, pre- and self allocated versions The lattice pseudo-complem...
A client handle for an unrestricted member of a poset. A total_poset_member is guaranteed not to be r...
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...