filters
AttrProcessing Class Reference
#include <TagProcessing.h>
Detailed Description
The class AttrProcessing and the two functions ProcessAttributes () and AllowNoSubtags () allow for easing parsing of the current tag's attributes.If don't expect any attributes you call AllowNoAttributes (). Otherwise you create a list of AttrProcessing elements and pass that to ProcessAttributes () which will go through all attributes it can find, retrieve the value in the datatype defined, and do all the necessary error handling.
Definition at line 96 of file TagProcessing.h.
Public Types | |
enum | AttrType { AttrNull = 0, AttrInt, AttrDouble, AttrBool, AttrQString } |
Public Member Functions | |
AttrProcessing () | |
AttrProcessing (const QString &n, const QString &t, void *d) KDE_DEPRECATED | |
AttrProcessing (const QString &_name) | |
AttrProcessing (const QString &_name, int &i) | |
AttrProcessing (const QString &_name, double &d) | |
AttrProcessing (const QString &_name, bool &flag) | |
AttrProcessing (const QString &_name, QString &str) | |
Public Attributes | |
QString | name |
AttrType | type |
void * | data |
Constructor & Destructor Documentation
|
Default constructor.
Definition at line 106 of file TagProcessing.h. |
|
Old constructor (without type checking).
Definition at line 105 of file TagProcessing.cc. |
|
No-op constructor. This just avoids that a warning is triggered that an attribute is not known Definition at line 119 of file TagProcessing.h. |
|
Integer constructor. Get the attribute value as an integer Definition at line 127 of file TagProcessing.h. |
|
Double constructor. Get the attribute value as a double Definition at line 135 of file TagProcessing.h. |
|
Boolean constructor. Get the attribute value as a bool (The values "yes,", "no", "true", "false", "0" and "1" are supported) Definition at line 144 of file TagProcessing.h. |
|
String constructor. Get the attribute value as a QString Definition at line 152 of file TagProcessing.h. |
The documentation for this class was generated from the following files: