source: s10k/XmlTools/xmlpatch.h@ 1102

Last change on this file since 1102 was 1073, checked in by s10k, 7 years ago

added XML Tools latest version (2.0d) and s10k's common libs

File size: 1.1 KB
Line 
1#ifndef XMLPATCH_H
2#define XMLPATCH_H
3
4#include "xmltools.h"
5#include "xmlcustomcode.h"
6#include "optionsparser.h"
7
8class XmlPatch
9{
10public:
11 XmlPatch(QString patchFilesWildcard, QString forceTargetFilesWildcard, bool noBackups, bool noVerbose);
12 void readAndProcessPatchFile();
13private:
14 QVector<QString> 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};
27
28#endif // XMLPATCH_H
Note: See TracBrowser for help on using the repository browser.