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