LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
LC::Util::DefaultHookProxy Class Reference

Standard implementation of IHookProxy. More...

#include "defaulthookproxy.h"

+ Inheritance diagram for LC::Util::DefaultHookProxy:
+ Collaboration diagram for LC::Util::DefaultHookProxy:

Public Member Functions

 DefaultHookProxy ()=default
 Creates a new hook proxy. More...
 
 DefaultHookProxy (QMap< QByteArray, QVariant > values)
 Creates a new hook proxy, initialized with the given values. More...
 
void CancelDefault () override
 Reimplemented from IHookProxy::CancelDefault(). More...
 
bool IsCancelled () const
 Returns whether the default implementation is canceled. More...
 
const QVariant & GetReturnValue () const override
 Reimplemented from IHookProxy::GetReturnValue(). More...
 
void SetReturnValue (const QVariant &) override
 Reimplemented from IHookProxy::SetReturnValue(). More...
 
template<typename T >
void FillValue (const QByteArray &name, T &val)
 Fills the value of the given parameter set by SetValue(). More...
 
QVariant GetValue (const QByteArray &) const override
 Reimplemented from IHookProxy::GetValue(). More...
 
void SetValue (const QByteArray &, const QVariant &) override
 Reimplemented from IHookProxy::SetValue(). More...
 
- Public Member Functions inherited from LC::IHookProxy
virtual ~IHookProxy ()
 

Detailed Description

Standard implementation of IHookProxy.

This class is the standard implementation of the IHookProxy interface and can be used in most cases.

See also
IHookProxy

Definition at line 31 of file defaulthookproxy.h.

Constructor & Destructor Documentation

◆ DefaultHookProxy() [1/2]

LC::Util::DefaultHookProxy::DefaultHookProxy ( )
default

Creates a new hook proxy.

◆ DefaultHookProxy() [2/2]

LC::Util::DefaultHookProxy::DefaultHookProxy ( QMap< QByteArray, QVariant >  values)
explicit

Creates a new hook proxy, initialized with the given values.

Parameters
[in]valuesThe initial values of this proxy's parameters.
See also
SetValue()
GetValue()

Definition at line 19 of file defaulthookproxy.cpp.

Member Function Documentation

◆ CancelDefault()

void LC::Util::DefaultHookProxy::CancelDefault ( )
overridevirtual

Reimplemented from IHookProxy::CancelDefault().

See also
IsCancelled()

Implements LC::IHookProxy.

Definition at line 24 of file defaulthookproxy.cpp.

◆ FillValue()

template<typename T >
void LC::Util::DefaultHookProxy::FillValue ( const QByteArray &  name,
T &  val 
)
inline

Fills the value of the given parameter set by SetValue().

If SetValue() has been called with the given parameter name this function sets val to that value, otherwise it does nothing.

Parameters
[in]nameThe name of the parameter.
[out]valThe value to fill.
Template Parameters
TThe type of the value, which should be known to Qt's metatypes system so that QVariant::value<T>() is valid.

Definition at line 94 of file defaulthookproxy.h.

◆ GetReturnValue()

const QVariant & LC::Util::DefaultHookProxy::GetReturnValue ( ) const
overridevirtual

Reimplemented from IHookProxy::GetReturnValue().

Implements LC::IHookProxy.

Definition at line 34 of file defaulthookproxy.cpp.

◆ GetValue()

QVariant LC::Util::DefaultHookProxy::GetValue ( const QByteArray &  name) const
overridevirtual

Reimplemented from IHookProxy::GetValue().

Implements LC::IHookProxy.

Definition at line 44 of file defaulthookproxy.cpp.

◆ IsCancelled()

bool LC::Util::DefaultHookProxy::IsCancelled ( ) const

Returns whether the default implementation is canceled.

This function returns whether CancelDefault() has been called at least once.

Returns
Whether the default implementation is canceled.
See also
CancelDefault()

Definition at line 29 of file defaulthookproxy.cpp.

◆ SetReturnValue()

void LC::Util::DefaultHookProxy::SetReturnValue ( const QVariant &  val)
overridevirtual

Reimplemented from IHookProxy::SetReturnValue().

Implements LC::IHookProxy.

Definition at line 39 of file defaulthookproxy.cpp.

◆ SetValue()

void LC::Util::DefaultHookProxy::SetValue ( const QByteArray &  name,
const QVariant &  val 
)
overridevirtual

Reimplemented from IHookProxy::SetValue().

Implements LC::IHookProxy.

Definition at line 49 of file defaulthookproxy.cpp.


The documentation for this class was generated from the following files: