25template<
class T,
class TInstance>
28 const TInstance *instancePtr = &instance;
29 return (
dynamic_cast<const T*
>(instancePtr)) !=
nullptr;
37template<
class T,
class TInstance>
40 return (pInstance !=
nullptr) && (
dynamic_cast<const T*
>(pInstance) !=
nullptr);
48template<
class T,
class TInstance>
51 return dynamic_cast<T*
>(&instance) !=
nullptr;
59template<
class T,
class TInstance>
62 return (pInstance !=
nullptr) && (
dynamic_cast<T*
>(pInstance) !=
nullptr);
70template<class T, bool IsEnum = std::is_enum<T>::value>
81 typedef typename std::underlying_type<T>::type
type;
bool IsInstanceOfType(const TInstance &instance)
Tests if the type of the as argument passed instance is T or derived by T .
Definition: TypeDeduction.hxx:26
Root namespace for the PLCnext API
Namespace of the C++ standard library
T type
The resulting type.
Definition: TypeDeduction.hxx:100
Gets the value type of a shared_ptr.
Definition: TypeDeduction.hxx:90
T type
The resulting type.
Definition: TypeDeduction.hxx:91
std::underlying_type< T >::type type
The resulting type.
Definition: TypeDeduction.hxx:81
Determines the underlying type of an enum class.
Definition: TypeDeduction.hxx:72
T type
The resulting type.
Definition: TypeDeduction.hxx:73