DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
Classes | Namespaces | Macros | Typedefs | Functions
XMLElements.h File Reference
#include <cmath>
#include <string>
#include <vector>
#include <stdexcept>
#include "XML/config.h"

Go to the source code of this file.

Classes

class  dd4hep::xml::XmlString
 Definition of the XmlString class. More...
 
class  dd4hep::xml::Strng_t
 Helper class to encapsulate a unicode string. More...
 
class  dd4hep::xml::Tag_t
 Class to support both way translation between C++ and XML strings. More...
 
class  dd4hep::xml::NodeList
 Class describing a list of XML nodes. More...
 
class  dd4hep::xml::Handle_t
 Class to easily access the properties of single XmlElements. More...
 
class  dd4hep::xml::Collection_t
 Class to support the access to collections of XmlNodes (or XmlElements) More...
 
class  dd4hep::xml::Document
 Class supporting the basic functionality of an XML document. More...
 
class  dd4hep::xml::DocumentHolder
 Class supporting the basic functionality of an XML document including ownership. More...
 
class  dd4hep::xml::Element
 User abstraction class to manipulate XML elements within a document. More...
 
class  dd4hep::xml::RefElement
 User abstraction class to manipulate named XML elements (references) within a document. More...
 

Namespaces

 dd4hep
 Namespace for the AIDA detector description toolkit.
 
 dd4hep::xml
 Namespace for the AIDA detector description toolkit supporting XML utilities.
 

Macros

#define RAD_2_DEGREE   57.295779513082320876798154814105
 
#define M_PI   3.14159265358979323846
 
#define INLINE   inline
 

Typedefs

typedef const XmlAttr * dd4hep::xml::Attribute
 
typedef const std::string & dd4hep::xml::CSTR
 
typedef const XmlChar * dd4hep::xml::cpXmlChar
 

Functions

void dd4hep::xml::dumpTree (XmlDocument *doc)
 Dump DOM tree of a document. More...
 
int dd4hep::xml::set_float_precision (int precision)
 Change floating point precision on conversion to string. More...
 
int dd4hep::xml::get_float_precision ()
 Access floating point precision on conversion to string. More...
 
std::string dd4hep::xml::_toString (const Attribute attr)
 Convert xml attribute to STL string. More...
 
std::string dd4hep::xml::_toString (const XmlChar *toTranscode)
 Convert xml string to STL string. More...
 
std::string dd4hep::xml::_toString (const char *s)
 Do-nothing version. Present for completeness and argument interchangeability. More...
 
std::string dd4hep::xml::_toString (const std::string &s)
 Do-nothing version. Present for completeness and argument interchangeability. More...
 
std::string dd4hep::xml::_toString (unsigned long i, const char *fmt="%lu")
 Format unsigned long integer to string with arbitrary format. More...
 
std::string dd4hep::xml::_toString (unsigned int i, const char *fmt="%u")
 Format unsigned integer (32 bits) to string with arbitrary format. More...
 
std::string dd4hep::xml::_toString (int i, const char *fmt="%d")
 Format signed integer (32 bits) to string with arbitrary format. More...
 
std::string dd4hep::xml::_toString (long i, const char *fmt="%ld")
 Format signed long integer to string with arbitrary format. More...
 
std::string dd4hep::xml::_toString (float d, const char *fmt="%.17e")
 Format single procision float number (32 bits) to string with arbitrary format. More...
 
std::string dd4hep::xml::_toString (double d, const char *fmt="%.17e")
 Format double procision float number (64 bits) to string with arbitrary format. More...
 
std::string dd4hep::xml::_ptrToString (const void *p, const char *fmt="%p")
 Format void pointer (64 bits) to string with arbitrary format. More...
 
template<typename T >
std::string dd4hep::xml::_toString (const T *p, const char *fmt="%p")
 Format void pointer (64 bits) to string with arbitrary format. More...
 
void dd4hep::xml::_toDictionary (const XmlChar *name, const XmlChar *value)
 Helper function to populate the evaluator dictionary. More...
 
template<typename T >
void dd4hep::xml::_toDictionary (const XmlChar *name, T value)
 Helper function to populate the evaluator dictionary. More...
 
void dd4hep::xml::_toDictionary (const XmlChar *name, float value)
 Helper function to populate the evaluator dictionary. More...
 
void dd4hep::xml::_toDictionary (const XmlChar *name, double value)
 Helper function to populate the evaluator dictionary. More...
 
bool dd4hep::xml::_toBool (const XmlChar *value)
 Conversion function from raw unicode string to bool. More...
 
int dd4hep::xml::_toInt (const XmlChar *value)
 Conversion function from raw unicode string to int. More...
 
unsigned int dd4hep::xml::_toUInt (const XmlChar *value)
 Conversion function from raw unicode string to unsigned int. More...
 
