SheafSystem  0.0.0.0
member_member_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 member_member_poset_bounds
19 
20 #ifndef MEMBER_MEMBER_POSET_BOUNDS_H
21 #define MEMBER_MEMBER_POSET_BOUNDS_H
22 
23 #ifndef POSET_BOUNDS_H
24 #include "SheafSystem/poset_bounds.h"
25 #endif
26 
27 class zn_to_bool;
28 namespace sheaf
29 {
30 
36 {
37 
38 public:
39 
40  // CANONICAL MEMBERS
41 
47 
53 
59  virtual member_member_poset_bounds* clone() const;
60 
65 
69  virtual bool invariant() const;
70 
74  virtual bool is_ancestor_of(const any* other) const;
75 
76  // POSET_BOUNDS FACET
77 
81  virtual bool lb_contains_member(const scoped_index& xindex);
82 
86  virtual index_iterator lb_iterator();
87 
91  virtual bool ub_contains_member(const scoped_index& xindex);
92 
96  virtual index_iterator ub_iterator();
97 
101  bool is_attached();
102 
106  virtual void attach_to_state(poset_state_handle* xhost);
107 
111  virtual void detach_from_state();
112 
117 
118  // MEMBER_MEMBER_POSET_BOUNDS FACET
119 
126  member_member_poset_bounds(int xlb_id, int xub_id);
127 
128 
129 protected:
130 
131 private:
132 
136  zn_to_bool* _lb;
137 
141  zn_to_bool* _ub;
142 
143 };
144 
145 } // namespace sheaf
146 
147 
148 
149 #endif // ifndef MEMBER_MEMBER_POSET_BOUNDS_H
150 
151 
152 
153 
154 
155 
member_member_poset_bounds()
Default constructor; private to prevent default construction.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
virtual bool ub_contains_member(const scoped_index &xindex)
True if the upper bound contains the member with index xindex.
virtual index_iterator lb_iterator()
An iterator for the members of the lower bound.
A client handle for a general, abstract partially order set.
virtual void detach_from_state()
Detaches the lower and upper bounds.
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
virtual index_iterator ub_iterator()
An iterator for the members of the upper bound.
virtual poset_bounds_descriptor descriptor()
A descriptor for this.
virtual member_member_poset_bounds * clone() const
Virtual constructor; makes a new instance of the same type as this.
virtual void attach_to_state(poset_state_handle *xhost)
Attaches the lower and upper bounds.
A poset bounds pair with lower and upper bounds each specified by a single member.
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
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
Iterates over the subset of Zn defined by the characteristic function host().
virtual bool lb_contains_member(const scoped_index &xindex)
True if the lower bound contains the member with index xindex.
A description of a (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bound...
virtual bool invariant() const
Class invariant.
Namespace for the sheaves component of the sheaf system.
bool is_attached()
True if lb() and ub() are attached.