SheafSystem  0.0.0.0
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 IMPLICIT_INDEX_SPACE_ITERATOR_H
22 #define IMPLICIT_INDEX_SPACE_ITERATOR_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef INDEX_SPACE_ITERATOR_H
29 #include "SheafSystem/index_space_iterator.h"
30 #endif
31 
32 namespace sheaf
33 {
34 
35 class implicit_index_space_state;
36 
42 {
43 
44  // ===========================================================
46  // ===========================================================
48 
49 public:
50 
55 
56 protected:
57 
62 
67 
72 
77 
82 
83 private:
84 
86 
87 
88  // ===========================================================
90  // ===========================================================
92 
93 public:
94 
98  virtual implicit_index_space_iterator& operator=(const index_space_iterator& xother);
99 
103  virtual bool operator==(const index_space_iterator& xother) const;
104 
109  virtual implicit_index_space_iterator* clone() const = 0;
110 
111 protected:
112 
113 private:
114 
116 
117 
118  // ===========================================================
120  // ===========================================================
122 
123 public:
124 
128  virtual const index_space_collection& host() const;
129 
133  virtual pod_type index() const;
134 
138  virtual bool is_attached() const;
139 
141 
145  virtual void attach_to(pod_type xindex);
146 
150  virtual void detach();
151 
152 protected:
153 
154 private:
155 
157 
158 
159  // ===========================================================
161  // ===========================================================
163 
164 public:
165 
169  virtual bool is_ancestor_of(const any *other) const;
170 
174  virtual bool invariant() const;
175 
176 protected:
177 
178 private:
179 
181 
182 };
183 
184 // ===========================================================
185 // NON-MEMBER FUNCTIONS
186 // ===========================================================
187 
188 
189 } // namespace sheaf
190 
191 #endif // ifndef 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
void attach_to(const index_space_family &xid_spaces, pod_type xindex)
Attach to the state with index xindex in the id space family xid_spaces.
An implementation of class index_space_iterator for id spaces that are implicitly represtented...
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.
const index_space_collection * _host
The host collection.
Namespace for the sheaves component of the sheaf system.
pod_type _local_id
The id of this space in the local host id space.
pod_index_type pod_type
The "plain old data" index type for this.