CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/DetectorDescription/Parser/src/DDLString.cc

Go to the documentation of this file.
00001 /***************************************************************************
00002                           DDLString.cc  -  description
00003                              -------------------
00004     begin                : Friday Nov. 21, 2003
00005     email                : case@ucdhep.ucdavis.edu
00006  ***************************************************************************/
00007 
00008 #include "DetectorDescription/Parser/src/DDLString.h"
00009 
00010 #include "DetectorDescription/Base/interface/DDdebug.h"
00011 
00012 DDLString::DDLString( DDLElementRegistry* myreg )
00013   : DDXMLElement( myreg )
00014 {}
00015 
00016 DDLString::~DDLString( void )
00017 {}
00018  
00019 void
00020 DDLString::preProcessElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
00021 {}
00022 
00023 void
00024 DDLString::processElement( const std::string& name, const std::string& nmspace, DDCompactView& cpv )
00025 {
00026   DCOUT_V('P', "DDLString::processElement started");
00027   if (parent() == "ConstantsSection" || parent() == "DDDefinition")
00028   {
00029     // I do not like "newing" things without my control.  But this is
00030     // the only way I was able to get this to work.
00031 
00032     std::string * ts = new std::string((getAttributeSet().find("value"))->second);
00033     DDName ddn = getDDName(nmspace);
00034     DDString (ddn 
00035               , ts
00036       );
00037 
00038     clear();
00039   }
00040 
00041   DCOUT_V('P', "DDLString::processElement completed");
00042 }
00043