// @(#)root/base:$Id$
// Author: Fons Rademakers   12/11/95

/*************************************************************************
 * 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_TObjString
#define ROOT_TObjString


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TObjString                                                           //
//                                                                      //
// Collectable string class. This is a TObject containing a TString.    //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

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


class TObjString : public TObject {

private:
   TString    fString;       // wrapped TString

public:
   TObjString(const char *s = "") : fString(s) { }
   TObjString(const TObjString &s) : TObject(), fString(s.fString) { }
   ~TObjString() { }
   Int_t       Compare(const TObject *obj) const;
   const char *GetName() const { return fString; }
   ULong_t     Hash() const { return fString.Hash(); }
   void        FillBuffer(char *&buffer) { fString.FillBuffer(buffer); }
   void        Print(Option_t *) const { Printf("TObjString = %s", (const char*)fString); }
   Bool_t      IsSortable() const { return kTRUE; }
   Bool_t      IsEqual(const TObject *obj) const;
   void        ReadBuffer(char *&buffer) { fString.ReadBuffer(buffer); }
   void        SetString(const char *s) { fString = s; }
   TString     GetString() const { return fString; }
   Int_t       Sizeof() const { return fString.Sizeof(); }
   TString    &String() { return fString; }

   ClassDef(TObjString,1)  //Collectable string class
};

#endif

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