upgrade to glibmm 2.16
[ardour.git] / libs / glibmm2 / glib / src / value_basictypes.cc.m4
1 divert(-1)
2
3 dnl $Id: value_basictypes.cc.m4 779 2009-01-19 17:58:50Z murrayc $
4
5 dnl  Glib::Value specializations for fundamental types
6 dnl
7 dnl  Copyright 2002 The gtkmm Development Team
8 dnl
9 dnl  This library is free software; you can redistribute it and/or
10 dnl  modify it under the terms of the GNU Lesser General Public
11 dnl  License as published by the Free Software Foundation; either
12 dnl  version 2.1 of the License, or (at your option) any later version.
13 dnl
14 dnl  This library is distributed in the hope that it will be useful,
15 dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 dnl  Lesser General Public License for more details.
18 dnl
19 dnl  You should have received a copy of the GNU Lesser General Public
20 dnl  License along with this library; if not, write to the Free
21 dnl  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23 include(template.macros.m4)
24
25 dnl
26 dnl GLIB_VALUE_BASIC(bool, boolean)
27 dnl
28 define([GLIB_VALUE_BASIC],[dnl
29 LINE(]__line__[)dnl
30
31 dnl Please ignore the format stuff.  I was just tired and played a little.
32 /**** Glib::Value<$1> translit(format([%]eval(57-len([$1]))[s],[****/]),[ ],[*])
33
34 // static
35 GType Value<$1>::value_type()
36 {
37   return G_TYPE_[]UPPER($2);
38 }
39
40 void Value<$1>::set($1 data)
41 {
42   g_value_set_$2(&gobject_, data);
43 }
44
45 $1 Value<$1>::get() const
46 {
47   return g_value_get_$2(&gobject_);
48 }
49
50 GParamSpec* Value<$1>::create_param_spec(const Glib::ustring& name) const
51 {
52   return g_param_spec_$2(
53       name.c_str(), 0, 0,ifelse($2,pointer,,[
54       ifelse($3,,,[$3, $4, ])[]g_value_get_$2(&gobject_),])
55       GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
56 }
57 ])
58
59 divert[]dnl
60 // -*- c++ -*-
61 // This is a generated file, do not edit.  Generated from __file__
62
63 #include <glibmm/value.h>
64
65 namespace Glib
66 {
67
68 G_GNUC_EXTENSION typedef long long long_long;
69 G_GNUC_EXTENSION typedef unsigned long long unsigned_long_long;
70
71 GLIB_VALUE_BASIC(bool, boolean)
72 GLIB_VALUE_BASIC(char, char, -128, 127)
73 GLIB_VALUE_BASIC(unsigned char, uchar, 0, 255)
74 GLIB_VALUE_BASIC(int, int, G_MININT, G_MAXINT)
75 GLIB_VALUE_BASIC(unsigned int, uint, 0, G_MAXUINT)
76 GLIB_VALUE_BASIC(long, long, G_MINLONG, G_MAXLONG)
77 GLIB_VALUE_BASIC(unsigned long, ulong, 0, G_MAXULONG)
78 GLIB_VALUE_BASIC(long_long, int64, G_GINT64_CONSTANT[](0x8000000000000000), G_GINT64_CONSTANT[](0x7fffffffffffffff))
79 GLIB_VALUE_BASIC(unsigned_long_long, uint64, G_GINT64_CONSTANT[](0U), G_GINT64_CONSTANT[](0xffffffffffffffffU))
80 GLIB_VALUE_BASIC(float, float, -G_MAXFLOAT, G_MAXFLOAT)
81 GLIB_VALUE_BASIC(double, double, -G_MAXDOUBLE, G_MAXDOUBLE)
82 GLIB_VALUE_BASIC(void*, pointer)
83 } // namespace Glib
84