ROOT logo
// @(#)root/base:$Id$
// Author: Rene Brun   26/12/94

/*************************************************************************
 * 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_TNamed
#define ROOT_TNamed


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TNamed                                                               //
//                                                                      //
// The basis for a named object (name, title).                          //
//                                                                      //
//////////////////////////////////////////////////////////////////////////


#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif


class TNamed : public TObject {

protected:
   TString   fName;            //object identifier
   TString   fTitle;           //object title

public:
   TNamed(): fName(), fTitle() { }
   TNamed(const char *name, const char *title) : fName(name), fTitle(title) { }
   TNamed(const TString &name, const TString &title) : fName(name), fTitle(title) { }
   TNamed(const TNamed &named);
   TNamed& operator=(const TNamed& rhs);
   virtual ~TNamed() { }
   virtual void     Clear(Option_t *option ="");
   virtual TObject *Clone(const char *newname="") const;
   virtual Int_t    Compare(const TObject *obj) const;
   virtual void     Copy(TObject &named) const;
   virtual void     FillBuffer(char *&buffer);
   virtual const char  *GetName() const { return fName; }
   virtual const char  *GetTitle() const { return fTitle; }
   virtual ULong_t  Hash() const { return fName.Hash(); }
   virtual Bool_t   IsSortable() const { return kTRUE; }
   virtual void     SetName(const char *name); // *MENU*
   virtual void     SetNameTitle(const char *name, const char *title);
   virtual void     SetTitle(const char *title=""); // *MENU*
   virtual void     ls(Option_t *option="") const;
   virtual void     Print(Option_t *option="") const;
   virtual Int_t    Sizeof() const;

   ClassDef(TNamed,1)  //The basis for a named object (name, title)
};

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