46 std::shared_ptr<DDXMLElement>
49 RegistryMap::iterator it =
registry_.find( name );
50 std::shared_ptr<DDXMLElement> myret(
nullptr );
58 myret = std::make_shared<DDLBox>(
this);
60 else if (name ==
"Cone")
62 myret = std::make_shared<DDLCone>(
this);
64 else if (name ==
"Polyhedra" || name ==
"Polycone")
66 myret = std::make_shared<DDLPolyGenerator>(
this);
68 else if (name ==
"Trapezoid" || name ==
"Trd1")
70 myret = std::make_shared<DDLTrapezoid>(
this);
72 else if (name ==
"PseudoTrap")
74 myret = std::make_shared<DDLPseudoTrap>(
this);
76 else if (name ==
"Tubs" || name ==
"CutTubs" || name ==
"Tube" || name ==
"TruncTubs")
78 myret = std::make_shared<DDLTubs>(
this);
80 else if (name ==
"Torus")
82 myret = std::make_shared<DDLTorus>(
this);
84 else if (name ==
"UnionSolid" || name ==
"SubtractionSolid" 85 || name ==
"IntersectionSolid")
87 myret = std::make_shared<DDLBooleanSolid>(
this);
89 else if (name ==
"ShapelessSolid")
91 myret = std::make_shared<DDLShapelessSolid>(
this);
93 else if (name ==
"Sphere")
95 myret = std::make_shared<DDLSphere>(
this);
97 else if (name ==
"EllipticalTube")
99 myret = std::make_shared<DDLEllipticalTube>(
this);
101 else if (name ==
"ExtrudedPolygon")
102 myret = std::make_shared<DDLPgonGenerator>(
this);
106 else if (name ==
"PosPart")
108 myret = std::make_shared<DDLPosPart>(
this);
110 else if (name ==
"CompositeMaterial")
112 myret = std::make_shared<DDLCompositeMaterial>(
this);
114 else if (name ==
"ElementaryMaterial")
116 myret = std::make_shared<DDLElementaryMaterial>(
this);
118 else if (name ==
"LogicalPart")
120 myret = std::make_shared<DDLLogicalPart>(
this);
122 else if (name ==
"ReflectionRotation" || name ==
"Rotation" )
124 myret = std::make_shared<DDLRotationAndReflection>(
this);
126 else if (name ==
"SpecPar")
128 myret = std::make_shared<DDLSpecPar>(
this);
130 else if (name ==
"RotationSequence")
132 myret = std::make_shared<DDLRotationSequence>(
this);
134 else if (name ==
"RotationByAxis")
136 myret = std::make_shared<DDLRotationByAxis>(
this);
139 else if (name ==
"SpecParSection") {
140 myret = std::make_shared<DDXMLElement>(
this,
true);
142 else if (name ==
"Vector") {
143 myret = std::make_shared<DDLVector>(
this);
145 else if (name ==
"Map") {
146 myret = std::make_shared<DDLMap>(
this);
148 else if (name ==
"String") {
149 myret = std::make_shared<DDLString>(
this);
151 else if (name ==
"Numeric") {
152 myret = std::make_shared<DDLNumeric>(
this);
154 else if (name ==
"Algorithm") {
155 myret = std::make_shared<DDLAlgorithm>(
this);
157 else if (name ==
"Division") {
158 myret = std::make_shared<DDLDivision>(
this);
164 else if (name ==
"MaterialFraction" 165 || name ==
"RZPoint" || name ==
"XYPoint" || name ==
"PartSelector" 166 || name ==
"Parameter" || name ==
"ZSection" || name ==
"ZXYSection" 167 || name ==
"Translation" 168 || name ==
"rSolid" || name ==
"rMaterial" 169 || name ==
"rParent" || name ==
"rChild" 170 || name ==
"rRotation" || name ==
"rReflectionRotation" 171 || name ==
"DDDefinition" )
173 myret = std::make_shared<DDXMLElement>(
this);
184 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.