SheafSystem  0.0.0.0
reserved_primary_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 RESERVED_PRIMARY_INDEX_SPACE_HANDLE_H
22 #define RESERVED_PRIMARY_INDEX_SPACE_HANDLE_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef PRIMARY_INDEX_SPACE_HANDLE_H
29 #include "SheafSystem/primary_index_space_handle.h"
30 #endif
31 
32 namespace sheaf
33 {
34 
35 class reserved_primary_index_space_state;
36 
42 {
43 
45 
46  // ===========================================================
48  // ===========================================================
50 
51 public:
52 
57 
62 
67  pod_type xindex);
68 
73  const std::string& xname);
74 
80 
85 
86 protected:
87 
92 
94 
99 
103  const reserved_primary_index_space_state& state() const;
104 
105 private:
106 
108 
109 
110  // ===========================================================
112  // ===========================================================
114 
115 public:
116 
121  pod_type new_id();
122 
127  pod_type new_hub_id(pod_type xhub_id);
128 
132  pod_type next_hub_id() const;
133 
137  bool is_next_id_available() const;
138 
142  bool is_hub_id_available(pod_type xhub_id) const;
143 
144 protected:
145 
146 private:
147 
149 
150 
151  // ===========================================================
153  // ===========================================================
155 
156 public:
157 
158 protected:
159 
160 private:
161 
163 
164 
165  // ===========================================================
167  // ===========================================================
169 
170 public:
171 
172 protected:
173 
174 private:
175 
177 
178 
179  // ===========================================================
181  // ===========================================================
183 
184 public:
185 
190  virtual reserved_primary_index_space_handle& operator=(const index_space_handle& xother);
191 
196  virtual reserved_primary_index_space_handle* clone() const;
197 
198 protected:
199 
200 private:
201 
203 
204 
205  // ===========================================================
207  // ===========================================================
209 
210 public:
211 
213 
218  virtual bool conforms_to_state(const index_space_collection& xhost,
219  pod_type xlocal_id) const;
220 
221 protected:
222 
223 private:
224 
226 
227 
228  // ===========================================================
230  // ===========================================================
232 
233 public:
234 
238  virtual bool is_ancestor_of(const any *other) const;
239 
243  virtual bool invariant() const;
244 
245 protected:
246 
247 private:
248 
250 
251 };
252 
253 // ===========================================================
254 // NON-MEMBER FUNCTIONS
255 // ===========================================================
256 
257 } // end namespace sheaf
258 
259 #endif // ifndef RESERVED_PRIMARY_INDEX_SPACE_HANDLE_H
primary_index_space_state & state()
The primary id space state (mutable version).
A computed implementation of abstract class primary_index_space_state. This representation is used fo...
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
An implementation of class explicit_index_space_handle that has a primary id space state...
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...
An implementation of class primary_index_space_handle that has a reserved primary id space state...
Namespace for the sheaves component of the sheaf system.
Factory and container for a family of id spaces.