#include <comstl/conversion/interface_cast.hpp>
This class serves only as a base, and cannot be used in isolation
I | The interface pointer type | |
R | The release type | |
X | The exception type |
Not to be implemented | |
interface_cast_base (class_type const &rhs) | |
Public Types | |
Member Types | |
typedef I | interface_pointer_type |
The interface pointer type. | |
typedef interface_pointer_traits< I > ::interface_type | interface_type |
The interface type. | |
typedef R | release_type |
The release type. | |
typedef X | exception_policy_type |
The exception type. | |
typedef exception_policy_type::thrown_type | thrown_type |
The thrown type. | |
typedef interface_cast_base< I, R, X > | class_type |
The type of the current parameterisation. | |
Protected Types | |
Member Constants | |
enum | NullThrowPermission { allowNull, throwOnNull } |
Protected Member Functions | |
Construction | |
template<typename J> | |
interface_cast_base (J &j, NullThrowPermission permission) | |
Constructor that attempts the speculative cast. | |
interface_cast_base (interface_pointer_type pi) | |
Constructor that directly casts (without calling QueryInterface()). | |
~interface_cast_base () throw () | |
Releases the acquired interface pointer according to the release_type policy. | |
Accessors | |
interface_pointer_type const & | get_pointer_ () |
Returns a non-mutating reference to the acquired interface pointer. | |
interface_pointer_type | get_pointer_ () const |
Returns a copy of the acquired interface pointer. |
typedef I interface_pointer_type |
typedef interface_pointer_traits<I>::interface_type interface_type |
typedef R release_type |
The release type.
typedef X exception_policy_type |
The exception type.
typedef exception_policy_type::thrown_type thrown_type |
The thrown type.
typedef interface_cast_base<I, R, X> class_type |
The type of the current parameterisation.
Reimplemented in interface_cast_noaddref, and interface_cast_addref.
interface_cast_base | ( | J & | j, | |
NullThrowPermission | permission | |||
) | [inline, explicit, protected] |
Constructor that attempts the speculative cast.
interface_cast_base | ( | interface_pointer_type | pi | ) | [inline, explicit, protected] |
Constructor that directly casts (without calling QueryInterface()).
~interface_cast_base | ( | ) | throw () [inline, protected] |
Releases the acquired interface pointer according to the release_type
policy.
interface_pointer_type const& get_pointer_ | ( | ) | [inline, protected] |
Returns a non-mutating reference to the acquired interface pointer.
interface_pointer_type get_pointer_ | ( | ) | const [inline, protected] |
Returns a copy of the acquired interface pointer.