1    	// @(#)root/base:$Id$
2    	// Author: Fons Rademakers   12/11/95
3    	
4    	/*************************************************************************
5    	 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
6    	 * All rights reserved.                                                  *
7    	 *                                                                       *
8    	 * For the licensing terms see $ROOTSYS/LICENSE.                         *
9    	 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
10   	 *************************************************************************/
11   	
12   	#ifndef ROOT_TObjString
13   	#define ROOT_TObjString
14   	
15   	
16   	//////////////////////////////////////////////////////////////////////////
17   	//                                                                      //
18   	// TObjString                                                           //
19   	//                                                                      //
20   	// Collectable string class. This is a TObject containing a TString.    //
21   	//                                                                      //
22   	//////////////////////////////////////////////////////////////////////////
23   	
24   	#ifndef ROOT_TObject
25   	#include "TObject.h"
26   	#endif
27   	#ifndef ROOT_TString
28   	#include "TString.h"
29   	#endif
30   	
31   	
32   	class TObjString : public TObject {
33   	
34   	private:
35   	   TString    fString;       // wrapped TString
36   	
37   	public:
38   	   TObjString(const char *s = "") : fString(s) { }
39   	   TObjString(const TObjString &s) : TObject(), fString(s.fString) { }
40   	   ~TObjString() { }
41   	   Int_t       Compare(const TObject *obj) const;
42   	   const char *GetName() const { return fString; }
43   	   ULong_t     Hash() const { return fString.Hash(); }
44   	   void        FillBuffer(char *&buffer) { fString.FillBuffer(buffer); }
45   	   void        Print(Option_t *) const { Printf("TObjString = %s", (const char*)fString); }
46   	   Bool_t      IsSortable() const { return kTRUE; }
47   	   Bool_t      IsEqual(const TObject *obj) const;
48   	   void        ReadBuffer(char *&buffer) { fString.ReadBuffer(buffer); }
49   	   void        SetString(const char *s) { fString = s; }
50   	   TString     GetString() const { return fString; }
51   	   Int_t       Sizeof() const { return fString.Sizeof(); }
52   	   TString    &String() { return fString; }
53   	
54   	   ClassDef(TObjString,1)  //Collectable string class
55   	};
56   	
57   	#endif
58   	
59