#include <DetectorDescription/Parser/src/DDLString.h>
Public Member Functions | |
DDLString () | |
void | preProcessElement (const std::string &name, const std::string &nmspace) |
Called by loadAttributes AFTER attributes are loaded. | |
void | processElement (const std::string &name, const std::string &nmspace) |
Processing the element. | |
~DDLString () |
DDLString.h - description ------------------- begin: Fri Nov 21 2003 email: case@ucdhep.ucdavis.edu
Definition at line 26 of file DDLString.h.
DDLString::DDLString | ( | ) |
DDLString::~DDLString | ( | ) |
void DDLString::preProcessElement | ( | const std::string & | name, | |
const std::string & | nmspace | |||
) | [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 33 of file DDLString.cc.
void DDLString::processElement | ( | const std::string & | name, | |
const std::string & | nmspace | |||
) | [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 37 of file DDLString.cc.
References DDXMLElement::clear(), DCOUT_V, find(), DDXMLElement::getAttributeSet(), DDXMLElement::getDDName(), DDXMLElement::parent(), and edm::second().
00038 { 00039 DCOUT_V('P', "DDLString::processElement started"); 00040 if (parent() == "ConstantsSection" || parent() == "DDDefinition") 00041 { 00042 // I do not like "newing" things without my control. But this is 00043 // the only way I was able to get this to work. 00044 00045 std::string * ts = new std::string((getAttributeSet().find("value"))->second); 00046 DDName ddn = getDDName(nmspace); 00047 DDString (ddn 00048 , ts 00049 ); 00050 00051 clear(); 00052 } 00053 00054 DCOUT_V('P', "DDLString::processElement completed"); 00055 }