A helper class which calls a provided functor if the supplied expression pointer can be cast to the target type. More...
#include <functor_wrapper.hpp>
Static Public Member Functions | |
template<typename InterfaceType , typename FunctorType > | |
static bool | apply (InterfaceType const *e, FunctorType const &functor) |
Attempts to cast the expression referred to be 'e' to 'CastToType'. If successful, the provided functor is called. |
A helper class which calls a provided functor if the supplied expression pointer can be cast to the target type.
CastToType | The type to which a dynamic cast should be attempted. |
static bool apply | ( | InterfaceType const * | e, | |
FunctorType const & | functor | |||
) | [inline, static] |
Attempts to cast the expression referred to be 'e' to 'CastToType'. If successful, the provided functor is called.