SheafSystem  0.0.0.0
section_dof_iterator.h
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 
18 // Interface for class section_dof_iterator
19 
20 #ifndef SECTION_DOF_ITERATOR_H
21 #define SECTION_DOF_ITERATOR_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef POSET_DOF_ITERATOR_H
28 #include "SheafSystem/poset_dof_iterator.h"
29 #endif
30 
31 namespace sheaf
32 {
33 class subposet;
34 class zn_to_bool;
35 }
36 
37 namespace fiber_bundle
38 {
39 
40 using namespace sheaf;
41 
42 
43 class section_space_schema_member;
44 
50 class SHEAF_DLL_SPEC section_dof_iterator : public poset_dof_iterator
51 {
52 
53 public:
54 
55  // CANONICAL MEMBERS
56 
60  virtual section_dof_iterator& operator=(const poset_dof_iterator& xother);
61 
65  section_dof_iterator& operator=(const section_dof_iterator& xother);
66 
70  virtual ~section_dof_iterator();
71 
75  virtual bool is_ancestor_of(const any* other) const;
76 
80  virtual section_dof_iterator* clone() const = 0;
81 
85  virtual bool invariant() const;
86 
87  // OTHER CONSTRUCTORS
88 
89  // ITERATOR FACET
90 
95  virtual bool is_initialized() const;
96 
97  // Anchor is not virtual; covariant signature hides
98  // inherited version.
99 
104  section_space_schema_member& anchor();
105 
110  const section_space_schema_member& anchor() const;
111 
116  virtual void put_anchor(const schema_poset_member* xanchor, int xversion);
117 
121  virtual bool is_done() const;
122 
126  virtual void force_is_done();
127 
131  virtual void next();
132 
137  virtual void reset(bool xreset_markers = RESET);
138 
143  virtual int ct(bool xreset = false);
144 
146 
150  virtual bool has_visited(pod_index_type xhub_id) const;
151 
155  virtual bool has_visited(const schema_poset_member& xmbr) const;
156 
158 
164  virtual void put_has_visited(pod_index_type xhub_id, bool xvalue);
165 
166  // DOF ITERATOR FACET
167 
168  // Item is not virtual; descendant redefinitions
169  // with covariant signature hide this version.
170 
175 
179  const section_space_schema_member& item() const;
180 
184  virtual bool item_is_ancestor_of(const schema_poset_member& xmbr) const;
185 
186 protected:
187 
193 
199 
204  virtual void reset_item() = 0;
205 
210  virtual void update_item() = 0;
211 
216 
217 };
218 
219 } // namespace fiber_bundle
220 
221 #endif // ifndef SECTION_DOF_ITERATOR_H
Iterates in postorder over dofs of a schema member anchor. Attaches an a handle of type section_space...
virtual void put_has_visited(pod_index_type xhub_id, bool xvalue)
Set the visisted marker for hub id xhub_id to xvalue. Intended for use reseting iterator without havi...
Abstract base class with useful features for all objects.
Definition: any.h:39
const bool RESET
Iteration marker reset control.
Definition: sheaf.h:87
virtual bool has_visited(pod_index_type xhub_id) const
True if this has already visited hub id xhub_id.
Iterates in postorder over dofs of a schema member anchor. Attaches a handle of type schema_poset_mem...
depth_first_iterator * _discretization_itr
The discretization iterator.
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.
A client handle for a poset member which has been prepared for use as a schema for a section space...
Namespace for the fiber_bundles component of the sheaf system.
A client handle for a poset member which has been prepared for use as a schema.
virtual void put_anchor(const schema_poset_member *xanchor, int xversion)
Set anchor() to xversion of *xanchor. Forces reset of markers, since the host may be different...