source: XmlTools2/trunk/xmlpatch.h@ 914

Last change on this file since 914 was 906, checked in by s10k, 11 years ago
File size: 1.2 KB
RevLine 
[906]1#ifndef XMLPATCH_H
2#define XMLPATCH_H
3
4#include "xmltools.h"
5
6class XmlPatch
7{
8public:
9 XmlPatch(QString patchFilesWildcard, QString forceTargetFilesWildcard="", bool backupsEnabled=true);
10 void readAndProcessPatchFile();
11private:
12 QStringList patchFilesToProcess;
13 QString forceTargetFilesWildcard;
14 pugi::xml_document document;
15 pugi::xml_node rootNode;
16 bool backupsEnabled;
17 QString getPatchParameterValue(const QString& line, QString parameter);
18 void addToOperation(const QString &xmlString, XmlFilter &filters, const QString &filesWildcard="");
19 void removeNodeOperation(XmlFilter &filters, const QString &filesWildcard="");
20 void executeCommandOperation(const QString &commandString);
21 void executeCustomCommandOperation(const QString &jsString, const QString &filesWildcard="");
22 void checkPatchVersion(const QString &file, QTextStream &fileStream);
23 void checkAndProcessValidCommands(QTextStream &fileStream);
24#ifdef _USE_OLD_JS_ENGINE
25 void displayJsException(QScriptEngine &engine, QScriptValue &engineResult);
26#else
27 void checkForJsException(QJSValue &engineResult);
28#endif
29};
30
31#endif // XMLPATCH_H
Note: See TracBrowser for help on using the repository browser.