52 std::shared_ptr<DDXMLElement>
55 RegistryMap::iterator it =
registry_.find( name );
56 std::shared_ptr<DDXMLElement> myret(
nullptr );
64 myret = std::make_shared<DDLBox>(
this);
66 else if (name ==
"Cone")
68 myret = std::make_shared<DDLCone>(
this);
70 else if (name ==
"Polyhedra" || name ==
"Polycone")
72 myret = std::make_shared<DDLPolyGenerator>(
this);
74 else if (name ==
"Trapezoid" || name ==
"Trd1")
76 myret = std::make_shared<DDLTrapezoid>(
this);
78 else if (name ==
"PseudoTrap")
80 myret = std::make_shared<DDLPseudoTrap>(
this);
82 else if (name ==
"Tubs" || name ==
"CutTubs" || name ==
"Tube" || name ==
"TruncTubs")
84 myret = std::make_shared<DDLTubs>(
this);
86 else if (name ==
"Torus")
88 myret = std::make_shared<DDLTorus>(
this);
90 else if (name ==
"ReflectionSolid")
92 myret = std::make_shared<DDLReflectionSolid>(
this);
94 else if (name ==
"UnionSolid" || name ==
"SubtractionSolid" 95 || name ==
"IntersectionSolid")
97 myret = std::make_shared<DDLBooleanSolid>(
this);
99 else if (name ==
"MultiUnionSolid" )
101 myret = std::make_shared<DDLMultiUnionSolid>(
this);
103 else if (name ==
"ShapelessSolid")
105 myret = std::make_shared<DDLShapelessSolid>(
this);
107 else if (name ==
"Sphere")
109 myret = std::make_shared<DDLSphere>(
this);
111 else if (name ==
"Orb")
113 myret = std::make_shared<DDLOrb>(
this);
115 else if (name ==
"EllipticalTube")
117 myret = std::make_shared<DDLEllipticalTube>(
this);
119 else if (name ==
"Ellipsoid")
121 myret = std::make_shared<DDLEllipsoid>(
this);
123 else if (name ==
"Parallelepiped")
125 myret = std::make_shared<DDLParallelepiped>(
this);
127 else if (name ==
"ExtrudedPolygon")
128 myret = std::make_shared<DDLPgonGenerator>(
this);
132 else if (name ==
"PosPart")
134 myret = std::make_shared<DDLPosPart>(
this);
136 else if (name ==
"CompositeMaterial")
138 myret = std::make_shared<DDLCompositeMaterial>(
this);
140 else if (name ==
"ElementaryMaterial")
142 myret = std::make_shared<DDLElementaryMaterial>(
this);
144 else if (name ==
"LogicalPart")
146 myret = std::make_shared<DDLLogicalPart>(
this);
148 else if (name ==
"ReflectionRotation" || name ==
"Rotation" )
150 myret = std::make_shared<DDLRotationAndReflection>(
this);
152 else if (name ==
"SpecPar")
154 myret = std::make_shared<DDLSpecPar>(
this);
156 else if (name ==
"RotationSequence")
158 myret = std::make_shared<DDLRotationSequence>(
this);
160 else if (name ==
"RotationByAxis")
162 myret = std::make_shared<DDLRotationByAxis>(
this);
165 else if (name ==
"SpecParSection") {
166 myret = std::make_shared<DDXMLElement>(
this,
true);
168 else if (name ==
"Vector") {
169 myret = std::make_shared<DDLVector>(
this);
171 else if (name ==
"Map") {
172 myret = std::make_shared<DDLMap>(
this);
174 else if (name ==
"String") {
175 myret = std::make_shared<DDLString>(
this);
177 else if (name ==
"Numeric") {
178 myret = std::make_shared<DDLNumeric>(
this);
180 else if (name ==
"Algorithm") {
181 myret = std::make_shared<DDLAlgorithm>(
this);
183 else if (name ==
"Division") {
184 myret = std::make_shared<DDLDivision>(
this);
190 else if (name ==
"MaterialFraction" 191 || name ==
"RZPoint" || name ==
"XYPoint" || name ==
"PartSelector" 192 || name ==
"Parameter" || name ==
"ZSection" || name ==
"ZXYSection" 193 || name ==
"Translation" 194 || name ==
"rSolid" || name ==
"rMaterial" 195 || name ==
"rParent" || name ==
"rChild" 196 || name ==
"rRotation" || name ==
"rReflectionRotation" 197 || name ==
"DDDefinition" )
199 myret = std::make_shared<DDXMLElement>(
this);
210 myret = std::make_shared<DDXMLElement>(
this);
std::shared_ptr< DDXMLElement > getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.