filters
TagProcessing.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef EXPORTTAGPROCESSING_H
00035 #define EXPORTTAGPROCESSING_H
00036
00037 #include <qdom.h>
00038 #include <qvaluelist.h>
00039
00040 #include <kdemacros.h>
00041 #include <kdebug.h>
00042
00043 class KWEFKWordLeader;
00044
00055 class TagProcessing
00056 {
00057 public:
00058 TagProcessing ()
00059 {}
00060
00061 TagProcessing (const QString& n,
00062 void (*p)(QDomNode, void *, KWEFKWordLeader*),
00063 void *d) : name (n), processor (p), data (d)
00064 {}
00065
00071 TagProcessing (const QString& _name) : name(_name), processor(0), data(0)
00072 {}
00073
00074 QString name;
00075 void (*processor)(QDomNode, void *, KWEFKWordLeader*);
00076 void *data;
00077 };
00078
00079 void ProcessSubtags ( const QDomNode &parentNode,
00080 QValueList<TagProcessing> &tagProcessingList,
00081 KWEFKWordLeader *leader);
00082
00083 void AllowNoSubtags ( const QDomNode& myNode, KWEFKWordLeader *leader );
00084
00085
00096 class AttrProcessing
00097 {
00098 public:
00099
00100 enum AttrType
00101 { AttrNull = 0, AttrInt, AttrDouble, AttrBool, AttrQString };
00102
00106 AttrProcessing () : type( AttrNull ), data(0) {}
00107
00112 AttrProcessing ( const QString& n, const QString& t, void *d ) KDE_DEPRECATED;
00113
00119 AttrProcessing ( const QString& _name )
00120 : name( _name ), type( AttrNull ), data( 0 ) {}
00121
00127 AttrProcessing ( const QString& _name, int& i )
00128 : name( _name ), type( AttrInt ), data( &i ) {}
00129
00135 AttrProcessing ( const QString& _name, double& d )
00136 : name( _name ), type( AttrDouble ), data( &d ) {}
00137
00144 AttrProcessing ( const QString& _name, bool& flag )
00145 : name( _name ), type( AttrBool ), data( &flag ) {}
00146
00152 AttrProcessing ( const QString& _name, QString& str )
00153 : name( _name ), type( AttrQString ), data( &str ) {}
00154
00155
00156 public:
00157 QString name;
00158 AttrType type;
00159 void *data;
00160 };
00161
00162 void ProcessAttributes ( const QDomNode &myNode,
00163 QValueList<AttrProcessing> &attrProcessingList );
00164
00165 void AllowNoAttributes ( const QDomNode& myNode );
00166
00167 #endif
|