Pluto v6.3.0
Loading...
Searching...
No Matches
PCommandList.h
Go to the documentation of this file.
1// Author: I. Froehlich
2// Written: 6.10.2009
3
4
5#ifndef _PCOMMANDLIST_H_
6#define _PCOMMANDLIST_H_
7
8#include "TObjString.h"
9
10
11class PCommandList : public TObjString {
12
13 private:
14
15 TObjString fCmd; //command
16
17 TObjString fNext; //Next command
18 PCommandList *fNextP;
19 Int_t fLevel;
20
21 TObjString fTool; //command
22
23 public:
24
25 //constructor
27 PCommandList(TString name);
28 PCommandList(TString name, TString cmd);
29 PCommandList(TObject *obj, TString name, TString cmd);
31
32 const char *GetCmd() const {
33 return fCmd.GetString().Data();
34 };
35
36 Bool_t AddCommand(const char *cmd, const char *basename = NULL, int level = 0);
37 Bool_t AddCommand(TObject *obj, const char *cmd, const char *basename = NULL, int level = 0);
38 Bool_t GetCommand(char **cmd, int level = 0, TObject **obj = NULL);
39
40 using TObject::Write;
41 Int_t Write(const char *name, Int_t option, Int_t bufsize) const;
42 void Print(const Option_t *delme = NULL) const;
43
44 ClassDef(PCommandList, 1) //Tool class to make lists of commands
45};
46
47#endif
PCommandList(TObject *obj, TString name, TString cmd)
PCommandList(TString name, TString cmd)
Bool_t GetCommand(char **cmd, int level=0, TObject **obj=NULL)
void Print(const Option_t *delme=NULL) const
const char * GetCmd() const
PCommandList(TString name)
Int_t Write(const char *name, Int_t option, Int_t bufsize) const
Bool_t AddCommand(const char *cmd, const char *basename=NULL, int level=0)
Bool_t AddCommand(TObject *obj, const char *cmd, const char *basename=NULL, int level=0)