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>
64 void warning(
const xercesc::SAXParseException& exception)
66 if (Suppress) {
return; }
67 char* message = xercesc::XMLString::transcode(exception.getMessage());
68 G4cout <<
"G4GDML: VALIDATION WARNING! " << message
69 <<
" at line: " << exception.getLineNumber() <<
G4endl;
70 xercesc::XMLString::release(&message);
73 void error(
const xercesc::SAXParseException& exception)
75 if (Suppress) {
return; }
76 char* message = xercesc::XMLString::transcode(exception.getMessage());
77 G4cout <<
"G4GDML: VALIDATION ERROR! " << message
78 <<
" at line: " << exception.getLineNumber() <<
G4endl;
79 xercesc::XMLString::release(&message);
82 void fatalError(
const xercesc::SAXParseException& exception)
94 virtual void DefineRead(
const xercesc::DOMElement*
const)=0;
95 virtual void MaterialsRead(
const xercesc::DOMElement*
const)=0;
96 virtual void SetupRead(
const xercesc::DOMElement*
const)=0;
97 virtual void SolidsRead(
const xercesc::DOMElement*
const)=0;
100 virtual void StructureRead(
const xercesc::DOMElement*
const)=0;
104 virtual void ExtensionRead(
const xercesc::DOMElement*
const);
112 virtual void UserinfoRead(
const xercesc::DOMElement*
const);
148 void LoopRead(
const xercesc::DOMElement*
const,
149 void(
G4GDMLRead::*)(
const xercesc::DOMElement*
const));
162 G4int inLoop, loopCount;
const G4GDMLAuxListType * GetAuxList() const
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
virtual void UserinfoRead(const xercesc::DOMElement *const)
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)
std::vector< G4GDMLAuxStructType > G4GDMLAuxListType
G4String Strip(const G4String &) const
G4GDMLAuxStructType AuxiliaryRead(const xercesc::DOMElement *const auxElem)
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)