SheafSystem  0.0.0.0
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 POSET_MEMBER_H
22 #define POSET_MEMBER_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef PARTIAL_POSET_MEMBER_H
29 #include "SheafSystem/partial_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 poset_dof_map;
48 class poset_member_dof_iterator;
49 class poset_member_iterator;
50 class storage_agent;
51 class subposet;
52 
59 class SHEAF_DLL_SPEC poset_member : public partial_poset_member
60 {
61  // ===========================================================
63  // ===========================================================
65 
66 public:
67 
71  poset_member();
72 
79  explicit poset_member(const abstract_poset_member& xother, bool xnew_jem = false);
80 
84  virtual poset_member& operator=(const abstract_poset_member& xother);
85 
89  poset_member& operator=(const poset_member& xother);
90 
94  virtual ~poset_member();
95 
101  inline poset_member* clone(bool xnew_state, bool xauto_access = true) const
102  {
103  return static_cast<poset_member*>(partial_poset_member::clone(xnew_state, xauto_access));
104  }
105 
106  // NEW HANDLE, NEW STATE CONSTRUCTORS
107 
113  explicit poset_member(poset_state_handle* xhost,
114  poset_dof_map* xdof_map = 0,
115  bool xcopy_dof_map = false,
116  bool xauto_access = true);
117 
118  // poset_member(poset_state_handle* xhost, block@<int@>* xexpansion);
119 
126  const scoped_index* xexpansion,
127  int xexpansion_ct,
128  const tern& xnew_jem,
129  bool xauto_access);
130 
131 
132  // NEW HANDLE, EXISTING STATE CONSTRUCTORS
133 
138  poset_member(const poset_state_handle* xhost, pod_index_type xhub_id);
139 
144  poset_member(const poset_state_handle* xhost, const scoped_index& xid);
145 
150  poset_member(const poset_state_handle* xhost, const std::string& xname);
151 
156  poset_member(const namespace_poset* xnamespace,
157  const poset_path& xpath,
158  bool xauto_access = true);
159 
160 protected:
161 
162 private:
163 
165 
166 
167  // ===========================================================
169  // ===========================================================
171 
172 public:
173 
174  // Member functions in restriction facet redefined only
175  // to change access status from protected to public.
176 
180  virtual void restrict_to(const abstract_poset_member* xschema);
181 
185  virtual void restrict_to_same(const abstract_poset_member* xother);
186 
190  virtual void unrestrict();
191 
192 protected:
193 
194 private:
195 
197 
198 
199  // ===========================================================
201  // ===========================================================
203 
204 public:
205 
209  inline poset_member* greatest_jem() const
210  {
211  return static_cast<poset_member*>(abstract_poset_member::greatest_jem());
212  };
213 
217  inline poset_member* least_jem() const
218  {
219  return static_cast<poset_member*>(abstract_poset_member::least_jem());
220  };
221 
222 protected:
223 
224 private:
225 
227 
228 
229  // ===========================================================
231  // ===========================================================
233 
234 public:
235 
240  inline poset_member* p_join(poset_member* other) const
241  {
242  return static_cast<poset_member*>(abstract_poset_member::p_join(other));
243  };
244 
250  {
251  return static_cast<poset_member*>(abstract_poset_member::p_meet(other));
252  };
253 
254 protected:
255 
256 private:
257 
259 
260 
261  // ===========================================================
263  // ===========================================================
265 
266 public:
267 
273  inline poset_member* l_join(poset_member* other, bool xnew_jem = true)
274  {
275  return static_cast<poset_member*>(abstract_poset_member::l_join(other, xnew_jem));
276  };
277 
283  inline poset_member* l_meet(poset_member* other, bool xnew_jem = true)
284  {
285  return static_cast<poset_member*>(abstract_poset_member::l_meet(other, xnew_jem));
286  };
287 
293  inline poset_member* l_not(bool xnew_jem = true) const
294  {
295  return static_cast<poset_member*>(abstract_poset_member::l_not(xnew_jem));
296  };
297 
298 protected:
299 
300 private:
301 
303 
304 
305  // ===========================================================
307  // ===========================================================
309 
310 public:
311 
315  virtual bool is_ancestor_of(const any* other) const;
316 
320  virtual poset_member* clone() const;
321 
325  virtual bool invariant() const;
326 
327 protected:
328 
329 private:
330 
332 };
333 
334 
335 // ===========================================================
336 // NONMEMBER FUNCTIONS
337 // ===========================================================
338 
339 } // namespace sheaf
340 
341 #endif // POSET_MEMBER_H
poset_member * least_jem() const
The smallest member which is join-equivalent to this.
Definition: poset_member.h:217
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.
virtual partial_poset_member * clone() const
Make a new handle, no state instance of current.
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.
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
poset_member * greatest_jem() const
The largest member which is join-equivalent to this.
Definition: poset_member.h:209
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
poset_member * l_join(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...
Definition: poset_member.h:273
Abstract base class with useful features for all objects.
Definition: any.h:39
poset_member * l_not(bool xnew_jem=true) const
lattice pseudo-complement of this, auto-allocated The lattice pseudo-complement is the largest latt...
Definition: poset_member.h:293
A client handle for a restrictable member of a poset. A poset_member is a poset_member which can ...
Definition: poset_member.h:59
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.
poset_member * p_join(poset_member *other) const
poset join of this with other, auto-allocated the poset join is the least upper bound in the poset ...
Definition: poset_member.h:240
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...
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.
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...
Definition: poset_member.h:101
An abstract client handle for a member of a poset.
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...
poset_member * l_meet(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...
Definition: poset_member.h:283
poset_member * p_meet(poset_member *other)
poset meet of this with other, auto-allocated the poset meet is the greatest lower bound in the pos...
Definition: poset_member.h:249
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...