GIRAFFE Pipeline Reference Manual

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

This file is part of the GIRAFFE Pipeline Reference Manual 2.16.10.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Thu Dec 15 2022 21:18:51 by doxygen 1.9.1 written by Dimitri van Heesch, © 1997-2004