HepMC3 event record library
|
The XMLTag struct is used to represent all information within an XML tag. It contains the attributes as a map, any sub-tags as a vector of pointers to other XMLTag objects, and any other information as a single string.
#include <LHEF.h>
Public Types | |
typedef std::string::size_type | pos_t |
typedef std::map< std::string, std::string > | AttributeMap |
Public Member Functions | |
XMLTag () | |
~XMLTag () | |
bool | getattr (std::string n, double &v) const |
bool | getattr (std::string n, bool &v) const |
bool | getattr (std::string n, long &v) const |
bool | getattr (std::string n, int &v) const |
bool | getattr (std::string n, std::string &v) const |
void | print (std::ostream &os) const |
Static Public Member Functions | |
static std::vector< XMLTag * > | findXMLTags (std::string str, std::string *leftover=0) |
static void | deleteAll (std::vector< XMLTag *> &tags) |
Data Fields | |
std::string | name |
AttributeMap | attr |
std::vector< XMLTag * > | tags |
std::string | contents |
Static Public Attributes | |
static const pos_t | end = std::string::npos |
typedef std::map<std::string,std::string> AttributeMap |
|
inline |
|
inlinestatic |
|
inlinestatic |
Scan the given string and return all XML tags found as a vector of pointers to XMLTag objects. Text which does not belong to any tag is stored in tags without name and in the string pointed to by leftover (if not null).
Definition at line 198 of file LHEF.h.
References OAttr< T >::name.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Print out this tag to a stream.
Definition at line 302 of file LHEF.h.
References OAttr< T >::name, and LHEF::oattr().
AttributeMap attr |
|
static |