InvokeHelper (estructura)

Admite la infraestructura WRL y no está diseñada para usarse directamente desde el código.

Sintaxis

template<typename TDelegateInterface, typename TCallback, unsigned int argCount>
struct InvokeHelper;

template<typename TDelegateInterface, typename TCallback>
struct InvokeHelper<TDelegateInterface, TCallback, 0> :
    public Microsoft::WRL::RuntimeClass<
        RuntimeClassFlags<Delegate>,
        TDelegateInterface
    >;

template<typename TDelegateInterface, typename TCallback>
struct InvokeHelper<TDelegateInterface, TCallback, 1> :
    public Microsoft::WRL::RuntimeClass<
        RuntimeClassFlags<Delegate>,
        TDelegateInterface
    >;

template<typename TDelegateInterface, typename TCallback>
struct InvokeHelper<TDelegateInterface, TCallback, 2> :
    public Microsoft::WRL::RuntimeClass<
        RuntimeClassFlags<Delegate>,
        TDelegateInterface
    >;

template<typename TDelegateInterface, typename TCallback>
struct InvokeHelper<TDelegateInterface, TCallback, 3> :
    public Microsoft::WRL::RuntimeClass<
        RuntimeClassFlags<Delegate>,
        TDelegateInterface
    >;

template<typename TDelegateInterface, typename TCallback>
struct InvokeHelper<TDelegateInterface, TCallback, 4> :
    Microsoft::WRL::RuntimeClass<
        RuntimeClassFlags<Delegate>,
        TDelegateInterface
    >;

template<typename TDelegateInterface, typename TCallback>
struct InvokeHelper<TDelegateInterface, TCallback, 5> :
    Microsoft::WRL::RuntimeClass<
        RuntimeClassFlags<Delegate>,
        TDelegateInterface
    >;

template<typename TDelegateInterface, typename TCallback>
struct InvokeHelper<TDelegateInterface, TCallback, 6> :
    Microsoft::WRL::RuntimeClass<
        RuntimeClassFlags<Delegate>,
        TDelegateInterface
    >;

template<typename TDelegateInterface, typename TCallback>
struct InvokeHelper<TDelegateInterface, TCallback, 7> :
    Microsoft::WRL::RuntimeClass<
        RuntimeClassFlags<Delegate>,
        TDelegateInterface
    >;

template<typename TDelegateInterface, typename TCallback>
struct InvokeHelper<TDelegateInterface, TCallback, 8> :
    Microsoft::WRL::RuntimeClass<
        RuntimeClassFlags<Delegate>,
        TDelegateInterface
    >;

template<typename TDelegateInterface, typename TCallback>
struct InvokeHelper<TDelegateInterface, TCallback, 9> :
    Microsoft::WRL::RuntimeClass<
        RuntimeClassFlags<Delegate>,
        TDelegateInterface
    >;

Parámetros

TDelegateInterface
Tipo de interfaz de delegado.

TCallback
[in] Nombre de la función del controlador de eventos.

argCount
Número de argumentos de una especialización InvokeHelper.

Comentarios

Proporciona una implementación del método Invoke() basándose en el número y el tipo de argumentos especificados.

Miembros

Definiciones de tipos públicas

Nombre Descripción
Traits Sinónimo de la clase que define el tipo de cada argumento del controlador de eventos.

Constructores públicos

Nombre Descripción
InvokeHelper::InvokeHelper Inicializa una nueva instancia de la clase InvokeHelper.

Métodos públicos

Nombre Descripción
InvokeHelper::Invoke Llama al controlador de eventos cuya firma contiene el número especificado de argumentos.

Miembros de datos públicos

Nombre Descripción
InvokeHelper::callback_ Representa el controlador de eventos al que se va a llamar cuando se produce un evento.

Jerarquía de herencia

InvokeHelper

Requisitos

Encabezado: event.h

Espacio de nombres:Microsoft::WRL::Details

InvokeHelper::callback_

Admite la infraestructura WRL y no está diseñada para usarse directamente desde el código.

TCallback callback_;

Comentarios

Representa el controlador de eventos al que se va a llamar cuando se produce un evento.

El parámetro de plantilla TCallback especifica el tipo del controlador de eventos.

InvokeHelper::Invoke

Admite la infraestructura WRL y no está diseñada para usarse directamente desde el código.

STDMETHOD(
   Invoke
)();
STDMETHOD(
   Invoke
)(typename Traits;
STDMETHOD(
   Invoke
)( typename Traits;
STDMETHOD(
   Invoke
)( typename Traits;
STDMETHOD(
   Invoke
)( typename Traits;
STDMETHOD(
   Invoke
)( typename Traits;
STDMETHOD(
   Invoke
)( typename Traits;
STDMETHOD(
   Invoke
)( typename Traits;
STDMETHOD(
   Invoke
)( typename Traits;
STDMETHOD(
   Invoke
)( typename Traits;

Parámetros

arg1
Argumento 1.

arg2
Argumento 2.

arg3
Argumento 3.

arg4
Argumento 4.

arg5
Argumento 5.

arg6
Argumento 6.

arg7
Argumento 7.

arg8
Argumento 8.

arg9
Argumento 9.

Valor devuelto

S_OK si se realiza correctamente; de lo contrario, un HRESULT que describe el error.

Comentarios

Llama al controlador de eventos cuya firma contiene el número especificado de argumentos.

InvokeHelper::InvokeHelper

Admite la infraestructura WRL y no está diseñada para usarse directamente desde el código.

explicit InvokeHelper(
   TCallback callback
);

Parámetros

callback
Un controlador de eventos.

Comentarios

Inicializa una nueva instancia de la clase InvokeHelper.

El parámetro de plantilla TCallback especifica el tipo del controlador de eventos.