1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU Lesser General Public License as published by |
|
7 * the Free Software Foundation, version 2.1 of the License. |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public License |
|
15 * along with this program. If not, |
|
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
|
17 * |
|
18 * Description: |
|
19 * |
|
20 */ |
|
21 |
|
22 #include "xqserviceipcmarshal.h" |
|
23 |
|
24 /*! |
|
25 \file xqserviceipcmarshal.h |
|
26 */ |
|
27 |
|
28 /*! |
|
29 \def Q_DECLARE_USER_METATYPE_NO_OPERATORS(TYPE) |
|
30 |
|
31 This macro declares \a TYPE as a user-defined type within the Qt |
|
32 metatype system. It should be used in header files, just after |
|
33 the declaration of TYPE. A corresponding invocation of |
|
34 Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TYPE) should appear in |
|
35 a source file. This macro should be used instead of |
|
36 Q_DECLARE_USER_METATYPE when no need to declare datastream operators. |
|
37 |
|
38 This example declares the class MyClass that doesn't need to declare |
|
39 datastream operators: |
|
40 |
|
41 \code |
|
42 Q_DECLARE_USER_METATYPE(MyClass) |
|
43 \endcode |
|
44 |
|
45 \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE() |
|
46 */ |
|
47 |
|
48 /*! |
|
49 \def Q_DECLARE_USER_METATYPE(TYPE) |
|
50 |
|
51 This macro declares \a TYPE as a user-defined type within the |
|
52 Qt metatype system. It should be used in header files, just |
|
53 after the declaration of \a TYPE. A corresponding invocation |
|
54 of Q_IMPLEMENT_USER_METATYPE should appear in a source file. |
|
55 |
|
56 This example declares the class \c{MyClass}: |
|
57 |
|
58 \code |
|
59 Q_DECLARE_USER_METATYPE(MyClass) |
|
60 \endcode |
|
61 |
|
62 \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE() |
|
63 */ |
|
64 |
|
65 /*! |
|
66 \def Q_DECLARE_USER_METATYPE_TYPEDEF(TAG,TYPE) |
|
67 |
|
68 This macro declares \a TYPE as a user-defined type within the |
|
69 Qt metatype system, but declares it as a typedef for a pre-existing |
|
70 metatype. The \a TAG is an identifier that will usually be the same |
|
71 as \a TYPE, but may be slightly different if \a TYPE is nested. |
|
72 For example, if \a TYPE is \c{Foo::Bar}, then \a TAG should be |
|
73 \c{Foo_Bar} to make it a valid identifier. |
|
74 |
|
75 This macro should be used in header files, just after the declaration |
|
76 of \a TYPE. A corresponding invocation of |
|
77 Q_IMPLEMENT_USER_METATYPE_TYPEDEF should appear in a source file. |
|
78 |
|
79 This example declares the types \c{Foo} and \c{Bar} as typedef aliases. |
|
80 |
|
81 \code |
|
82 typedef Foo Bar; |
|
83 Q_DECLARE_USER_METATYPE(Foo) |
|
84 Q_DECLARE_USER_METATYPE_TYPEDEF(Bar, Bar) |
|
85 \endcode |
|
86 |
|
87 \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE() |
|
88 */ |
|
89 |
|
90 /*! |
|
91 \def Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(TYPE) |
|
92 |
|
93 This macro implements the code necessary to register \a TYPE as a user-defined |
|
94 type within the Qt metatype system. |
|
95 |
|
96 This example implements the registration, logic for the class MyClass that |
|
97 doesn't need to declare datastream operators: |
|
98 |
|
99 \code |
|
100 Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(MyClass) |
|
101 \endcode |
|
102 |
|
103 On most systems, this macro will arrange for registration to be performed at program |
|
104 startup. On systems that don't support global constructors properly, it may be |
|
105 necessary to manually call Q_REGISTER_USER_METATYPE(). |
|
106 |
|
107 \sa Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_DECLARE_METATYPE(), Q_REGISTER_USER_METATYPE() |
|
108 */ |
|
109 |
|
110 /*! |
|
111 \def Q_DECLARE_USER_METATYPE_ENUM(TYPE) |
|
112 |
|
113 This macro declares \a TYPE as a user-defined enumerated type within |
|
114 the Qt metatype system. It should be used in header files, just |
|
115 after the declaration of \a TYPE. A corresponding invocation |
|
116 of Q_IMPLEMENT_USER_METATYPE_ENUM should appear in a source file. |
|
117 |
|
118 This example declares the enumerated type \c{MyEnum}: |
|
119 |
|
120 \code |
|
121 Q_DECLARE_USER_METATYPE_ENUM(MyEnum) |
|
122 \endcode |
|
123 |
|
124 This macro differs from Q_DECLARE_USER_METATYPE in that it explicitly |
|
125 declares datastream operators for the type. |
|
126 |
|
127 \sa Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_DECLARE_METATYPE(), Q_REGISTER_USER_METATYPE() |
|
128 */ |
|
129 |
|
130 /*! |
|
131 \def Q_IMPLEMENT_USER_METATYPE(TYPE) |
|
132 |
|
133 This macro implements the code necessary to register \a TYPE |
|
134 as a user-defined type within the Qt metatype system. |
|
135 |
|
136 This example implements the registration logic for the class \c{MyClass}: |
|
137 |
|
138 \code |
|
139 Q_IMPLEMENT_USER_METATYPE(MyClass) |
|
140 \endcode |
|
141 |
|
142 On most systems, this macro will arrange for registration to be |
|
143 performed at program startup. On systems that don't support |
|
144 global constructors properly, it may be necessary to manually |
|
145 call Q_REGISTER_USER_METATYPE(). |
|
146 |
|
147 \sa Q_DECLARE_USER_METATYPE(), Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE() |
|
148 */ |
|
149 |
|
150 /*! |
|
151 \def Q_IMPLEMENT_USER_METATYPE_TYPEDEF(TAG,TYPE) |
|
152 |
|
153 This macro implements the code necessary to register \a TYPE |
|
154 as a user-defined typedef alias within the Qt metatype system. |
|
155 The \a TAG should be the same as the tag used in the |
|
156 corresponding invocation of Q_DECLARE_USER_METATYPE_TYPEDEF. |
|
157 |
|
158 This example implements the registration logic for the typedef'ed |
|
159 types \c{Foo} and \c{Bar}: |
|
160 |
|
161 \code |
|
162 typedef Foo Bar; |
|
163 Q_IMPLEMENT_USER_METATYPE(Foo) |
|
164 Q_IMPLEMENT_USER_METATYPE_TYPEDEF(Bar, Bar) |
|
165 \endcode |
|
166 |
|
167 On most systems, this macro will arrange for registration to be |
|
168 performed at program startup. On systems that don't support |
|
169 global constructors properly, it may be necessary to manually |
|
170 call Q_REGISTER_USER_METATYPE(). |
|
171 |
|
172 \sa Q_DECLARE_USER_METATYPE(), Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE_ENUM(), Q_REGISTER_USER_METATYPE() |
|
173 */ |
|
174 |
|
175 /*! |
|
176 \def Q_IMPLEMENT_USER_METATYPE_ENUM(TYPE) |
|
177 |
|
178 This macro implements the code necessary to register \a TYPE |
|
179 as a user-defined type within the Qt metatype system. \a TYPE |
|
180 is assumed to be an enumerated type. Using this macro relieves |
|
181 the need to manually declare \c{operator<<} and \c{operator>>} |
|
182 for the enumerated type. Non-enumerated types should use |
|
183 Q_IMPLEMENT_USER_METATYPE() instead. |
|
184 |
|
185 This example implements the registration logic for the type \c{MyEnum}: |
|
186 |
|
187 \code |
|
188 Q_IMPLEMENT_USER_METATYPE_ENUM(MyEnum) |
|
189 \endcode |
|
190 |
|
191 On most systems, this macro will arrange for registration to be |
|
192 performed at program startup. On systems that don't support |
|
193 global constructors properly, it may be necessary to manually |
|
194 call Q_REGISTER_USER_METATYPE(). |
|
195 |
|
196 \sa Q_DECLARE_USER_METATYPE_ENUM(), Q_DECLARE_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE(), Q_REGISTER_USER_METATYPE() |
|
197 */ |
|
198 |
|
199 /*! |
|
200 \def Q_REGISTER_USER_METATYPE(TYPE) |
|
201 |
|
202 This macro can be called as a function to manually register \a TYPE |
|
203 as a user-defined type within the Qt metatype system. It is only |
|
204 needed if the system does not support global constructors properly. |
|
205 |
|
206 \sa Q_DECLARE_USER_METATYPE(), Q_DECLARE_USER_METATYPE_ENUM(), Q_IMPLEMENT_USER_METATYPE(), Q_IMPLEMENT_USER_METATYPE_ENUM() |
|
207 */ |
|
208 |
|
209 Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(QUuid) |
|