// @(#)root/meta:$Name: p16-br-05 $:$Id: TClassRef.hpp,v 1.1.4.1 2004/03/23 16:21:06 serban Exp $ // Author: Axel Naumann 01/08/2002 /************************************************************************* * Copyright (C) 1995-2002, 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_TClassRef #define ROOT_TClassRef #ifndef ROOT_TObject #include "TObject.h" #endif class TClass; class TClassRef: public TObject { public: inline TClassRef(const TClass* cl = NULL): fClass(cl) {} inline TClassRef(const char* clname) { SetClass(clname); } virtual inline ~TClassRef() {} void SetClass(const char* clname); inline void SetClass(const TClass* cl) { fClass = cl; } inline const TClass* GetClass() const { return fClass; } Bool_t IsEqual(const TObject *obj) const { return (Compare(obj)==0); }; Int_t Compare(const TObject *obj) const; Bool_t IsSortable() const { return kTRUE; } ULong_t Hash() const; private: const TClass* fClass; //! referenced TClass ClassDef(TClassRef,1) // persistent TClass reference }; #endif // ifdef ROOT_TClassRef