| 1 | // Classe d'initialisation du module NTools | 
|---|
| 2 |  | 
|---|
| 3 | #include "sopnamsp.h" | 
|---|
| 4 | #include "machdefs.h" | 
|---|
| 5 | #include "ntoolsinit.h" | 
|---|
| 6 |  | 
|---|
| 7 | #include "poly.h" | 
|---|
| 8 | #include "generaldata.h" | 
|---|
| 9 | #include "cimage.h" | 
|---|
| 10 |  | 
|---|
| 11 | #include "tabmath.h" | 
|---|
| 12 | #include "dates.h" | 
|---|
| 13 | #include "datime.h" | 
|---|
| 14 |  | 
|---|
| 15 | /*! | 
|---|
| 16 | \defgroup NTools NTools module | 
|---|
| 17 | */ | 
|---|
| 18 |  | 
|---|
| 19 | int NToolsInitiator::FgInit = 0; | 
|---|
| 20 |  | 
|---|
| 21 | // Module version number 1.5, Jul 06 | 
|---|
| 22 | #define MOD_VERS   1.5 | 
|---|
| 23 |  | 
|---|
| 24 | /*! | 
|---|
| 25 | \class SOPHYA::NToolsInitiator | 
|---|
| 26 | \ingroup NTools | 
|---|
| 27 | \brief NTools module initializer. | 
|---|
| 28 |  | 
|---|
| 29 | This module contains various tools for Sophya, in particular numerical algorithms | 
|---|
| 30 | such as : | 
|---|
| 31 | - Non linear fitting (parameter determination) : GeneralFit , MinZSimplex | 
|---|
| 32 | - FFT (FFTServerInterface, FFTPackServer) | 
|---|
| 33 | - Spline interpolation | 
|---|
| 34 | - Numerical integration and differential equations | 
|---|
| 35 | - Date/time manipulation and some usual astronomical quantities (datime.c .h) | 
|---|
| 36 | */ | 
|---|
| 37 | NToolsInitiator::NToolsInitiator() | 
|---|
| 38 | : TArrayInitiator() | 
|---|
| 39 | { | 
|---|
| 40 | FgInit++; | 
|---|
| 41 | if (FgInit > 1)  return; | 
|---|
| 42 |  | 
|---|
| 43 | //   Enregistrement des classes PPersist du modules NTools | 
|---|
| 44 |  | 
|---|
| 45 | //  Objets Poly et Poly2  (pas encore a la norme Sophya::PPersist) | 
|---|
| 46 | PPRegister(ObjFileIO<Poly>); | 
|---|
| 47 | PPRegister(ObjFileIO<Poly2>); | 
|---|
| 48 |  | 
|---|
| 49 | // Classe GeneralFitData et son PPersist handler | 
|---|
| 50 | PPRegister(ObjFileIO<GeneralFitData>); | 
|---|
| 51 | DObjRegister(ObjFileIO<GeneralFitData>, GeneralFitData); | 
|---|
| 52 |  | 
|---|
| 53 | // Classes Image<T> et leurs  PPersist handler | 
|---|
| 54 | PPRegister(FIO_Image<uint_2>); | 
|---|
| 55 | DObjRegister(FIO_Image<uint_2>, Image<uint_2>); | 
|---|
| 56 | PPRegister(FIO_Image<int_4>); | 
|---|
| 57 | DObjRegister(FIO_Image<int_4>, Image<int_4>); | 
|---|
| 58 | PPRegister(FIO_Image<int_8>); | 
|---|
| 59 | DObjRegister(FIO_Image<int_8>, Image<int_8>); | 
|---|
| 60 | PPRegister(FIO_Image<r_4>); | 
|---|
| 61 | DObjRegister(FIO_Image<r_4>, Image<r_4>); | 
|---|
| 62 | PPRegister(FIO_Image<r_8>); | 
|---|
| 63 | DObjRegister(FIO_Image<r_8>, Image<r_8>); | 
|---|
| 64 |  | 
|---|
| 65 |  | 
|---|
| 66 | //  TSidSetupLaSilla();    Old-Eros | 
|---|
| 67 |  | 
|---|
| 68 | gTimeZone = new TimeZone; | 
|---|
| 69 |  | 
|---|
| 70 | ptabFExp = new TabFExp; | 
|---|
| 71 |  | 
|---|
| 72 | SophyaInitiator::RegisterModule("NTools", MOD_VERS);  // Module name and version number registration | 
|---|
| 73 | } | 
|---|
| 74 |  | 
|---|
| 75 | NToolsInitiator::~NToolsInitiator() | 
|---|
| 76 | { | 
|---|
| 77 | FgInit--; | 
|---|
| 78 | } | 
|---|
| 79 |  | 
|---|
| 80 |  | 
|---|
| 81 | // On met un objet initiator en statique, pour les loaders qui savent | 
|---|
| 82 | // appeler le constructeur des objets statiques   Reza 08/98 | 
|---|
| 83 | #ifndef Darwin | 
|---|
| 84 | static NToolsInitiator ntoolsinit; | 
|---|
| 85 | #endif | 
|---|
| 86 |  | 
|---|