![]() |
|
|||
File indexing completed on 2025-02-21 09:58:02
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 #ifndef DD4HEP_OPAQUEDATABINDER_H 0014 #define DD4HEP_OPAQUEDATABINDER_H 0015 0016 // Framework include files 0017 #include <DD4hep/Printout.h> 0018 0019 // C/C++ include files 0020 #include <string> 0021 0022 /// Namespace for the AIDA detector description toolkit 0023 namespace dd4hep { 0024 0025 /// DD4hep internal namespace declaration for utilities and implementation details 0026 namespace detail { 0027 0028 /// Helper class to bind string values to C++ data objects (primitive or complex) 0029 /** 0030 * \author M.Frank 0031 * \version 1.0 0032 * \ingroup DD4HEP 0033 */ 0034 struct ValueBinder { }; 0035 0036 /// Helper class to bind string values to a STL vector of data objects (primitive or complex) 0037 /** 0038 * \author M.Frank 0039 * \version 1.0 0040 * \ingroup DD4HEP 0041 */ 0042 struct VectorBinder { }; 0043 0044 /// Helper class to bind string values to a STL list of data objects (primitive or complex) 0045 /** 0046 * \author M.Frank 0047 * \version 1.0 0048 * \ingroup DD4HEP 0049 */ 0050 struct ListBinder { }; 0051 0052 /// Helper class to bind string values to a STL set of data objects (primitive or complex) 0053 /** 0054 * \author M.Frank 0055 * \version 1.0 0056 * \ingroup DD4HEP 0057 */ 0058 struct SetBinder { }; 0059 0060 /// Helper class to bind STL map objects 0061 /** 0062 * \author M.Frank 0063 * \version 1.0 0064 * \ingroup DD4HEP 0065 */ 0066 struct MapBinder { }; 0067 0068 /// Helper class to bind string values to C++ data items 0069 /** 0070 * 0071 * \author M.Frank 0072 * \version 1.0 0073 * \ingroup DD4HEP 0074 */ 0075 class OpaqueDataBinder { 0076 public: 0077 /// Default constructor 0078 OpaqueDataBinder() = default; 0079 /// Default destructor 0080 ~OpaqueDataBinder() = default; 0081 0082 /// Binding function for scalar items. See the implementation function for the concrete instantiations 0083 template <typename BINDER, typename OBJECT> static 0084 bool bind(const BINDER& b, OBJECT& object, const std::string& typ, const std::string& val); 0085 0086 /// Binding function for sequences (unmapped STL containers) 0087 template <typename OBJECT> static 0088 bool bind_sequence(OBJECT& object, const std::string& typ, const std::string& val); 0089 0090 /// Binding function for STL maps. Does not fill data! 0091 template <typename BINDER, typename OBJECT> static 0092 bool bind_map(const BINDER& b, OBJECT& o, const std::string& key_type, const std::string& val_type); 0093 0094 /// Filling function for STL maps. 0095 template <typename BINDER, typename OBJECT> static 0096 bool insert_map(const BINDER& b, OBJECT& o, 0097 const std::string& key_type, const std::string& key, 0098 const std::string& val_type, const std::string& val); 0099 /// Filling function for STL maps. 0100 template <typename BINDER, typename OBJECT> static 0101 bool insert_map(const BINDER& b, OBJECT& o, 0102 const std::string& key_type, const std::string& val_type, 0103 const std::string& pair_data); 0104 }; 0105 } 0106 } /* End namespace dd4hep */ 0107 #endif /* DD4HEP_OPAQUEDATABINDER_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |