1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
2 | // Adaptateur pour objets gere par NamedObjMgr (piapp)
|
---|
3 | // Reza 05/99
|
---|
4 | // LAL-IN2P3/CNRS CEA-DAPNIA
|
---|
5 |
|
---|
6 | #ifndef NOMGADAPTER_H_SEEN
|
---|
7 | #define NOMGADAPTER_H_SEEN
|
---|
8 |
|
---|
9 | #include "machdefs.h"
|
---|
10 | #include "ppersist.h"
|
---|
11 | #include "anydataobj.h"
|
---|
12 | #include "pidrawer.h"
|
---|
13 | #include "parradapter.h"
|
---|
14 | #include "ntupintf.h"
|
---|
15 |
|
---|
16 |
|
---|
17 | // Classe d'adaptateur d'objets de donnees pour la gestion d'objets
|
---|
18 | // nommes (NamedObjMgr) de piapp
|
---|
19 |
|
---|
20 | class NObjMgrAdapter {
|
---|
21 | public:
|
---|
22 | NObjMgrAdapter(AnyDataObj* o);
|
---|
23 | virtual ~NObjMgrAdapter();
|
---|
24 |
|
---|
25 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
26 |
|
---|
27 | // Returns the actual data-object
|
---|
28 | virtual AnyDataObj* GetDataObj();
|
---|
29 |
|
---|
30 | // Returns the actual data-object type (class name)
|
---|
31 | virtual string GetDataObjType();
|
---|
32 |
|
---|
33 | // Returns a new data-object, cloning the original object
|
---|
34 | virtual AnyDataObj* CloneDataObj();
|
---|
35 |
|
---|
36 | // Copies data from object o
|
---|
37 | virtual void CopyFrom(AnyDataObj* o);
|
---|
38 |
|
---|
39 | // Returns a string representation of the object
|
---|
40 | virtual string ToString();
|
---|
41 | // Fills the object from a string
|
---|
42 | virtual void FillFromString();
|
---|
43 |
|
---|
44 | virtual void ReadFits(string const & flnm);
|
---|
45 | virtual void SaveFits(string const & flnm);
|
---|
46 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
47 |
|
---|
48 | virtual void Print(ostream& os);
|
---|
49 | virtual PIDrawer* GetDrawer(string& dopt);
|
---|
50 | virtual P2DArrayAdapter* Get2DArray(string& dopt);
|
---|
51 |
|
---|
52 | // NTupleInterface* nti = GetNTupleInterface(adel)
|
---|
53 | // Retourne un objet de type NTupleInterface (nti), ainsi que adel
|
---|
54 | // si adel == true, le programme appelant doit faire delete de nti
|
---|
55 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
56 | protected:
|
---|
57 | AnyDataObj* mObj;
|
---|
58 | };
|
---|
59 |
|
---|
60 | #endif
|
---|