SheafSystem  0.0.0.0
section_space_schema_jims_index_space_state.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 SECTION_SPACE_SCHEMA_JIMS_INDEX_SPACE_STATE_H
22 #define SECTION_SPACE_SCHEMA_JIMS_INDEX_SPACE_STATE_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef EXPLICIT_INDEX_SPACE_STATE_H
29 #include "SheafSystem/explicit_index_space_state.h"
30 #endif
31 
32 #ifndef LIST_POOL_H
33 #include "SheafSystem/list_pool.h"
34 #endif
35 
36 namespace sheaf
37 {
38 class index_space_handle;
39 class ij_product_structure;
40 }
41 
42 namespace fiber_bundle
43 {
44 
45 using namespace sheaf;
46 
47 class section_space_schema_jims_index_space_handle;
48 class section_space_schema_jims_index_space_iterator;
49 
55 {
56 
57  friend class fiber_bundles_namespace;
58 
59  // ===========================================================
61  // ===========================================================
63 
64 public:
65 
74  static
76  new_space(index_space_family& xid_spaces,
77  const std::string& xname,
78  const index_space_handle& xbase_space_id_space,
79  const index_space_handle& xfiber_schema_id_space,
80  const ij_product_structure& xsection_space_schema_product);
81 
90  static
92  new_space(index_space_family& xid_spaces,
93  pod_type xid,
94  const std::string& xname,
95  const index_space_handle& xbase_space_id_space,
96  const index_space_handle& xfiber_schema_id_space,
97  const ij_product_structure& xsection_space_schema_product);
98 
99 protected:
100 
101 private:
102 
104 
105 
106  // ===========================================================
108  // ===========================================================
110 
111 public:
112 
113 protected:
114 
119 
124 
129 
130 private:
131 
133 
134 
135  // ===========================================================
137  // ===========================================================
139 
140 public:
141 
145  void put_factors(const index_space_handle& xbase_space_id_space,
146  const index_space_handle& xfiber_schema_id_space,
147  const ij_product_structure& xsection_space_schema_product);
148 
152  const index_space_handle& base_space() const;
153 
157  const index_space_handle& fiber_schema() const;
158 
162  const ij_product_structure& section_space_schema_product_structure() const;
163 
168  bool is_consistent() const;
169 
174  void update();
175 
176 protected:
177 
182 
187 
192 
193 private:
194 
196 
197 
198  // ===========================================================
200  // ===========================================================
202 
203 public:
204 
208  virtual bool operator==(const explicit_index_space_state& xother) const;
209 
213  virtual size_type deep_size(bool xinclude_shallow) const;
214 
215 protected:
216 
221 
222 private:
223 
225 
226 
227  // ===========================================================
229  // ===========================================================
231 
232 public:
233 
237  virtual bool contains(pod_type xid) const;
238 
242  virtual bool contains_unglued_hub(pod_type xid) const;
243 
247  virtual pod_type pod(pod_type xid) const;
248 
252  virtual pod_type unglued_hub_pod(pod_type xid) const;
253 
254 protected:
255 
256 private:
257 
259 
260 
261  // ===========================================================
263  // ===========================================================
265 
266 public:
267 
272  virtual void new_product_structure(const abstract_product_structure& xproduct);
273 
277  virtual void delete_product_structure();
278 
282  const ij_product_structure& product_structure() const;
283 
287  ij_product_structure& product_structure();
288 
289 protected:
290 
291 private:
292 
294 
295 
296  // ===========================================================
298  // ===========================================================
300 
301 public:
302 
306  static size_type handle_pool_ct();
307 
311  static size_type handle_pool_deep_size();
312 
316  virtual index_space_handle& get_id_space() const;
317 
321  virtual void release_id_space(index_space_handle& xid_space) const;
322 
327  virtual bool allocated_id_space(const index_space_handle& xid_space) const;
328 
329 protected:
330 
331 private:
332 
337 
339 
340 
341  // ===========================================================
343  // ===========================================================
345 
346 public:
347 
351  static size_type iterator_pool_ct();
352 
356  static size_type iterator_pool_deep_size();
357 
361  virtual index_space_iterator& get_iterator() const;
362 
366  virtual void release_iterator(index_space_iterator& xitr) const;
367 
372  virtual bool allocated_iterator(const index_space_iterator& xitr) const;
373 
374 protected:
375 
376 private:
377 
382 
384 
385 
386  // ===========================================================
388  // ===========================================================
390 
391 public:
392 
396  virtual const std::string& class_name() const;
397 
401  virtual section_space_schema_jims_index_space_state* clone() const;
402 
403 protected:
404 
405 private:
406 
410  static bool make_prototype();
411 
413 
414 
415  // ===========================================================
417  // ===========================================================
419 
420 public:
421 
425  virtual bool is_ancestor_of(const any *other) const;
426 
430  virtual bool invariant() const;
431 
432 protected:
433 
434 private:
435 
437 
438 };
439 
440 // ===========================================================
441 // NON-MEMBER FUNCTIONS
442 // ===========================================================
443 
447 SHEAF_DLL_SPEC
448 size_t deep_size(const section_space_schema_jims_index_space_state& xn, bool xinclude_shallow = true);
449 
450 } // end namespace sheaf
451 
452 #endif // ifndef SECTION_SPACE_SCHEMA_JIMS_INDEX_SPACE_STATE_H
An implementation of class explicit_index_space_handle that has a section space schema jims id space ...
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...
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
Abstract base class with useful features for all objects.
Definition: any.h:39
An immutable abstract state for a space of alternate integer identifiers (aliases) for a subset of th...
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
section_space_schema_jims_index_space_state(const section_space_schema_jims_index_space_state &xother)
Copy constructor; disabled.
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.
pod_index_type pod_type
The "plain old data" index type for this.
A 2D implementation of abstract_product_structure.
Namespace for the sheaves component of the sheaf system.
An implementation class explicit_index_space_state for the jims id space of the section space schema...
ij_product_structure * _section_space_schema_product
The product structure of the section space schema id space.
Factory and container for a family of id spaces.
Namespace for the fiber_bundles component of the sheaf system.
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