DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | List of all members
dd4hep::xml::LayeringCnv Class Reference

XML converter for layering objects. More...

#include <Layering.h>

Inheritance diagram for dd4hep::xml::LayeringCnv:
dd4hep::xml::Element

Public Member Functions

 LayeringCnv (Element e)
 Initializing constructor. More...
 
void fromCompact (Layering &layering) const
 Invoke converter. More...
 
- Public Member Functions inherited from dd4hep::xml::Element
 Element (const Handle_t &e)
 Constructor from XmlElement handle. More...
 
 Element (const Element &e)
 Constructor from XmlElement handle. More...
 
 Element (const Document &document, const XmlChar *type)
 Constructor from DOM document entity. More...
 
Document document () const
 Access the hosting document handle of this DOM element. More...
 
 operator bool () const
 operator bool: check handle validity More...
 
bool operator! () const
 operator NOT: check handle validity More...
 
Elementoperator= (const Element &c)
 Assignment operator. More...
 
Elementoperator= (Handle_t handle)
 Assignment operator. More...
 
 operator Handle_t () const
 Automatic conversion to DOM element handle. More...
 
 operator Elt_t () const
 Automatic conversion to XmlElement pointer. More...
 
Elt_t ptr () const
 Access to XmlElement pointer. More...
 
Handle_t parent () const
 Access the XmlElements parent. More...
 
Elt_t parentElement () const
 Access the XmlElements parent. More...
 
std::string tag () const
 Access the tag name of this DOM element. More...
 
const XmlChartagName () const
 Access the tag name of this DOM element. More...
 
std::string text () const
 Access the tag name of this DOM element. More...
 
void text (const std::string value) const
 Set text attribute to the XML node. More...
 
void append (Handle_t handle) const
 Append a new element to the existing tree. More...
 
Handle_t clone (const Document &new_doc) const
 Clone the DOMelement. More...
 
bool hasAttr (const XmlChar *name) const
 Check for the existence of a named attribute. More...
 
template<class T >
attr (const XmlAttr *att) const
 Access attribute with implicit return type conversion. More...
 
template<class T >
attr (const XmlChar *tag_value) const
 Access attribute with implicit return type conversion. More...
 
template<class T >
attr (const XmlChar *tag_value, T default_value) const
 Access attribute with implicit return type conversion. More...
 
template<class T >
attr (const char *name) const
 Access typed attribute value by its name. More...
 
template<class T >
attr (const char *name, T default_value) const
 Access typed attribute value by its name. More...
 
const XmlCharattr_name (const Attribute a) const
 Access attribute name (throws exception if not present) More...
 
const XmlCharattr_value (const Attribute a) const
 Access attribute value by the attribute (throws exception if not present) More...
 
size_t numChildren (const XmlChar *tag_value, bool exc=true) const
 Access the number of children of this DOM element with a given tag name. More...
 
void setAttrs (Handle_t e) const
 Remove own attributes and copy all attributes from handle 'e'. More...
 
void removeAttrs () const
 Remove all attributes of this element. More...
 
std::vector< Attributeattributes () const
 Retrieve a collection of all attributes of this DOM element. More...
 
Attribute getAttr (const XmlChar *name) const
 Access single attribute by its name. More...
 
template<class T >
Attribute setAttr (const XmlChar *nam, const T &val) const
 Set single attribute. More...
 
template<class T >
void setValue (const T &val) const
 Set element value. More...
 
Handle_t clone (Handle_t h) const
 Clone the DOM element tree. More...
 
Handle_t addChild (const XmlChar *tag) const
 Add a new child to the DOM node. More...
 
Handle_t setChild (const XmlChar *tag) const
 Check if a child with the required tag exists - if not create it and add it to the current node. More...
 
Handle_t child (const Strng_t &tag_value, bool except=true) const
 Access child by tag name. Thow an exception if required in case the child is not present. More...
 
Handle_t remove (Handle_t node) const
 Remove a child node identified by its handle. More...
 
bool hasChild (const XmlChar *tag_value) const
 Check the existence of a child with a given tag name. More...
 
Attribute setRef (const XmlChar *tag, const XmlChar *refname) const
 Set the reference attribute to the node (adds attribute ref="ref-name") More...
 
Attribute setRef (const XmlChar *tag, const std::string &refname) const
 Set the reference attribute to the node (adds attribute ref="ref-name") More...
 
const XmlChargetRef (const XmlChar *tag) const
 Access the value of the reference attribute of the node (attribute ref="ref-name") More...
 
void addComment (const XmlChar *text) const
 Add comment node to the element. More...
 
void addComment (const char *text) const
 Add comment node to the element. More...
 
void addComment (const std::string &text_value) const
 Add comment node to the element. More...
 

Additional Inherited Members

- Public Types inherited from dd4hep::xml::Element
typedef Handle_t::Elt_t Elt_t
 Simplification type declarations. More...
 
- Public Attributes inherited from dd4hep::xml::Element
Handle_t m_element
 The underlying object holding the XmlElement pointer. More...
 

Detailed Description

XML converter for layering objects.

Author
M.Frank
Version
1.0

Definition at line 149 of file Layering.h.

Constructor & Destructor Documentation

◆ LayeringCnv()

dd4hep::xml::LayeringCnv::LayeringCnv ( Element  e)
inline

Initializing constructor.

Definition at line 158 of file Layering.h.

Member Function Documentation

◆ fromCompact()

void dd4hep::xml::LayeringCnv::fromCompact ( Layering layering) const

Invoke converter.

Definition at line 43 of file Layering.cpp.


The documentation for this class was generated from the following files: