LibEngsas
|
Used to connect tagNames to EXmlItem's. More...
#include <exmlparseritem.h>
Public Member Functions | |
EXmlParserItem (QString tagName, EXmlItem *(*callback)(EXmlModel *), EXmlModel *model) | |
~EXmlParserItem () | |
EXmlItem * | load (QDomElement element, EXmlItem *parent, QMap< QString, EXmlParserItem * > parser) |
QString | tagName () const |
Private Attributes | |
QString | myTagName |
EXmlItem *(* | callback )(EXmlModel *) |
EXmlModel * | model |
Used to connect tagNames to EXmlItem's.
The given callback function is used to create an instance of the connected EXmlItem Implementation when load is called. The pointer to EXmlModel is used to provide it to the create callback function.
|
inline |
EXmlItem * EXmlParserItem::load | ( | QDomElement | element, |
EXmlItem * | parent, | ||
QMap< QString, EXmlParserItem * > | parser | ||
) |
Calls the callback function to create an instance of EXmlItem. Afterwards it sets the parent
of the returned item and calls EXmlItem::load() afterwards to load the XML data. The parameter model
contains a pointer to the model, where the created EXmlItem is used in.
QString EXmlParserItem::tagName | ( | ) | const |
|
private |
|
private |