mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-27 09:38:39 +02:00
... for functions in final classes. override is like const -- it's not necessary, but it helps the compiler to catch mistakes. There may be some overriding functions not explicitly declared virtual and I did not identify such cases, in which I might also add override.
44 lines
973 B
C++
44 lines
973 B
C++
/**********************************************************************
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
XMLFileReader.h
|
|
|
|
Dominic Mazzoni
|
|
|
|
**********************************************************************/
|
|
|
|
#include "../Audacity.h"
|
|
|
|
#include <vector>
|
|
#include "expat.h"
|
|
|
|
#include "XMLTagHandler.h"
|
|
|
|
class AUDACITY_DLL_API XMLFileReader final {
|
|
public:
|
|
XMLFileReader();
|
|
~XMLFileReader();
|
|
|
|
bool Parse(XMLTagHandler *baseHandler,
|
|
const wxString &fname);
|
|
|
|
wxString GetErrorStr();
|
|
|
|
// Callback functions for expat
|
|
|
|
static void startElement(void *userData, const char *name,
|
|
const char **atts);
|
|
|
|
static void endElement(void *userData, const char *name);
|
|
|
|
static void charHandler(void *userData, const char *s, int len);
|
|
|
|
private:
|
|
XML_Parser mParser;
|
|
XMLTagHandler *mBaseHandler;
|
|
using Handlers = std::vector<XMLTagHandler*>;
|
|
Handlers mHandler;
|
|
wxString mErrorStr;
|
|
};
|