IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 22, 2011, 4:11:23 PM (15 years ago)
Author:
rhenders
Message:

Using new Fits class and Config class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/src/Config.h

    r30147 r31011  
    1 /** @file ippToPspsConfig.h
     1/** @file Config.h
    22 *
    33 *  @brief ippToPsps
     
    99 */
    1010
    11 #ifndef IPPTOPSPSCONFIG_H
    12 #define IPPTOPSPSCONFIG_H
     11#ifndef IPPTOPSPS_CONFIG_H
     12#define IPPTOPSPS_CONFIG_H
    1313
    1414#include <psmodules.h>
    1515
    1616// column class
    17 typedef struct {
     17typedef struct Column {
    1818
    1919    int ippColNum;
     
    2727    char comment[300];
    2828
    29 } IppToPspsConfig_Column;
     29} Column;
    3030
    3131// table class
    32 typedef struct {
     32typedef struct Table {
    3333
    3434    char name[32];
    35     IppToPspsConfig_Column* columns;
     35    Column* columns;
    3636    int numOfColumns;
    3737
    38 } IppToPspsConfig_Table;
     38} Table;
    3939
    40 // 
    41 typedef struct {
     40/**
    4241
     42  Class encapsulating ... TODO
     43
     44*/
     45typedef struct Config {
     46
     47    // fields
    4348    psString configsPath;
    44     IppToPspsConfig_Table* tables;
     49    Table* tables;
    4550    int numOfTables;
    4651
    47 } IppToPspsConfig;
     52    // methods
     53    bool (*getFilterId)();
     54    bool (*getSurveyId)();
     55    bool (*createAndPopulateTable)();
     56    bool (*populateFromFile)();
    4857
    49 IppToPspsConfig* ippToPspsConfig_Constructor(const char* filePath);
    50 bool ippToPspsConfig_populateFromFile(IppToPspsConfig* this, fitsfile *fitsOut); // TODO remove
    51 void ippToPspsConfig_Destructor();
    52 bool ippToPspsConfig_writeTable(
    53         IppToPspsConfig* this,
    54         fitsfile* fitsIn,
    55         fitsfile* fitsOut,
    56         const long nRows,
    57         const char* tableName,
    58         const bool fromHeader);
     58    // destructor
     59    void (*destroy)();
    5960
    60 // getters
    61 bool ippToPspsConfig_getFilterId(IppToPspsConfig* this, const char* filterType, int8_t* filterId);
    62 bool ippToPspsConfig_getSurveyId(IppToPspsConfig* this, const char* surveyType, int8_t* surveyId);
    63 bool ippToPspsConfig_getFitsColumnMeta(
    64         char* name,
    65         int* colNum,
    66         int* type,
    67         long* repeat,
    68         fitsfile *fitsIn);
     61} Config;
    6962
    70 bool ippToPspsConfig_getColumnVector(
    71         int col,
    72         long row,
    73         int type,
    74         int repeat,
    75         float* vector,
    76         fitsfile *fitsIn);
     63// constructor
     64Config* new_Config(const char* path);
    7765
     66#endif // IPPTOPSPS_CONFIG_H
    7867
    79 
    80 
    81 #endif // IPPTOPSPSCONFIG_H
    82 
Note: See TracChangeset for help on using the changeset viewer.