Recipe Definition


Defines

#define cpl_get_license(PACKAGE_NAME, YEAR)
 generate the recipe copyright and license text
#define CPL_RECIPE_DEFINE(RECIPE_NAME, RECIPE_VERSION, RECIPE_FILL_PARAMS,RECIPE_AUTHOR, RECIPE_AUTHOR_EMAIL, RECIPE_YEAR,RECIPE_SYNOPSIS, RECIPE_DESCRIPTION)
 Define a standard CPL recipe.

Detailed Description

This module implements the support for recipe defition.

Synopsis:
   #include <cpl_recipedefine.h>

Define Documentation

#define cpl_get_license ( PACKAGE_NAME,
YEAR   ) 

Value:

"This file is part of the " PACKAGE_NAME "\n"                              \
    "Copyright (C) " YEAR " European Southern Observatory\n"                   \
    "\n"                                                                       \
    "This program is free software; you can redistribute it and/or modify\n"   \
    "it under the terms of the GNU General Public License as published by\n"   \
    "the Free Software Foundation; either version 2 of the License, or\n"      \
    "(at your option) any later version.\n"                                    \
    "\n"                                                                       \
    "This program is distributed in the hope that it will be useful,\n"        \
    "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"         \
    "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"          \
    "GNU General Public License for more details.\n"                           \
    "\n"                                                                       \
    "You should have received a copy of the GNU General Public License\n"      \
    "along with this program; if not, write to the Free Software\n"            \
    "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, \n"                \
    "MA  02111-1307  USA"
generate the recipe copyright and license text

Parameters:
PACKAGE_NAME The name as a string literal, e.g. from config.h
YEAR The year(s) as a string literal
Returns:
The recipe copyright and license text as a string literal
Example:
     const char * my_license = cpl_get_license(PACKAGE_NAME, "2005, 2008");

#define CPL_RECIPE_DEFINE ( RECIPE_NAME,
RECIPE_VERSION,
RECIPE_FILL_PARAMS,
RECIPE_AUTHOR,
RECIPE_AUTHOR_EMAIL,
RECIPE_YEAR,
RECIPE_SYNOPSIS,
RECIPE_DESCRIPTION   ) 

Define a standard CPL recipe.

Parameters:
RECIPE_NAME The name as an identifier
RECIPE_VERSION The binary version number
RECIPE_FILL_PARAMS A function call to fill the recipe parameterlist Must evaluate to zero if and only if successful
RECIPE_AUTHOR The author as a string literal
RECIPE_AUTHOR_EMAIL The author email as a string literal
RECIPE_YEAR The copyright year as a string literal
RECIPE_SYNOPSIS The synopsis as a string literal
RECIPE_DESCRIPTION The man-page as a string literal
A CPL-based recipe may use this macro to define its four mandatory functions: cpl_plugin_get_info(), <recipe>_create(), <recipe>_exec() and <recipe>_destroy(), as well as declaring the actual data reduction function, <recipe>() as
     static int <recipe>(cpl_frameset *, const cpl_parameterlist *);

This may be done by defining a macro, e.g. in my_recipe.h:

   #define MY_RECIPE_DEFINE(NAME, FILL_PARAMS_FUNC, SYNOPSIS, DESCRIPTION)  \
     CPL_RECIPE_DEFINE(NAME, MY_BINARY_VERSION,                             \
     FILL_PARAMS_FUNC(recipe->parameters),                                  \
     "Firstname Lastname", "2006, 2008", SYNOPSIS, DESCRIPTION)

   #include "my_recipe.h"

   MY_RECIPE_DEFINE(instrume_img_dark,
                    instrume_img_dark_fill_parameterlist,
                    "Dark recipe",
                    "instrume_img_dark -- imaging dark recipe.\n"
                    " ... recipe man-page\n")                       

where instrume_img_dark_fill_parameterlist() is a recipe specific function, that takes an empty parameterlist and fills it with those parameters that the recipe supports.


Generated on Wed Mar 18 09:40:13 2009 for Common Pipeline Library Reference Manual by  doxygen 1.4.7