SheafSystem  0.0.0.0
array_implicit_index_space_iterator.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 ARRAY_IMPLICIT_INDEX_SPACE_ITERATOR_H
22 #define ARRAY_IMPLICIT_INDEX_SPACE_ITERATOR_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef AUTO_BLOCK_H
29 #include "SheafSystem/auto_block.h"
30 #endif
31 
32 #ifndef IMPLICIT_INDEX_SPACE_ITERATOR_H
33 #include "SheafSystem/implicit_index_space_iterator.h"
34 #endif
35 
36 namespace sheaf
37 {
38 
45 {
46 
47  friend class array_implicit_index_space_interval;
48 
49  // ===========================================================
51  // ===========================================================
53 
54 public:
55 
60 
65 
70  pod_type xindex);
71 
76  const std::string& xname);
77 
82 
87 
88 protected:
89 
93  const pod_type* _to_hub;
94 
98  pod_type _end;
99 
100 private:
101 
103 
104 
105  // ===========================================================
107  // ===========================================================
109 
110 public:
111 
112 protected:
113 
114 private:
115 
117 
118 
119  // ===========================================================
121  // ===========================================================
122 
123 public:
124 
128  virtual array_implicit_index_space_iterator& operator=(const index_space_iterator& xother);
129 
133  virtual bool operator==(const index_space_iterator& xother) const;
134 
139  virtual array_implicit_index_space_iterator* clone() const;
140 
141 protected:
142 
143 private:
144 
146 
147 
148  // ===========================================================
150  // ===========================================================
152 
153 public:
154 
158  virtual void next();
159 
163  virtual void reset();
164 
165 protected:
166 
167 private:
168 
170 
171 
172  // ===========================================================
174  // ===========================================================
176 
177 public:
178 
180 
185  virtual void attach_to(const index_space_collection& xhost,
186  pod_type xlocal_id);
187 
189 
194  virtual bool conforms_to_state(const index_space_collection& xhost,
195  pod_type xlocal_id) const;
196 
197 protected:
198 
199 private:
200 
202 
203 
204  // ===========================================================
206  // ===========================================================
208 
209 public:
210 
214  virtual bool is_ancestor_of(const any *other) const;
215 
219  virtual bool invariant() const;
220 
221 protected:
222 
223 private:
224 
226 
227 };
228 
229 // ===========================================================
230 // NON-MEMBER FUNCTIONS
231 // ===========================================================
232 
233 
234 } // namespace sheaf
235 
236 #endif // ifndef ARRAY_IMPLICIT_INDEX_SPACE_ITERATOR_H
An abstract iterator over the ids of an id space.
Abstract base class with useful features for all objects.
Definition: any.h:39
An implementation of implicit_index_space_iterator for an implicit id space in an array_index_space_i...
An implementation of class index_space_iterator for id spaces that are implicitly represtented...
virtual void attach_to(pod_type xindex)
Attach to the state with index xindex in the id space family id_spaces().
A collection of id space states. This is a virtual class with provides an interface for accessing the...
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.
Namespace for the sheaves component of the sheaf system.
Factory and container for a family of id spaces.
bool conforms_to_state(const index_space_family &xid_spaces, pod_type xindex) const
True if this conforms to the handle type required by the state with index xindex in the id space fami...