Static Public Member Functions

callback_if_castable< CastToType > Struct Template Reference

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.

Detailed Description

template<typename CastToType>
struct viennamath::callback_if_castable< CastToType >

A helper class which calls a provided functor if the supplied expression pointer can be cast to the target type.

Template Parameters:
CastToType The type to which a dynamic cast should be attempted.

Member Function Documentation

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.


The documentation for this struct was generated from the following file: