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

Last change on this file since 8529 was 8384, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 2.4 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 fName; // A workaround!
24
25 TString Compile(TString str, const char *post) const;
26
27public:
28 MEnv(const char *name="");
29
30 Bool_t IsValid() const { return !fName.IsNull(); }
31
32 TObject *Clone(const char *newname="") const;
33
34 Bool_t Touch(const char *name) { return !TString(GetValue(name, "")).IsNull(); }
35
36 Int_t GetValue(const char *name, Int_t dflt);
37 Double_t GetValue(const char *name, Double_t dflt);
38 const char *GetValue(const char *name, const char *dflt);
39
40 const char *GetName() const { return fName; }
41
42 Int_t GetColor(const char *name, Int_t dftl);
43 Int_t GetAlign(const char *name, Int_t dftl);
44 Int_t GetFillStyle(const char *name, Int_t dftl);
45 Int_t GetLineStyle(const char *name, Int_t dftl);
46
47 void GetAttributes(const char *name, TObject *obj, TObject *dftl=0);
48 void GetAttLine(const char *name, TAttLine &line, TAttLine *dftl=0);
49 void GetAttText(const char *name, TAttText &text, TAttText *dftl=0);
50 void GetAttFill(const char *name, TAttFill &fill, TAttFill *dftl=0);
51 void GetAttMarker(const char *name, TAttMarker &marker, TAttMarker *dftl=0);
52 void GetAttPave(const char *name, TPave &pave, TPave *dftl=0);
53
54 void SetColor(const char *name, Int_t col);
55 void SetAlign(const char *name, Int_t align);
56 void SetFillStyle(const char *name, Int_t style);
57 void SetLineStyle(const char *name, Int_t style);
58 void SetMarkerStyle(const char *name, Int_t style);
59
60 void SetAttributes(const char *name, const TObject *obj);
61 void SetAttLine(const char *name, const TAttLine &line);
62 void SetAttText(const char *name, const TAttText &text);
63 void SetAttFill(const char *name, const TAttFill &fill);
64 void SetAttMarker(const char *name, const TAttMarker &marker);
65 void SetAttPave(const char *name, const TPave &pave);
66
67 void AddEnv(const TEnv &env, Bool_t overwrite=kTRUE);
68
69 void PrintUntouched() const;
70 Int_t GetNumUntouched() const;
71
72 ClassDef(MEnv, 0) // A slightly more advanced version of TEnv
73};
74
75#endif
76
Note: See TracBrowser for help on using the repository browser.