#ifndef ROOT_TObjPtr #define ROOT_TObjPtr //+SEQ,CopyRight,T=NOINCLUDE. ////////////////////////////////////////////////////////////////////////// // // // TObjPtr // // // // Collectable generic pointer class. This is a TObject containing a // // void *. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TObject //*KEEP,TObject. #include "TObject.h" //*KEND. #endif class TObjPtr : public TObject { private: const void *fPtr; //Wrapped pointer public: TObjPtr(const void *p = 0) : fPtr(p) { } TObjPtr(const TObjPtr &p) : fPtr(p.fPtr) { } ~TObjPtr() { } Int_t Compare(TObject *obj); ULong_t Hash() { return (ULong_t) fPtr >> 2; } Bool_t IsSortable() const { return kTRUE; } Bool_t IsEqual(TObject *obj) { return fPtr == obj; } void *Ptr() const { return (void *)fPtr; } //ClassDef(TObjPtr,1) //Collectable generic pointer class }; #endif