DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OpaqueDataBinder.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation for LCD
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DD4HEP_OPAQUEDATABINDER_H
14 #define DD4HEP_OPAQUEDATABINDER_H
15 
16 // Framework include files
17 #include "DD4hep/Printout.h"
18 
19 // C/C++ include files
20 #include <string>
21 
23 namespace DD4hep {
24 
26 
31  struct ValueBinder { };
32 
34 
39  struct VectorBinder { };
40 
42 
47  struct ListBinder { };
48 
50 
55  struct SetBinder { };
56 
58 
63  struct MapBinder { };
64 
66 
73  public:
75  OpaqueDataBinder() = default;
77  ~OpaqueDataBinder() = default;
78 
80  template <typename BINDER, typename OBJECT> static
81  bool bind(const BINDER& b, OBJECT& object, const std::string& typ, const std::string& val);
82 
84  template <typename OBJECT> static
85  bool bind_sequence(OBJECT& object, const std::string& typ, const std::string& val);
86 
88  template <typename BINDER, typename OBJECT> static
89  bool bind_map(const BINDER& b, OBJECT& o, const std::string& key_type, const std::string& val_type);
90 
92  template <typename BINDER, typename OBJECT> static
93  bool insert_map(const BINDER& b, OBJECT& o,
94  const std::string& key_type, const std::string& key,
95  const std::string& val_type, const std::string& val);
97  template <typename BINDER, typename OBJECT> static
98  bool insert_map(const BINDER& b, OBJECT& o,
99  const std::string& key_type, const std::string& val_type,
100  const std::string& pair_data);
101  };
102 } /* End namespace DD4hep */
103 #endif /* DD4HEP_OPAQUEDATABINDER_H */
static bool bind_sequence(OBJECT &object, const std::string &typ, const std::string &val)
Binding function for sequences (unmapped STL containers)
Helper class to bind string values to a STL list of data objects (primitive or complex) ...
static bool bind(const BINDER &b, OBJECT &object, const std::string &typ, const std::string &val)
Binding function for scalar items. See the implementation function for the concrete instantiations...
Helper class to bind string values to C++ data items.
OpaqueDataBinder()=default
Default constructor.
static bool bind_map(const BINDER &b, OBJECT &o, const std::string &key_type, const std::string &val_type)
Binding function for STL maps. Does not fill data!
Helper class to bind string values to a STL set of data objects (primitive or complex) ...
static bool insert_map(const BINDER &b, OBJECT &o, const std::string &key_type, const std::string &key, const std::string &val_type, const std::string &val)
Filling function for STL maps.
Helper class to bind string values to C++ data objects (primitive or complex)
Helper class to bind string values to a STL vector of data objects (primitive or complex) ...
~OpaqueDataBinder()=default
Default destructor.
Helper class to bind STL map objects.