Ignore:
Timestamp:
Jan 13, 2006, 11:05:52 AM (20 years ago)
Author:
ansari
Message:

Mise en place de l heritage FitsIOHandler (ancien) de FitsHandlerInterface pour une gestion commune - a partir de FitsManager - Reza 13/01/2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fitslocalmap.cc

    r2874 r2897  
    6868    ownobj_ = false;
    6969  }   
     70
     71template <class T>
     72int FITS_LocalMap<T>::CheckHandling(AnyDataObj & o)
     73{
     74  if ( typeid(o) == typeid( LocalMap< T > ) ) return 2;
     75  LocalMap<T> * po = dynamic_cast< LocalMap<T> * >(&o);
     76  if (po == NULL) return 0;
     77  else return 1;
     78}
     79
     80template <class T>
     81int FITS_LocalMap<T>::CheckReadability(FitsInOutFile& is)
     82{
     83  if (is.CurrentHDUType() !=  BINARY_TBL ) return 0;
     84  string key;
     85  key = "Content";
     86  string clsnm = is.KeyValue(key);
     87  if (clsnm != "LocalMap") return 0;
     88
     89  vector<string> colnames;
     90  vector<int> coltypes;
     91  vector<long> repcnt;
     92  vector<long> width;
     93  long ncols = is.GetColInfo(colnames, coltypes, repcnt, width);
     94  if (ncols < 1) return 0;
     95  T x;
     96  if (coltypes[0] == FitsTypes::DataType(x)) return 2 ;
     97  else return 1;
     98}
     99
     100template <class T>
     101FitsHandlerInterface* FITS_LocalMap<T>::Clone()
     102{
     103  return new FITS_LocalMap<T>() ;
     104}
    70105
    71106template <class T>
     
    195230  dvl["Content"]= "LocalMap";
    196231  dvl.SetComment("Content", "name of SOPHYA object");
     232  dvl["SOPCLSNM"]= "SOPHYA::LocalMap<T>";
     233  dvl.SetComment("SOPCLSNM", "SOPHYA class name");
    197234  // On ecrit les dataBlocks
    198235  vector<string> Noms;   
    199236  Noms.push_back(dvl.GetS("Content"));
    200   string extname("SIMULATION");
     237  //  string extname("SIMULATION");
     238  string extname = os.NextExtensionName();
    201239
    202240  // sortie sur image fits
Note: See TracChangeset for help on using the changeset viewer.