SheafSystem  0.0.0.0
poset_state.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_STATE
19 
20 #ifndef POSET_STATE_H
21 #define POSET_STATE_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef READ_WRITE_MONITOR_H
28 #include "SheafSystem/read_write_monitor.h"
29 #endif
30 
31 #ifndef POSET_TYPE_H
32 #include "SheafSystem/poset_type.h"
33 #endif
34 
35 
36 namespace sheaf
37 {
38 
39 class abstract_poset_member;
40 class array_poset_dof_map;
41 class poset_crg_state;
42 class poset_powerset_state;
43 class poset_table_state;
44 class schema_poset_member;
45 
49 class SHEAF_DLL_SPEC poset_state: public read_write_monitor
50 {
51 
52  friend SHEAF_DLL_SPEC size_t deep_size(const poset_state& xp, bool xinclude_shallow, size_t xresults[4]);
53 
54  // ===========================================================
56  // ===========================================================
58 
59 public:
60 
64  poset_state(const abstract_poset_member* xschema, poset_type xtype_id, const std::string& xname);
65 
66 // ///
67 // /// Constructor
68 // ///
69 // poset_state(const abstract_poset_member* xschema,
70 // poset_type xtype_id,
71 // size_type xmbr_ct = 16,
72 // size_type xlink_ct = 64,
73 // size_type xsubset_ct = 4);
74 
78  ~poset_state();
79 
83  const std::string& name() const;
84 
88  void put_name(const std::string& xname);
89 
93  poset_type type_id() const;
94 
95  // ///
97  // ///
98  // const char* poset_class();
99 
103  poset_crg_state* crg();
104 
108  poset_powerset_state* powerset();
109 
113  poset_table_state* table() const;
114 
115 protected:
116 
122 
126  std::string _name;
127 
132 
137 
142 
147 
148 private:
149 
151 
152 
153  // ===========================================================
155  // ===========================================================
157 
158 public:
159 
163  virtual bool is_ancestor_of(const any* other) const;
164 
168  virtual poset_state* clone() const;
169 
173  virtual bool invariant() const;
174 
175 protected:
176 
177 private:
178 
180 };
181 
182 // ===========================================================
183 // NON-MEMBER FUNCTIONS
184 // ===========================================================
185 
194 SHEAF_DLL_SPEC size_t deep_size(const poset_state& xp,
195  bool xinclude_shallow = true,
196  size_t xresults[4] = 0);
197 
198 } // namespace poset
199 
200 #endif // ifndef POSET_STATE_H
201 
The data structure representing the cover relation graph of a poset.
The private state of a partially ordered set.
Definition: poset_state.h:49
The monitor concurrency control interface. Class READ_WRITE_MONITOR implements the monitor concurrenc...
poset_type
Identifiers for poset types.
Definition: poset_type.h:41
poset_state()
Default constructor; private to disable default construction.
Definition: poset_state.h:121
Abstract base class with useful features for all objects.
Definition: any.h:39
SHEAF_DLL_SPEC size_t deep_size(const dof_descriptor_array &xp, bool xinclude_shallow=true)
The deep size of the referenced object of type dof_descriptor_array.
poset_crg_state * _crg
The cover relation graph for this poset.
Definition: poset_state.h:136
Namespace for the sheaves component of the sheaf system.
poset_powerset_state * _powerset
The set of subposets for this poset .
Definition: poset_state.h:141
poset_type _type_id
Identifier for the type of poset.
Definition: poset_state.h:131
An abstract client handle for a member of a poset.
poset_table_state * _table
The table of dof tuples for this poset.
Definition: poset_state.h:146
The set of subsets of a poset.
The data structure representing the table containing the dof tuples of the members of a poset...