SheafSystem  0.0.0.0
i_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 I_CONNECTIVITY_INDEX_SPACE_INTERVAL_H
22 #define I_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 i_connectivity_implicit_index_space_iterator;
46 
52 {
53 
54  friend class fiber_bundles_namespace;
55  friend SHEAF_DLL_SPEC size_t deep_size(const i_connectivity_index_space_interval& xn, bool xinclude_shallow);
56 
57  // ===========================================================
59  // ===========================================================
61 
62 public:
63 
70  static const i_connectivity_index_space_interval& new_space(index_space_family& xid_spaces,
71  size_type xub,
72  pod_type xvertex_hub_begin);
73 
74 protected:
75 
76 private:
77 
79 
80 
81  // ===========================================================
83  // ===========================================================
85 
86 public:
87 
92 
96  pod_type vertex_hub_begin() const;
97 
101  pod_type vertex_hub_begin(pod_type xlocal_id) const;
102 
103 protected:
104 
109 
114 
118  pod_type _vertex_hub_begin;
119 
120 private:
121 
123 
124 
125  // ===========================================================
127  // ===========================================================
129 
130 public:
131 
132 protected:
133 
134 private:
135 
137 
138 
139  // ===========================================================
141  // ===========================================================
143 
144 public:
145 
149  virtual const std::string& class_name() const;
150 
154  virtual i_connectivity_index_space_interval* clone() const;
155 
156 protected:
157 
158 private:
159 
163  static bool make_prototype();
164 
166 
167 
168  // ===========================================================
170  // ===========================================================
172 
173 public:
174 
178  virtual bool operator==(const index_space_collection& xother) const;
179 
183  virtual size_type deep_size(bool xinclude_shallow) const;
184 
185 protected:
186 
190  virtual i_connectivity_index_space_interval& operator=(const index_space_collection& xother);
191 
196  virtual explicit_index_space_state* explicit_state(pod_type xlocal_id) const;
197 
198 private:
199 
201 
202 
203  // ===========================================================
205  // ===========================================================
207 
208 public:
209 
213  virtual void remove(pod_type xlocal_id);
214 
218  virtual size_type ct(pod_type xlocal_id) const;
219 
221 
225  virtual pod_type begin(pod_type xlocal_id) const;
226 
228 
232  virtual pod_type end(pod_type xlocal_id) const;
233 
234 
236 
240  virtual bool contains(pod_type xlocal_id, pod_type xid) const;
241 
246  virtual bool contains_unglued_hub(pod_type xlocal_id, pod_type xid) const;
247 
252  virtual bool contains(pod_type xlocal_id, pod_type xid, pod_type xhub_id) const;
253 
258  virtual pod_type pod(pod_type xlocal_id, pod_type xid) const;
259 
264  virtual pod_type unglued_hub_pod(pod_type xlocal_id, pod_type xid) const;
265 
269  virtual bool is_persistent(pod_type xlocal_id) const;
270 
271 protected:
272 
273 private:
274 
276 
277 
278  // ===========================================================
280  // ===========================================================
282 
283 public:
284 
289  virtual void new_product_structure(pod_type xlocal_id,
290  const abstract_product_structure& xproduct);
291 
295  virtual void delete_product_structure(pod_type xlocal_id);
296 
300  virtual const abstract_product_structure& product_structure(pod_type xlocal_id) const;
301 
305  virtual abstract_product_structure& product_structure(pod_type xlocal_id);
306 
310  virtual bool has_product_structure(pod_type xlocal_id) const;
311 
312 protected:
313 
314 private:
315 
317 
318 
319  // ===========================================================
321  // ===========================================================
323 
324 public:
325 
330  virtual index_space_handle& get_id_space(pod_type xlocal_id) const;
331 
335  virtual void release_id_space(index_space_handle& xid_space) const;
336 
341  virtual bool allocated_id_space(const index_space_handle& xid_space) const;
342 
343 protected:
344 
349 
350 private:
351 
353 
354 
355  // ===========================================================
357  // ===========================================================
359 
360 public:
361 
366  virtual index_space_iterator& get_id_space_iterator(pod_type xlocal_id) const;
367 
371  virtual void release_id_space_iterator(index_space_iterator& xitr) const;
372 
377  virtual bool allocated_id_space_iterator(const index_space_iterator& xitr) const;
378 
379 protected:
380 
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 bool invariant() const;
407 
408 protected:
409 
410 private:
411 
413 
414 };
415 
416 // ===========================================================
417 // NON-MEMBER FUNCTIONS
418 // ===========================================================
419 
423 SHEAF_DLL_SPEC
424 size_t deep_size(const i_connectivity_index_space_interval& xn, bool xinclude_shallow = true);
425 
426 } // end namespace fiber_bundle
427 
428 #endif // ifndef I_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.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
list_pool< forwarding_index_space_handle > _handles
The handle pool.
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.
An implementation of index_space_interval for an interval of implicit id spaces for the connectivity ...
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
A collection of id space states. This is a virtual class with provides an interface for accessing the...
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 i_connectivity_index_space_interval &xn, bool xinclude_shallow=true)
The deep size of i_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.
i_connectivity_index_space_interval(const i_connectivity_index_space_interval &xother)
Copy constructor; disabled.
Factory and container for a family of id spaces.
list_pool< i_connectivity_implicit_index_space_iterator > _iterators
The iterator pool.
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