SheafSystem  0.0.0.0
poset_bounds.h
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 
18 // Interface for class poset_bounds
19 
20 #ifndef POSET_BOUNDS_H
21 #define POSET_BOUNDS_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef ANY_H
28 #include "SheafSystem/any.h"
29 #endif
30 
31 #ifndef POSET_BOUNDS_DESCRIPTOR_H
32 #include "SheafSystem/poset_bounds_descriptor.h"
33 #endif
34 
35 #ifndef ZN_TO_BOOL_H
36 #include "SheafSystem/zn_to_bool.h"
37 #endif
38 
39 namespace sheaf
40 {
41 
42 class schema_poset_member;
43 class poset_state_handle;
44 class index_iterator;
45 
50 class SHEAF_DLL_SPEC poset_bounds : public any
51 {
52 
53 public:
54 
55  // ===========================================================
56  // ANY FACET
57  // ===========================================================
58 
64  virtual poset_bounds* clone() const;
65 
69  virtual bool invariant() const;
70 
74  virtual bool is_ancestor_of(const any* other) const;
75 
76  // ===========================================================
77  // POSET_BOUNDS FACET
78  // ===========================================================
79 
85 
89  poset_bounds();
90 
94  poset_bounds(const poset_bounds& xother);
95 
100 
104  virtual ~poset_bounds();
105 
109  virtual poset_bounds_descriptor descriptor() const;
110 
115 
120  pod_index_type lb_id() const;
121 
127  void put_lb_id(pod_index_type xlb_id);
128 
134  void put_lb_id(const scoped_index& xlb_id);
135 
139  bool lb_is_singleton() const;
140 
144  bool bounded_below() const;
145 
150  pod_index_type ub_id() const;
151 
157  void put_ub_id(pod_index_type xub_id);
158 
164  void put_ub_id(const scoped_index& xub_id);
165 
169  bool ub_is_singleton() const;
170 
175  bool ub_is_decomposition() const;
176 
180  bool bounded_above() const;
181 
182 protected:
183 
188 
193 
198 
203 
208 
213 
218 };
219 
220 } // namespace sheaf
221 
222 #endif // ifndef POSET_BOUNDS_H
223 
224 
225 
226 
227 
228 
bool _bounded_below
True if the lower bound is not the bottom.
Definition: poset_bounds.h:202
bool _bounded_above
True if the upper bound is not the top.
Definition: poset_bounds.h:217
A (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bounded i/o operation...
Definition: poset_bounds.h:50
Abstract base class with useful features for all objects.
Definition: any.h:39
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
Definition: zn_to_bool.h:52
specification_mode
Enumeration for mode of specifying the lower and upper bounds.
bool _ub_is_singleton
True if the upper bound contains a single member.
Definition: poset_bounds.h:212
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
bool _lb_is_singleton
True if the lower bound contains a single member.
Definition: poset_bounds.h:197
zn_to_bool * _lb
The lower bound.
Definition: poset_bounds.h:192
zn_to_bool * _ub
The upper bound.
Definition: poset_bounds.h:207
A description of a (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bound...
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
Namespace for the sheaves component of the sheaf system.
poset_bounds_descriptor _descriptor
A descriptor for this.
Definition: poset_bounds.h:187