ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TSystemDirectory.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Christian Bormann 13/10/97
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 #ifndef ROOT_TSystemDirectory
12 #define ROOT_TSystemDirectory
13 
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TSystemDirectory //
18 // //
19 // Describes an Operating System directory for the browser. //
20 // //
21 // Author: Christian Bormann 30/09/97 //
22 // http://www.ikf.physik.uni-frankfurt.de/~bormann/ //
23 // //
24 //////////////////////////////////////////////////////////////////////////
25 
26 #ifndef ROOT_TSystemFile
27 #include "TSystemFile.h"
28 #endif
29 
30 class TOrdCollection;
31 class TList;
32 
33 
34 class TSystemDirectory : public TSystemFile {
35 
36 protected:
39 
40  Bool_t IsItDirectory(const char *name) const;
41  TSystemDirectory *FindDirObj(const char *name);
42  TSystemFile *FindFileObj(const char *name, const char *dir);
43 
46 
47 public:
49  TSystemDirectory(const char *dirname, const char *path);
50 
51  virtual ~TSystemDirectory();
52 
53  virtual Bool_t IsFolder() const { return kTRUE; }
54  virtual Bool_t IsDirectory(const char * = 0) const { return kTRUE; }
55 
56  virtual void Browse(TBrowser *b);
57  virtual void Edit() { }
58  virtual TList *GetListOfFiles() const;
59  virtual void SetDirectory(const char *name);
60  virtual void Delete() {}
61  virtual void Copy(const char *) {}
62  virtual void Move(const char *) {}
63 
64  // dummy methods from TObject
65  void DrawClass() const { }
66  TObject *DrawClone(Option_t *) const { return 0; }
67  void SetDrawOption(Option_t *) { }
68  void SetName(const char *name) { TSystemFile::SetName(name); }
69  void SetTitle(const char *title) { TSystemFile::SetTitle(title); }
70  void Delete(Option_t *) { }
71  void Copy(TObject & ) const { }
72  ClassDef(TSystemDirectory,0) //A system directory
73 };
74 
75 #endif
76 
virtual void Move(const char *)
move this file
const char Option_t
Definition: RtypesCore.h:62
TSystemDirectory()
Create a system directory object.
virtual void SetDirectory(const char *name)
Create a system directory object.
Bool_t IsItDirectory(const char *name) const
Check if name is a directory.
void SetName(const char *name)
Change (i.e.
bool Bool_t
Definition: RtypesCore.h:59
TObject * DrawClone(Option_t *) const
Draw a clone of this object in the current pad.
#define ClassDef(name, id)
Definition: Rtypes.h:254
void SetName(const char *name)
Change (i.e.
Definition: TSystemFile.h:57
Describes an Operating System directory for the browser.
A doubly linked list.
Definition: TList.h:47
TSystemDirectory & operator=(const TSystemDirectory &)
Assignment operator.
void SetDrawOption(Option_t *)
Set drawing option for object.
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
void SetTitle(const char *title)
Change (i.e. set) the title of the TNamed.
virtual void Copy(const char *)
copy this file
TSystemFile * FindFileObj(const char *name, const char *dir)
Method that returns system file object if it exists in list, 0 otherwise.
virtual void Browse(TBrowser *b)
Browse OS system directories.
virtual void Edit()
Invoke text editor on this file.
virtual Bool_t IsDirectory(const char *=0) const
Check if object is a directory.
virtual void Delete()
delete this file
TOrdCollection * fDirsInBrowser
virtual ~TSystemDirectory()
Delete system directory object.
void dir(char *path=0)
Definition: rootalias.C:30
TOrdCollection * fFilesInBrowser
#define name(a, b)
Definition: linkTestLib0.cpp:5
Mother of all ROOT objects.
Definition: TObject.h:58
void SetTitle(const char *title)
Change (i.e. set) the title of the TNamed.
Definition: TSystemFile.h:58
void Copy(TObject &) const
Copy this to obj.
A TSystemFile describes an operating system file.
Definition: TSystemFile.h:31
TSystemDirectory * FindDirObj(const char *name)
Method that returns system directory object if it exists in list, 0 otherwise.
const Bool_t kTRUE
Definition: Rtypes.h:91
Ordered collection.
virtual TList * GetListOfFiles() const
Returns a TList of TSystemFile objects representing the contents of the directory.
void DrawClass() const
Draw class inheritance tree of the class to which this object belongs.
void Delete(Option_t *)
Delete this object.
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...