SheafSystem  0.0.0.0
i_adjacency_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_ADJACENCY_INDEX_SPACE_INTERVAL_H
22 #define I_ADJACENCY_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_adjacency_implicit_index_space_iterator;
46 
52 {
53 
54  friend class fiber_bundles_namespace;
55  friend SHEAF_DLL_SPEC size_t deep_size(const i_adjacency_index_space_interval& xn, bool xinclude_shallow);
56 
57  // ===========================================================
59  // ===========================================================
61 
62 public:
63 
70  static const i_adjacency_index_space_interval& new_space(index_space_family& xid_spaces,
71  size_type xub,
72  pod_type xzone_hub_begin,
73  size_type xi_size);
74 
75 protected:
76 
77 private:
78 
80 
81 
82  // ===========================================================
84  // ===========================================================
86 
87 public:
88 
93 
97  pod_type zone_hub_begin() const;
98 
102  pod_type zone_hub_begin(pod_type xlocal_id) const;
103 
108  void adjacent_zones(pod_type xlocal_id,
109  pod_type& xzone_hub_begin,
110  size_type& xi_ct) const;
111 
115  size_type i_size() const;
116 
117 protected:
118 
123 
128 
132  pod_type _zone_hub_begin;
133 
138 
139 private:
140 
142 
143 
144  // ===========================================================
146  // ===========================================================
148 
149 public:
150 
151 protected:
152 
153 private:
154 
156 
157 
158  // ===========================================================
160  // ===========================================================
162 
163 public:
164 
168  virtual const std::string& class_name() const;
169 
173  virtual i_adjacency_index_space_interval* clone() const;
174 
175 protected:
176 
177 private:
178 
182  static bool make_prototype();
183 
185 
186 
187  // ===========================================================
189  // ===========================================================
191 
192 public:
193 
197  virtual bool operator==(const index_space_collection& xother) const;
198 
202  virtual size_type deep_size(bool xinclude_shallow) const;
203 
204 protected:
205 
209  virtual i_adjacency_index_space_interval& operator=(const index_space_collection& xother);
210 
215  virtual explicit_index_space_state* explicit_state(pod_type xlocal_id) const;
216 
217 private:
218 
220 
221 
222  // ===========================================================
224  // ===========================================================
226 
227 public:
228 
232  virtual void remove(pod_type xlocal_id);
233 
237  virtual size_type ct(pod_type xlocal_id) const;
238 
240 
244  virtual pod_type begin(pod_type xlocal_id) const;
245 
247 
251  virtual pod_type end(pod_type xlocal_id) const;
252 
253 
255 
259  virtual bool contains(pod_type xlocal_id, pod_type xid) const;
260 
265  virtual bool contains_unglued_hub(pod_type xlocal_id, pod_type xid) const;
266 
271  virtual bool contains(pod_type xlocal_id, pod_type xid, pod_type xhub_id) const;
272 
277  virtual pod_type pod(pod_type xlocal_id, pod_type xid) const;
278 
283  virtual pod_type unglued_hub_pod(pod_type xlocal_id, pod_type xid) const;
284 
288  virtual bool is_persistent(pod_type xlocal_id) const;
289 
290 protected:
291 
292 private:
293 
295 
296 
297  // ===========================================================
299  // ===========================================================
301 
302 public:
303 
308  virtual void new_product_structure(pod_type xlocal_id,
309  const abstract_product_structure& xproduct);
310 
314  virtual void delete_product_structure(pod_type xlocal_id);
315 
319  virtual const abstract_product_structure& product_structure(pod_type xlocal_id) const;
320 
324  virtual abstract_product_structure& product_structure(pod_type xlocal_id);
325 
329  virtual bool has_product_structure(pod_type xlocal_id) const;
330 
331 protected:
332 
333 private:
334 
336 
337 
338  // ===========================================================
340  // ===========================================================
342 
343 public:
344 
349  virtual index_space_handle& get_id_space(pod_type xlocal_id) const;
350 
354  virtual void release_id_space(index_space_handle& xid_space) const;
355 
360  virtual bool allocated_id_space(const index_space_handle& xid_space) const;
361 
362 protected:
363 
368 
369 private:
370 
372 
373 
374  // ===========================================================
376  // ===========================================================
378 
379 public:
380 
385  virtual index_space_iterator& get_id_space_iterator(pod_type xlocal_id) const;
386 
390  virtual void release_id_space_iterator(index_space_iterator& xitr) const;
391 
396  virtual bool allocated_id_space_iterator(const index_space_iterator& xitr) const;
397 
398 protected:
399 
404 
405 private:
406 
408 
409 
410  // ===========================================================
412  // ===========================================================
414 
415 public:
416 
420  virtual bool is_ancestor_of(const any *other) const;
421 
425  virtual bool invariant() const;
426 
427 protected:
428 
429 private:
430 
432 
433 };
434 
435 // ===========================================================
436 // NON-MEMBER FUNCTIONS
437 // ===========================================================
438 
442 SHEAF_DLL_SPEC
443 size_t deep_size(const i_adjacency_index_space_interval& xn, bool xinclude_shallow = true);
444 
445 } // end namespace fiber_bundle
446 
447 #endif // ifndef I_ADJACENCY_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.
SHEAF_DLL_SPEC size_t deep_size(const i_adjacency_index_space_interval &xn, bool xinclude_shallow=true)
The deep size of i_adjacency_index_space_interval& xn.
The standard fiber bundles name space; extends the standard sheaves namespace by defining base space...
An implementation of index_space_interval for an interval of implicit id spaces for the adjacency of ...
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.
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()...
list_pool< i_adjacency_implicit_index_space_iterator > _iterators
The iterator pool.
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...
size_type _i_size
The number of zones in the i direction.
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.
list_pool< forwarding_index_space_handle > _handles
The handle pool.
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_adjacency_index_space_interval(const i_adjacency_index_space_interval &xother)
Copy constructor; disabled.
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