SheafSystem  0.0.0.0
id_block.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 id_block
19 
20 #ifndef ID_BLOCK_H
21 #define ID_BLOCK_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef BLOCK_H
28 #include "SheafSystem/block.h"
29 #endif
30 
31 #ifndef SCOPED_INDEX_H
32 #include "SheafSystem/scoped_index.h"
33 #endif
34 
35 #ifndef SHEAF_H
36 #include "SheafSystem/sheaf.h"
37 #endif
38 
39 namespace sheaf
40 {
41 
42 class any;
43 class poset_state_handle;
44 
48 class SHEAF_DLL_SPEC id_block : public block<scoped_index>
49 {
50 
51 public:
52 
53  // =============================================================================
54  // ANY FACET
55  // =============================================================================
56 
60  virtual bool is_ancestor_of(const any* other) const;
61 
66  virtual id_block* clone() const;
67 
71  id_block& operator=(const id_block& xother);
72 
76  virtual bool invariant() const;
77 
78  // =============================================================================
79  // ID_BLOCK FACET
80  // =============================================================================
81 
85  id_block(const id_block& xother);
86 
90  virtual ~id_block();
91 
97  id_block(const poset_state_handle& xhost,
98  const index_space_handle& xid_space,
99  int xub,
100  const scoped_index *xids = 0,
101  int xct = 0);
102 
106  poset_state_handle& host();
107 
111  const poset_state_handle& host() const;
112 
116  const index_space_handle& id_space() const;
117 
121  void put_id_space(const index_space_handle& xnew_id_space, bool xauto_access);
122 
126  void put_member_id_space(bool xauto_access);
127 
131  bool is_member_hub_id_space() const;
132 
133 
134 private:
135 
139  id_block();
140 
144  poset_state_handle* _host;
145 
149  index_space_handle* _id_space;
150 
151 };
152 
153 // =============================================================================
154 // NON-MEMBER FUNCTIONS
155 // =============================================================================
156 
160 SHEAF_DLL_SPEC
161 std::ostream&
162 operator << (std::ostream& xos, const id_block& xblk);
163 
164 } // namespace sheaf
165 
166 #endif // ifndef ID_BLOCK_H
A client handle for a general, abstract partially order set.
An abstract handle to a space of alternate integer identifiers (aliases) for a subset of a hub set of...
Abstract base class with useful features for all objects.
Definition: any.h:39
An index within the external ("client") scope of a given id space.
Definition: scoped_index.h:116
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const dof_descriptor_array &p)
Insert dof_descriptor_array& p into ostream& os.
Namespace for the sheaves component of the sheaf system.
An auto_block with a no-initialization initialization policy.
A block of ids all in the same id space.
Definition: id_block.h:48