Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:28

0001 // @(#)root/base:$Id$
0002 // Author: Christian Bormann  13/10/97
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 #ifndef ROOT_TSystemDirectory
0012 #define ROOT_TSystemDirectory
0013 
0014 
0015 //////////////////////////////////////////////////////////////////////////
0016 //                                                                      //
0017 // TSystemDirectory                                                     //
0018 //                                                                      //
0019 // Describes an Operating System directory for the browser.             //
0020 //                                                                      //
0021 // Author: Christian Bormann  30/09/97                                  //
0022 //         http://www.ikf.physik.uni-frankfurt.de/~bormann/             //
0023 //                                                                      //
0024 //////////////////////////////////////////////////////////////////////////
0025 
0026 #include "TSystemFile.h"
0027 
0028 class TOrdCollection;
0029 class TList;
0030 
0031 
0032 class TSystemDirectory : public TSystemFile {
0033 
0034 protected:
0035    TOrdCollection *fDirsInBrowser{nullptr};
0036    TOrdCollection *fFilesInBrowser{nullptr};
0037 
0038    Bool_t             IsItDirectory(const char *name) const;
0039    TSystemDirectory  *FindDirObj(const char *name);
0040    TSystemFile       *FindFileObj(const char *name, const char *dir);
0041 
0042    TSystemDirectory(const TSystemDirectory&) = delete;
0043    TSystemDirectory& operator=(const TSystemDirectory&) = delete;
0044 
0045 public:
0046    TSystemDirectory();
0047    TSystemDirectory(const char *dirname, const char *path);
0048 
0049    virtual ~TSystemDirectory();
0050 
0051    Bool_t      IsFolder() const override { return kTRUE; }
0052    Bool_t      IsDirectory(const char * = nullptr) const override { return kTRUE; }
0053 
0054    void        Browse(TBrowser *b) override;
0055    void        Edit() override {}
0056    virtual TList *GetListOfFiles() const;
0057    virtual void   SetDirectory(const char *name);
0058    void        Delete() override {}
0059    void        Copy(const char *) override {}
0060    void        Move(const char *) override {}
0061 
0062    // dummy methods from TObject
0063    void        DrawClass() const override { }
0064    TObject    *DrawClone(Option_t *) const override { return nullptr; }
0065    void        SetDrawOption(Option_t *) override { }
0066    void        SetName(const char *name) override { TSystemFile::SetName(name); }
0067    void        SetTitle(const char *title) override { TSystemFile::SetTitle(title); }
0068    void        Delete(Option_t *) override { }
0069    void        Copy(TObject & ) const override { }
0070 
0071    ClassDefOverride(TSystemDirectory,0)  //A system directory
0072 };
0073 
0074 #endif
0075