GIRAFFE Pipeline Reference Manual

giresponse.c
1 /* $Id$
2  *
3  * This file is part of the GIRAFFE Pipeline
4  * Copyright (C) 2002-2006 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /*
22  * $Author$
23  * $Date$
24  * $Revision$
25  * $Name$
26  */
27 
28 #ifdef HAVE_CONFIG_H
29 # include <config.h>
30 #endif
31 
32 #include <cxmemory.h>
33 
34 #include "giresponse.h"
35 
36 
43 GiResponse*
44 giraffe_response_new(void)
45 {
46 
47  GiResponse* self = cx_calloc(1, sizeof *self);
48 
49  if (self != NULL) {
50  self->response = NULL;
51  self->efficiency = NULL;
52  }
53 
54  return self;
55 
56 }
57 
58 
59 void
60 giraffe_response_delete(GiResponse* self)
61 {
62 
63  if (self != NULL) {
64  if (self->response != NULL) {
65  giraffe_image_delete(self->response);
66  self->response = NULL;
67  }
68 
69  if (self->efficiency != NULL) {
70  giraffe_table_delete(self->efficiency);
71  self->efficiency = NULL;
72  }
73 
74  cx_free(self);
75 
76  }
77 
78  return;
79 
80 }
81 
void giraffe_table_delete(GiTable *self)
Destroys a Giraffe table.
Definition: gitable.c:162
void giraffe_image_delete(GiImage *self)
Destroys an image.
Definition: giimage.c:189

This file is part of the GIRAFFE Pipeline Reference Manual 2.14.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Wed Mar 11 2015 13:19:42 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2004