]> Pileus Git - grits/blob - src/objects/gis-object.c
ac01a294379b67c512ca585b815fad9407c7079b
[grits] / src / objects / gis-object.c
1 /*
2  * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
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 General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 #include <config.h>
19 #include "gis-object.h"
20
21
22 /* GisPoint */
23 GisPoint *gis_point_new()
24 {
25         return g_new0(GisPoint, 1);
26 }
27
28 void gis_point_set_lle(GisPoint *point, gdouble lat, gdouble lon, gdouble elev)
29 {
30         point->lat  = lat;
31         point->lon  = lon;
32         point->elev = elev;
33 }
34
35 void gis_point_free(GisPoint *point)
36 {
37         g_free(point);
38 }
39
40
41 /* GisObject */
42 G_DEFINE_ABSTRACT_TYPE(GisObject, gis_object, G_TYPE_OBJECT);
43 static void gis_object_init(GisObject *object)
44 {
45 }
46
47 static void gis_object_class_init(GisObjectClass *klass)
48 {
49 }