SheafSystem  0.0.0.0
preorder_itr.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 PREORDER_ITR_H
22 #define PREORDER_ITR_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef FILTERED_DEPTH_FIRST_ITR_H
29 #include "SheafSystem/filtered_depth_first_itr.h"
30 #endif
31 
32 namespace sheaf
33 {
34 
39 
40 template <typename T>
41 class SHEAF_DLL_SPEC preorder_itr : public filtered_depth_first_itr<T>
42 {
43  // ===========================================================
45  // ===========================================================
47 
48 public:
49 
54  preorder_itr();
55 
59  preorder_itr(const preorder_itr& xother);
60 
64  ~preorder_itr();
65 
66  // OTHER CONSTRUCTORS
67 
73  preorder_itr(const abstract_poset_member& xanchor,
74  bool xdown,
75  bool xstrict);
76 
82  preorder_itr(const abstract_poset_member& xanchor,
83  const subposet& xfilter,
84  bool xdown,
85  bool xstrict);
86 
92  preorder_itr(const abstract_poset_member& xanchor,
93  pod_index_type xfilter_index,
94  bool xdown,
95  bool xstrict);
96 
102  preorder_itr(const abstract_poset_member& xanchor,
103  const scoped_index& xfilter_index,
104  bool xdown,
105  bool xstrict);
106 
112  preorder_itr(const abstract_poset_member& xanchor,
113  const std::string& xfilter_name,
114  bool xdown,
115  bool xstrict);
116 
117 protected:
118 
119 private:
120 
122 
123 
124  // ===========================================================
126  // ===========================================================
128 
129 public:
130 
134  virtual bool is_ancestor_of(const any* other) const;
135 
139  virtual preorder_itr* clone() const;
140 
144  bool invariant() const;
145 
146 protected:
147 
148 private:
149 
151 };
152 
153 
158 
163 
168 
169 } // namespace sheaf
170 
171 #endif // ifndef PREORDER_ITR_H
A client handle for a subposet.
Definition: subposet.h:86
The general depth-first iterator over the intersection of a subposet filter with a directional (up or...
Abstract base class with useful features for all objects.
Definition: any.h:39
preorder_itr< unordered::unordered_set< pod_index_type > > unordered_set_preorder_itr
Preorder_itr<T> using unordered_set for _has_visited markers.
Definition: preorder_itr.h:167
preorder_itr< zn_to_bool > zn_to_bool_preorder_itr
Preorder_itr<T> using zn_to_bool for _has_visited markers.
Definition: preorder_itr.h:157
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
preorder_itr< std::set< pod_index_type > > set_preorder_itr
Preorder_itr<T> using set for _has_visited markers.
Definition: preorder_itr.h:162
Namespace for the sheaves component of the sheaf system.
An abstract client handle for a member of a poset.
Specialization of the filtered depth-first iterator which exposes the PREVISIT_ACTION to the client...
Definition: preorder_itr.h:41