| 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 |    This module contains various tools for Sophya.
 | 
|---|
| 18 | */
 | 
|---|
| 19 | 
 | 
|---|
| 20 | int NToolsInitiator::FgInit = 0;
 | 
|---|
| 21 | 
 | 
|---|
| 22 | /*!
 | 
|---|
| 23 |   \class SOPHYA::NToolsInitiator
 | 
|---|
| 24 |   \ingroup NTools
 | 
|---|
| 25 |   Tools initiator
 | 
|---|
| 26 | */
 | 
|---|
| 27 | NToolsInitiator::NToolsInitiator()
 | 
|---|
| 28 |   : TArrayInitiator()
 | 
|---|
| 29 | {
 | 
|---|
| 30 |   FgInit++;
 | 
|---|
| 31 |   if (FgInit > 1)  return;
 | 
|---|
| 32 | 
 | 
|---|
| 33 | //   Enregistrement des classes PPersist du modules NTools
 | 
|---|
| 34 | 
 | 
|---|
| 35 |   //  Objets Poly et Poly2  (pas encore a la norme Sophya::PPersist)
 | 
|---|
| 36 |   PPRegister(ObjFileIO<Poly>);
 | 
|---|
| 37 |   PPRegister(ObjFileIO<Poly2>);
 | 
|---|
| 38 | 
 | 
|---|
| 39 |   // Classe GeneralFitData et son PPersist handler
 | 
|---|
| 40 |   PPRegister(ObjFileIO<GeneralFitData>);
 | 
|---|
| 41 |   DObjRegister(ObjFileIO<GeneralFitData>, GeneralFitData);
 | 
|---|
| 42 | 
 | 
|---|
| 43 |   // Classes Image<T> et leurs  PPersist handler
 | 
|---|
| 44 |   PPRegister(FIO_Image<uint_2>);
 | 
|---|
| 45 |   DObjRegister(FIO_Image<uint_2>, Image<uint_2>);
 | 
|---|
| 46 |   PPRegister(FIO_Image<int_4>);
 | 
|---|
| 47 |   DObjRegister(FIO_Image<int_4>, Image<int_4>);
 | 
|---|
| 48 |   PPRegister(FIO_Image<int_8>);
 | 
|---|
| 49 |   DObjRegister(FIO_Image<int_8>, Image<int_8>);
 | 
|---|
| 50 |   PPRegister(FIO_Image<r_4>);
 | 
|---|
| 51 |   DObjRegister(FIO_Image<r_4>, Image<r_4>);
 | 
|---|
| 52 |   PPRegister(FIO_Image<r_8>);
 | 
|---|
| 53 |   DObjRegister(FIO_Image<r_8>, Image<r_8>);
 | 
|---|
| 54 | 
 | 
|---|
| 55 | 
 | 
|---|
| 56 | //  TSidSetupLaSilla();    Old-Eros
 | 
|---|
| 57 | 
 | 
|---|
| 58 |   gTimeZone = new TimeZone;
 | 
|---|
| 59 | 
 | 
|---|
| 60 |   ptabFExp = new TabFExp;
 | 
|---|
| 61 | 
 | 
|---|
| 62 | }
 | 
|---|
| 63 | 
 | 
|---|
| 64 | NToolsInitiator::~NToolsInitiator()
 | 
|---|
| 65 | {
 | 
|---|
| 66 |   FgInit--;
 | 
|---|
| 67 | }
 | 
|---|
| 68 | 
 | 
|---|
| 69 | 
 | 
|---|
| 70 | // On met un objet initiator en statique, pour les loaders qui savent 
 | 
|---|
| 71 | // appeler le constructeur des objets statiques   Reza 08/98
 | 
|---|
| 72 | #ifndef Darwin
 | 
|---|
| 73 | static NToolsInitiator ntoolsinit;
 | 
|---|
| 74 | #endif
 | 
|---|
| 75 | 
 | 
|---|