|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Go to the documentation of this file.
42 #ifndef TEUCHOS_DYN_CAST_HPP
43 #define TEUCHOS_DYN_CAST_HPP
65 virtual const char*
what()
const throw() {
return msg.data(); }
71 const std::string &T_from,
72 const std::string &T_from_concr,
73 const std::string &T_to
171 template <
class T_To,
class T_From>
175 T_To *to_ = dynamic_cast<T_To*>(&from);
189 #endif // TEUCHOS_DYN_CAST_HPP
TEUCHOSCORE_LIB_DLL_EXPORT void dyn_cast_throw_exception(const std::string &T_from, const std::string &T_from_concr, const std::string &T_to)
Default traits class that just returns typeid(T).name().
#define TEUCHOSCORE_LIB_DLL_EXPORT
T_To & dyn_cast(T_From &from)
Dynamic casting utility function meant to replace dynamic_cast<T&> by throwing a better documented er...
virtual const char * what() const
Defines basic traits returning the name of a type in a portable and readable way.
Exception class for bad cast.
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.
m_bad_cast(const std::string &what_arg)