ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/XmlTools2/trunk/xmlpatch.h
Revision: 953
Committed: Mon Feb 10 14:28:14 2014 UTC (11 years, 8 months ago) by s10k
Content type: text/x-chdr
File size: 1345 byte(s)
Log Message:
XmlTools
What if we increase the performance of javascript by 2.5 times or more? (trying multithreading)

File Contents

# Content
1 #ifndef XMLPATCH_H
2 #define XMLPATCH_H
3
4 #include "xmltools.h"
5 #include "optionsparser.h"
6 #include <omp.h> // OpenMP support
7
8 class XmlPatch
9 {
10 public:
11 XmlPatch(QString patchFilesWildcard, QString forceTargetFilesWildcard, bool noBackups, bool noVerbose);
12 void readAndProcessPatchFile();
13 private:
14 QStringList patchFilesToProcess;
15 QString forceTargetFilesWildcard;
16 pugi::xml_document document;
17 pugi::xml_node rootNode;
18 bool backupsEnabled, verboseEnabled;
19 QString getPatchParameterValue(const QString& line, QString parameter);
20 void insertNodesOperation(const QString &xmlString, XmlFilter &filters, const QString &xPathExpression, const QString &filesWildcard="");
21 void removeNodesOperation(XmlFilter &filters, const QString &xPathExpression, const QString &filesWildcard="");
22 void executeCommandOperation(const QString &commandString);
23 void executeCustomCommandOperation(const QString &jsString, const QString &filesWildcard="");
24 void checkPatchVersion(const QString &file, QTextStream &fileStream);
25 void checkAndProcessValidCommands(QTextStream &fileStream);
26 #ifdef _USE_OLD_JS_ENGINE
27 void displayJsException(QScriptEngine &engine, QScriptValue &engineResult);
28 #else
29 void checkForJsException(QJSValue &engineResult);
30 #endif
31 };
32
33 #endif // XMLPATCH_H