SheafSystem  0.0.0.0
section_component_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_component_iterator
19 
20 #ifndef SECTION_COMPONENT_ITERATOR_H
21 #define SECTION_COMPONENT_ITERATOR_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef ANY_H
28 #include "SheafSystem/any.h"
29 #endif
30 
31 #ifndef SCOPED_INDEX_H
32 #include "SheafSystem/scoped_index.h"
33 #endif
34 
35 #ifndef POSTORDER_ITERATOR_H
36 #include "SheafSystem/postorder_iterator.h"
37 #endif
38 
39 namespace sheaf
40 {
41 class subposet;
42 class zn_to_bool;
43 }
44 
45 namespace fiber_bundle
46 {
47 
48 using namespace sheaf;
49 
50 class section_space_schema_member;
51 
59 class SHEAF_DLL_SPEC section_component_iterator : public any
60 {
61 
62 public:
63 
64  // CANONICAL MEMBERS
65 
71 
76 
80  virtual section_component_iterator& operator=(const section_component_iterator& xother);
81 
85  virtual ~section_component_iterator();
86 
90  virtual bool is_ancestor_of(const any* other) const;
91 
95  virtual section_component_iterator* clone() const = 0;
96 
100  bool invariant() const;
101 
102  // OTHER CONSTRUCTORS
103 
108  // Explicit above prevents interpretation as conversion from section_space_schema_meber
109 
110  // ITERATOR FACET
111 
116  bool is_initialized() const;
117 
118  // Anchor is not virtual; descendant redefinitions
119  // with covariant signature hide this version.
120 
125  section_space_schema_member& anchor();
126 
131  const section_space_schema_member& anchor() const;
132 
136  void put_anchor(const section_space_schema_member* xanchor);
137 
141  bool is_done() const;
142 
146  virtual void next();
147 
152  virtual void reset(bool xreset_markers = RESET);
153 
158  virtual int ct(bool xreset = false);
159 
163  virtual bool has_visited(pod_index_type xhub_id) const;
164 
168  bool has_visited(const scoped_index& xid) const;
169 
173  virtual bool has_visited(const section_space_schema_member& xmbr) const;
174 
180  virtual void put_has_visited(pod_index_type xhub_id, bool xvalue);
181 
187  void put_has_visited(const scoped_index& xid, bool xvalue);
188 
189  // DOF ITERATOR FACET
190 
191  // Item is not virtual; descendant redefinitions
192  // with covariant signature hide this version.
193 
198 
202  const section_space_schema_member& item() const;
203 
207  virtual bool item_is_ancestor_of(const section_space_schema_member& xmbr) const;
208 
212  virtual const scoped_index& index() const;
213 
214 protected:
215 
220  virtual void reset_anchor(const section_space_schema_member& xanchor);
221 
227 
231  virtual void reset_item() = 0;
232 
237  virtual void update_item();
238 
243 
248 
249 };
250 
251 } // namespace fiber_bundle
252 
253 #endif // ifndef SECTION_COMPONENT_ITERATOR_H
section_space_schema_member * _item
The member handle for the current item in the iteration.
postorder_iterator _itr
The index iterator used to implement the iteration.
Dperecated. Use postorder_itr. Specialization of the filtered depth-first iterator which exposes the ...
Abstract base class with useful features for all objects.
Definition: any.h:39
const bool RESET
Iteration marker reset control.
Definition: sheaf.h:87
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
Iterates in postorder over components of a section_space_schema_member anchor. The components of a se...
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.
section_space_schema_member * _anchor
The schema member whose downset is being iterated over; the top member of the domain of iteration...