48 std::map<G4String, G4VisAttributes*>::iterator
pos;
50 {
delete pos->second; }
59 for (xercesc::DOMNode* iter = extElement->getFirstChild();
60 iter != 0; iter = iter->getNextSibling())
62 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
64 const xercesc::DOMElement*
const child
65 =
dynamic_cast<xercesc::DOMElement*
>(iter);
71 G4String error_msg =
"Unknown tag in structure: " + tag;
87 XMLCh *name_attr = xercesc::XMLString::transcode(
"name");
89 xercesc::XMLString::release(&name_attr);
91 for (xercesc::DOMNode* iter = volumeElement->getFirstChild();
92 iter != 0; iter = iter->getNextSibling())
94 if (iter->getNodeType() != xercesc::DOMNode::ELEMENT_NODE) {
continue; }
96 const xercesc::DOMElement*
const child
97 =
dynamic_cast<xercesc::DOMElement*
>(iter);
100 if (tag==
"auxiliary")
102 if (tag==
"materialref")
106 if (tag ==
"colorref")
127 const xercesc::DOMNamedNodeMap*
const attributes
128 = colorElement->getAttributes();
129 XMLSize_t attributeCount = attributes->getLength();
131 for (XMLSize_t attribute_index=0;
132 attribute_index<attributeCount; attribute_index++)
134 xercesc::DOMNode* attribute_node = attributes->item(attribute_index);
136 if (attribute_node->getNodeType() != xercesc::DOMNode::ATTRIBUTE_NODE)
139 const xercesc::DOMAttr*
const attribute
140 =
dynamic_cast<xercesc::DOMAttr*
>(attribute_node);
156 G4cout <<
"Color attribute (R,G,B,A) is: "
157 << r <<
", " <<
g <<
", " <<
b <<
", " <<
a <<
" !" <<
G4endl;
159 fAttribs.insert(std::make_pair(name,color));
167 std::map<G4String, G4VisAttributes*>::iterator
pos =
fAttribs.find(ref);
175 G4String err_mess =
"Attribute: " + ref +
" NOT found !";