DDLBox processes Box elements. More...
#include <DDLBox.h>
Public Member Functions | |
DDLBox (DDLElementRegistry *myreg) | |
Constructor. | |
void | processElement (const std::string &name, const std::string &nmspace, DDCompactView &cpv) |
Processing the element. | |
~DDLBox () | |
Destructor. |
DDLBox processes Box elements.
DDLBox.h - description ------------------- begin: Wed Oct 24 2001 email: case@ucdhep.ucdavis.edu
This is the Box element processor.
DDLBox::DDLBox | ( | DDLElementRegistry * | myreg | ) |
void DDLBox::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 31 of file DDLBox.cc.
References DDSolidFactory::box(), DCOUT_V, ddbox, ExprEvalInterface::eval(), DDXMLElement::getAttributeSet(), DDXMLElement::getDDName(), DDI::Singleton< I >::instance(), and DDLSolid::setReference().
{ DCOUT_V( 'P', "DDLBox::processElement started" ); ExprEvalInterface & ev = ExprEvalSingleton::instance(); DDXMLAttribute atts = getAttributeSet(); DDName ddname = getDDName( nmspace ); DDSolid ddbox = DDSolidFactory::box( ddname, ev.eval( nmspace, atts.find( "dx" )->second ), ev.eval( nmspace, atts.find( "dy" )->second ), ev.eval( nmspace, atts.find( "dz" )->second )); // Attempt to make sure Solid elements can be in LogicalPart elements. DDLSolid::setReference( nmspace, cpv ); DCOUT_V( 'P', "DDLBox::processElement completed" ); }