source: Sophya/trunk/SophyaExt/FitsIOServer/fitsmanager.h@ 3477

Last change on this file since 3477 was 2898, checked in by ansari, 20 years ago

Ajout methode FitsManager::ScanFile() et corrections diverses - Reza 13/01/2006

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#ifndef FITSMANAGER_H
2#define FITSMANAGER_H
3
4#include "machdefs.h"
5#include <string>
6#include <iostream>
7#include "fitsinoutfile.h"
8
9namespace SOPHYA {
10
11class FitsHandlerInterface;
12
13/*!
14 \ingroup FitsIOServer
15 \brief Top level FITS I/O operations and handler management.
16*/
17class FitsManager {
18 public:
19 //! Called once for each handler during init phase.
20 static int RegisterHandler(FitsHandlerInterface * fhi, int glev=0, string desc="");
21 //! Print list of handlers on cout
22 static int ListHandlers();
23 //! Finds the appropriate handler and writes the object \b o to fits file \b os
24 static void Write(FitsInOutFile& os, AnyDataObj & o);
25 //! Finds the appropriate handler and reads the object \b o from fits file \b is
26 static void Read(FitsInOutFile& is, AnyDataObj & o);
27 //! Finds the appropriate reader for the current HDU and reads the data form \b is
28 static FitsHandlerInterface * Read(FitsInOutFile& is);
29 //! Scans the fits file and prints information about each HDU on formatted stream \b os
30 static int ScanFile(string filename, ostream& os, int slev=0);
31 //! Scans the fits file and prints information about each HDU on \b cout
32 static inline int ScanFile(string filename, int slev=0)
33 { return ScanFile(filename, cout, slev); }
34
35 protected:
36 //! Finds the appropriate handler for the object \b o in the list of registered handlers.
37 static FitsHandlerInterface* FindHandler(AnyDataObj & o);
38 //! Finds the appropriate reader for the current HDU in the list of registered handlers.
39 static FitsHandlerInterface* FindReader(FitsInOutFile& is);
40};
41
42} // Fin du namespace
43
44#endif
45
Note: See TracBrowser for help on using the repository browser.