SheafSystem  0.0.0.0
list_index_space_handle.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 LIST_INDEX_SPACE_HANDLE_H
22 #define LIST_INDEX_SPACE_HANDLE_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef SCATTERED_INSERTION_INDEX_SPACE_HANDLE_H
29 #include "SheafSystem/scattered_insertion_index_space_handle.h"
30 #endif
31 
32 #ifndef STD_LIST_H
33 #include "SheafSystem/std_list.h"
34 #endif
35 
36 namespace sheaf
37 {
38 
39 class list_index_space_state;
40 class list_index_space_handle;
41 
42 
46 SHEAF_DLL_SPEC
47 std::ostream & operator << (std::ostream &xos, const list_index_space_handle& xi);
48 
49 
60 {
61 
62  friend class list_index_space_state;
63  friend SHEAF_DLL_SPEC std::ostream & operator << (std::ostream &xos, const list_index_space_handle& xi);
64 
65  // ===========================================================
67  // ===========================================================
69 
70 public:
71 
77  static list_index_space_handle new_space(index_space_family& xid_spaces,
78  const std::string& xname,
79  bool xis_persistent);
80 
81 protected:
82 
83 private:
84 
86 
87 
88  // ===========================================================
90  // ===========================================================
92 
93 public:
94 
99 
104 
108  list_index_space_handle(const index_space_family& xid_spaces, pod_type xindex);
109 
113  list_index_space_handle(const index_space_family& xid_spaces, const std::string& xname);
114 
119  list_index_space_handle& operator=(const list_index_space_handle& xother);
120 
124  virtual ~list_index_space_handle();
125 
129  void reverse(bool xupdate_extrema);
130 
135  pod_type front() const;
136 
141  pod_type back() const;
142 
147  void push_front(pod_type xhub_id);
148 
152  void replace_range_id(pod_type xold_range_id, pod_type xnew_range_id);
153 
154 protected:
155 
160 
162 
166  list_index_space_state& state();
167 
171  const list_index_space_state& state() const;
172 
173 private:
174 
176 
177 
178  // ===========================================================
180  // ===========================================================
182 
183 public:
184 
185 protected:
186 
187 private:
188 
190 
191  // ===========================================================
193  // ===========================================================
195 
196 public:
197 
201  typedef std::list<pod_type> to_range_type;
202 
209  to_range_type& to_range();
210 
217  const to_range_type& to_range() const;
218 
219 protected:
220 
221 private:
222 
224 
225 
226  // ===========================================================
228  // ===========================================================
230 
231 public:
232 
233 protected:
234 
235 private:
236 
238 
239 
240  // ===========================================================
242  // ===========================================================
244 
245 public:
246 
251  virtual list_index_space_handle& operator=(const index_space_handle& xother);
252 
257  virtual list_index_space_handle* clone() const;
258 
259 protected:
260 
261 private:
262 
264 
265 
266  // ===========================================================
268  // ===========================================================
270 
271 public:
272 
274 
279  virtual bool conforms_to_state(const index_space_collection& xhost,
280  pod_type xlocal_id) const;
281 
282 protected:
283 
284 private:
285 
287 
288 
289  // ===========================================================
291  // ===========================================================
293 
294 public:
295 
299  virtual bool is_ancestor_of(const any *other) const;
300 
304  virtual bool invariant() const;
305 
306 protected:
307 
308 private:
309 
311 
312 };
313 
314 // ===========================================================
315 // NON-MEMBER FUNCTIONS
316 // ===========================================================
317 
318 } // end namespace sheaf
319 
320 #endif // ifndef LIST_INDEX_SPACE_HANDLE_H
scattered_insertion_index_space_state & state()
The mutable id space state (mutable version).
An list implementation of class gathered_insertion_index_space_state. This representation is intended...
An map implementation of class scattered_insertion_index_space_handle. This representation is intende...
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
Abstract base class with useful features for all objects.
Definition: any.h:39
pod_index_type pod_type
The "plain old data" index type for this.
A collection of id space states. This is a virtual class with provides an interface for accessing the...
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...
std::list< pod_type > to_range_type
The type of the domain id to range id map.
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const dof_descriptor_array &p)
Insert dof_descriptor_array& p into ostream& os.
A handle for a scattered_insertion_index_space_state.
Namespace for the sheaves component of the sheaf system.
Factory and container for a family of id spaces.