SheafSystem  0.0.0.0
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 PRIMARY_INDEX_SPACE_HANDLE_H
22 #define PRIMARY_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 primary_index_space_state;
36 
42 {
43 
44  friend class primary_index_space_state;
45  friend class primary_sum_index_space_state;
46 
47  // ===========================================================
49  // ===========================================================
51 
52 public:
53 
58 
63 
68  pod_type xindex);
69 
74  const std::string& xname);
75 
81 
85  virtual ~primary_index_space_handle();
86 
87 protected:
88 
93 
95 
100 
104  const primary_index_space_state& state() const;
105 
106 private:
107 
109 
110 
111  // ===========================================================
113  // ===========================================================
115 
116 public:
117 
121  pod_type offset() const;
122 
126  void extend(size_type xct);
127 
131  pod_type hub_term_id() const;
132 
133 protected:
134 
138  void put_hub_term_id(pod_type xhub_term_id);
139 
140 private:
141 
143 
144 
145  // ===========================================================
147  // ===========================================================
149 
150 public:
151 
152 protected:
153 
154 private:
155 
157 
158 
159  // ===========================================================
161  // ===========================================================
163 
164 public:
165 
170  virtual primary_index_space_handle& operator=(const index_space_handle& xother);
171 
176  virtual primary_index_space_handle* clone() const;
177 
178 protected:
179 
180 private:
181 
183 
184 
185  // ===========================================================
187  // ===========================================================
189 
190 public:
191 
193 
198  virtual bool conforms_to_state(const index_space_collection& xhost,
199  pod_type xlocal_id) const;
200 
201 protected:
202 
203 private:
204 
206 
207 
208  // ===========================================================
210  // ===========================================================
212 
213 public:
214 
218  virtual bool is_ancestor_of(const any *other) const;
219 
223  virtual bool invariant() const;
224 
225 protected:
226 
227 private:
228 
230 
231 };
232 
233 // ===========================================================
234 // NON-MEMBER FUNCTIONS
235 // ===========================================================
236 
237 } // end namespace sheaf
238 
239 #endif // ifndef PRIMARY_INDEX_SPACE_HANDLE_H
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...
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.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
A collection of id space states. This is a virtual class with provides an interface for accessing the...
A computed implementation class explicit_index_space_state that is used for the terms of the primary ...
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 class sum_index_space_state intended for use as the sum of the primary id spaces...
Factory and container for a family of id spaces.