|
Boost Users : |
From: lorydido (pieralisi.lorenzo_at_[hidden])
Date: 2003-03-12 12:00:36
Good morning,
First of all, thank you very much for your help in advance.
I have a problem in dynamic casting.
sc_object *o = (sc_object*)(x[i]);
if (typeid(*o)==typeid(sc_out<bool>))
sc_out<bool> *thisPort=dynamic_cast<sc_out<bool> *>(o);
sc_out<T> type is a polymorphic template class that inherits
sc_object class.
I would like to cast the polymorphic object (*o) without to know the
template type T of sc_out<T>.
I would avoid all the possible casts that can result in an enormous
computational burden.
I would like to access to the methods of sc_out<T> type.I cannot
modify the code of sc_out<T> and sc_object.Does exist any way to
perform this "blind" operation?
Does exist a boost library that allows the use of the string
typeid.name() as type in dynamic cast operation?
thank you very much in advance
Lorenzo PIERALISI
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net