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

Class to support both way translation between C++ and XML strings. More...

#include <XMLElements.h>

Inheritance diagram for dd4hep::xml::Tag_t:
dd4hep::xml::Strng_t

Public Member Functions

 Tag_t (const char *s)
 Constructor from normal ASCII string. More...
 
 Tag_t (const XmlChar *s)
 Constructor from unicode string. More...
 
 Tag_t (const Strng_t &s)
 Constructor from internal XML string. More...
 
 Tag_t (const std::string &s)
 Constructor from STL string. More...
 
 Tag_t (const std::string &v, const std::string &s, void(*register_func)(const std::string &, Tag_t *))
 
 Tag_t (const Tag_t &c)
 Copy constructor. More...
 
 ~Tag_t ()
 Destructor. More...
 
Tag_toperator= (const char *s)
 Assignment of a normal ASCII string. More...
 
Tag_toperator= (const Tag_t &s)
 Assignment of a tag object. More...
 
Tag_toperator= (const Strng_t &s)
 Assignment of a internal Xml string. More...
 
Tag_toperator= (const std::string &s)
 Assignment of a STL string. More...
 
 operator const std::string & () const
 Automatic conversion to STL string. More...
 
const std::string & str () const
 Access writable STL string. More...
 
const char * c_str () const
 Access data buffer of STL string. More...
 
- Public Member Functions inherited from dd4hep::xml::Strng_t
 Strng_t (const XmlChar *c)
 Initializing constructor from unicode string. More...
 
Strng_toperator= (const XmlChar *s)
 Assignment opertor from unicode string. More...
 
 Strng_t (const char *c)
 Initializing constructor from ascii string. More...
 
 Strng_t (const std::string &c)
 Initializing constructor from STL string. More...
 
 Strng_t (const Strng_t &c)
 Copy constructor. More...
 
 ~Strng_t ()
 Default destructor - release unicode string. More...
 
 operator const XmlChar * () const
 Auto-conversion to unicode string. More...
 
const XmlCharptr () const
 Accessor to unicode string. More...
 
size_t length () const
 String length in native representation. More...
 
Strng_toperator= (const char *s)
 Assignment opertor from ascii string. More...
 
Strng_toperator= (const Strng_t &s)
 Assignment opertor from helper string. More...
 
Strng_toperator= (const std::string &s)
 Assignment opertor from STL string. More...
 

Public Attributes

std::string m_str
 STL string buffer. More...
 
- Public Attributes inherited from dd4hep::xml::Strng_t
XmlCharm_xml
 Pointer to unicode string. More...
 

Detailed Description

Class to support both way translation between C++ and XML strings.

Helper class to easily convert between – unicode – std::string – const char*. Internaly a copy representation as an std::string is kept.

Author
M.Frank
Version
1.0

Definition at line 254 of file XMLElements.h.

Constructor & Destructor Documentation

◆ Tag_t() [1/6]

dd4hep::xml::Tag_t::Tag_t ( const char *  s)
inline

Constructor from normal ASCII string.

Definition at line 260 of file XMLElements.h.

◆ Tag_t() [2/6]

dd4hep::xml::Tag_t::Tag_t ( const XmlChar s)
inline

Constructor from unicode string.

Definition at line 265 of file XMLElements.h.

◆ Tag_t() [3/6]

dd4hep::xml::Tag_t::Tag_t ( const Strng_t s)
inline

Constructor from internal XML string.

Definition at line 269 of file XMLElements.h.

◆ Tag_t() [4/6]

dd4hep::xml::Tag_t::Tag_t ( const std::string &  s)
inline

Constructor from STL string.

Definition at line 273 of file XMLElements.h.

◆ Tag_t() [5/6]

dd4hep::xml::Tag_t::Tag_t ( const std::string &  v,
const std::string &  s,
void(*)(const std::string &, Tag_t *)  register_func 
)
inline

Constructor from STL string with registration. ONLY to be used for static global entries to protect against duplicated static memory.

Definition at line 278 of file XMLElements.h.

◆ Tag_t() [6/6]

dd4hep::xml::Tag_t::Tag_t ( const Tag_t c)
inline

Copy constructor.

Definition at line 283 of file XMLElements.h.

◆ ~Tag_t()

dd4hep::xml::Tag_t::~Tag_t ( )
inline

Destructor.

Definition at line 287 of file XMLElements.h.

Member Function Documentation

◆ c_str()

const char* dd4hep::xml::Tag_t::c_str ( ) const
inline

Access data buffer of STL string.

Definition at line 308 of file XMLElements.h.

◆ operator const std::string &()

dd4hep::xml::Tag_t::operator const std::string & ( ) const
inline

Automatic conversion to STL string.

Definition at line 300 of file XMLElements.h.

◆ operator=() [1/4]

Tag_t & Tag_t::operator= ( const char *  s)

Assignment of a normal ASCII string.

Definition at line 528 of file XMLElements.cpp.

◆ operator=() [2/4]

Tag_t & Tag_t::operator= ( const std::string &  s)

Assignment of a STL string.

Definition at line 555 of file XMLElements.cpp.

◆ operator=() [3/4]

Tag_t & Tag_t::operator= ( const Strng_t s)

Assignment of a internal Xml string.

Definition at line 542 of file XMLElements.cpp.

◆ operator=() [4/4]

Tag_t & Tag_t::operator= ( const Tag_t s)

Assignment of a tag object.

Definition at line 518 of file XMLElements.cpp.

◆ str()

const std::string& dd4hep::xml::Tag_t::str ( ) const
inline

Access writable STL string.

Definition at line 304 of file XMLElements.h.

Member Data Documentation

◆ m_str

std::string dd4hep::xml::Tag_t::m_str

STL string buffer.

Definition at line 257 of file XMLElements.h.


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