DD4hep  1.31.0
Detector Description Toolkit for High Energy Physics
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
config.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
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 //
14 // Setup XML parsing for the use of Apache Xerces-C and TiXml
15 //
16 //==========================================================================
17 #ifndef XML_CONFIG_H
18 #define XML_CONFIG_H
19 
20 #include <Parsers/config.h>
21 
22 #if defined(DD4HEP_USE_TINYXML)
23 #define __TIXML__
24 #endif
25 
26 // C/C++ include files
27 #include <cstdlib>
28 
29 #ifndef __TIXML__
30 // This is the absolute minimal include necessary to comply with XercesC
31 // Not includuing this file leads to clashes in XmlChar aka XMLCh in XercesC.
32 //
33 // We do not load here many dependencies. This simply sets up primitive types.
34 #include <xercesc/util/Xerces_autoconf_config.hpp>
35 #endif
36 
38 namespace dd4hep {
39 
41  namespace xml {
42  class XmlElement;
43  class XmlDocument;
44  class XmlNodeList;
45  class XmlNode;
46  class XmlAttr;
47  typedef std::size_t XmlSize_t;
48 #ifdef __TIXML__
49  typedef char XmlChar;
50 #else
51  typedef XERCES_XMLCH_T XmlChar;
53  // These only work for very specific XercesC implementations:
54  //typedef char16_t XmlChar;
55  //typedef unsigned short XmlChar;
56 #endif
57  }
58 }
59 
60 #ifdef __TIXML__
61 #define XML_IMPLEMENTATION_TYPE " TinyXML DOM mini-parser "
62 #else // Xerces-C
63 #define XML_IMPLEMENTATION_TYPE " Apache Xerces-C DOM Parser"
64 #endif // __TIXML__
65 #endif // XML_CONFIG_H
dd4hep::xml
Namespace for the AIDA detector description toolkit supporting XML utilities.
Definition: ConditionsTags.h:27
dd4hep::xml::XmlChar
XERCES_XMLCH_T XmlChar
Use the definition from the autoconf header of Xerces:
Definition: config.h:52
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::xml::XmlSize_t
std::size_t XmlSize_t
Definition: config.h:46