Changeset 31011 for trunk/ippToPsps/src/Config.h
- Timestamp:
- Mar 22, 2011, 4:11:23 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/Config.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/Config.h
r30147 r31011 1 /** @file ippToPspsConfig.h1 /** @file Config.h 2 2 * 3 3 * @brief ippToPsps … … 9 9 */ 10 10 11 #ifndef IPPTOPSPS CONFIG_H12 #define IPPTOPSPS CONFIG_H11 #ifndef IPPTOPSPS_CONFIG_H 12 #define IPPTOPSPS_CONFIG_H 13 13 14 14 #include <psmodules.h> 15 15 16 16 // column class 17 typedef struct {17 typedef struct Column { 18 18 19 19 int ippColNum; … … 27 27 char comment[300]; 28 28 29 } IppToPspsConfig_Column;29 } Column; 30 30 31 31 // table class 32 typedef struct {32 typedef struct Table { 33 33 34 34 char name[32]; 35 IppToPspsConfig_Column* columns;35 Column* columns; 36 36 int numOfColumns; 37 37 38 } IppToPspsConfig_Table;38 } Table; 39 39 40 // 41 typedef struct { 40 /** 42 41 42 Class encapsulating ... TODO 43 44 */ 45 typedef struct Config { 46 47 // fields 43 48 psString configsPath; 44 IppToPspsConfig_Table* tables;49 Table* tables; 45 50 int numOfTables; 46 51 47 } IppToPspsConfig; 52 // methods 53 bool (*getFilterId)(); 54 bool (*getSurveyId)(); 55 bool (*createAndPopulateTable)(); 56 bool (*populateFromFile)(); 48 57 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)(); 59 60 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; 69 62 70 bool ippToPspsConfig_getColumnVector( 71 int col, 72 long row, 73 int type, 74 int repeat, 75 float* vector, 76 fitsfile *fitsIn); 63 // constructor 64 Config* new_Config(const char* path); 77 65 66 #endif // IPPTOPSPS_CONFIG_H 78 67 79 80 81 #endif // IPPTOPSPSCONFIG_H82
Note:
See TracChangeset
for help on using the changeset viewer.
