Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TFolder.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/base:$Id$
0002 // Author: Rene Brun   02/09/2000
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 
0012 #ifndef ROOT_TFolder
0013 #define ROOT_TFolder
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TFolder                                                              //
0019 //                                                                      //
0020 // Describe a folder: a list of objects and folders                     //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 #include "TNamed.h"
0025 
0026 class TCollection;
0027 class TBrowser;
0028 
0029 
0030 class TFolder : public TNamed {
0031 
0032 protected:
0033    TCollection       *fFolders;        //pointer to the list of folders
0034    Bool_t             fIsOwner;        //true if folder own its contained objects
0035 
0036 private:
0037    TFolder(const TFolder &folder) = delete;  //folders cannot be copied
0038    void operator=(const TFolder &)= delete;
0039 
0040 public:
0041 
0042    TFolder();
0043    TFolder(const char *name, const char *title);
0044    virtual ~TFolder();
0045    virtual void        Add(TObject *obj);
0046    TFolder            *AddFolder(const char *name, const char *title, TCollection *collection=nullptr);
0047    void                Browse(TBrowser *b) override;
0048    void                Clear(Option_t *option="") override;
0049    void                Copy(TObject &) const override { MayNotUse("Copy(TObject &)"); }
0050    virtual const char *FindFullPathName(const char *name) const;
0051    virtual const char *FindFullPathName(const TObject *obj) const;
0052    TObject            *FindObject(const char *name) const override;
0053    TObject            *FindObject(const TObject *obj) const override;
0054    virtual TObject    *FindObjectAny(const char *name) const;
0055    TCollection        *GetListOfFolders() const { return fFolders; }
0056    Bool_t              IsFolder() const override { return kTRUE; }
0057    Bool_t              IsOwner()  const;
0058    void                ls(Option_t *option="") const override;  // *MENU*
0059    virtual Int_t       Occurence(const TObject *obj) const;
0060    void                RecursiveRemove(TObject *obj) override;
0061    virtual void        Remove(TObject *obj);
0062    void                SaveAs(const char *filename="",Option_t *option="") const override; // *MENU*
0063    virtual void        SetOwner(Bool_t owner=kTRUE);
0064 
0065    ClassDefOverride(TFolder,1)  //Describe a folder: a list of objects and folders
0066 };
0067 
0068 #endif