SheafSystem  0.0.0.0
offset_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 OFFSET_INDEX_SPACE_ITERATOR_H
22 #define OFFSET_INDEX_SPACE_ITERATOR_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef EXPLICIT_INDEX_SPACE_ITERATOR_H
29 #include "SheafSystem/explicit_index_space_iterator.h"
30 #endif
31 
32 namespace sheaf
33 {
34 
40 {
41 
42  friend class offset_index_space_state;
43 
44  // ===========================================================
46  // ===========================================================
48 
49 public:
50 
55 
60 
65  pod_type xindex);
66 
71  const std::string& xname);
72 
77 
81  virtual ~offset_index_space_iterator();
82 
86  pod_type offset() const;
87 
91  size_type ct() const;
92 
93 protected:
94 
99 
104 
105 private:
106 
108 
109 
110  // ===========================================================
112  // ===========================================================
114 
115 public:
116 
117 protected:
118 
119 private:
120 
122 
123 
124  // ===========================================================
126  // ===========================================================
127 
128 public:
129 
133  virtual offset_index_space_iterator& operator=(const index_space_iterator& xother);
134 
138  virtual bool operator==(const index_space_iterator& xother) const;
139 
144  virtual offset_index_space_iterator* clone() const;
145 
146 protected:
147 
148 private:
149 
151 
152 
153  // ===========================================================
155  // ===========================================================
157 
158 public:
159 
163  virtual void next();
164 
168  virtual void reset();
169 
170 protected:
171 
172 private:
173 
175 
176 
177  // ===========================================================
179  // ===========================================================
181 
182 public:
183 
185 
187 
188 protected:
189 
194  virtual void attach_to(explicit_index_space_state* xstate);
195 
200  virtual bool conforms_to_state(explicit_index_space_state* xstate) const;
201 
202 private:
203 
205 
206 
207  // ===========================================================
209  // ===========================================================
211 
212 public:
213 
217  virtual bool is_ancestor_of(const any *other) const;
218 
222  virtual bool invariant() const ;
223 
224 protected:
225 
226 private:
227 
229 
230 };
231 
232 // ===========================================================
233 // NON-MEMBER FUNCTIONS
234 // ===========================================================
235 
236 } // namespace sheaf
237 
238 #endif // ifndef OFFSET_INDEX_SPACE_ITERATOR_H
virtual void attach_to(pod_type xindex)
Attach to the state with index xindex in the id space family id_spaces().
An abstract iterator over the ids of an id space.
pod_type _offset
The offset into the hub id space.
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...
size_type _ct
The number of entries to iterate over.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
A computed implementation of abstract class explicit_index_space_state. This representation assumes t...
virtual bool conforms_to_state(const index_space_collection &xhost, pod_type xlocal_id) const
True if this conforms to the handle type required by the state with local scope id xlocal_id in the h...
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.
An implementation of class index_space_iterator for an explicit_index_space_state.
Namespace for the sheaves component of the sheaf system.
Factory and container for a family of id spaces.
pod_index_type pod_type
The "plain old data" index type for this.
An iterator over a gathered id space in which the equivlence between the ids in the space and the hub...