IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 12, 2008, 11:41:55 AM (18 years ago)
Author:
Paul Price
Message:

Adding additional notes in header file that the returned pmFPAfile is a view only (the caller should not free it). Cleaning up erroneous frees of the pmFPAfile when an error is hit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfileDefine.h

    r15931 r17634  
    44 * @author EAM, IfA
    55 *
    6  * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2007-12-27 02:08:19 $
     6 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-05-12 21:41:55 $
    88 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii
    99 */
     
    3939
    4040/// Define the FPA file using the provided camera and format names.
     41///
     42/// Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only
     43/// reference count is held by the config->files metadata.
    4144pmFPAfile *pmFPAfileDefineOutputForFormat(const pmConfig *config, // Configuration
    4245                                          pmFPA *fpa, // Optional FPA to bind
     
    7881
    7982/// Same as pmFPAfileDefineFromFPA, except it uses an FPA file instead of an FPA
     83///
     84/// The new pmFPAfile is inserted into the config->files metadata, freed and returned; so that the user does
     85/// not have to (and should not!) free the result.
    8086pmFPAfile *pmFPAfileDefineFromFile(const pmConfig *config, // Configuration
    8187                                   pmFPAfile *src, // Source file for this file
     
    122128// create a file with the given name, assign it type "INTERNAL", and supply it with an image
    123129// of the requested dimensions. (image only, mask and weight are ignored)
    124 pmReadout *pmFPAfileDefineInternal (psMetadata *files, const char *name, int Nx, int Ny, int type);
     130///
     131/// The new pmFPAfile is inserted into the config->files metadata, freed and returned; so that the user does
     132/// not have to (and should not!) free the result.
     133pmReadout *pmFPAfileDefineInternal(psMetadata *files, const char *name, int Nx, int Ny, int type);
    125134
    126135// delete the INTERNAL file of the given name (if it exists)
    127 bool pmFPAfileDropInternal (psMetadata *files, const char *name);
     136bool pmFPAfileDropInternal(psMetadata *files, const char *name);
    128137
    129138// look for the given argname on the argument list.  find the give filename from the file rules
     
    131140// Note that the returned pmFPAfile is a view only, so it should not be freed by the caller --- the only
    132141// reference count is held by the config->files metadata.
    133 pmFPAfile *pmFPAfileDefineSingleFromArgs (bool *found, pmConfig *config, const char *filename,
    134         const char *argname, int entry);
     142pmFPAfile *pmFPAfileDefineSingleFromArgs(bool *found, pmConfig *config, const char *filename,
     143                                         const char *argname, int entry);
    135144
    136145// Select or construct the requested readout.  If the named entry does not exist, generate it based
     
    139148// pmFPAfile is being used internally.
    140149pmReadout *pmFPAGenerateReadout(const pmConfig *config, // configuration information
    141                                 const pmFPAview *view, // select background for this entry
    142                                 const char *name, // name of internal/external file
    143                                 const pmFPA *fpa, // use this fpa to generate
    144                                 const psImageBinning *binning);
     150                                const pmFPAview *view, // select background for this entry
     151                                const char *name, // name of internal/external file
     152                                const pmFPA *fpa, // use this fpa to generate
     153                                const psImageBinning *binning);
    145154
    146155/// @}
Note: See TracChangeset for help on using the changeset viewer.