Diffstat (limited to 'noncore/applets/keyhelper/keyhelperapplet/applet/QSafeDataStream.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/applets/keyhelper/keyhelperapplet/applet/QSafeDataStream.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/noncore/applets/keyhelper/keyhelperapplet/applet/QSafeDataStream.h b/noncore/applets/keyhelper/keyhelperapplet/applet/QSafeDataStream.h new file mode 100644 index 0000000..2152b23 --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperapplet/applet/QSafeDataStream.h | |||
@@ -0,0 +1,51 @@ | |||
1 | #ifndef _QSAFEDATASTREAM_H_ | ||
2 | #define _QSAFEDATASTREAM_H_ | ||
3 | |||
4 | #include <qdatastream.h> | ||
5 | |||
6 | class QString; | ||
7 | class QStringList; | ||
8 | class QCString; | ||
9 | class QDate; | ||
10 | class QTime; | ||
11 | class QDateTime; | ||
12 | |||
13 | class QSafeDataStream : public QDataStream | ||
14 | { | ||
15 | public: | ||
16 | /* constructors */ | ||
17 | QSafeDataStream() | ||
18 | : QDataStream() {} | ||
19 | QSafeDataStream(QIODevice* d) | ||
20 | : QDataStream(d) {} | ||
21 | QSafeDataStream(QByteArray a, int mode) | ||
22 | : QDataStream(a, mode) {} | ||
23 | |||
24 | /* read functions */ | ||
25 | QSafeDataStream &operator>>( Q_INT8 &i ); | ||
26 | QSafeDataStream &operator>>( Q_UINT8 &i ); | ||
27 | QSafeDataStream &operator>>( Q_INT16 &i ); | ||
28 | QSafeDataStream &operator>>( Q_UINT16 &i ); | ||
29 | QSafeDataStream &operator>>( Q_INT32 &i ); | ||
30 | QSafeDataStream &operator>>( Q_UINT32 &i ); | ||
31 | QSafeDataStream &operator>>( Q_INT64 &i ); | ||
32 | QSafeDataStream &operator>>( Q_UINT64 &i ); | ||
33 | |||
34 | QSafeDataStream &operator>>( float &f ); | ||
35 | QSafeDataStream &operator>>( double &f ); | ||
36 | QSafeDataStream &operator>>( char *&str ); | ||
37 | |||
38 | QSafeDataStream &readBytes( char *&, uint &len ); | ||
39 | QSafeDataStream &readRawBytes( char *, uint len ); | ||
40 | |||
41 | QSafeDataStream &operator>>( QString& s ); | ||
42 | QSafeDataStream &operator>>( QStringList& list ); | ||
43 | QSafeDataStream &operator>>( QByteArray& a ); | ||
44 | QSafeDataStream &operator>>( QCString& s ); | ||
45 | QSafeDataStream &operator>>( QDate& d ); | ||
46 | QSafeDataStream &operator>>( QTime& t ); | ||
47 | QSafeDataStream &operator>>( QDateTime& dt ); | ||
48 | |||
49 | }; | ||
50 | |||
51 | #endif /* _QSAFEDATASTREAM_H_ */ | ||