/** @file ippToPspsConfig.h
 *
 *  @brief ippToPsps
 *
 *  @ingroup ippToPsps
 *
 *  @author IfA
 *  Copyright 2009 Institute for Astronomy, University of Hawaii
 */

#ifndef IPPTOPSPSCONFIG_H
#define IPPTOPSPSCONFIG_H

#include <psmodules.h>

// column class
typedef struct {

    int ippColNum;
    char ippName[100];
    int ippType;
    char pspsName[100]; // TODO change to 'name'
    int pspsType;
    bool usingDefault;
    char defaultValue[100];
    char comment[300];

} IppToPspsConfig_Column;

// table class
typedef struct {

    char name[32];
    IppToPspsConfig_Column* columns;
    int numOfColumns;

} IppToPspsConfig_Table;

//  
typedef struct {

    psString configsPath;
    IppToPspsConfig_Table* tables;
    int numOfTables;

} IppToPspsConfig; 

IppToPspsConfig* ippToPspsConfig_Constructor(const char* filePath);
bool ippToPspsConfig_populateFromFile(IppToPspsConfig* this, fitsfile *fitsOut); // TODO remove
void ippToPspsConfig_Destructor();
bool ippToPspsConfig_writeTable(
        IppToPspsConfig* this,
        fitsfile* fitsIn,
        fitsfile* fitsOut,
        const long nRows,
        const char* tableName, 
        const bool fromHeader);

// getters
bool ippToPspsConfig_getFilterId(IppToPspsConfig* this, const char* filterType, int8_t* filterId);

#endif // IPPTOPSPSCONFIG_H

