#ifndef AGDDSHEDHH #define AGDDSHEDHH #include #include #include "ExpatInterface/Element.h" #include "agddSection.hh" #include "agddBase.hh" #include "agddVolume.hh" #include "agddSolid.hh" #include "agddAttribute.hh" #include "agddMaterial.hh" #include "agddInnerStruct.hh" #include "DWUnits.hh" namespace agdd { class Shed : public Volume { private: double _xLen; double _yMinusLen; double _yPlusLen; double _zThickness; public: explicit Shed(agdd::Section & sec) : Solid("shed", sec), _params ("X_Y_Z" , Attribute::required) { }; void putMeIn(xml::Element & parent) { // LESTER. Need checks. cout << "Creating a Box named " << Volume::getNameAtt().getSetValue() << " ... " << flush; xml::Element * child = new xml::Element(); assert(child); parent.addChild(child); // Now destruction taken care of. child->setTagName(Volume::Base::getTagName()); child->addAttribute("name", Volume::getName()); _params.addAttributeTo(child); Solid::willAppendTheRestTo(*child); cout << "done." << endl; }; Box & setBox(double xLength, // These arguments should be double yLength, // represented in the internal double zLength) { // unit system. //_shape.setValue("box"); _params.setValue(makeNumberString(xLength/DWmm, // AGDD dtd requires mm yLength/DWmm, zLength/DWmm) ); return *this; }; }; } #endif