akonadi
Akonadi::Internal::PayloadTrait< T > Struct Template Reference
#include <itempayloadinternals_p.h>
Public Types | |
typedef T | ElementType |
typedef KPIMUtils::SuperClass < T >::Type | SuperElementType |
typedef KPIMUtils::SuperClass < T >::Type | SuperType |
typedef T | Type |
Static Public Member Functions | |
template<typename U > | |
static bool | canCastFrom (const U &) |
template<typename U > | |
static Type | castFrom (const U &) |
template<typename U > | |
static U | castTo (const Type &) |
static bool | isNull (const Type &) |
Static Public Attributes | |
static const bool | isPolymorphic = false |
Detailed Description
template<typename T>
struct Akonadi::Internal::PayloadTrait< T >
For internal use only.
Payload type traits. Implements specialized handling for polymorphic types and smart pointers. The default one is never used (as isPolymorphic is always false) and only contains safe dummy implementations to make the compiler happy (in practice it will always optimized away anyway).
Definition at line 48 of file itempayloadinternals_p.h.
Member Typedef Documentation
typedef T Akonadi::Internal::PayloadTrait< T >::ElementType |
type of the payload object contained inside a shared pointer
Definition at line 51 of file itempayloadinternals_p.h.
typedef KPIMUtils::SuperClass<T>::Type Akonadi::Internal::PayloadTrait< T >::SuperElementType |
type of the base class of the payload object inside a shared pointer, same as ElementType if there is no super class
Definition at line 54 of file itempayloadinternals_p.h.
typedef KPIMUtils::SuperClass<T>::Type Akonadi::Internal::PayloadTrait< T >::SuperType |
type of the payload to store a base class of this payload (eg.
a shared pointer containing a pointer to SuperElementType) same as Type if there is not super class
Definition at line 60 of file itempayloadinternals_p.h.
typedef T Akonadi::Internal::PayloadTrait< T >::Type |
type of this payload object
Definition at line 56 of file itempayloadinternals_p.h.
Member Function Documentation
static bool Akonadi::Internal::PayloadTrait< T >::canCastFrom | ( | const U & | ) | [inline, static] |
tests if casting from U
to Type is possible
Definition at line 73 of file itempayloadinternals_p.h.
static Type Akonadi::Internal::PayloadTrait< T >::castFrom | ( | const U & | ) | [inline, static] |
casts to Type from U
throws a PayloadException if casting failed
Definition at line 68 of file itempayloadinternals_p.h.
static U Akonadi::Internal::PayloadTrait< T >::castTo | ( | const Type & | ) | [inline, static] |
cast to U
from Type
Definition at line 78 of file itempayloadinternals_p.h.
static bool Akonadi::Internal::PayloadTrait< T >::isNull | ( | const Type & | ) | [inline, static] |
checks an object of this payload type for being null
Definition at line 65 of file itempayloadinternals_p.h.
Member Data Documentation
const bool Akonadi::Internal::PayloadTrait< T >::isPolymorphic = false [static] |
indicates if this payload is polymorphic, that is is a shared pointer and has a known super class
Definition at line 63 of file itempayloadinternals_p.h.
The documentation for this struct was generated from the following file: