ROOT logo
// @(#)root/base:$Id$
// Author: Rene Brun   02/09/2000

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TFolder
#define ROOT_TFolder


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TFolder                                                              //
//                                                                      //
// Describe a folder: a list of objects and folders                     //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

class TCollection;
class TBrowser;


class TFolder : public TNamed {

protected:
   TCollection       *fFolders;        //pointer to the list of folders
   Bool_t             fIsOwner;        //true if folder own its contained objects

private:
   TFolder(const TFolder &folder);  //folders cannot be copied
   void operator=(const TFolder &);

public:

   TFolder();
   TFolder(const char *name, const char *title);
   virtual ~TFolder();
   virtual void        Add(TObject *obj);
   TFolder            *AddFolder(const char *name, const char *title, TCollection *collection=0);
   virtual void        Browse(TBrowser *b);
   virtual void        Clear(Option_t *option="");
   virtual void        Copy(TObject &) const { MayNotUse("Copy(TObject &)"); }
   virtual const char *FindFullPathName(const char *name) const;
   virtual const char *FindFullPathName(const TObject *obj) const;
   virtual TObject    *FindObject(const char *name) const;
   virtual TObject    *FindObject(const TObject *obj) const;
   virtual TObject    *FindObjectAny(const char *name) const;
   TCollection        *GetListOfFolders() const { return fFolders; }
   Bool_t              IsFolder() const { return kTRUE; }
   Bool_t              IsOwner()  const;
   virtual void        ls(Option_t *option="") const;  // *MENU*
   virtual Int_t       Occurence(const TObject *obj) const;
   virtual void        RecursiveRemove(TObject *obj);
   virtual void        Remove(TObject *obj);
   virtual void        SaveAs(const char *filename="",Option_t *option="") const; // *MENU*
   virtual void        SetOwner(Bool_t owner=kTRUE);

   ClassDef(TFolder,1)  //Describe a folder: a list of objects and folders
};

#endif
 TFolder.h:1
 TFolder.h:2
 TFolder.h:3
 TFolder.h:4
 TFolder.h:5
 TFolder.h:6
 TFolder.h:7
 TFolder.h:8
 TFolder.h:9
 TFolder.h:10
 TFolder.h:11
 TFolder.h:12
 TFolder.h:13
 TFolder.h:14
 TFolder.h:15
 TFolder.h:16
 TFolder.h:17
 TFolder.h:18
 TFolder.h:19
 TFolder.h:20
 TFolder.h:21
 TFolder.h:22
 TFolder.h:23
 TFolder.h:24
 TFolder.h:25
 TFolder.h:26
 TFolder.h:27
 TFolder.h:28
 TFolder.h:29
 TFolder.h:30
 TFolder.h:31
 TFolder.h:32
 TFolder.h:33
 TFolder.h:34
 TFolder.h:35
 TFolder.h:36
 TFolder.h:37
 TFolder.h:38
 TFolder.h:39
 TFolder.h:40
 TFolder.h:41
 TFolder.h:42
 TFolder.h:43
 TFolder.h:44
 TFolder.h:45
 TFolder.h:46
 TFolder.h:47
 TFolder.h:48
 TFolder.h:49
 TFolder.h:50
 TFolder.h:51
 TFolder.h:52
 TFolder.h:53
 TFolder.h:54
 TFolder.h:55
 TFolder.h:56
 TFolder.h:57
 TFolder.h:58
 TFolder.h:59
 TFolder.h:60
 TFolder.h:61
 TFolder.h:62
 TFolder.h:63
 TFolder.h:64
 TFolder.h:65
 TFolder.h:66
 TFolder.h:67
 TFolder.h:68
 TFolder.h:69
 TFolder.h:70