source: Sophya/trunk/SophyaPI/PIext/servnobjm.h@ 321

Last change on this file since 321 was 295, checked in by ercodmgr, 26 years ago

Mise aux "normes" version DPC/Planck - Gestion des objets a travers

un adaptateur/interface NTuple par NamedObjMgr.
Enregistrement d'objets et de l'adaptateur (I/O PPersist, display, ...)
par ServNobjMgr .... Reza 13/05/99

File size: 2.3 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Classe de services destinee a NamedObjMgr pour piapp
3// Reza Aout 98
4// CEA-DAPNIA LAL-IN2P3/CNRS
5
6#ifndef SERVNOBJM_H_SEEN
7#define SERVNOBJM_H_SEEN
8
9#include "machdefs.h"
10#include <string>
11#include <list>
12#include <map>
13#if defined(__KCC__)
14using std::string ;
15#include <list.h>
16#include <map.h>
17#endif
18
19#include "pdlmgr.h"
20#include "dlftypes.h"
21#include "nomgadapter.h"
22
23class NTuple;
24class Histo;
25class Histo2D;
26class HProf;
27class PIStdImgApp;
28
29class Services2NObjMgr {
30public:
31 Services2NObjMgr(PIStdImgApp* app, string& tmpdir);
32 ~Services2NObjMgr();
33
34// Pour enregistrer les objets de donnees et leurs adaptateurs
35 void RegisterClass(AnyDataObj* o, NObjMgrAdapter* oa);
36// Pour recuperer l'adaptateur pour un objet o
37 NObjMgrAdapter* GetAdapter(AnyDataObj* o);
38
39 inline void SetImgApp(PIStdImgApp* app) {mImgapp = app; }
40
41 void Nobj_ComputeExpressions(NObjMgrAdapter* obja, string& expx, string& expy, string& expz,
42 string& expwt, string& expcut,
43 NTuple* nt=NULL, Histo* h1=NULL,
44 Histo2D* h2=NULL, HProf* hp=NULL);
45 PlotExprFunc LinkExprFunc(string& vardec, string& expx, string& expy, string& expz,
46 string& wt, string& cut);
47 DlFunction LinkFunctionFromFile(string& fnamer, char* funcname);
48 void CloseDLL();
49
50 string FileName2Name(string const & fn);
51 int DecodeDispOption(string& dopt, bool& fgsrgr);
52
53protected:
54 void InitGrAttNames();
55
56// Pour enregister les objets et leurs adaptateurs pour NamedObjMgr
57 struct dataobj_adapter {
58 AnyDataObj* obj; NObjMgrAdapter* obja;
59 };
60 typedef list<dataobj_adapter> ObjAdaptList;
61 ObjAdaptList objadaplist;
62
63// Variables membre , en public pour le moment
64 struct gratt_item {
65 int a1, a2;
66 };
67 typedef map<string, gratt_item, less<string> > GrAttNames;
68
69// Pour les changements d'attributs graphiques / de visualisation
70 GrAttNames GrAcolors;
71 GrAttNames GrAlines;
72 GrAttNames GrAmarkers;
73 GrAttNames GrAfonts;
74 GrAttNames GrAcmap;
75 GrAttNames GrAzoom;
76 GrAttNames GrAaxes;
77
78 PDynLinkMgr * dynlink; // shared-lib lib.so
79 string TmpDir; // Pour fichiers temporaires
80
81 PIStdImgApp* mImgapp;
82
83};
84
85
86#endif
Note: See TracBrowser for help on using the repository browser.