utils.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KRADIO_UTILS_H
00019 #define KRADIO_UTILS_H
00020
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024
00025 using namespace std;
00026
00027 #include <kconfig.h>
00028 #include <klocale.h>
00029 #include <kdebug.h>
00030 #include <QtCore/QString>
00031 #define __USE_ISOC99 1
00032 #include <math.h>
00033
00034
00035
00036
00037 extern QString XMLEscape (const QString &s);
00038 QString xmlOpenTag (const QString &tag, bool newline = true);
00039 QString xmlTag (const QString &tag, const QString &s, bool newline = true);
00040 QString xmlTag (const QString &tag, int i, bool newline = true);
00041 QString xmlTag (const QString &tag, float f, bool newline = true);
00042 QString xmlCloseTag (const QString &tag, bool newline = true);
00043
00044 template<class T1, class T2> inline T1 min (T1 a, T2 b) { return a < b ? a : b; }
00045 template<class T1, class T2> inline T1 max (T1 a, T2 b) { return a < b ? b : a; }
00046
00047 #endif