SheafSystem  0.0.0.0
singleton_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 SINGLETON_INDEX_SPACE_HANDLE_H
22 #define SINGLETON_INDEX_SPACE_HANDLE_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef EXPLICIT_INDEX_SPACE_HANDLE_H
29 #include "SheafSystem/explicit_index_space_handle.h"
30 #endif
31 
32 namespace sheaf
33 {
34 
35 class singleton_index_space_state;
36 
42 {
43 
44  friend class singleton_index_space_state;
45 
46  // ===========================================================
48  // ===========================================================
50 
51 public:
52 
58  static singleton_index_space_handle new_space(index_space_family& xid_spaces,
59  const std::string& xname,
60  pod_type xhub_id);
61 
62 protected:
63 
64 private:
65 
67 
68 
69  // ===========================================================
71  // ===========================================================
73 
74 public:
75 
80 
85 
90  pod_type xindex);
91 
96  const std::string& xname);
97 
103 
107  virtual ~singleton_index_space_handle();
108 
109 protected:
110 
115 
117 
122 
126  const singleton_index_space_state& state() const;
127 
128 private:
129 
131 
132 
133  // ===========================================================
135  // ===========================================================
137 
138 public:
139 
143  pod_type hub_id() const;
144 
145 protected:
146 
147 private:
148 
150 
151 
152  // ===========================================================
154  // ===========================================================
156 
157 public:
158 
159 protected:
160 
161 private:
162 
164 
165 
166  // ===========================================================
168  // ===========================================================
170 
171 public:
172 
177  virtual singleton_index_space_handle& operator=(const index_space_handle& xother);
178 
183  virtual singleton_index_space_handle* clone() const;
184 
185 protected:
186 
187 private:
188 
190 
191 
192  // ===========================================================
194  // ===========================================================
196 
197 public:
198 
200 
205  virtual bool conforms_to_state(const index_space_collection& xhost,
206  pod_type xlocal_id) const;
207 
208 protected:
209 
210 private:
211 
213 
214 
215  // ===========================================================
217  // ===========================================================
219 
220 public:
221 
225  virtual bool is_ancestor_of(const any *other) const;
226 
230  virtual bool invariant() const;
231 
232 protected:
233 
234 private:
235 
237 
238 };
239 
240 // ===========================================================
241 // NON-MEMBER FUNCTIONS
242 // ===========================================================
243 
244 } // end namespace sheaf
245 
246 #endif // ifndef SINGLETON_INDEX_SPACE_HANDLE_H
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
explicit_index_space_state & state()
The explicit state (mutable version).
Abstract base class with useful features for all objects.
Definition: any.h:39
An implementation of class index_space_handle for an explicit_index_space_state.
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...
An implementation of class explicit_index_space_handle that has a singleton id space state...
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...
Namespace for the sheaves component of the sheaf system.
An implementation of explicit_index_space_state for an id space containing a single id...
Factory and container for a family of id spaces.