-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmlpatch.h
28 lines (25 loc) · 1.11 KB
/
xmlpatch.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef XMLPATCH_H
#define XMLPATCH_H
#include "xmltools.h"
#include "xmlcustomcode.h"
#include "optionsparser.h"
class XmlPatch
{
public:
XmlPatch(QString patchFilesWildcard, QString forceTargetFilesWildcard, bool noBackups, bool noVerbose);
void readAndProcessPatchFile();
private:
QVector<QString> patchFilesToProcess;
QString forceTargetFilesWildcard;
pugi::xml_document document;
pugi::xml_node rootNode;
bool backupsEnabled, verboseEnabled;
QString getPatchParameterValue(const QString& line, QString parameter);
void insertNodesOperation(const QString &xmlString, XmlFilter &filters, const QString &xPathExpression, const QString &filesWildcard="");
void removeNodesOperation(XmlFilter &filters, const QString &xPathExpression, const QString &filesWildcard="");
void executeCommandOperation(const QString &commandString);
void executeCustomCommandOperation(const QString &jsString, const QString &filesWildcard="");
void checkPatchVersion(const QString &file, QTextStream &fileStream);
void checkAndProcessValidCommands(QTextStream &fileStream);
};
#endif // XMLPATCH_H