12 #include <xercesc/util/XercesDefs.hpp>
13 #include <xercesc/util/PlatformUtils.hpp>
14 #include <xercesc/sax2/SAX2XMLReader.hpp>
15 #include <xercesc/sax2/XMLReaderFactory.hpp>
16 #include <xercesc/sax/SAXException.hpp>
109 void parse(
const std::vector<unsigned char>& ablob,
unsigned int bsize ) ;
int parse(const DDLDocumentProvider &dp)
Parse all files. Return is meaningless.
std::map< int, bool > parsed_
Parse status of a given file.
std::string configFileName_
Configuration file name. Only necessary until deprecated methods removed.
std::string getNameSpace(const std::string &fname)
XERCES_CPP_NAMESPACE::SAX2XMLReader SAX2XMLReader
std::string extractFileName(std::string fullname)
DDLSAX2FileHandler * fileHandler_
SAX2XMLReader * SAX2Parser_
SAX2XMLReader is one way of parsing.
std::string getCurrFileName()
Report which file currently being processed (or last processed).
std::string currFileName_
Which file is currently being processed.
FileNameHolder fileNames_
List of files to be processed, obtained from the DDLDocumentProvider.
type of data representation of DDCompactView
~DDLParser()
Destructor terminates the XMLPlatformUtils (as required by Xerces)
DDLSAX2FileHandler is the SAX2 Handler for XML files found in the configuration file.
std::map< int, std::pair< std::string, std::string > > FileNameHolder
size_t isFound(const std::string &filename)
Is the file already known by the DDLParser? Returns 0 if not found, and index if found.
DDLSAX2ExpressionHandler is the first pass SAX2 Handler for XML files found in the configuration file...
DDLSAX2ExpressionHandler * expHandler_
bool parseOneFile(const std::string &filename)
Process a single files.
DDLSAX2Handler * errHandler_
void clearFiles()
Clear the file list - see Warning!
DDLSAX2FileHandler * getDDLSAX2FileHandler()
To get the parent this class allows access to the handler.
DDLParser is the main class of Detector Description Language Parser.
void parseFile(const int &numtoproc)
Parse File. Just to hold some common looking code.
std::vector< std::string > getFileList()
Return list of files.
SAX2XMLReader * getXMLParser()
Get the SAX2Parser from the DDLParser. USE WITH CAUTION. Set your own handler, etc.
DDLDocumentProvider provides a set of URLs and filenames.
DDLSAX2Handler inherits from Xerces C++ DefaultHandler.
void dumpFileList()
Print out the list of files.
DDCompactView & cpv_
reference to storage
bool isParsed(const std::string &filename)
Is the file already parsed?
int nFiles_
Number of files + 1.