#include <coConfigImportReader.h>
|
QDomElement | findMapping (const QString &mapping, const QDomNode &parent) const |
|
QDomElement | getOrCreateSection (QDomDocument &document, QDomNode &parent, const QString &name, const QString &hosts="") |
|
QDomNode | addChild (QDomNode &parent, const QDomNode &newChild) |
|
void | update (QDomElement &rootNode, QDomElement &updater) |
| Updates a DOM tree using the instructions in updater More...
|
|
void | updateNode (QDomElement &node, QDomElement &updateInstruction) |
| Update a node with an instruction set. More...
|
|
void | updateEntry (QDomElement &node, QDomElement &updateInstruction) |
| Apply a single instruction. More...
|
|
void | updateApplyInstruction (QDomElement &node, QDomElement &updateInstruction) |
| Apply a single instruction. More...
|
|
void | updateMergeNodes (QDomElement §ion, QDomElement &node) |
| Merges two tags. More...
|
|
QLinkedList< QDomNode > | makeNonLiveList (QDomNodeList liveList) const |
| Converts a QDomNodeList into a QValueList<QDomNode>. More...
|
|
QString | domToString (const QDomDocument &doc) const |
|
coConfigImportReader::coConfigImportReader |
( |
const QString & |
source, |
|
|
const QString & |
dest, |
|
|
const QString & |
transform, |
|
|
bool |
resolve_includes = true |
|
) |
| |
coConfigImportReader::~coConfigImportReader |
( |
| ) |
|
QDomNode coConfigImportReader::addChild |
( |
QDomNode & |
parent, |
|
|
const QDomNode & |
newChild |
|
) |
| |
|
private |
QString coConfigImportReader::domToString |
( |
const QDomDocument & |
doc | ) |
const |
|
inlineprivate |
QDomElement coConfigImportReader::findMapping |
( |
const QString & |
mapping, |
|
|
const QDomNode & |
parent |
|
) |
| const |
|
private |
QDomElement coConfigImportReader::getOrCreateSection |
( |
QDomDocument & |
document, |
|
|
QDomNode & |
parent, |
|
|
const QString & |
name, |
|
|
const QString & |
hosts = "" |
|
) |
| |
|
private |
QLinkedList< QDomNode > coConfigImportReader::makeNonLiveList |
( |
QDomNodeList |
liveList | ) |
const |
|
inlineprivate |
Converts a QDomNodeList into a QValueList<QDomNode>.
- Parameters
-
liveList | The QDomNodeList to convert |
- Returns
- The non-live list
This has to be done as a QDomNodeList changes as nodes are added to / removed from the tree.
QDomDocument coConfigImportReader::parse |
( |
| ) |
|
void coConfigImportReader::update |
( |
QDomElement & |
rootNode, |
|
|
QDomElement & |
updater |
|
) |
| |
|
private |
Updates a DOM tree using the instructions in updater
- Parameters
-
rootNode | DOM tree to update. |
updater | update instructions. |
Updater format:
<Entry>
<Instruction>
...
</Instruction>
</Entry>
<Entry>
...
</Entry>
...
void coConfigImportReader::updateApplyInstruction |
( |
QDomElement & |
node, |
|
|
QDomElement & |
instruction |
|
) |
| |
|
inlineprivate |
Apply a single instruction.
- Parameters
-
node | Node to apply the instruction to. |
instruction | Instruction to apply. Please see the file config/transform.xml for a detailed documentation. |
void coConfigImportReader::updateEntry |
( |
QDomElement & |
node, |
|
|
QDomElement & |
updateInstruction |
|
) |
| |
|
inlineprivate |
Apply a single instruction.
- Parameters
-
node | Node to update according to the instruction scope (AllChildren, Child or Self). |
updateInstruction | Instruction to apply. |
void coConfigImportReader::updateMergeNodes |
( |
QDomElement & |
section, |
|
|
QDomElement & |
node |
|
) |
| |
|
inlineprivate |
Merges two tags.
- Parameters
-
section | Section where the target node resides. |
node | Node to merge. |
void coConfigImportReader::updateNode |
( |
QDomElement & |
node, |
|
|
QDomElement & |
updateInstruction |
|
) |
| |
|
inlineprivate |
Update a node with an instruction set.
- Parameters
-
node | Node to update. |
updateInstruction | Instruction set. |
Instruction set format:
<Instruction scope="AllChildren|Child|Self" [param="parameter"]>
Instruction1
Instruction2
...
</Instruction>
void coConfigImportReader::updatev0v1 |
( |
| ) |
|
Updates the current result DOM tree from version 0 to version 1.
- Note
- Has to be called after parse().
Updater format:
<TRANSFORM>
<UpdateV0V1>
<Entry>
...
</UpdateV0V1>
</TRANSFORM>
QDomDocument coConfigImportReader::write |
( |
| ) |
|
QFile* coConfigImportReader::dest |
|
private |
int coConfigImportReader::errorColumn |
|
private |
int coConfigImportReader::errorLine |
|
private |
QString coConfigImportReader::errorMessage |
|
private |
QDomNode coConfigImportReader::global |
|
private |
QMap<QString, QDomElement> coConfigImportReader::hostconfigs |
|
private |
bool coConfigImportReader::resolveIncludes |
|
private |
QDomDocument coConfigImportReader::result |
|
private |
QDomNode coConfigImportReader::root |
|
private |
QFile* coConfigImportReader::source |
|
private |
QTextStream* coConfigImportReader::sourceStream |
|
private |
QFile* coConfigImportReader::transform |
|
private |
QDomElement coConfigImportReader::transformer |
|
private |
QDomDocument coConfigImportReader::transformerDoc |
|
private |
The documentation for this class was generated from the following files: