1 // This is a generated file. Do not edit it.  Generated from /home/kjell/checkout/gnome/glibmm-2.4/glib/src/variant_basictypes.h.m4
2 
3 #ifndef DOXYGEN_SHOULD_SKIP_THIS
4 #ifndef _GLIBMM_VARIANT_H_INCLUDE_VARIANT_BASICTYPES_H
5 #error "glibmm/variant_basictypes.h cannot be included directly"
6 #endif
7 #endif
8 
9 namespace Glib
10 {
11 
12 /** Specialization of Glib::Variant containing a bool type.
13  * @newin{2,26}
14  * @ingroup Variant
15  */
16 template <>
17 class GLIBMM_API Variant<bool> : public VariantBase
18 {
19 public:
20   using CType = gboolean;
21 
22   /// Default constructor.
23   Variant<bool>()
VariantBase()24   : VariantBase()
25   {}
26 
27   /** GVariant constructor.
28    * @param castitem The GVariant to wrap.
29    * @param take_a_reference Whether to take an extra reference of the
30    * GVariant or not (not taking one could destroy the GVariant with the
31    * wrapper).
32    */
33   explicit Variant<bool>(GVariant* castitem, bool take_a_reference = false)
VariantBase(castitem,take_a_reference)34   : VariantBase(castitem, take_a_reference)
35   {}
36 
37   /** Gets the Glib::VariantType.
38    * @return The Glib::VariantType.
39    */
40   static const VariantType& variant_type() G_GNUC_CONST;
41 
42   /** Creates a new Glib::Variant<bool>.
43    * @param data The value of the new Glib::Variant<bool>.
44    * @return The new Glib::Variant<bool>.
45    */
46   static Variant<bool> create(bool data);
47 
48   /** Gets the value of the Glib::Variant<bool>.
49    * @return The bool value of the Glib::Variant<bool>.
50    */
51   bool get() const;
52 };
53 
54 
55 /** Specialization of Glib::Variant containing a unsigned char type.
56  * @newin{2,26}
57  * @ingroup Variant
58  */
59 template <>
60 class GLIBMM_API Variant<unsigned char> : public VariantBase
61 {
62 public:
63   using CType = guchar;
64 
65   /// Default constructor.
66   Variant<unsigned char>()
VariantBase()67   : VariantBase()
68   {}
69 
70   /** GVariant constructor.
71    * @param castitem The GVariant to wrap.
72    * @param take_a_reference Whether to take an extra reference of the
73    * GVariant or not (not taking one could destroy the GVariant with the
74    * wrapper).
75    */
76   explicit Variant<unsigned char>(GVariant* castitem, bool take_a_reference = false)
VariantBase(castitem,take_a_reference)77   : VariantBase(castitem, take_a_reference)
78   {}
79 
80   /** Gets the Glib::VariantType.
81    * @return The Glib::VariantType.
82    */
83   static const VariantType& variant_type() G_GNUC_CONST;
84 
85   /** Creates a new Glib::Variant<unsigned char>.
86    * @param data The value of the new Glib::Variant<unsigned char>.
87    * @return The new Glib::Variant<unsigned char>.
88    */
89   static Variant<unsigned char> create(unsigned char data);
90 
91   /** Gets the value of the Glib::Variant<unsigned char>.
92    * @return The unsigned char value of the Glib::Variant<unsigned char>.
93    */
94   unsigned char get() const;
95 };
96 
97 
98 /** Specialization of Glib::Variant containing a gint16 type.
99  * @newin{2,26}
100  * @ingroup Variant
101  */
102 template <>
103 class GLIBMM_API Variant<gint16> : public VariantBase
104 {
105 public:
106   using CType = gint16;
107 
108   /// Default constructor.
109   Variant<gint16>()
VariantBase()110   : VariantBase()
111   {}
112 
113   /** GVariant constructor.
114    * @param castitem The GVariant to wrap.
115    * @param take_a_reference Whether to take an extra reference of the
116    * GVariant or not (not taking one could destroy the GVariant with the
117    * wrapper).
118    */
119   explicit Variant<gint16>(GVariant* castitem, bool take_a_reference = false)
VariantBase(castitem,take_a_reference)120   : VariantBase(castitem, take_a_reference)
121   {}
122 
123   /** Gets the Glib::VariantType.
124    * @return The Glib::VariantType.
125    */
126   static const VariantType& variant_type() G_GNUC_CONST;
127 
128   /** Creates a new Glib::Variant<gint16>.
129    * @param data The value of the new Glib::Variant<gint16>.
130    * @return The new Glib::Variant<gint16>.
131    */
132   static Variant<gint16> create(gint16 data);
133 
134   /** Gets the value of the Glib::Variant<gint16>.
135    * @return The gint16 value of the Glib::Variant<gint16>.
136    */
137   gint16 get() const;
138 };
139 
140 
141 /** Specialization of Glib::Variant containing a guint16 type.
142  * @newin{2,26}
143  * @ingroup Variant
144  */
145 template <>
146 class GLIBMM_API Variant<guint16> : public VariantBase
147 {
148 public:
149   using CType = guint16;
150 
151   /// Default constructor.
152   Variant<guint16>()
VariantBase()153   : VariantBase()
154   {}
155 
156   /** GVariant constructor.
157    * @param castitem The GVariant to wrap.
158    * @param take_a_reference Whether to take an extra reference of the
159    * GVariant or not (not taking one could destroy the GVariant with the
160    * wrapper).
161    */
162   explicit Variant<guint16>(GVariant* castitem, bool take_a_reference = false)
VariantBase(castitem,take_a_reference)163   : VariantBase(castitem, take_a_reference)
164   {}
165 
166   /** Gets the Glib::VariantType.
167    * @return The Glib::VariantType.
168    */
169   static const VariantType& variant_type() G_GNUC_CONST;
170 
171   /** Creates a new Glib::Variant<guint16>.
172    * @param data The value of the new Glib::Variant<guint16>.
173    * @return The new Glib::Variant<guint16>.
174    */
175   static Variant<guint16> create(guint16 data);
176 
177   /** Gets the value of the Glib::Variant<guint16>.
178    * @return The guint16 value of the Glib::Variant<guint16>.
179    */
180   guint16 get() const;
181 };
182 
183 
184 /** Specialization of Glib::Variant containing a gint32 type.
185  * @newin{2,26}
186  * @ingroup Variant
187  */
188 template <>
189 class GLIBMM_API Variant<gint32> : public VariantBase
190 {
191 public:
192   using CType = gint32;
193 
194   /// Default constructor.
195   Variant<gint32>()
VariantBase()196   : VariantBase()
197   {}
198 
199   /** GVariant constructor.
200    * @param castitem The GVariant to wrap.
201    * @param take_a_reference Whether to take an extra reference of the
202    * GVariant or not (not taking one could destroy the GVariant with the
203    * wrapper).
204    */
205   explicit Variant<gint32>(GVariant* castitem, bool take_a_reference = false)
VariantBase(castitem,take_a_reference)206   : VariantBase(castitem, take_a_reference)
207   {}
208 
209   /** Gets the Glib::VariantType.
210    * @return The Glib::VariantType.
211    */
212   static const VariantType& variant_type() G_GNUC_CONST;
213 
214   /** Creates a new Glib::Variant<gint32>.
215    * @param data The value of the new Glib::Variant<gint32>.
216    * @return The new Glib::Variant<gint32>.
217    */
218   static Variant<gint32> create(gint32 data);
219 
220   /** Creates a new Glib::Variant<gint32> of type VARIANT_TYPE_HANDLE.
221    * @param data The value of the new Glib::Variant<gint32>.
222    * @return The new Glib::Variant<gint32>.
223    */
224   static Variant<gint32> create_handle(gint32 data);
225 
226   /** Gets the value of the Glib::Variant<gint32>.
227    * @return The gint32 value of the Glib::Variant<gint32>.
228    */
229   gint32 get() const;
230 };
231 
232 
233 /** Specialization of Glib::Variant containing a guint32 type.
234  * @newin{2,26}
235  * @ingroup Variant
236  */
237 template <>
238 class GLIBMM_API Variant<guint32> : public VariantBase
239 {
240 public:
241   using CType = guint32;
242 
243   /// Default constructor.
244   Variant<guint32>()
VariantBase()245   : VariantBase()
246   {}
247 
248   /** GVariant constructor.
249    * @param castitem The GVariant to wrap.
250    * @param take_a_reference Whether to take an extra reference of the
251    * GVariant or not (not taking one could destroy the GVariant with the
252    * wrapper).
253    */
254   explicit Variant<guint32>(GVariant* castitem, bool take_a_reference = false)
VariantBase(castitem,take_a_reference)255   : VariantBase(castitem, take_a_reference)
256   {}
257 
258   /** Gets the Glib::VariantType.
259    * @return The Glib::VariantType.
260    */
261   static const VariantType& variant_type() G_GNUC_CONST;
262 
263   /** Creates a new Glib::Variant<guint32>.
264    * @param data The value of the new Glib::Variant<guint32>.
265    * @return The new Glib::Variant<guint32>.
266    */
267   static Variant<guint32> create(guint32 data);
268 
269   /** Gets the value of the Glib::Variant<guint32>.
270    * @return The guint32 value of the Glib::Variant<guint32>.
271    */
272   guint32 get() const;
273 };
274 
275 
276 /** Specialization of Glib::Variant containing a gint64 type.
277  * @newin{2,26}
278  * @ingroup Variant
279  */
280 template <>
281 class GLIBMM_API Variant<gint64> : public VariantBase
282 {
283 public:
284   using CType = gint64;
285 
286   /// Default constructor.
287   Variant<gint64>()
VariantBase()288   : VariantBase()
289   {}
290 
291   /** GVariant constructor.
292    * @param castitem The GVariant to wrap.
293    * @param take_a_reference Whether to take an extra reference of the
294    * GVariant or not (not taking one could destroy the GVariant with the
295    * wrapper).
296    */
297   explicit Variant<gint64>(GVariant* castitem, bool take_a_reference = false)
VariantBase(castitem,take_a_reference)298   : VariantBase(castitem, take_a_reference)
299   {}
300 
301   /** Gets the Glib::VariantType.
302    * @return The Glib::VariantType.
303    */
304   static const VariantType& variant_type() G_GNUC_CONST;
305 
306   /** Creates a new Glib::Variant<gint64>.
307    * @param data The value of the new Glib::Variant<gint64>.
308    * @return The new Glib::Variant<gint64>.
309    */
310   static Variant<gint64> create(gint64 data);
311 
312   /** Gets the value of the Glib::Variant<gint64>.
313    * @return The gint64 value of the Glib::Variant<gint64>.
314    */
315   gint64 get() const;
316 };
317 
318 
319 /** Specialization of Glib::Variant containing a guint64 type.
320  * @newin{2,26}
321  * @ingroup Variant
322  */
323 template <>
324 class GLIBMM_API Variant<guint64> : public VariantBase
325 {
326 public:
327   using CType = guint64;
328 
329   /// Default constructor.
330   Variant<guint64>()
VariantBase()331   : VariantBase()
332   {}
333 
334   /** GVariant constructor.
335    * @param castitem The GVariant to wrap.
336    * @param take_a_reference Whether to take an extra reference of the
337    * GVariant or not (not taking one could destroy the GVariant with the
338    * wrapper).
339    */
340   explicit Variant<guint64>(GVariant* castitem, bool take_a_reference = false)
VariantBase(castitem,take_a_reference)341   : VariantBase(castitem, take_a_reference)
342   {}
343 
344   /** Gets the Glib::VariantType.
345    * @return The Glib::VariantType.
346    */
347   static const VariantType& variant_type() G_GNUC_CONST;
348 
349   /** Creates a new Glib::Variant<guint64>.
350    * @param data The value of the new Glib::Variant<guint64>.
351    * @return The new Glib::Variant<guint64>.
352    */
353   static Variant<guint64> create(guint64 data);
354 
355   /** Gets the value of the Glib::Variant<guint64>.
356    * @return The guint64 value of the Glib::Variant<guint64>.
357    */
358   guint64 get() const;
359 };
360 
361 
362 /** Specialization of Glib::Variant containing a double type.
363  * @newin{2,26}
364  * @ingroup Variant
365  */
366 template <>
367 class GLIBMM_API Variant<double> : public VariantBase
368 {
369 public:
370   using CType = gdouble;
371 
372   /// Default constructor.
373   Variant<double>()
VariantBase()374   : VariantBase()
375   {}
376 
377   /** GVariant constructor.
378    * @param castitem The GVariant to wrap.
379    * @param take_a_reference Whether to take an extra reference of the
380    * GVariant or not (not taking one could destroy the GVariant with the
381    * wrapper).
382    */
383   explicit Variant<double>(GVariant* castitem, bool take_a_reference = false)
VariantBase(castitem,take_a_reference)384   : VariantBase(castitem, take_a_reference)
385   {}
386 
387   /** Gets the Glib::VariantType.
388    * @return The Glib::VariantType.
389    */
390   static const VariantType& variant_type() G_GNUC_CONST;
391 
392   /** Creates a new Glib::Variant<double>.
393    * @param data The value of the new Glib::Variant<double>.
394    * @return The new Glib::Variant<double>.
395    */
396   static Variant<double> create(double data);
397 
398   /** Gets the value of the Glib::Variant<double>.
399    * @return The double value of the Glib::Variant<double>.
400    */
401   double get() const;
402 };
403 
404 } // namespace Glib
405