VISIR Pipeline Reference Manual  4.1.7
visir_recipe.h
1 /* $Id: visir_recipe.h,v 1.23 2013-02-27 09:04:24 jtaylor Exp $
2  *
3  * This file is part of the VISIR Pipeline
4  * Copyright (C) 2002,2003 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 02111-1307 USA
19  */
20 
21 /*
22  * $Author: jtaylor $
23  * $Date: 2013-02-27 09:04:24 $
24  * $Revision: 1.23 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 
29 
30 /* include file for VISIR recipes */
31 /* cpp macros that must be defined before inclusion:
32 
33  RECIPE_NAME: e.g. visir_img_combine
34  RECIPE_STRING: e.g. "visir_img_combine"
35  RECIPE_SYNOPSIS: String with the recipe synopsis
36  RECIPE_DESCRIPTION: String with the recipe descrption
37  Optionally:
38  RECIPE_PARAMS: Binary or of VISIR parameter enums
39 
40 */
41 
42 
43 #ifndef VISIR_RECIPE_H
44 #define VISIR_RECIPE_H
45 
46 /*-----------------------------------------------------------------------------
47  Includes
48  -----------------------------------------------------------------------------*/
49 
50 
51 #include "irplib_plugin.h"
52 
53 #include "visir_parameter.h"
54 #include "visir_utils.h"
55 #include "visir_pfits.h"
56 #include "visir_dfs.h"
57 #include "visir_inputs.h"
58 #include "visir_cpl_compat.h"
59 #include <cpl.h>
60 
61 #include <math.h>
62 #include <assert.h>
63 #include <float.h>
64 
65 /*-----------------------------------------------------------------------------
66  Defines
67  -----------------------------------------------------------------------------*/
68 
69 #define visir_pipe_id PACKAGE "/" PACKAGE_VERSION
70 
71 #define VISIR_RECIPE_DEFINE(RECIPE_NAME, RECIPE_PARAMS, SYNOPSIS, DESCRIPTION) \
72  cpl_recipe_define(RECIPE_NAME, VISIR_BINARY_VERSION, \
73  "Lars Lundin", PACKAGE_BUGREPORT, "2004, 2005", \
74  SYNOPSIS, DESCRIPTION); \
75  \
76  static cpl_error_code CPL_CONCAT2X(RECIPE_NAME,fill_parameterlist) \
77  (cpl_parameterlist * self) { \
78  return visir_parameter_set(self, #RECIPE_NAME, RECIPE_PARAMS) \
79  ? cpl_error_set_where(cpl_func) : CPL_ERROR_NONE; \
80  } \
81  extern int CPL_CONCAT2X(RECIPE_NAME,plugin_end)
82 
83 #endif