SheafSystem  0.0.0.0
implicit_crg_interval.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 IMPLICIT_CRG_INTERVAL_H
22 #define IMPLICIT_CRG_INTERVAL_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef CRG_INTERVAL_H
29 #include "SheafSystem/crg_interval.h"
30 #endif
31 
32 namespace sheaf
33 {
34 
35 // Forward declarations to support friend declaration.
36 
37 class implicit_crg_interval;
38 
43 class SHEAF_DLL_SPEC implicit_crg_interval : public crg_interval
44 {
45 
46  friend SHEAF_DLL_SPEC size_t deep_size(const implicit_crg_interval& xp, bool xinclude_shallow);
47 
48  // ===========================================================
50  // ===========================================================
52 
53 public:
54 
59 
63  virtual ~implicit_crg_interval();
64 
65 protected:
66 
67 private:
68 
70 
71 
72  // ===========================================================
74  // ===========================================================
76 
77 public:
78 
84  pod_index_type implicit_begin() const;
85 
91  void implicit_begin(scoped_index& result) const;
92 
97  pod_index_type interval_member() const;
98 
103  void interval_member(scoped_index& result) const;
104 
108  bool is_interval_member(pod_index_type xindex) const;
109 
113  bool is_interval_member(const scoped_index& xindex) const;
114 
115 protected:
116 
117 private:
118 
120 
121 
122  // ===========================================================
124  // ===========================================================
126 
127 public:
128 
129 protected:
130 
134  static std::string implicit_cover_name(bool xlower, const scoped_index& xmbr_index);
135 
139  static std::string implicit_cover_name(bool xlower, pod_index_type xmbr_index);
140 
141 private:
142 
144 
145 
146  // ===========================================================
148  // ===========================================================
150 
151 public:
152 
156  virtual bool is_jim(pod_index_type xmbr_index) const = 0;
157 
161  bool is_jim(const scoped_index& xmbr_index) const;
162 
166  virtual pod_index_type dof_tuple_id(pod_index_type xmbr_index) const = 0;
167 
171  pod_index_type dof_tuple_id(const scoped_index& xmbr_index) const;
172 
176  block<pod_index_type>& dof_tuple_ids();
177 
181  const block<pod_index_type>& dof_tuple_ids() const;
182 
186  bool dof_tuple_ids_initialized() const;
187 
191  void initialize_dof_tuple_ids(const block<pod_index_type>& xdof_tuple_ids);
192 
193 protected:
194 
199 
204 
205 private:
206 
208 
209 
210  // ===========================================================
212  // ===========================================================
214 
215 public:
216 
220  void clean_cover(bool xlower, pod_index_type xmbr_index);
221 
222 protected:
223 
224 private:
225 
227 
228 
229  // ===========================================================
231  // ===========================================================
233 
234 public:
235 
236  // $$SCRIBBLE: implicit-cover-reorganization
237  // Made private data functions non-virtual.
238 
242  size_type private_data_size() const;
243 
247  void get_private_data(block<pod_index_type>& xdata) const;
248 
252  void put_private_data(const block<pod_index_type>& xdata);
253 
257  bool private_data_initialized() const;
258 
259 protected:
260 
261  // $$SCRIBBLE: implicit-cover-reorganization
262  // Added implicit private data function
263 
267  virtual size_type implicit_private_data_size() const = 0;
268 
272  virtual void get_implicit_private_data(block<pod_index_type>& xdata) const = 0;
273 
277  virtual void put_implicit_private_data(const block<pod_index_type>& xdata) = 0;
278 
283 
284 private:
285 
287 
288 
289  // ===========================================================
291  // ===========================================================
293 
294 public:
295 
299  virtual void finalize(poset_state_handle& xhost);
300 
301 protected:
302 
307 
308 private:
309 
311 
312 
313  // ===========================================================
315  // ===========================================================
317 
318 public:
319 
324  void initialize(const namespace_poset& xnamespace);
325 
329  virtual bool is_initialized() const;
330 
335  virtual const std::string& class_name() const;
336 
337 protected:
338 
339 private:
340 
342 
343 
344  // ===========================================================
346  // ===========================================================
348 
349 public:
350 
354  virtual bool is_ancestor_of(const any* other) const;
355 
360  virtual implicit_crg_interval* clone() const = 0;
361 
365  virtual bool invariant() const;
366 
367 protected:
368 
369 private:
370 
372 };
373 
374 // ===========================================================
375 // NON-MEMBER FUNCTIONS
376 // ===========================================================
377 
382 SHEAF_DLL_SPEC
383 size_t deep_size(const implicit_crg_interval& xp, bool xinclude_shallow = true);
384 
385 } // namespace sheaf
386 
387 #endif // ifndef IMPLICIT_CRG_INTERVAL_H
block< pod_index_type > _dof_tuple_ids
The ids of the dof tuples associated with this interval.
The default name space; a poset which contains other posets as members.
A client handle for a general, abstract partially order set.
Abstract implementation of crg_interval for an interval of implicit cover relation graph members...
Abstract base class with useful features for all objects.
Definition: any.h:39
Abstract emulator for an interval of cover relation graph members.
Definition: crg_interval.h:70
bool _private_data_initialized
True if private data has been initialized.
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
SHEAF_DLL_SPEC size_t deep_size(const dof_descriptor_array &xp, bool xinclude_shallow=true)
The deep size of the referenced object of type dof_descriptor_array.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
bool _is_finalized
True if the initialization of this crg interval has been finalized.
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.
bool _dof_tuple_ids_initialized
True if dof tuple ids have been initialized.