blob: f8502aaab3478c6ada7f5a5f80671b421e9def03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#ifndef __kdatastream__h
#define __kdatastream__h
#include <tqdatastream.h>
inline TQDataStream & operator << (TQDataStream & str, bool b)
{
str << Q_INT8(b);
return str;
}
inline TQDataStream & operator >> (TQDataStream & str, bool & b)
{
Q_INT8 l;
str >> l;
b = bool(l);
return str;
}
#if QT_VERSION < 0x030200 && !defined(Q_WS_WIN) && !defined(Q_WS_MAC)
inline TQDataStream & operator << (TQDataStream & str, long long int ll)
{
Q_UINT32 l1,l2;
l1 = ll & 0xffffffffLL;
l2 = ll >> 32;
str << l1 << l2;
return str;
}
inline TQDataStream & operator >> (TQDataStream & str, long long int&ll)
{
Q_UINT32 l1,l2;
str >> l1 >> l2;
ll = ((unsigned long long int)(l2) << 32) + (long long int) l1;
return str;
}
inline TQDataStream & operator << (TQDataStream & str, unsigned long long int ll)
{
Q_UINT32 l1,l2;
l1 = ll & 0xffffffffLL;
l2 = ll >> 32;
str << l1 << l2;
return str;
}
inline TQDataStream & operator >> (TQDataStream & str, unsigned long long int &ll)
{
Q_UINT32 l1,l2;
str >> l1 >> l2;
ll = ((unsigned long long int)(l2) << 32) + (unsigned long long int) l1;
return str;
}
#endif
#endif
|