long dd4hep::xml::_toLong (const XmlChar *value)
 Conversion function from raw unicode string to long. More...
 
unsigned long dd4hep::xml::_toULong (const XmlChar *value)
 Conversion function from raw unicode string to unsigned long. More...
 
float dd4hep::xml::_toFloat (const XmlChar *value)
 Conversion function from raw unicode string to float. More...
 
double dd4hep::xml::_toDouble (const XmlChar *value)
 Conversion function from raw unicode string to double. More...
 
std::string dd4hep::xml::getEnviron (const std::string &env)
 Helper function to lookup environment from the expression evaluator. More...
 
bool dd4hep::xml::enableEnvironResolution (bool new_value)
 Enable/disable environment resolution when parsing strings. More...
 
Strng_t dd4hep::xml::operator+ (const Strng_t &a, const char *b)
 Unicode string concatenation of a normal ASCII string from right side. More...
 
Strng_t dd4hep::xml::operator+ (const Strng_t &a, const std::string &b)
 Unicode string concatenation of a encapsulated and an STL string from right side. More...
 
Strng_t dd4hep::xml::operator+ (const Strng_t &a, const Strng_t &b)
 Unicode string concatenation of a encapsulated and an encapsulated string from right side. More...
 
Strng_t dd4hep::xml::operator+ (const char *a, const Strng_t &b)
 Unicode string concatenation of a normal ASCII string from left side. More...
 
Strng_t dd4hep::xml::operator+ (const std::string &a, const Strng_t &b)
 Unicode string concatenation of a STL string and an encapsulated string from the left. More...
 
Strng_t dd4hep::xml::operator+ (const Strng_t &a, const XmlChar *b)
 Unicode string concatenation of a encapsulated and raw unicode string from right side. More...
 
Strng_t dd4hep::xml::operator+ (const XmlChar *a, const Strng_t &b)
 Unicode string concatenation of a encapsulated and raw unicode string from left side. More...
 
Strng_t dd4hep::xml::operator+ (const XmlChar *a, const std::string &b)
 Unicode string concatenation of a raw unicode and an STL string from the right. More...
 
Strng_t dd4hep::xml::operator+ (const std::string &a, const XmlChar *b)
 Unicode string concatenation of a raw unicode and an STL string from the left. More...
 
Tag_t dd4hep::xml::operator+ (const Tag_t &a, const char *b)
 Tag/string concatenation with a normal ASCII string from right side. More...
 
Tag_t dd4hep::xml::operator+ (const char *a, const Tag_t &b)
 Tag/string concatenation with a normal ASCII string from left side. More...
 
Tag_t dd4hep::xml::operator+ (const Tag_t &a, const XmlChar *b)
 Tag/string concatenation with a unicode string from right side. More...
 
Tag_t dd4hep::xml::operator+ (const Tag_t &a, const Strng_t &b)
 Tag/string concatenation with a internal Xml string from right side. More...
 
Tag_t dd4hep::xml::operator+ (const Tag_t &a, const std::string &b)
 Tag/string concatenation with a STL string from right side. More...
 
bool dd4hep::xml::operator== (const std::string &c, const Tag_t &b)
 Equality operator between tag object and STL string. More...
 
std::string dd4hep::xml::_toString (const Strng_t &s)
 Convert Strng_t to std::string. More...
 
std::string dd4hep::xml::_toString (const Tag_t &s)
 Convert Tag_t to std::string. More...
 
void dd4hep::xml::_toDictionary (const XmlChar *name, const Strng_t &s)
 Helper function to populate the evaluator dictionary. More...
 
void dd4hep::xml::_toDictionary (const XmlChar *name, const Tag_t &t)
 Helper function to populate the evaluator dictionary. More...
 
template<>
INLINE std::string dd4hep::xml::Handle_t::attr< std::string > (const XmlChar *tag_value) const
 
template<>
INLINE std::string dd4hep::xml::Handle_t::attr< std::string > (const XmlChar *tag_value, std::string default_value) const
 
void dd4hep::xml::dump_tree (Handle_t elt)
 Dump partial or full XML trees to stdout. More...
 
void dd4hep::xml::dump_tree (Handle_t elt, std::ostream &os)
 Dump partial or full XML trees. More...
 
void dd4hep::xml::dump_tree (Document doc)
 Dump partial or full XML documents to stdout. More...
 
void dd4hep::xml::dump_tree (Document doc, std::ostream &os)
 Dump partial or full XML documents. More...
 

Macro Definition Documentation

◆ INLINE

#define INLINE   inline

Definition at line 526 of file XMLElements.h.

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 30 of file XMLElements.h.

◆ RAD_2_DEGREE

#define RAD_2_DEGREE   57.295779513082320876798154814105

Definition at line 27 of file XMLElements.h.