Logo ROOT  
Reference Guide
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 #include "TSystemFile.h"
27 
28 class TOrdCollection;
29 class TList;
30 
31 
32 class TSystemDirectory : public TSystemFile {
33 
34 protected:
37 
38  Bool_t IsItDirectory(const char *name) const;
39  TSystemDirectory *FindDirObj(const char *name);
40  TSystemFile *FindFileObj(const char *name, const char *dir);
41 
44 
45 public:
47  TSystemDirectory(const char *dirname, const char *path);
48 
49  virtual ~TSystemDirectory();
50 
51  virtual Bool_t IsFolder() const { return kTRUE; }
52  virtual Bool_t IsDirectory(const char * = 0) const { return kTRUE; }
53 
54  virtual void Browse(TBrowser *b);
55  virtual void Edit() { }
56  virtual TList *GetListOfFiles() const;
57  virtual void SetDirectory(const char *name);
58  virtual void Delete() {}
59  virtual void Copy(const char *) {}
60  virtual void Move(const char *) {}
61 
62  // dummy methods from TObject
63  void DrawClass() const { }
64  TObject *DrawClone(Option_t *) const { return 0; }
65  void SetDrawOption(Option_t *) { }
66  void SetName(const char *name) { TSystemFile::SetName(name); }
67  void SetTitle(const char *title) { TSystemFile::SetTitle(title); }
68  void Delete(Option_t *) { }
69  void Copy(TObject & ) const { }
70  ClassDef(TSystemDirectory,0) //A system directory
71 };
72 
73 #endif
74 
TSystemDirectory::TSystemDirectory
TSystemDirectory()
Create a system directory object.
Definition: TSystemDirectory.cxx:30
TSystemDirectory::GetListOfFiles
virtual TList * GetListOfFiles() const
Returns a TList of TSystemFile objects representing the contents of the directory.
Definition: TSystemDirectory.cxx:84
TBrowser
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TSystemDirectory::IsDirectory
virtual Bool_t IsDirectory(const char *=0) const
Check if object is a directory.
Definition: TSystemDirectory.h:52
TSystemDirectory::IsFolder
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TSystemDirectory.h:51
Option_t
const char Option_t
Definition: RtypesCore.h:66
TSystemDirectory::IsItDirectory
Bool_t IsItDirectory(const char *name) const
Check if name is a directory.
Definition: TSystemDirectory.cxx:125
TOrdCollection
Ordered collection.
Definition: TOrdCollection.h:32
TSystemDirectory
Describes an Operating System directory for the browser.
Definition: TSystemDirectory.h:32
TSystemDirectory::SetTitle
void SetTitle(const char *title)
Set the title of the TNamed.
Definition: TSystemDirectory.h:67
TSystemDirectory::FindDirObj
TSystemDirectory * FindDirObj(const char *name)
Method that returns system directory object if it exists in list, 0 otherwise.
Definition: TSystemDirectory.cxx:202
b
#define b(i)
Definition: RSha256.hxx:100
bool
TSystemDirectory::SetDrawOption
void SetDrawOption(Option_t *)
Set drawing option for object.
Definition: TSystemDirectory.h:65
TSystemDirectory::DrawClone
TObject * DrawClone(Option_t *) const
Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad...
Definition: TSystemDirectory.h:64
TSystemDirectory::fFilesInBrowser
TOrdCollection * fFilesInBrowser
Definition: TSystemDirectory.h:36
TSystemFile::SetName
void SetName(const char *name)
Set the name of the TNamed.
Definition: TSystemFile.h:55
TSystemDirectory::SetDirectory
virtual void SetDirectory(const char *name)
Create a system directory object.
Definition: TSystemDirectory.cxx:116
TSystemDirectory::~TSystemDirectory
virtual ~TSystemDirectory()
Delete system directory object.
Definition: TSystemDirectory.cxx:72
TSystemDirectory::operator=
TSystemDirectory & operator=(const TSystemDirectory &)
Assignment operator.
Definition: TSystemDirectory.cxx:59
TSystemFile
A TSystemFile describes an operating system file.
Definition: TSystemFile.h:29
TSystemDirectory::SetName
void SetName(const char *name)
Set the name of the TNamed.
Definition: TSystemDirectory.h:66
TSystemDirectory::Copy
virtual void Copy(const char *)
copy this file
Definition: TSystemDirectory.h:59
TSystemDirectory::FindFileObj
TSystemFile * FindFileObj(const char *name, const char *dir)
Method that returns system file object if it exists in list, 0 otherwise.
Definition: TSystemDirectory.cxx:217
TSystemDirectory::Copy
void Copy(TObject &) const
Copy this to obj.
Definition: TSystemDirectory.h:69
TSystemDirectory::DrawClass
void DrawClass() const
Draw class inheritance tree of the class to which this object belongs.
Definition: TSystemDirectory.h:63
TSystemFile::SetTitle
void SetTitle(const char *title)
Set the title of the TNamed.
Definition: TSystemFile.h:56
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
TSystemDirectory::fDirsInBrowser
TOrdCollection * fDirsInBrowser
Definition: TSystemDirectory.h:35
TSystemDirectory::Delete
void Delete(Option_t *)
Delete this object.
Definition: TSystemDirectory.h:68
TSystemDirectory::Browse
virtual void Browse(TBrowser *b)
Browse OS system directories.
Definition: TSystemDirectory.cxx:144
TSystemDirectory::Delete
virtual void Delete()
delete this file
Definition: TSystemDirectory.h:58
TList
A doubly linked list.
Definition: TList.h:44
TSystemFile.h
TSystemDirectory::Move
virtual void Move(const char *)
move this file
Definition: TSystemDirectory.h:60
TSystemDirectory::Edit
virtual void Edit()
Invoke text editor on this file.
Definition: TSystemDirectory.h:55