Skip to content
Snippets Groups Projects
Commit 16810b0f authored by Fons Rademakers's avatar Fons Rademakers
Browse files

fix in explicit template instantiation syntax which was wrong, but accepted

by gcc and icc (!). Remove TObjPtr class which is now just an instantiation
of TObjNum<void*> (for backward compatability we provide the typedef:
typedef TObjNum<void*> TObjPtr;). Remove reference to TObjPtr.h from
TBuffer.cxx. To compile make sure to remove base/src/G__Base1.d,
base/src/G__Base2.d, base/src/G__Base3.d and base/src/TBuffer.d.


git-svn-id: http://root.cern.ch/svn/root/trunk@5739 27541ba8-7e3a-0410-8455-c3a389f83636
parent c50d5d60
No related branches found
No related tags found
No related merge requests found
/* @(#)root/base:$Name: $:$Id: LinkDef3.h,v 1.7 2002/09/16 10:57:57 rdm Exp $ */
/* @(#)root/base:$Name: $:$Id: LinkDef3.h,v 1.8 2002/12/04 12:13:32 rdm Exp $ */
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
......@@ -164,6 +164,7 @@
#pragma link C++ typedef TObjNumUL;
#pragma link C++ typedef TObjNumF;
#pragma link C++ typedef TObjNumD;
#pragma link C++ typedef TObjPtr;
#pragma link C++ class TObjNum<Char_t>+;
#pragma link C++ class TObjNum<UChar_t>+;
......@@ -175,5 +176,6 @@
#pragma link C++ class TObjNum<ULong_t>+;
#pragma link C++ class TObjNum<Float_t>+;
#pragma link C++ class TObjNum<Double_t>+;
#pragma link C++ class TObjNum<void*>+;
#endif
// @(#)root/base:$Name:$:$Id:$
// @(#)root/base:$Name: $:$Id: TObjNum.h,v 1.1 2002/12/04 12:13:32 rdm Exp $
// Author: Fons Rademakers 02/12/02
/*************************************************************************
......@@ -60,15 +60,16 @@ public:
ClassDef(TObjNum,1) //Basic type wrapped in a TObject
};
typedef TObjNum<Char_t> TObjNumC;
typedef TObjNum<UChar_t> TObjNumUC;
typedef TObjNum<Short_t> TObjNumS;
typedef TObjNum<UShort_t> TObjNumUS;
typedef TObjNum<Int_t> TObjNumI;
typedef TObjNum<UInt_t> TObjNumUI;
typedef TObjNum<Long_t> TObjNumL;
typedef TObjNum<ULong_t> TObjNumUL;
typedef TObjNum<Float_t> TObjNumF;
typedef TObjNum<Double_t> TObjNumD;
typedef TObjNum<Char_t> TObjNumC;
typedef TObjNum<UChar_t> TObjNumUC;
typedef TObjNum<Short_t> TObjNumS;
typedef TObjNum<UShort_t> TObjNumUS;
typedef TObjNum<Int_t> TObjNumI;
typedef TObjNum<UInt_t> TObjNumUI;
typedef TObjNum<Long_t> TObjNumL;
typedef TObjNum<ULong_t> TObjNumUL;
typedef TObjNum<Float_t> TObjNumF;
typedef TObjNum<Double_t> TObjNumD;
typedef TObjNum<void*> TObjPtr;
#endif
// @(#)root/base:$Name: $:$Id: TObjPtr.h,v 1.2 2000/12/13 15:13:45 brun Exp $
// Author: Fons Rademakers 04/05/96
/*************************************************************************
* 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_TObjPtr
#define ROOT_TObjPtr
//////////////////////////////////////////////////////////////////////////
// //
// TObjPtr //
// //
// Collectable generic pointer class. This is a TObject containing a //
// void *. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TObject
#include "TObject.h"
#endif
class TObjPtr : public TObject {
private:
const void *fPtr; //Wrapped pointer
public:
TObjPtr(const void *p = 0) : fPtr(p) { }
TObjPtr(const TObjPtr &p) : TObject(p), fPtr(p.fPtr) { }
~TObjPtr() { }
Int_t Compare(const TObject *obj) const;
ULong_t Hash() const { return (ULong_t) fPtr >> 2; }
Bool_t IsSortable() const { return kTRUE; }
Bool_t IsEqual(const TObject *obj) const { return fPtr == obj; }
void *Ptr() const { return (void *)fPtr; }
//ClassDef(TObjPtr,1) //Collectable generic pointer class
};
#endif
// @(#)root/base:$Name: $:$Id: TBuffer.cxx,v 1.40 2002/11/15 22:20:51 brun Exp $
// @(#)root/base:$Name: $:$Id: TBuffer.cxx,v 1.41 2002/12/02 18:50:01 rdm Exp $
// Author: Fons Rademakers 04/05/96
/*************************************************************************
......@@ -23,7 +23,6 @@
#include "TFile.h"
#include "TBuffer.h"
#include "TExMap.h"
#include "TObjPtr.h"
#include "TClass.h"
#include "TStorage.h"
#include "TMath.h"
......
// @(#)root/base:$Name:$:$Id:$
// @(#)root/base:$Name: $:$Id: TObjNum.cxx,v 1.1 2002/12/04 12:13:32 rdm Exp $
// Author: Fons Rademakers 02/12/02
/*************************************************************************
......@@ -20,15 +20,16 @@
#include "TObjNum.h"
// explicit template instantiation of the versions specified in LinkDef.h
template TObjNum<Char_t>;
template TObjNum<UChar_t>;
template TObjNum<Short_t>;
template TObjNum<UShort_t>;
template TObjNum<Int_t>;
template TObjNum<UInt_t>;
template TObjNum<Long_t>;
template TObjNum<ULong_t>;
template TObjNum<Float_t>;
template TObjNum<Double_t>;
template class TObjNum<Char_t>;
template class TObjNum<UChar_t>;
template class TObjNum<Short_t>;
template class TObjNum<UShort_t>;
template class TObjNum<Int_t>;
template class TObjNum<UInt_t>;
template class TObjNum<Long_t>;
template class TObjNum<ULong_t>;
template class TObjNum<Float_t>;
template class TObjNum<Double_t>;
template class TObjNum<void*>;
templateClassImp(TObjNum)
// @(#)root/base:$Name: $:$Id: TObjPtr.cxx,v 1.1.1.1 2000/05/16 17:00:39 rdm Exp $
// Author: Fons Rademakers 04/05/96
/*************************************************************************
* 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. *
*************************************************************************/
//////////////////////////////////////////////////////////////////////////
// //
// TObjPtr //
// //
// Collectable generic pointer class. This is a TObject containing a //
// void *. //
// //
//////////////////////////////////////////////////////////////////////////
#include "TObjPtr.h"
//ClassImp(TObjPtr)
Int_t TObjPtr::Compare(const TObject *obj) const
{
if (fPtr == obj)
return 0;
else if (fPtr < obj)
return -1;
else
return 1;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment