source: trunk/MagicSoft/Mars/mbase/MEnv.h@ 8732

Last change on this file since 8732 was 8716, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 2.7 KB
Line 
1#ifndef MARS_MEnv
2#define MARS_MEnv
3
4#ifndef ROOT_TEnv
5#include <TEnv.h>
6#endif
7
8#ifndef ROOT_TOrdCollection
9#include <TOrdCollection.h>
10#endif
11
12class TAttLine;
13class TAttMarker;
14class TAttText;
15class TAttFill;
16class TPave;
17
18class MEnv : public TEnv
19{
20private:
21 TOrdCollection fChecked;
22
23 TString Compile(TString str, const char *post) const;
24 Int_t ReadInclude();
25
26public:
27 MEnv(const char *name="");
28
29 Bool_t IsValid() const { return !TString(GetRcName()).IsNull(); }
30
31 TObject *Clone(const char *newname="") const;
32
33 Bool_t Touch(const char *name) { return !TString(GetValue(name, "")).IsNull(); }
34
35 Int_t GetEntries() const;
36
37 Int_t GetValue(const char *name, Int_t dflt);
38 Double_t GetValue(const char *name, Double_t dflt);
39 const char *GetValue(const char *name, const char *dflt);
40
41 const char *GetName() const;
42
43 Int_t GetColor(const char *name, Int_t dftl);
44 Int_t GetAlign(const char *name, Int_t dftl);
45 Int_t GetFillStyle(const char *name, Int_t dftl);
46 Int_t GetLineStyle(const char *name, Int_t dftl);
47
48 void GetAttributes(const char *name, TObject *obj, TObject *dftl=0);
49 void GetAttLine(const char *name, TAttLine &line, TAttLine *dftl=0);
50 void GetAttText(const char *name, TAttText &text, TAttText *dftl=0);
51 void GetAttFill(const char *name, TAttFill &fill, TAttFill *dftl=0);
52 void GetAttMarker(const char *name, TAttMarker &marker, TAttMarker *dftl=0);
53 void GetAttPave(const char *name, TPave &pave, TPave *dftl=0);
54
55 void SetColor(const char *name, Int_t col);
56 void SetAlign(const char *name, Int_t align);
57 void SetFillStyle(const char *name, Int_t style);
58 void SetLineStyle(const char *name, Int_t style);
59 void SetMarkerStyle(const char *name, Int_t style);
60
61 void SetAttributes(const char *name, const TObject *obj);
62 void SetAttLine(const char *name, const TAttLine &line);
63 void SetAttText(const char *name, const TAttText &text);
64 void SetAttFill(const char *name, const TAttFill &fill);
65 void SetAttMarker(const char *name, const TAttMarker &marker);
66 void SetAttPave(const char *name, const TPave &pave);
67
68 void AddEnv(const TEnv &env, Bool_t overwrite=kTRUE);
69
70 Int_t ReadFile(const char *fname, EEnvLevel level);
71
72 void PrintEnv(EEnvLevel level = kEnvAll) const;
73 void Print(Option_t *option) const { TEnv::Print(option); }
74 void Print() const { PrintEnv(kEnvLocal); } //*MENU*
75
76 void PrintUntouched() const;
77 Int_t GetNumUntouched() const;
78
79 ClassDef(MEnv, 0) // A slightly more advanced version of TEnv
80};
81
82#endif
83
Note: See TracBrowser for help on using the repository browser.