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