Changeset 2932 in Sophya
- Timestamp:
- Apr 3, 2006, 12:13:59 PM (19 years ago)
- Location:
- trunk/SophyaExt/FitsIOServer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fiosinit.cc
r2928 r2932 32 32 // Enregistrement des classes FitsHandler 33 33 //DBG cout << " ---- FitsIOServerInitiator / DEBUG ---- debut RegisterHandler " << endl; 34 FitsManager::RegisterHandler(new FitsArrayHandler<int_2> , "TArray<int_2>");34 FitsManager::RegisterHandler(new FitsArrayHandler<int_2> , 1, "TArray<int_2>"); 35 35 FitsManager::RegisterHandler(new FitsArrayHandler<int_4> , 1, "TArray<int_4> "); 36 36 FitsManager::RegisterHandler(new FitsArrayHandler<r_4> , 1, "TArray<r_4>"); -
trunk/SophyaExt/FitsIOServer/fitshandler.h
r2864 r2932 20 20 //! Return the real data object 21 21 virtual AnyDataObj* DataObj() = 0; // Retourne l'objet reel 22 //! Return a positive value if I/O for object \b o can be handled 22 23 /*! 24 \brief Return a positive value if I/O for object \b o can be handled 25 26 - Rc= 0 -> Can NOT handle fits I/O operations for the object \b o 27 - Rc= 1 -> Can handle fits I/O operations for the object \b o 28 - Rc= 2 -> This is a specific handler for object \b o 29 - Rc > 2 -> Higher Rc values can be returned if needed 30 (for subclasses with specific handlers) 31 32 */ 23 33 virtual int CheckHandling(AnyDataObj & o) = 0; 24 34 //! Read/write operation will use the object o 25 35 virtual void SetDataObj(AnyDataObj & o) = 0; 26 36 27 //! Return a positive value if current HDU can be read by the handler 37 //! 38 /*! 39 \brief Return a positive value if current HDU can be read by the handler 40 41 - Rc= 0 -> Can NOT read the current HDU 42 - Rc= 1 -> Can read the current HDU (generic reader) 43 - Rc= 2 -> Can read the current HDU, as a specific reader 44 - Rc > 2 -> Higher Rc values can be returned if needed 45 (when multiple specific handlers are registered) 46 47 */ 28 48 virtual int CheckReadability(FitsInOutFile& is) = 0; 29 49 -
trunk/SophyaExt/FitsIOServer/fitsinoutfile.cc
r2864 r2932 3 3 #include "segdatablock.h" 4 4 #include "fitsinoutfile.h" 5 #include "strutil.h" 5 6 #include <stdio.h> 6 7 #include <string.h> … … 514 515 515 516 /*-- Methode --*/ 516 int FitsInOutFile::GetHeaderRecords(DVList& dvl) 517 /*! 518 Read the current fits header information as pairs of '(keyword,value)' appended 519 to the DVList object \b dvl. 520 \param dvl : DVList object containing filled with (keyword,value) pairs. 521 \param stripkw : if true (default), remove leading and trailing spaces from keyword 522 \param keepstkey : if true (default), keep keys of type TYP_STRUC_KEY 523 */ 524 int FitsInOutFile::GetHeaderRecords(DVList& dvl, bool stripkw, bool keepstkey) 517 525 { 518 526 int status = 0; … … 529 537 FitsCheckStatus(status, "FitsInOutFile::GetHeaderRecords() Error(2): "); 530 538 int kclas = fits_get_keyclass(record); 531 if ( (kclas == TYP_STRUC_KEY) || (kclas == TYP_NULL_KEY) ) continue; 539 if ( (!keepstkey && (kclas == TYP_STRUC_KEY)) 540 || (kclas == TYP_NULL_KEY) ) continue; 532 541 int len = 0; 533 542 status = 0; 534 543 fits_get_keyname(record, value, &len, &status); 535 544 if (status) continue; 545 if (stripkw) strip(value, 'B', ' '); 536 546 string keyname = value; 537 547 status = 0; … … 551 561 case 'L' : // Il faudra traiter le cas des nb complexes 552 562 case 'X' : // idem pour les valeurs logiques 553 dvl.SetS(keyname, value);563 dvl.SetS(keyname, value); 554 564 break; 555 565 case 'I' : -
trunk/SophyaExt/FitsIOServer/fitsinoutfile.h
r2864 r2932 179 179 string KeyValue(string const & key, bool& nosk); 180 180 //! Read header records and appends the information to dvl 181 int GetHeaderRecords(DVList& dvl); 181 int GetHeaderRecords(DVList& dvl, 182 bool stripkw= true, bool keepstkey=true); 182 183 //! Appends a keyword to FITS header 183 184 void WriteKey(const char * kname, MuTyV const & val, -
trunk/SophyaExt/FitsIOServer/fitsmanager.cc
r2901 r2932 25 25 } 26 26 /*! 27 Generic handlers (ImageHDU, TableHDU) will have a higher global priority level 28 than specific handlers. Use glev=0 for specific handlers and glev=1 for generic 29 handlers. 27 30 \param fhi : handler object pointer (created by new) which will be kept in the 28 31 handler list
Note:
See TracChangeset
for help on using the changeset viewer.