Rootcint & template classes

Hello!

I have browsed a lot of FAQ pages and mailing list records by now and have not found a solution to my problem.

I have a templated class TQIteratorT that is to be embedded in a shared library. I want to instantiate the template with T=TObject and T=TObjString for a start.

I have attached my header and LinkDef files.

However, when running

rootcint -f dict/TQIteratorTDict.cxx -c -p include/TQIteratorT.h include/TQIteratorTLinkDef.h

the newly created dictionary is missing the ShowMembers and Streamer functions.

What changes do I need to undertake to have these functions generated for the template class?

Regards,
Carsten
TQIteratorTLinkDef.h (264 Bytes)
TQIteratorT.h (1.72 KB)

Hi!
There is a mistake in the selction pragmas in the linkdef:
you have

#pragma link C++ TQIteratorT<TObject>+;
#pragma link C++ TQIteratorT<TObjString>+;

it should be

#pragma link C++ class TQIteratorT<TObject>+;
#pragma link C++ class TQIteratorT<TObjString>+;

In addition, for the generation of the dictionary, you should make available to rootcint information about all the desired template arguments. In this case the TObjString header should be made available somehow, e.g. via an include.

Cheers,
Danilo