CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/FWCore/Utilities/interface/DictionaryTools.h

Go to the documentation of this file.
00001 #ifndef FWCore_Utilities_DictionaryTools_h
00002 #define FWCore_Utilities_DictionaryTools_h
00003 
00004 /*----------------------------------------------------------------------
00005 
00006 DictionaryTools provides a small number of dictionary based tools, used in
00007 the CMS event model.
00008 
00009 ----------------------------------------------------------------------*/
00010 
00011 #include <set>
00012 #include <string>
00013 #include <vector>
00014 
00015 namespace edm {
00016 
00017   class TypeWithDict;
00018   typedef std::set<std::string> StringSet;
00019 
00020   bool
00021   find_nested_type_named(std::string const& nested_type,
00022                          TypeWithDict const& type_to_search,
00023                          TypeWithDict& found_type);
00024   bool
00025   find_nested_type_named(std::string const& nested_type,
00026                          TypeWithDict const& type_to_search,
00027                          TypeWithDict& found_type);
00028 
00029   inline
00030   bool
00031   value_type_of(TypeWithDict const& t, TypeWithDict& found_type) {
00032     return find_nested_type_named("value_type", t, found_type);
00033   }
00034 
00035 
00036   inline
00037   bool
00038   wrapper_type_of(TypeWithDict const& possible_wrapper,
00039                   TypeWithDict& found_wrapped_type) {
00040     return find_nested_type_named("wrapped_type",
00041                                   possible_wrapper,
00042                                   found_wrapped_type);
00043   }
00044 
00045   bool
00046   is_RefVector(TypeWithDict const& possible_ref_vector,
00047                TypeWithDict& value_type);
00048 
00049   bool
00050   is_PtrVector(TypeWithDict const& possible_ref_vector,
00051                TypeWithDict& value_type);
00052   bool
00053   is_RefToBaseVector(TypeWithDict const& possible_ref_vector,
00054                      TypeWithDict& value_type);
00055 
00056   void checkDictionaries(std::string const& name, bool noComponents = false);
00057   void throwMissingDictionariesException();
00058   void loadMissingDictionaries();
00059   StringSet& missingTypes();
00060   StringSet& foundTypes();
00061 
00062   void public_base_classes(TypeWithDict const& type,
00063                            std::vector<TypeWithDict>& baseTypes);
00064 
00065   std::string const& dictionaryPlugInPrefix();
00066 }
00067 
00068 #endif