Last change
on this file since 261 was 255, checked in by ansari, 26 years ago |
code classe PeidaInitiator Reza 23/04/99
|
File size:
1.5 KB
|
Rev | Line | |
---|
[255] | 1 | #include "machdefs.h"
|
---|
| 2 | #include <stdlib.h>
|
---|
| 3 | #include <stdio.h>
|
---|
| 4 | #include "pexceptions.h"
|
---|
| 5 | #include "peidainit.h"
|
---|
| 6 | // --- Classe d'initialisation de PEIDA++, (PPersistMgr en particulier)
|
---|
| 7 | int PeidaInitiator::FgInit = 0;
|
---|
| 8 |
|
---|
| 9 | PeidaInitiator::PeidaInitiator()
|
---|
| 10 | {
|
---|
| 11 | FgInit++;
|
---|
| 12 | if (FgInit > 1) return;
|
---|
| 13 |
|
---|
| 14 | InitFailNewHandler();
|
---|
| 15 |
|
---|
| 16 | #ifdef xx__mac__
|
---|
| 17 | //InitToolBox();
|
---|
| 18 | //SIOUXSettings.initializeTB = FALSE;
|
---|
| 19 | SIOUXSettings.autocloseonquit = FALSE;
|
---|
| 20 | SIOUXSettings.asktosaveonclose = FALSE;
|
---|
| 21 | SIOUXSettings.showstatusline = TRUE;
|
---|
| 22 | #endif
|
---|
| 23 |
|
---|
| 24 | //DEL PPersistMgr::classList = new PPersistMgr::ClassList;
|
---|
| 25 | //DEL PShPersist::objList = new PShPersist::ObjList;
|
---|
| 26 |
|
---|
| 27 |
|
---|
| 28 | #if (!defined(__GNUG__) && !defined(__MWERKS__) && !defined(HPUX))
|
---|
| 29 | // pas de bufferisation pour printf cmv 18/3/97 selon E.A.
|
---|
| 30 | // setvbuf(stdout,NULL,_IOLBF,0); setvbuf(stderr,NULL,_IOLBF,0);
|
---|
| 31 | setlinebuf(stdout);
|
---|
| 32 | setlinebuf(stderr);
|
---|
| 33 | #endif
|
---|
| 34 |
|
---|
| 35 | // si var env PEIDA_NOPRTVER definie pas de print
|
---|
| 36 | if(!getenv("PEIDA_NOPRTVER")) PrintPeidaVersion();
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | PeidaInitiator::~PeidaInitiator()
|
---|
| 40 | {
|
---|
| 41 | FgInit--;
|
---|
| 42 | /*
|
---|
| 43 | if (FgInit == 0)
|
---|
| 44 | {
|
---|
| 45 | delete PPersistMgr::classList; PPersistMgr::classList = NULL;
|
---|
| 46 | delete PShPersist::objList; PShPersist::objList = NULL;
|
---|
| 47 | }
|
---|
| 48 | */
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | double PeidaInitiator::Version(bool fgprt)
|
---|
| 52 | {
|
---|
| 53 | if (fgprt) PrintPeidaVersion();
|
---|
| 54 | return(PeidaVersion());
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 | // On met un objet initiator en statique, pour les loaders qui savent
|
---|
| 58 | // appeler le constructeur des objets statiques Reza 08/98
|
---|
| 59 | static PeidaInitiator ppeidainit;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.