CMS 3D CMS Logo

DDLString Class Reference

DDLString handles String Elements. More...

#include <DetectorDescription/Parser/src/DDLString.h>

Inheritance diagram for DDLString:

DDXMLElement

List of all members.

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 ()


Detailed Description

DDLString handles String Elements.

Author:
Michael Case
DDLString.h - description ------------------- begin: Fri Nov 21 2003 email: case@ucdhep.ucdavis.edu

Definition at line 26 of file DDLString.h.


Constructor & Destructor Documentation

DDLString::DDLString (  ) 

Definition at line 25 of file DDLString.cc.

00026 {
00027 }

DDLString::~DDLString (  ) 

Definition at line 29 of file DDLString.cc.

00030 {
00031 }


Member Function Documentation

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.

00034 {
00035 }

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 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:05 2009 for CMSSW by  doxygen 1.5.4