A general plist xml-file parser.
More...
#include <baseplistparser.h>
A general plist xml-file parser.
◆ BasePListParser()
edbee::BasePListParser::BasePListParser |
( |
| ) |
|
The constructor for the parser.
◆ ~BasePListParser()
edbee::BasePListParser::~BasePListParser |
( |
| ) |
|
|
virtual |
◆ beginParsing()
bool edbee::BasePListParser::beginParsing |
( |
QIODevice * |
device | ) |
|
|
protected |
Start the parsing of the plist. If it isn't a valid plist this method return false. (it only checks and reads the existence of <plist>)
◆ currentStackLevel()
int edbee::BasePListParser::currentStackLevel |
( |
| ) |
|
|
protected |
returns the current stack-level
◆ endParsing()
bool edbee::BasePListParser::endParsing |
( |
| ) |
|
|
protected |
Closes the parsers.
- Returns
- true if the parsing was succesful
◆ lastErrorMessage()
QString edbee::BasePListParser::lastErrorMessage |
( |
| ) |
const |
Returns the last error message of the parsed file.
◆ raiseError()
void edbee::BasePListParser::raiseError |
( |
const QString & |
str | ) |
|
|
protected |
Call this method to raise an error and stop the xml parsing.
- Parameters
-
◆ readDict()
QHash< QString, QVariant > edbee::BasePListParser::readDict |
( |
| ) |
|
|
protected |
◆ readElementText()
QString edbee::BasePListParser::readElementText |
( |
| ) |
|
|
protected |
Reads the element text contents.
◆ readList()
QList< QVariant > edbee::BasePListParser::readList |
( |
| ) |
|
|
protected |
reads a list of qvariants
◆ readNextElement()
bool edbee::BasePListParser::readNextElement |
( |
const QString & |
name, |
|
|
int |
level = -1 |
|
) |
| |
|
protected |
Reads the next element and optionally expects it to be the given name.
- Parameters
-
name | the name taht's expected. Use '' to not check the name |
minimum | level the level the element should be. -1 means ignore this argument |
◆ readNextPlistType()
QVariant edbee::BasePListParser::readNextPlistType |
( |
int |
level = -1 | ) |
|
|
protected |
reads the next plist type
- Parameters
-
level | the level we're currently parsing |
◆ setLastErrorMessage()
void edbee::BasePListParser::setLastErrorMessage |
( |
const QString & |
str | ) |
|
|
protected |
Sets the last error message. To correctly set the last error message while parsing please use raiseError.
The documentation for this class was generated from the following files: