IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 1, 2009, 11:43:05 AM (17 years ago)
Author:
eugene
Message:

merging Doxygen templates added by Bill G

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppArith/src/ppArithArguments.c

    r16189 r21244  
     1/** @file ppArithArguments.c
     2 *
     3 *  @brief
     4 *
     5 *  @ingroup ppArith
     6 *
     7 *  @author IfA
     8 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-01 21:40:52 $
     10 *  Copyright 2009 Institute for Astronomy, University of Hawaii
     11 */
     12
    113#ifdef HAVE_CONFIG_H
    214#include <config.h>
     
    1022#include "ppArith.h"
    1123
    12 // Print usage information and die
    13 static void usage(const char *program,  // Name of the program
    14                   psMetadata *arguments, // Command-line arguments
    15                   pmConfig *config      // Configuration
     24/**
     25 * Print usage information and die
     26 */
     27static void usage(const char *program,  ///< Name of the program
     28                  psMetadata *arguments, ///< Command-line arguments
     29                  pmConfig *config      ///< Configuration
    1630    )
    1731{
     
    2842}
    2943
    30 // Get a string value from the command-line and add it to the target
    31 static bool valueArgStr(psMetadata *arguments, // Command-line arguments
    32                         const char *argName, // Argument name in the command-line arguments
    33                         const char *mdName, // Name for value in the metadata
    34                         psMetadata *target // Target metadata to which to add value
     44/**
     45 * Get a string value from the command-line and add it to the target
     46 */
     47static bool valueArgStr(psMetadata *arguments, ///< Command-line arguments
     48                        const char *argName, ///< Argument name in the command-line arguments
     49                        const char *mdName, ///< Name for value in the metadata
     50                        psMetadata *target ///< Target metadata to which to add value
    3551                        )
    3652{
    37     psString value = psMetadataLookupStr(NULL, arguments, argName); // Value of interest
     53    psString value = psMetadataLookupStr(NULL, arguments, argName); ///< Value of interest
    3854    if (value && strlen(value) > 0) {
    3955        return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value);
     
    4258}
    4359
    44 // Add a single filename to the arguments as an array, so that it can be used with pmFPAfileBindFromArgs, etc
    45 static void fileList(const char *file, // The symbolic name for the file
    46                      const char *name, // The name of the file
    47                      const char *comment, // Description of the file
    48                      pmConfig *config // Configuration
     60/**
     61 * Add a single filename to the arguments as an array, so that it can be used with pmFPAfileBindFromArgs, etc
     62 */
     63static void fileList(const char *file, ///< The symbolic name for the file
     64                     const char *name, ///< The name of the file
     65                     const char *comment, ///< Description of the file
     66                     pmConfig *config ///< Configuration
    4967    )
    5068{
    51     psArray *files = psArrayAlloc(1); // Array with file names
     69    psArray *files = psArrayAlloc(1); ///< Array with file names
    5270    files->data[0] = psStringCopy(name);
    5371    psMetadataAddArray(config->arguments, PS_LIST_TAIL, file, 0, comment, files);
     
    6078    assert(config);
    6179
    62     psMetadata *arguments = psMetadataAlloc(); // Command-line arguments
     80    psMetadata *arguments = psMetadataAlloc(); ///< Command-line arguments
    6381    psMetadataAddStr(arguments, PS_LIST_TAIL, "-file1", 0, "First image", NULL);
    6482    psMetadataAddStr(arguments, PS_LIST_TAIL, "-op", 0, "Operation to perform", NULL);
     
    7391    bool isMask = psMetadataLookupBool(NULL, arguments, "-mask"); // Are we dealing with masks?
    7492    psMetadataAddBool(config->arguments, PS_LIST_TAIL, "MASK", 0, "Produce a mask image?", isMask);
    75     const char *inFilerule = isMask ? "PPARITH.INPUT.MASK" : "PPARITH.INPUT.IMAGE"; // Input file rule
    76     const char *outFilerule = isMask ? "PPARITH.OUTPUT.MASK" : "PPARITH.OUTPUT.IMAGE"; // Output file rule
     93    const char *inFilerule = isMask ? "PPARITH.INPUT.MASK" : "PPARITH.INPUT.IMAGE"; ///< Input file rule
     94    const char *outFilerule = isMask ? "PPARITH.OUTPUT.MASK" : "PPARITH.OUTPUT.IMAGE"; ///< Output file rule
    7795    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "FILERULE.INPUT", 0,
    7896                     "File rule for input", inFilerule);
     
    8098                     "File rule for output", outFilerule);
    8199
    82     bool status = false;                // Status for file definition
     100    bool status = false;                ///< Status for file definition
    83101
    84102    // First file
    85     const char *name1 = psMetadataLookupStr(NULL, arguments, "-file1"); // Name of first image
     103    const char *name1 = psMetadataLookupStr(NULL, arguments, "-file1"); ///< Name of first image
    86104    if (!name1 || strlen(name1) == 0) {
    87105        psError(PS_ERR_UNEXPECTED_NULL, true, "No input image specified.");
     
    100118
    101119    // Second file is optional (won't be one for unary operations)
    102     const char *name2 = psMetadataLookupStr(NULL, arguments, "-file2"); // Name of second image
     120    const char *name2 = psMetadataLookupStr(NULL, arguments, "-file2"); ///< Name of second image
    103121    if (name2 && strlen(name2) > 0) {
    104122        fileList("INPUT2", name2, "Name of the second input image", config);
Note: See TracChangeset for help on using the changeset viewer.