DDLString handles String Elements. More...
#include <DDLString.h>
Public Member Functions | |
DDLString (DDLElementRegistry *myreg) | |
void | preProcessElement (const std::string &name, const std::string &nmspace, DDCompactView &cpv) |
Called by loadAttributes AFTER attributes are loaded. | |
void | processElement (const std::string &name, const std::string &nmspace, DDCompactView &cpv) |
Processing the element. | |
~DDLString (void) |
DDLString handles String Elements.
DDLString.h - description ------------------- begin: Fri Nov 21 2003 email: case@ucdhep.ucdavis.edu
Definition at line 26 of file DDLString.h.
DDLString::DDLString | ( | DDLElementRegistry * | myreg | ) |
Definition at line 12 of file DDLString.cc.
: DDXMLElement( myreg ) {}
DDLString::~DDLString | ( | void | ) |
Definition at line 16 of file DDLString.cc.
{}
void DDLString::preProcessElement | ( | const std::string & | name, |
const std::string & | nmspace, | ||
DDCompactView & | cpv | ||
) | [virtual] |
Called by loadAttributes AFTER attributes are loaded.
The preProcessElement method can assume that the attributes are loaded and perform any code that is necessary at the start of an element.
This would allow users to call their own code to setup anything necessary for the continued processing of the child elements.
Reimplemented from DDXMLElement.
Definition at line 20 of file DDLString.cc.
{}
void DDLString::processElement | ( | const std::string & | name, |
const std::string & | nmspace, | ||
DDCompactView & | cpv | ||
) | [virtual] |
Processing the element.
The processElement method completes any necessary work to process the XML element.
For example, this can be used to call the DDCore to make the geometry in memory. There is a default for this so that if not declared in the inheriting class, no processing is done.
Reimplemented from DDXMLElement.
Definition at line 24 of file DDLString.cc.
References DDXMLElement::clear(), DCOUT_V, spr::find(), DDXMLElement::getAttributeSet(), DDXMLElement::getDDName(), DDXMLElement::parent(), edm::second(), and AlCaHLTBitMon_QueryRunRegistry::string.
{ DCOUT_V('P', "DDLString::processElement started"); if (parent() == "ConstantsSection" || parent() == "DDDefinition") { // I do not like "newing" things without my control. But this is // the only way I was able to get this to work. std::string * ts = new std::string((getAttributeSet().find("value"))->second); DDName ddn = getDDName(nmspace); DDString (ddn , ts ); clear(); } DCOUT_V('P', "DDLString::processElement completed"); }