IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8161


Ignore:
Timestamp:
Aug 4, 2006, 3:08:30 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.16

Location:
trunk/ippdb
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/configure.ac

    r8156 r8161  
    11AC_PREREQ(2.59)
    22
    3 AC_INIT([ippdb], [0.0.15], [pan-starrs.ifa.hawaii.edu])
     3AC_INIT([ippdb], [0.0.1], [pan-starrs.ifa.hawaii.edu])
    44AC_CONFIG_SRCDIR([ippdb.pc.in])
    55
  • trunk/ippdb/src/ippdb.c

    r8156 r8161  
    7777}
    7878
     79bool ippdbPrintMetadatas(FILE *stream, psArray *mds, const char *mdname, bool mdconfigformat)
     80{
     81    PS_ASSERT_PTR_NON_NULL(mds, false);
     82    PS_ASSERT_PTR_NON_NULL(mdname, false);
     83
     84    psMetadata *output = psMetadataAlloc();
     85    for (long i = 0; i < psArrayLength(mds); i++) {
     86        psMetadata *md = mds->data[i];
     87        if (!psMetadataAddMetadata(
     88            output,
     89            PS_LIST_TAIL,
     90            mdname,
     91            PS_META_DUPLICATE_OK,
     92            NULL,
     93            md
     94        )) {
     95            psError(PS_ERR_UNKNOWN, false, "failed to add metadata");
     96            psFree(md);
     97            psFree(output);
     98            return false;
     99        }
     100        psFree(md);
     101    }
     102
     103    psString str = psMetadataConfigFormat(output);
     104    if (!str) {
     105        psError(PS_ERR_UNKNOWN, false, "failed to format data into a string");
     106        psFree(output);
     107    }
     108    psFree(output);
     109    fprintf(stream, "%s\n", str);
     110    psFree(str);
     111
     112    return true;
     113}
     114
    79115static void weatherRowFree(weatherRow *object);
    80116
  • trunk/ippdb/src/ippdb.h

    r8152 r8161  
    2929void ippdbCleanup(
    3030    psDB            *dbh                ///< Database handle
     31);
     32
     33/** Formats and prints an array of metadata
     34 *
     35 * When mdconfigformat is set the formated output is in psMetadataConfig
     36 * format, otherwise it is in a simple tabular format.
     37 *
     38 * @return true on success
     39 */
     40
     41bool ippdbPrintMetadatas(
     42    FILE            *stream,            ///< a stream
     43    psArray         *mds,               ///< An array of metadata
     44    const char      *mdname,            ///< name of the metadata(s)
     45    bool            mdconfigformat      ///< format as mdconfig or simple
    3146);
    3247
     
    235250/** Formats and prints an array of weatherRow objects
    236251 *
    237  * @return A boolean - false on error
     252 * When mdconfigformat is set the formated output is in psMetadataConfig
     253 * format, otherwise it is in a simple tabular format.
     254 *
     255 * @return true on success
    238256 */
    239257
     
    447465/** Formats and prints an array of skyp_transparencyRow objects
    448466 *
    449  * @return A boolean - false on error
     467 * When mdconfigformat is set the formated output is in psMetadataConfig
     468 * format, otherwise it is in a simple tabular format.
     469 *
     470 * @return true on success
    450471 */
    451472
     
    667688/** Formats and prints an array of skyp_absorptionRow objects
    668689 *
    669  * @return A boolean - false on error
     690 * When mdconfigformat is set the formated output is in psMetadataConfig
     691 * format, otherwise it is in a simple tabular format.
     692 *
     693 * @return true on success
    670694 */
    671695
     
    875899/** Formats and prints an array of skyp_emissionRow objects
    876900 *
    877  * @return A boolean - false on error
     901 * When mdconfigformat is set the formated output is in psMetadataConfig
     902 * format, otherwise it is in a simple tabular format.
     903 *
     904 * @return true on success
    878905 */
    879906
     
    10871114/** Formats and prints an array of dimmRow objects
    10881115 *
    1089  * @return A boolean - false on error
     1116 * When mdconfigformat is set the formated output is in psMetadataConfig
     1117 * format, otherwise it is in a simple tabular format.
     1118 *
     1119 * @return true on success
    10901120 */
    10911121
     
    12951325/** Formats and prints an array of skyp_irRow objects
    12961326 *
    1297  * @return A boolean - false on error
     1327 * When mdconfigformat is set the formated output is in psMetadataConfig
     1328 * format, otherwise it is in a simple tabular format.
     1329 *
     1330 * @return true on success
    12981331 */
    12991332
     
    14951528/** Formats and prints an array of domeRow objects
    14961529 *
    1497  * @return A boolean - false on error
     1530 * When mdconfigformat is set the formated output is in psMetadataConfig
     1531 * format, otherwise it is in a simple tabular format.
     1532 *
     1533 * @return true on success
    14981534 */
    14991535
     
    16991735/** Formats and prints an array of telescopeRow objects
    17001736 *
    1701  * @return A boolean - false on error
     1737 * When mdconfigformat is set the formated output is in psMetadataConfig
     1738 * format, otherwise it is in a simple tabular format.
     1739 *
     1740 * @return true on success
    17021741 */
    17031742
     
    19031942/** Formats and prints an array of summitExpRow objects
    19041943 *
    1905  * @return A boolean - false on error
     1944 * When mdconfigformat is set the formated output is in psMetadataConfig
     1945 * format, otherwise it is in a simple tabular format.
     1946 *
     1947 * @return true on success
    19061948 */
    19071949
     
    21072149/** Formats and prints an array of pzPendingExpRow objects
    21082150 *
    2109  * @return A boolean - false on error
     2151 * When mdconfigformat is set the formated output is in psMetadataConfig
     2152 * format, otherwise it is in a simple tabular format.
     2153 *
     2154 * @return true on success
    21102155 */
    21112156
     
    23152360/** Formats and prints an array of pzPendingImfileRow objects
    23162361 *
    2317  * @return A boolean - false on error
     2362 * When mdconfigformat is set the formated output is in psMetadataConfig
     2363 * format, otherwise it is in a simple tabular format.
     2364 *
     2365 * @return true on success
    23182366 */
    23192367
     
    25192567/** Formats and prints an array of newExpRow objects
    25202568 *
    2521  * @return A boolean - false on error
     2569 * When mdconfigformat is set the formated output is in psMetadataConfig
     2570 * format, otherwise it is in a simple tabular format.
     2571 *
     2572 * @return true on success
    25222573 */
    25232574
     
    27192770/** Formats and prints an array of newImfileRow objects
    27202771 *
    2721  * @return A boolean - false on error
     2772 * When mdconfigformat is set the formated output is in psMetadataConfig
     2773 * format, otherwise it is in a simple tabular format.
     2774 *
     2775 * @return true on success
    27222776 */
    27232777
     
    29473001/** Formats and prints an array of rawDetrendExpRow objects
    29483002 *
    2949  * @return A boolean - false on error
     3003 * When mdconfigformat is set the formated output is in psMetadataConfig
     3004 * format, otherwise it is in a simple tabular format.
     3005 *
     3006 * @return true on success
    29503007 */
    29513008
     
    31753232/** Formats and prints an array of rawScienceExpRow objects
    31763233 *
    3177  * @return A boolean - false on error
     3234 * When mdconfigformat is set the formated output is in psMetadataConfig
     3235 * format, otherwise it is in a simple tabular format.
     3236 *
     3237 * @return true on success
    31783238 */
    31793239
     
    33753435/** Formats and prints an array of rawImfileRow objects
    33763436 *
    3377  * @return A boolean - false on error
     3437 * When mdconfigformat is set the formated output is in psMetadataConfig
     3438 * format, otherwise it is in a simple tabular format.
     3439 *
     3440 * @return true on success
    33783441 */
    33793442
     
    36113674/** Formats and prints an array of p1PendingExpRow objects
    36123675 *
    3613  * @return A boolean - false on error
     3676 * When mdconfigformat is set the formated output is in psMetadataConfig
     3677 * format, otherwise it is in a simple tabular format.
     3678 *
     3679 * @return true on success
    36143680 */
    36153681
     
    38513917/** Formats and prints an array of p2PendingExpRow objects
    38523918 *
    3853  * @return A boolean - false on error
     3919 * When mdconfigformat is set the formated output is in psMetadataConfig
     3920 * format, otherwise it is in a simple tabular format.
     3921 *
     3922 * @return true on success
    38543923 */
    38553924
     
    40594128/** Formats and prints an array of p2PendingImfileRow objects
    40604129 *
    4061  * @return A boolean - false on error
     4130 * When mdconfigformat is set the formated output is in psMetadataConfig
     4131 * format, otherwise it is in a simple tabular format.
     4132 *
     4133 * @return true on success
    40624134 */
    40634135
     
    42994371/** Formats and prints an array of p2DoneExpRow objects
    43004372 *
    4301  * @return A boolean - false on error
     4373 * When mdconfigformat is set the formated output is in psMetadataConfig
     4374 * format, otherwise it is in a simple tabular format.
     4375 *
     4376 * @return true on success
    43024377 */
    43034378
     
    45074582/** Formats and prints an array of p2DoneImfileRow objects
    45084583 *
    4509  * @return A boolean - false on error
     4584 * When mdconfigformat is set the formated output is in psMetadataConfig
     4585 * format, otherwise it is in a simple tabular format.
     4586 *
     4587 * @return true on success
    45104588 */
    45114589
     
    47434821/** Formats and prints an array of p3PendingExpRow objects
    47444822 *
    4745  * @return A boolean - false on error
     4823 * When mdconfigformat is set the formated output is in psMetadataConfig
     4824 * format, otherwise it is in a simple tabular format.
     4825 *
     4826 * @return true on success
    47464827 */
    47474828
     
    49355016/** Formats and prints an array of detRunRow objects
    49365017 *
    4937  * @return A boolean - false on error
     5018 * When mdconfigformat is set the formated output is in psMetadataConfig
     5019 * format, otherwise it is in a simple tabular format.
     5020 *
     5021 * @return true on success
    49385022 */
    49395023
     
    51715255/** Formats and prints an array of detInputExpRow objects
    51725256 *
    5173  * @return A boolean - false on error
     5257 * When mdconfigformat is set the formated output is in psMetadataConfig
     5258 * format, otherwise it is in a simple tabular format.
     5259 *
     5260 * @return true on success
    51745261 */
    51755262
     
    53755462/** Formats and prints an array of detProcessedImfileRow objects
    53765463 *
    5377  * @return A boolean - false on error
     5464 * When mdconfigformat is set the formated output is in psMetadataConfig
     5465 * format, otherwise it is in a simple tabular format.
     5466 *
     5467 * @return true on success
    53785468 */
    53795469
     
    55795669/** Formats and prints an array of detStackedImfileRow objects
    55805670 *
    5581  * @return A boolean - false on error
     5671 * When mdconfigformat is set the formated output is in psMetadataConfig
     5672 * format, otherwise it is in a simple tabular format.
     5673 *
     5674 * @return true on success
    55825675 */
    55835676
     
    57835876/** Formats and prints an array of detNormalizedImfileRow objects
    57845877 *
    5785  * @return A boolean - false on error
     5878 * When mdconfigformat is set the formated output is in psMetadataConfig
     5879 * format, otherwise it is in a simple tabular format.
     5880 *
     5881 * @return true on success
    57865882 */
    57875883
     
    59796075/** Formats and prints an array of detMasterFrameRow objects
    59806076 *
    5981  * @return A boolean - false on error
     6077 * When mdconfigformat is set the formated output is in psMetadataConfig
     6078 * format, otherwise it is in a simple tabular format.
     6079 *
     6080 * @return true on success
    59826081 */
    59836082
     
    61796278/** Formats and prints an array of detMasterImfileRow objects
    61806279 *
    6181  * @return A boolean - false on error
     6280 * When mdconfigformat is set the formated output is in psMetadataConfig
     6281 * format, otherwise it is in a simple tabular format.
     6282 *
     6283 * @return true on success
    61826284 */
    61836285
     
    63956497/** Formats and prints an array of detResidImfileAnalysisRow objects
    63966498 *
    6397  * @return A boolean - false on error
     6499 * When mdconfigformat is set the formated output is in psMetadataConfig
     6500 * format, otherwise it is in a simple tabular format.
     6501 *
     6502 * @return true on success
    63986503 */
    63996504
     
    65996704/** Formats and prints an array of detResidExpAnalysisRow objects
    66006705 *
    6601  * @return A boolean - false on error
     6706 * When mdconfigformat is set the formated output is in psMetadataConfig
     6707 * format, otherwise it is in a simple tabular format.
     6708 *
     6709 * @return true on success
    66026710 */
    66036711
Note: See TracChangeset for help on using the changeset viewer.