Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TNamed.h

Go to the documentation of this file.
00001 // @(#)root/base:$Name:  $:$Id: TNamed.h,v 1.6 2002/11/26 07:58:18 brun Exp $
00002 // Author: Rene Brun   26/12/94
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TNamed
00013 #define ROOT_TNamed
00014 
00015 
00017 //                                                                      //
00018 // TNamed                                                               //
00019 //                                                                      //
00020 // The basis for a named object (name, title).                          //
00021 //                                                                      //
00023 
00024 
00025 #ifndef ROOT_TObject
00026 #include "TObject.h"
00027 #endif
00028 #ifndef ROOT_TList
00029 #include "TList.h"
00030 #endif
00031 #ifndef ROOT_TString
00032 #include "TString.h"
00033 #endif
00034 
00035 
00036 class TNamed : public TObject {
00037 
00038 protected:
00039    TString   fName;            //object identifier
00040    TString   fTitle;           //object title
00041 
00042 public:
00043    TNamed() { }
00044    TNamed(const char *name, const char *title) : fName(name), fTitle(title) { }
00045    TNamed(const TString &name, const TString &title) : fName(name), fTitle(title) { }
00046    TNamed(const TNamed &named);
00047    TNamed& operator=(const TNamed& rhs);
00048    virtual ~TNamed() { }
00049    virtual void     Clear(Option_t *option ="");
00050    virtual TObject *Clone(const char *newname="") const;
00051    virtual Int_t    Compare(const TObject *obj) const;
00052    virtual void     Copy(TObject &named) const;
00053    virtual void     FillBuffer(char *&buffer);
00054    virtual const char  *GetName() const {return fName.Data();}
00055    virtual const char  *GetTitle() const {return fTitle.Data();}
00056    virtual ULong_t  Hash() const { return fName.Hash(); }
00057    virtual Bool_t   IsSortable() const { return kTRUE; }
00058    virtual void     SetName(const char *name); // *MENU*
00059    virtual void     SetNameTitle(const char *name, const char *title);
00060    virtual void     SetTitle(const char *title=""); // *MENU*
00061    virtual void     ls(Option_t *option="") const;
00062    virtual void     Print(Option_t *option="") const;
00063    virtual Int_t    Sizeof() const;
00064 
00065    ClassDef(TNamed,1)  //The basis for a named object (name, title)
00066 };
00067 
00068 #endif

Generated on Thu Dec 18 14:52:22 2003 for ROOT by doxygen1.2.16