source: JEM-EUSO/esaf_cc_at_lal/packages/common/base/include/EsafConfigurable.hh @ 114

Last change on this file since 114 was 114, checked in by moretto, 11 years ago

actual version of ESAF at CCin2p3

File size: 1.6 KB
Line 
1// ESAF : Euso Simulation and Analysis Framework
2// $Id: EsafConfigurable.hh 2804 2008-10-09 12:10:06Z biktem $
3// D. De Marco, M. Pallavicini created Jan, 18 2002
4// class description:
5// base class for all objects that need to access to Config parameters
6//
7
8#ifndef __EUSOCONFIGURABLE_HH_
9#define __EUSOCONFIGURABLE_HH_
10
11#include "euso.hh"
12#include "RConfig.h"
13#include "BaseDialogFactory.hh"
14#include "ConfigFileParser.hh"
15
16class TGTransientFrame;   // root class for Dialog window
17class SimuApplication;
18class TGMainFrame;
19class TGWindow;
20
21// macro used by all children of this class
22// defines a ClassType and a ClassName through ROOT TObject
23#define EsafConfigClass(type,name) \
24public: \
25  virtual const char* ClassType() const {return _QUOTE_(type);} \
26  virtual const char* ClassName() const {return _QUOTE_(name);}
27
28// each sub-class should add the previous macro providing a class type
29// and a class name
30class EsafConfigurable {
31public:
32    EsafConfigurable(const char* ClassName=0, const char* parent=0 );
33
34    virtual ~EsafConfigurable();
35
36    static void SelectFactory( BaseDialogFactory* f ) { gFactory=f;}
37
38    virtual const char* ClassType() const = 0;
39    virtual const char* ClassName() const = 0;
40
41    virtual ConfigFileParser* Conf(const char* name=0) const;
42   // virtual ConfigFileParser* Conf(const char* type,const char* name) const;
43
44    virtual TGTransientFrame *GetDialog( SimuApplication* pApp, TGWindow* pWin,
45                    TGMainFrame* pMain) const;
46private:
47    static BaseDialogFactory *gFactory;
48    ClassDef(EsafConfigurable,0)
49};
50
51#endif  /* __EUSOCONFIGURABLE_HH_ */
52
Note: See TracBrowser for help on using the repository browser.