49 std::map<G4String, G4VisAttributes*>::iterator pos;
50 for (pos=fAttribs.begin(); pos!=fAttribs.end(); pos++)
51 {
delete pos->second; }
60 for (xercesc::DOMNode* iter = extElement->getFirstChild();
61 iter != 0; iter = iter->getNextSibling())
63 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
65 const xercesc::DOMElement*
const child
66 =
dynamic_cast<xercesc::DOMElement*
>(iter);
72 G4String error_msg =
"Unknown tag in structure: " + tag;
88 XMLCh *name_attr = xercesc::XMLString::transcode(
"name");
90 xercesc::XMLString::release(&name_attr);
92 for (xercesc::DOMNode* iter = volumeElement->getFirstChild();
93 iter != 0; iter = iter->getNextSibling())
95 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
97 const xercesc::DOMElement*
const child
98 =
dynamic_cast<xercesc::DOMElement*
>(iter);
101 if (tag==
"auxiliary")
103 if (tag==
"materialref")
107 if (tag ==
"colorref")
128 const xercesc::DOMNamedNodeMap*
const attributes
129 = colorElement->getAttributes();
130 XMLSize_t attributeCount = attributes->getLength();
132 for (XMLSize_t attribute_index=0;
133 attribute_index<attributeCount; attribute_index++)
135 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
137 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
140 const xercesc::DOMAttr*
const attribute
141 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
157 G4cout <<
"Color attribute (R,G,B,A) is: "
158 << r <<
", " <<
g <<
", " <<
b <<
", " <<
a <<
" !" <<
G4endl;
160 fAttribs.insert(std::make_pair(name,color));
168 std::map<G4String, G4VisAttributes*>::iterator pos = fAttribs.find(ref);
170 if (pos != fAttribs.end())
176 G4String err_mess =
"Attribute: " + ref +
" NOT found !";