35#define G4GDMLBASE_HH 1
37#include <xercesc/parsers/XercesDOMParser.hpp>
38#include <xercesc/util/PlatformUtils.hpp>
39#include <xercesc/sax/HandlerBase.hpp>
40#include <xercesc/util/XMLUni.hpp>
41#include <xercesc/dom/DOM.hpp>
57 void warning(
const xercesc::SAXParseException& exception)
63 char* message = xercesc::XMLString::transcode(exception.getMessage());
64 G4cout <<
"G4GDML: VALIDATION WARNING! " << message
65 <<
" at line: " << exception.getLineNumber() <<
G4endl;
66 xercesc::XMLString::release(&message);
69 void error(
const xercesc::SAXParseException& exception)
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)
96 virtual void DefineRead(
const xercesc::DOMElement*
const) = 0;
98 virtual void SetupRead(
const xercesc::DOMElement*
const) = 0;
99 virtual void SolidsRead(
const xercesc::DOMElement*
const) = 0;
106 virtual void ExtensionRead(
const xercesc::DOMElement*
const);
114 virtual void UserinfoRead(
const xercesc::DOMElement*
const);
149 void LoopRead(
const xercesc::DOMElement*
const,
150 void (
G4GDMLRead::*)(
const xercesc::DOMElement*
const));
163 G4int inLoop = 0, loopCount = 0;
std::vector< G4GDMLAuxStructType > G4GDMLAuxListType
G4GLOB_DLL std::ostream G4cout
G4GDMLErrorHandler(const G4bool set)
void fatalError(const xercesc::SAXParseException &exception)
void error(const xercesc::SAXParseException &exception)
void warning(const xercesc::SAXParseException &exception)
G4String Strip(const G4String &) const
virtual void Paramvol_contentRead(const xercesc::DOMElement *const)=0
G4GDMLAuxStructType AuxiliaryRead(const xercesc::DOMElement *const auxElem)
void GeneratePhysvolName(const G4String &, G4VPhysicalVolume *)
virtual void SolidsRead(const xercesc::DOMElement *const)=0
G4String GenerateName(const G4String &name, G4bool strip=false)
const G4GDMLAuxListType * GetAuxList() const
virtual void MaterialsRead(const xercesc::DOMElement *const)=0
virtual G4LogicalVolume * GetVolume(const G4String &) const =0
void LoopRead(const xercesc::DOMElement *const, void(G4GDMLRead::*)(const xercesc::DOMElement *const))
virtual void Volume_contentRead(const xercesc::DOMElement *const)=0
virtual G4String GetSetup(const G4String &)=0
void Read(const G4String &, G4bool validation, G4bool isModule, G4bool strip=true)
virtual void UserinfoRead(const xercesc::DOMElement *const)
virtual void SetupRead(const xercesc::DOMElement *const)=0
G4String Transcode(const XMLCh *const)
void StripName(G4String &) const
virtual void ExtensionRead(const xercesc::DOMElement *const)
virtual void DefineRead(const xercesc::DOMElement *const)=0
virtual void StructureRead(const xercesc::DOMElement *const)=0
void OverlapCheck(G4bool)