43 RegistryMap::iterator it =
registry_.find(name);
44 std::shared_ptr<DDXMLElement> myret(
nullptr);
50 myret = std::make_shared<DDLBox>(
this);
51 }
else if (name ==
"Cone") {
52 myret = std::make_shared<DDLCone>(
this);
53 }
else if (name ==
"Polyhedra" || name ==
"Polycone") {
54 myret = std::make_shared<DDLPolyGenerator>(
this);
55 }
else if (name ==
"Trapezoid" || name ==
"Trd1") {
56 myret = std::make_shared<DDLTrapezoid>(
this);
57 }
else if (name ==
"PseudoTrap") {
58 myret = std::make_shared<DDLPseudoTrap>(
this);
59 }
else if (name ==
"Tubs" || name ==
"CutTubs" || name ==
"Tube" || name ==
"TruncTubs") {
60 myret = std::make_shared<DDLTubs>(
this);
61 }
else if (name ==
"Torus") {
62 myret = std::make_shared<DDLTorus>(
this);
63 }
else if (name ==
"UnionSolid" || name ==
"SubtractionSolid" || name ==
"IntersectionSolid") {
64 myret = std::make_shared<DDLBooleanSolid>(
this);
65 }
else if (name ==
"ShapelessSolid") {
66 myret = std::make_shared<DDLShapelessSolid>(
this);
67 }
else if (name ==
"Sphere") {
68 myret = std::make_shared<DDLSphere>(
this);
69 }
else if (name ==
"EllipticalTube") {
70 myret = std::make_shared<DDLEllipticalTube>(
this);
71 }
else if (name ==
"ExtrudedPolygon")
72 myret = std::make_shared<DDLPgonGenerator>(
this);
76 else if (name ==
"PosPart") {
77 myret = std::make_shared<DDLPosPart>(
this);
78 }
else if (name ==
"CompositeMaterial") {
79 myret = std::make_shared<DDLCompositeMaterial>(
this);
80 }
else if (name ==
"ElementaryMaterial") {
81 myret = std::make_shared<DDLElementaryMaterial>(
this);
82 }
else if (name ==
"LogicalPart") {
83 myret = std::make_shared<DDLLogicalPart>(
this);
84 }
else if (name ==
"ReflectionRotation" || name ==
"Rotation") {
85 myret = std::make_shared<DDLRotationAndReflection>(
this);
86 }
else if (name ==
"SpecPar") {
87 myret = std::make_shared<DDLSpecPar>(
this);
88 }
else if (name ==
"RotationSequence") {
89 myret = std::make_shared<DDLRotationSequence>(
this);
90 }
else if (name ==
"RotationByAxis") {
91 myret = std::make_shared<DDLRotationByAxis>(
this);
94 else if (name ==
"SpecParSection") {
95 myret = std::make_shared<DDXMLElement>(
this,
true);
96 }
else if (name ==
"Vector") {
97 myret = std::make_shared<DDLVector>(
this);
98 }
else if (name ==
"Map") {
99 myret = std::make_shared<DDLMap>(
this);
100 }
else if (name ==
"String") {
101 myret = std::make_shared<DDLString>(
this);
102 }
else if (name ==
"Numeric") {
103 myret = std::make_shared<DDLNumeric>(
this);
104 }
else if (name ==
"Algorithm") {
105 myret = std::make_shared<DDLAlgorithm>(
this);
106 }
else if (name ==
"Division") {
107 myret = std::make_shared<DDLDivision>(
this);
113 else if (name ==
"MaterialFraction" || name ==
"RZPoint" || name ==
"XYPoint" || name ==
"PartSelector" ||
114 name ==
"Parameter" || name ==
"ZSection" || name ==
"ZXYSection" || name ==
"Translation" ||
115 name ==
"rSolid" || name ==
"rMaterial" || name ==
"rParent" || name ==
"rChild" || name ==
"rRotation" ||
116 name ==
"rReflectionRotation" || name ==
"DDDefinition") {
117 myret = std::make_shared<DDXMLElement>(
this);
127 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.