filters

AttrProcessing Class Reference

#include <TagProcessing.h>

List of all members.


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

AttrProcessing::AttrProcessing  )  [inline]
 

Default constructor.

Definition at line 106 of file TagProcessing.h.

AttrProcessing::AttrProcessing const QString &  n,
const QString &  t,
void *  d
 

Old constructor (without type checking).

Deprecated:
do not use for new code

Definition at line 105 of file TagProcessing.cc.

AttrProcessing::AttrProcessing const QString &  _name  )  [inline]
 

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.

AttrProcessing::AttrProcessing const QString &  _name,
int &  i
[inline]
 

Integer constructor.

Get the attribute value as an integer

Definition at line 127 of file TagProcessing.h.

AttrProcessing::AttrProcessing const QString &  _name,
double &  d
[inline]
 

Double constructor.

Get the attribute value as a double

Definition at line 135 of file TagProcessing.h.

AttrProcessing::AttrProcessing const QString &  _name,
bool &  flag
[inline]
 

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.

AttrProcessing::AttrProcessing const QString &  _name,
QString &  str
[inline]
 

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:
KDE Home | KDE Accessibility Home | Description of Access Keys