39 #ifndef _G4GDMLBASE_INCLUDED_
40 #define _G4GDMLBASE_INCLUDED_
42 #include <xercesc/parsers/XercesDOMParser.hpp>
43 #include <xercesc/util/PlatformUtils.hpp>
44 #include <xercesc/sax/HandlerBase.hpp>
45 #include <xercesc/util/XMLUni.hpp>
46 #include <xercesc/dom/DOM.hpp>
63 void warning(
const xercesc::SAXParseException& exception)
65 if (Suppress) {
return; }
66 char* message = xercesc::XMLString::transcode(exception.getMessage());
67 G4cout <<
"G4GDML: VALIDATION WARNING! " << message
68 <<
" at line: " << exception.getLineNumber() <<
G4endl;
69 xercesc::XMLString::release(&message);
72 void error(
const xercesc::SAXParseException& exception)
74 if (Suppress) {
return; }
75 char* message = xercesc::XMLString::transcode(exception.getMessage());
76 G4cout <<
"G4GDML: VALIDATION ERROR! " << message
77 <<
" at line: " << exception.getLineNumber() <<
G4endl;
78 xercesc::XMLString::release(&message);
81 void fatalError(
const xercesc::SAXParseException& exception)
93 virtual void DefineRead(
const xercesc::DOMElement*
const)=0;
94 virtual void MaterialsRead(
const xercesc::DOMElement*
const)=0;
95 virtual void SetupRead(
const xercesc::DOMElement*
const)=0;
96 virtual void SolidsRead(
const xercesc::DOMElement*
const)=0;
99 virtual void StructureRead(
const xercesc::DOMElement*
const)=0;
103 virtual void ExtensionRead(
const xercesc::DOMElement*
const);
139 void LoopRead(
const xercesc::DOMElement*
const,
140 void(
G4GDMLRead::*)(
const xercesc::DOMElement*
const));
150 G4int inLoop, loopCount;
void OverlapCheck(G4bool)
virtual G4String GetSetup(const G4String &)=0
virtual void Volume_contentRead(const xercesc::DOMElement *const)=0
virtual void MaterialsRead(const xercesc::DOMElement *const)=0
G4String Transcode(const XMLCh *const)
void GeneratePhysvolName(const G4String &, G4VPhysicalVolume *)
virtual void StructureRead(const xercesc::DOMElement *const)=0
void LoopRead(const xercesc::DOMElement *const, void(G4GDMLRead::*)(const xercesc::DOMElement *const))
G4GLOB_DLL std::ostream G4cout
G4GDMLErrorHandler(const G4bool set)
void warning(const xercesc::SAXParseException &exception)
void error(const xercesc::SAXParseException &exception)
void StripName(G4String &) const
virtual void DefineRead(const xercesc::DOMElement *const)=0
virtual void ExtensionRead(const xercesc::DOMElement *const)
virtual void Paramvol_contentRead(const xercesc::DOMElement *const)=0
G4String GenerateName(const G4String &name, G4bool strip=false)
G4String Strip(const G4String &) const
virtual G4LogicalVolume * GetVolume(const G4String &) const =0
void fatalError(const xercesc::SAXParseException &exception)
virtual void SetupRead(const xercesc::DOMElement *const)=0
virtual void SolidsRead(const xercesc::DOMElement *const)=0
void Read(const G4String &, G4bool validation, G4bool isModule, G4bool strip=true)