SheafSystem  0.0.0.0
ij_connectivity_index_space_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 IJ_CONNECTIVITY_INDEX_SPACE_INTERVAL_H
22 #define IJ_CONNECTIVITY_INDEX_SPACE_INTERVAL_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef FORWARDING_INDEX_SPACE_HANDLE_H
29 #include "SheafSystem/forwarding_index_space_handle.h"
30 #endif
31 
32 #ifndef INDEX_SPACE_INTERVAL_H
33 #include "SheafSystem/index_space_interval.h"
34 #endif
35 
36 #ifndef LIST_POOL_H
37 #include "SheafSystem/list_pool.h"
38 #endif
39 
40 namespace fiber_bundle
41 {
42 
43 using namespace sheaf;
44 
45 class ij_connectivity_implicit_index_space_iterator;
46 
52 {
53 
54  friend class fiber_bundles_namespace;
55  friend SHEAF_DLL_SPEC size_t deep_size(const ij_connectivity_index_space_interval& xn, bool xinclude_shallow);
56 
57  // ===========================================================
59  // ===========================================================
61 
62 public:
63 
71  static const ij_connectivity_index_space_interval& new_space(index_space_family& xid_spaces,
72  size_type xub,
73  pod_type xvertex_hub_begin,
74  size_type xj_size);
75 
76 protected:
77 
78 private:
79 
81 
82 
83  // ===========================================================
85  // ===========================================================
87 
88 public:
89 
94 
98  pod_type vertex_hub_begin() const;
99 
103  pod_type vertex_hub_begin(pod_type xlocal_id) const;
104 
108  size_type j_size() const;
109 
113  size_type j_vertex_size() const;
114 
115 protected:
116 
121 
126 
130  pod_type _vertex_hub_begin;
131 
136 
141 
142 private:
143 
145 
146 
147  // ===========================================================
149  // ===========================================================
151 
152 public:
153 
154 protected:
155 
156 private:
157 
159 
160 
161  // ===========================================================
163  // ===========================================================
165 
166 public:
167 
171  virtual const std::string& class_name() const;
172 
176  virtual ij_connectivity_index_space_interval* clone() const;
177 
178 protected:
179 
180 private:
181 
185  static bool make_prototype();
186 
188 
189 
190  // ===========================================================
192  // ===========================================================
194 
195 public:
196 
200  virtual bool operator==(const index_space_collection& xother) const;
201 
205  virtual size_type deep_size(bool xinclude_shallow) const;
206 
207 protected:
208 
212  virtual ij_connectivity_index_space_interval& operator=(const index_space_collection& xother);
213 
218  virtual explicit_index_space_state* explicit_state(pod_type xlocal_id) const;
219 
220 private:
221 
223 
224 
225  // ===========================================================
227  // ===========================================================
229 
230 public:
231 
235  virtual void remove(pod_type xlocal_id);
236 
240  virtual size_type ct(pod_type xlocal_id) const;
241 
243 
247  virtual pod_type begin(pod_type xlocal_id) const;
248 
250 
254  virtual pod_type end(pod_type xlocal_id) const;
255 
256 
258 
262  virtual bool contains(pod_type xlocal_id, pod_type xid) const;
263 
268  virtual bool contains_unglued_hub(pod_type xlocal_id, pod_type xid) const;
269 
274  virtual bool contains(pod_type xlocal_id, pod_type xid, pod_type xhub_id) const;
275 
280  virtual pod_type pod(pod_type xlocal_id, pod_type xid) const;
281 
286  virtual pod_type unglued_hub_pod(pod_type xlocal_id, pod_type xid) const;
287 
291  virtual bool is_persistent(pod_type xlocal_id) const;
292 
293 protected:
294 
295 private:
296 
298 
299 
300  // ===========================================================
302  // ===========================================================
304 
305 public:
306 
311  virtual void new_product_structure(pod_type xlocal_id,
312  const abstract_product_structure& xproduct);
313 
317  virtual void delete_product_structure(pod_type xlocal_id);
318 
322  virtual const abstract_product_structure& product_structure(pod_type xlocal_id) const;
323 
327  virtual abstract_product_structure& product_structure(pod_type xlocal_id);
328 
332  virtual bool has_product_structure(pod_type xlocal_id) const;
333 
334 protected:
335 
336 private:
337 
339 
340 
341  // ===========================================================
343  // ===========================================================
345 
346 public:
347 
352  virtual index_space_handle& get_id_space(pod_type xlocal_id) const;
353 
357  virtual void release_id_space(index_space_handle& xid_space) const;
358 
363  virtual bool allocated_id_space(const index_space_handle& xid_space) const;
364 
365 protected:
366 
371 
372 private:
373 
375 
376 
377  // ===========================================================
379  // ===========================================================
381 
382 public:
383 
388  virtual index_space_iterator& get_id_space_iterator(pod_type xlocal_id) const;
389 
393  virtual void release_id_space_iterator(index_space_iterator& xitr) const;
394 
399  virtual bool allocated_id_space_iterator(const index_space_iterator& xitr) const;
400 
401 protected:
402 
407 
408 private:
409 
411 
412 
413  // ===========================================================
415  // ===========================================================
417 
418 public:
419 
423  virtual bool is_ancestor_of(const any *other) const;
424 
428  virtual bool invariant() const;
429 
430 protected:
431 
432 private:
433 
435 
436 };
437 
438 // ===========================================================
439 // NON-MEMBER FUNCTIONS
440 // ===========================================================
441 
445 SHEAF_DLL_SPEC
446 size_t deep_size(const ij_connectivity_index_space_interval& xn, bool xinclude_shallow = true);
447 
448 } // end namespace fiber_bundle
449 
450 #endif // ifndef IJ_CONNECTIVITY_INDEX_SPACE_INTERVAL_H
An abstract class that defines the product structure for an id space.
An abstract iterator over the ids of an id space.
size_type _j_size
The number of zones in the j direction.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
ij_connectivity_index_space_interval(const ij_connectivity_index_space_interval &xother)
Copy constructor; disabled.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
pod_index_type pod_type
The "plain old data" index type for this.
size_type _j_vertex_size
The number of vertices in the j direction.
list_pool< forwarding_index_space_handle > _handles
The handle pool.
Abstract base class with useful features for all objects.
Definition: any.h:39
An implemenation of index_space_collection that adds an interface for the interval [begin()...
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
An implementation of index_space_interval for an interval of implicit id spaces for the connectivity ...
A collection of id space states. This is a virtual class with provides an interface for accessing the...
list_pool< ij_connectivity_implicit_index_space_iterator > _iterators
The iterator pool.
bool operator==(const singly_linked_list< T, Alloc > &lhs, const singly_linked_list< T, Alloc > &rhs)
Checks if the contents of lhs and rhs are equal, that is, whether lhs.size() == rhs.size() and each element in lhs compares equal with the element in rhs at the same position.
SHEAF_DLL_SPEC size_t deep_size(const ij_connectivity_index_space_interval &xn, bool xinclude_shallow=true)
The deep size of ij_connectivity_index_space_interval& xn.
Namespace for the sheaves component of the sheaf system.
pod_type end() const
Ending space id of this interval in the id space family scope.
virtual bool contains(pod_type xlocal_id) const
True if this collection contains the id space with local id xlocal_id.
Factory and container for a family of id spaces.
Namespace for the fiber_bundles component of the sheaf system.
pod_type begin() const
Beginning space id of this interval in the id space family scope.
A reallocated pool of objects of type T. Objects in the pool are either allocated or stored in a free...
Definition: list_pool.h:42