Need general class handling all types of named parameters


I recently “discovered” the TParameter template classes and started having great fun adding TLists of named parameters to some of my classes. Notably, some objects which I would previously have represented using several derived classes, each adding some specific member variables, I now represent with one single class whose parameter list is adapted to each object.

This is OK in the case where all possible parameters are of the same type, i.e. in the previous case they were all instanciations of TParamer<Double_t>. However, I am now beginning to think of a far more general approach, where the parameter-TList would contain objects of some totally general parameter class which is capable of associating a name with any possible known type, including classes.

This seems like such a good idea that I’m sure it must already exist … :laughing:

I haven’t found it yet (or I’ve overlooked something so obvious it’s staring me in the face), so before I try to reinvent the wheel, can anybody point me in the right direction ?