SheafSystem  0.0.0.0
poset_handle_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 poset_handle_factory
19 
20 #ifndef POSET_HANDLE_FACTORY_H
21 #define POSET_HANDLE_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 POSET_TYPE_H
32 #include "SheafSystem/poset_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 namespace sheaf
44 {
45 
46 class namespace_poset;
47 class poset_state_handle;
48 
52 class SHEAF_DLL_SPEC poset_handle_factory
53 {
54 public:
55 
56  // ===========================================================
57  // POSET_HANDLE_FACTORY FACET
58  // ===========================================================
59 
65 
69  virtual ~poset_handle_factory();
70 
75  poset_state_handle* new_poset_handle(const std::string& xclient_class_name,
76  poset_type xsheaf_base_class_id);
77 
81  void insert_prototype(const poset_state_handle* xprototype);
82 
86  void insert_prototype(poset_type xtype_id,
87  const poset_state_handle* xprototype);
88 
92  void delete_prototype(const std::string& xclass_name);
93 
98  bool contains_prototype(const std::string& xclass_name) const;
99 
104  bool contains_prototype(poset_type xtype_id) const;
105 
106 private:
107 
113  {}
114  ;
115 
119  typedef std::map<std::string, poset_state_handle*> prototypes_map_type;
120 
124  prototypes_map_type _prototypes_map;
125 
129  block<poset_state_handle*> _sheaf_prototypes_map;
130 
131 };
132 
133 // ===========================================================
134 // NON-MEMBER FUNCTIONS
135 // ===========================================================
136 
137 } // namespace sheaf
138 
139 #endif // ifndef POSET_HANDLE_FACTORY_H
A factory for creating poset handles.
poset_type
Identifiers for poset types.
Definition: poset_type.h:41
A client handle for a general, abstract partially order set.
Namespace for the sheaves component of the sheaf system.
An auto_block with a no-initialization initialization policy.