SheafSystem  0.0.0.0
dof_map_factory.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 dof_map_factory
19 
20 #ifndef DOF_MAP_FACTORY_H
21 #define DOF_MAP_FACTORY_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 DOF_TUPLE_TYPE_H
32 #include "SheafSystem/dof_tuple_type.h"
33 #endif
34 
35 #ifndef STD_MAP_H
36 #include "SheafSystem/std_map.h"
37 #endif
38 
39 #ifndef STD_STRING_H
40 #include "SheafSystem/std_string.h"
41 #endif
42 
43 
44 
45 namespace sheaf
46 {
47 class poset_dof_map;
51 class SHEAF_DLL_SPEC dof_map_factory
52 {
53 
54  friend class poset_dof_map;
55 
56 public:
57 
58  // ===========================================================
59  // DOF_MAP_FACTORY FACET
60  // ===========================================================
61 
65  virtual ~dof_map_factory();
66 
71  poset_dof_map* new_dof_map(const std::string& xclient_class_name,
72  dof_tuple_type xsheaf_base_class_id);
73 
77  void insert_prototype(const poset_dof_map* xprototype);
78 
82  void insert_prototype(dof_tuple_type xtype_id, const poset_dof_map* xprototype);
83 
87  void delete_prototype(const std::string& xclass_name);
88 
93  bool contains_prototype(const std::string& xclass_name) const;
94 
99  bool contains_prototype(dof_tuple_type xtype_id) const;
100 
101 private:
102 
107  dof_map_factory();
108 
113  dof_map_factory(const dof_map_factory& xother)
114  {}
115  ;
116 
120  typedef std::map<std::string, poset_dof_map*> prototypes_map_type;
121 
125  prototypes_map_type _prototypes_map;
126 
130  block<poset_dof_map*> _sheaf_prototypes_map;
131 
132 };
133 
134 // ===========================================================
135 // NON-MEMBER FUNCTIONS
136 // ===========================================================
137 
138 } // namespace sheaf
139 
140 #endif // ifndef DOF_MAP_FACTORY_H
The general, abstract map from dof ids to dof values.
Definition: poset_dof_map.h:59
dof_tuple_type
Identifiers for dof tuple types.
Namespace for the sheaves component of the sheaf system.
A factory for creating dof maps.
An auto_block with a no-initialization initialization policy.