Mercurial > retraceit
annotate src/libqxt/qxtglobal.h @ 112:9daf778feaf1 1.4
Fix usage of WIN32 macro. With c++11 this is no longer set.
_WIN32 is the better macro to use anyway.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 08 Dec 2016 15:34:07 +0100 |
parents | 7a2637c3eb83 |
children |
rev | line source |
---|---|
1
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
1 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
2 /**************************************************************************** |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
3 ** Copyright (c) 2006 - 2011, the LibQxt project. |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
4 ** See the Qxt AUTHORS file for a list of authors and copyright holders. |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
5 ** All rights reserved. |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
6 ** |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
7 ** Redistribution and use in source and binary forms, with or without |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
8 ** modification, are permitted provided that the following conditions are met: |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
9 ** * Redistributions of source code must retain the above copyright |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
10 ** notice, this list of conditions and the following disclaimer. |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
11 ** * Redistributions in binary form must reproduce the above copyright |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
12 ** notice, this list of conditions and the following disclaimer in the |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
13 ** documentation and/or other materials provided with the distribution. |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
14 ** * Neither the name of the LibQxt project nor the |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
15 ** names of its contributors may be used to endorse or promote products |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
16 ** derived from this software without specific prior written permission. |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
17 ** |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
18 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
19 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
20 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
21 ** DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
22 ** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
23 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
24 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
25 ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
26 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
27 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
28 ** |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
29 ** <http://libqxt.org> <foundation@libqxt.org> |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
30 *****************************************************************************/ |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
31 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
32 #ifndef QXTGLOBAL_H |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
33 #define QXTGLOBAL_H |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
34 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
35 #include <QtGlobal> |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
36 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
37 #define QXT_VERSION 0x000700 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
38 #define QXT_VERSION_STR "0.7.0" |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
39 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
40 //--------------------------global macros------------------------------ |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
41 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
42 #ifndef QXT_NO_MACROS |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
43 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
44 #ifndef _countof |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
45 #define _countof(x) (sizeof(x)/sizeof(*x)) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
46 #endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
47 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
48 #endif // QXT_NO_MACROS |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
49 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
50 //--------------------------export macros------------------------------ |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
51 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
52 #define QXT_DLLEXPORT DO_NOT_USE_THIS_ANYMORE |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
53 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
54 #if !defined(QXT_STATIC) && !defined(QXT_DOXYGEN_RUN) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
55 # if defined(BUILD_QXT_CORE) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
56 # define QXT_CORE_EXPORT Q_DECL_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
57 # else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
58 # define QXT_CORE_EXPORT Q_DECL_IMPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
59 # endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
60 #else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
61 # define QXT_CORE_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
62 #endif // BUILD_QXT_CORE |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
63 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
64 #if !defined(QXT_STATIC) && !defined(QXT_DOXYGEN_RUN) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
65 # if defined(BUILD_QXT_GUI) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
66 # define QXT_GUI_EXPORT Q_DECL_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
67 # else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
68 # define QXT_GUI_EXPORT Q_DECL_IMPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
69 # endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
70 #else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
71 # define QXT_GUI_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
72 #endif // BUILD_QXT_GUI |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
73 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
74 #if !defined(QXT_STATIC) && !defined(QXT_DOXYGEN_RUN) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
75 # if defined(BUILD_QXT_NETWORK) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
76 # define QXT_NETWORK_EXPORT Q_DECL_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
77 # else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
78 # define QXT_NETWORK_EXPORT Q_DECL_IMPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
79 # endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
80 #else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
81 # define QXT_NETWORK_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
82 #endif // BUILD_QXT_NETWORK |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
83 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
84 #if !defined(QXT_STATIC) && !defined(QXT_DOXYGEN_RUN) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
85 # if defined(BUILD_QXT_SQL) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
86 # define QXT_SQL_EXPORT Q_DECL_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
87 # else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
88 # define QXT_SQL_EXPORT Q_DECL_IMPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
89 # endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
90 #else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
91 # define QXT_SQL_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
92 #endif // BUILD_QXT_SQL |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
93 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
94 #if !defined(QXT_STATIC) && !defined(QXT_DOXYGEN_RUN) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
95 # if defined(BUILD_QXT_WEB) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
96 # define QXT_WEB_EXPORT Q_DECL_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
97 # else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
98 # define QXT_WEB_EXPORT Q_DECL_IMPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
99 # endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
100 #else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
101 # define QXT_WEB_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
102 #endif // BUILD_QXT_WEB |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
103 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
104 #if !defined(QXT_STATIC) && !defined(QXT_DOXYGEN_RUN) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
105 # if defined(BUILD_QXT_BERKELEY) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
106 # define QXT_BERKELEY_EXPORT Q_DECL_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
107 # else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
108 # define QXT_BERKELEY_EXPORT Q_DECL_IMPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
109 # endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
110 #else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
111 # define QXT_BERKELEY_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
112 #endif // BUILD_QXT_BERKELEY |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
113 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
114 #if !defined(QXT_STATIC) && !defined(QXT_DOXYGEN_RUN) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
115 # if defined(BUILD_QXT_ZEROCONF) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
116 # define QXT_ZEROCONF_EXPORT Q_DECL_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
117 # else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
118 # define QXT_ZEROCONF_EXPORT Q_DECL_IMPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
119 # endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
120 #else |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
121 # define QXT_ZEROCONF_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
122 #endif // QXT_ZEROCONF_EXPORT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
123 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
124 #if defined(BUILD_QXT_CORE) || defined(BUILD_QXT_GUI) || defined(BUILD_QXT_SQL) || defined(BUILD_QXT_NETWORK) || defined(BUILD_QXT_WEB) || defined(BUILD_QXT_BERKELEY) || defined(BUILD_QXT_ZEROCONF) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
125 # define BUILD_QXT |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
126 #endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
127 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
128 QXT_CORE_EXPORT const char* qxtVersion(); |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
129 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
130 #ifndef QT_BEGIN_NAMESPACE |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
131 #define QT_BEGIN_NAMESPACE |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
132 #endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
133 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
134 #ifndef QT_END_NAMESPACE |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
135 #define QT_END_NAMESPACE |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
136 #endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
137 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
138 #ifndef QT_FORWARD_DECLARE_CLASS |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
139 #define QT_FORWARD_DECLARE_CLASS(Class) class Class; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
140 #endif |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
141 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
142 /**************************************************************************** |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
143 ** This file is derived from code bearing the following notice: |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
144 ** The sole author of this file, Adam Higerd, has explicitly disclaimed all |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
145 ** copyright interest and protection for the content within. This file has |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
146 ** been placed in the public domain according to United States copyright |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
147 ** statute and case law. In jurisdictions where this public domain dedication |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
148 ** is not legally recognized, anyone who receives a copy of this file is |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
149 ** permitted to use, modify, duplicate, and redistribute this file, in whole |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
150 ** or in part, with no restrictions or conditions. In these jurisdictions, |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
151 ** this file shall be copyright (C) 2006-2008 by Adam Higerd. |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
152 ****************************************************************************/ |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
153 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
154 #define QXT_DECLARE_PRIVATE(PUB) friend class PUB##Private; QxtPrivateInterface<PUB, PUB##Private> qxt_d; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
155 #define QXT_DECLARE_PUBLIC(PUB) friend class PUB; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
156 #define QXT_INIT_PRIVATE(PUB) qxt_d.setPublic(this); |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
157 #define QXT_D(PUB) PUB##Private& d = qxt_d() |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
158 #define QXT_P(PUB) PUB& p = qxt_p() |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
159 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
160 template <typename PUB> |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
161 class QxtPrivate |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
162 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
163 public: |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
164 virtual ~QxtPrivate() |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
165 {} |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
166 inline void QXT_setPublic(PUB* pub) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
167 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
168 qxt_p_ptr = pub; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
169 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
170 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
171 protected: |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
172 inline PUB& qxt_p() |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
173 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
174 return *qxt_p_ptr; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
175 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
176 inline const PUB& qxt_p() const |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
177 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
178 return *qxt_p_ptr; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
179 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
180 inline PUB* qxt_ptr() |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
181 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
182 return qxt_p_ptr; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
183 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
184 inline const PUB* qxt_ptr() const |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
185 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
186 return qxt_p_ptr; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
187 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
188 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
189 private: |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
190 PUB* qxt_p_ptr; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
191 }; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
192 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
193 template <typename PUB, typename PVT> |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
194 class QxtPrivateInterface |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
195 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
196 friend class QxtPrivate<PUB>; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
197 public: |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
198 QxtPrivateInterface() |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
199 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
200 pvt = new PVT; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
201 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
202 ~QxtPrivateInterface() |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
203 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
204 delete pvt; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
205 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
206 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
207 inline void setPublic(PUB* pub) |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
208 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
209 pvt->QXT_setPublic(pub); |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
210 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
211 inline PVT& operator()() |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
212 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
213 return *static_cast<PVT*>(pvt); |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
214 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
215 inline const PVT& operator()() const |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
216 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
217 return *static_cast<PVT*>(pvt); |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
218 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
219 inline PVT * operator->() |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
220 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
221 return static_cast<PVT*>(pvt); |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
222 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
223 inline const PVT * operator->() const |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
224 { |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
225 return static_cast<PVT*>(pvt); |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
226 } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
227 private: |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
228 QxtPrivateInterface(const QxtPrivateInterface&) { } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
229 QxtPrivateInterface& operator=(const QxtPrivateInterface&) { } |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
230 QxtPrivate<PUB>* pvt; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
231 }; |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
232 |
7a2637c3eb83
Add csv parser from libqxt
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
233 #endif // QXT_GLOBAL |