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

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

Destructeur virtuel - Reza 23/6/99

File size: 3.3 KB
RevLine 
[165]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
[293]9#include "machdefs.h"
[165]10#include <string>
[295]11#include <list>
12#include <map>
13#if defined(__KCC__)
14using std::string ;
15#include <list.h>
16#include <map.h>
17#endif
[165]18
[171]19#include "pdlmgr.h"
[165]20#include "dlftypes.h"
[295]21#include "nomgadapter.h"
[165]22
23class NTuple;
24class Histo;
25class Histo2D;
26class HProf;
27class PIStdImgApp;
28
29class Services2NObjMgr {
30public:
31 Services2NObjMgr(PIStdImgApp* app, string& tmpdir);
[327]32 virtual ~Services2NObjMgr();
[165]33
[295]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
[165]39 inline void SetImgApp(PIStdImgApp* app) {mImgapp = app; }
40
[295]41 void Nobj_ComputeExpressions(NObjMgrAdapter* obja, string& expx, string& expy, string& expz,
[165]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);
[326]47 DlFunction LinkFunctionFromFile(string const & fname, string const & funcname);
[165]48 void CloseDLL();
49
[326]50// Trace de fonctions 1-D , 2-D
51 virtual void PlotFunc(string const & expfunc, float xmin, float xmax, int np=100, string dopt="");
52 virtual void PlotFunc2D(string const & expfunc, float xmin, float xmax, float ymin, float ymax,
53 int npx=50, int npy=50, string dopt="");
54 virtual void PlotFuncFrCFile(string const & fname, string const & func, float xmin, float xmax,
55 int np=100, string dopt="");
56 virtual void PlotFunc2DFrCFile(string const & fname, string const & func, float xmin, float xmax,
57 float ymin, float ymax, int npx=50, int npy=50, string dopt="");
58 virtual void PlotFunc(DlFunctionOfX f, float xmin, float xmax, int np=100, string dopt="");
59 virtual void PlotFunc2D(DlFunctionOfXY f, float xmin, float xmax, float ymin, float ymax,
60 int npx=50, int npy=50, string dopt="");
61
62// Utilitaires divers
[165]63 string FileName2Name(string const & fn);
64 int DecodeDispOption(string& dopt, bool& fgsrgr);
65
[295]66protected:
[165]67 void InitGrAttNames();
68
[295]69// Pour enregister les objets et leurs adaptateurs pour NamedObjMgr
70 struct dataobj_adapter {
71 AnyDataObj* obj; NObjMgrAdapter* obja;
72 };
73 typedef list<dataobj_adapter> ObjAdaptList;
74 ObjAdaptList objadaplist;
75
[165]76// Variables membre , en public pour le moment
77 struct gratt_item {
78 int a1, a2;
79 };
80 typedef map<string, gratt_item, less<string> > GrAttNames;
[295]81
[165]82// Pour les changements d'attributs graphiques / de visualisation
83 GrAttNames GrAcolors;
84 GrAttNames GrAlines;
85 GrAttNames GrAmarkers;
86 GrAttNames GrAfonts;
87 GrAttNames GrAcmap;
88 GrAttNames GrAzoom;
[203]89 GrAttNames GrAaxes;
[165]90
[171]91 PDynLinkMgr * dynlink; // shared-lib lib.so
92 string TmpDir; // Pour fichiers temporaires
[165]93
94 PIStdImgApp* mImgapp;
95
96};
97
98
99#endif
Note: See TracBrowser for help on using the repository browser.