CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DictionaryTools.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_DictionaryTools_h
2 #define FWCore_Utilities_DictionaryTools_h
3 
4 /*----------------------------------------------------------------------
5 
6 DictionaryTools provides a small number of dictionary based tools, used in
7 the CMS event model.
8 
9 ----------------------------------------------------------------------*/
10 
11 #include <set>
12 #include <string>
13 #include <vector>
14 
15 namespace edm {
16 
17  class TypeWithDict;
18  typedef std::set<std::string> StringSet;
19 
20  bool
21  find_nested_type_named(std::string const& nested_type,
22  TypeWithDict const& type_to_search,
23  TypeWithDict& found_type);
24  bool
25  find_nested_type_named(std::string const& nested_type,
26  TypeWithDict const& type_to_search,
27  TypeWithDict& found_type);
28 
29  inline
30  bool
31  value_type_of(TypeWithDict const& t, TypeWithDict& found_type) {
32  return find_nested_type_named("value_type", t, found_type);
33  }
34 
35 
36  inline
37  bool
38  wrapper_type_of(TypeWithDict const& possible_wrapper,
39  TypeWithDict& found_wrapped_type) {
40  return find_nested_type_named("wrapped_type",
41  possible_wrapper,
42  found_wrapped_type);
43  }
44 
45  bool
46  is_RefVector(TypeWithDict const& possible_ref_vector,
47  TypeWithDict& value_type);
48 
49  bool
50  is_PtrVector(TypeWithDict const& possible_ref_vector,
51  TypeWithDict& value_type);
52  bool
53  is_RefToBaseVector(TypeWithDict const& possible_ref_vector,
54  TypeWithDict& value_type);
55 
56  void checkDictionaries(std::string const& name, bool noComponents = false);
61 
62  void public_base_classes(TypeWithDict const& type,
63  std::vector<TypeWithDict>& baseTypes);
64 
66 }
67 
68 #endif
bool find_nested_type_named(std::string const &nested_type, TypeWithDict const &type_to_search, TypeWithDict &found_type)
type
Definition: HCALResponse.h:21
bool is_RefToBaseVector(TypeWithDict const &possible_ref_vector, TypeWithDict &value_type)
std::string const & dictionaryPlugInPrefix()
void public_base_classes(TypeWithDict const &type, std::vector< TypeWithDict > &baseTypes)
bool is_RefVector(TypeWithDict const &possible_ref_vector, TypeWithDict &value_type)
StringSet & missingTypes()
bool wrapper_type_of(TypeWithDict const &possible_wrapper, TypeWithDict &found_wrapped_type)
std::set< std::string > StringSet
void checkDictionaries(std::string const &name, bool noComponents=false)
StringSet & foundTypes()
Container::value_type value_type
void throwMissingDictionariesException()
void loadMissingDictionaries()
bool is_PtrVector(TypeWithDict const &possible_ref_vector, TypeWithDict &value_type)
bool value_type_of(TypeWithDict const &t, TypeWithDict &found_type)