1 /* an input real ... put/get methods
2  */
3 
4 /*
5 
6     Copyright (C) 1991-2003 The National Gallery
7 
8     This program is free software; you can redistribute it and/or modify
9     it under the terms of the GNU General Public License as published by
10     the Free Software Foundation; either version 2 of the License, or
11     (at your option) any later version.
12 
13     This program is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16     GNU General Public License for more details.
17 
18     You should have received a copy of the GNU General Public License along
19     with this program; if not, write to the Free Software Foundation, Inc.,
20     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 
22  */
23 
24 /*
25 
26     These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
27 
28  */
29 
30 /*
31 #define DEBUG
32  */
33 
34 #include "ip.h"
35 
36 static ValueClass *parent_class = NULL;
37 
38 static void
real_class_init(RealClass * class)39 real_class_init( RealClass *class )
40 {
41 	parent_class = g_type_class_peek_parent( class );
42 
43 	/* Create signals.
44 	 */
45 
46 	model_register_loadable( MODEL_CLASS( class ) );
47 }
48 
49 static void
real_init(Real * real)50 real_init( Real *real )
51 {
52 	iobject_set( IOBJECT( real ), CLASS_REAL, NULL );
53 }
54 
55 GType
real_get_type(void)56 real_get_type( void )
57 {
58 	static GType type = 0;
59 
60 	if( !type ) {
61 		static const GTypeInfo info = {
62 			sizeof( RealClass ),
63 			NULL,           /* base_init */
64 			NULL,           /* base_finalize */
65 			(GClassInitFunc) real_class_init,
66 			NULL,           /* class_finalize */
67 			NULL,           /* class_data */
68 			sizeof( Real ),
69 			32,             /* n_preallocs */
70 			(GInstanceInitFunc) real_init,
71 		};
72 
73 		type = g_type_register_static( TYPE_VALUE,
74 			"Real", &info, 0 );
75 	}
76 
77 	return( type );
78 }
79