LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
defaulthookproxy.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#include "
defaulthookproxy.h
"
10
11
namespace
LC::Util
12
{
13
DefaultHookProxy::DefaultHookProxy
(
QMap<QByteArray, QVariant>
map)
14
: Name2NewVal_ { std::move (map) }
15
{
16
}
17
18
void
DefaultHookProxy::CancelDefault
()
19
{
20
Cancelled_ =
true
;
21
}
22
23
bool
DefaultHookProxy::IsCancelled
()
const
24
{
25
return
Cancelled_;
26
}
27
28
const
QVariant&
DefaultHookProxy::GetReturnValue
()
const
29
{
30
return
ReturnValue_;
31
}
32
33
void
DefaultHookProxy::SetReturnValue
(
const
QVariant& val)
34
{
35
ReturnValue_ = val;
36
}
37
38
QVariant
DefaultHookProxy::GetValue
(
const
QByteArray& name)
const
39
{
40
return
Name2NewVal_.value (name);
41
}
42
43
void
DefaultHookProxy::SetValue
(
const
QByteArray& name,
const
QVariant& val)
44
{
45
Name2NewVal_ [name] = val;
46
}
47
}
LC::Util::DefaultHookProxy::SetValue
void SetValue(const QByteArray &, const QVariant &) override
Reimplemented from IHookProxy::SetValue().
Definition
defaulthookproxy.cpp:43
LC::Util::DefaultHookProxy::SetReturnValue
void SetReturnValue(const QVariant &) override
Reimplemented from IHookProxy::SetReturnValue().
Definition
defaulthookproxy.cpp:33
LC::Util::DefaultHookProxy::IsCancelled
bool IsCancelled() const
Returns whether the default implementation is canceled.
Definition
defaulthookproxy.cpp:23
LC::Util::DefaultHookProxy::GetValue
QVariant GetValue(const QByteArray &) const override
Reimplemented from IHookProxy::GetValue().
Definition
defaulthookproxy.cpp:38
LC::Util::DefaultHookProxy::GetReturnValue
const QVariant & GetReturnValue() const override
Reimplemented from IHookProxy::GetReturnValue().
Definition
defaulthookproxy.cpp:28
LC::Util::DefaultHookProxy::DefaultHookProxy
DefaultHookProxy()=default
Creates a new hook proxy.
LC::Util::DefaultHookProxy::CancelDefault
void CancelDefault() override
Reimplemented from IHookProxy::CancelDefault().
Definition
defaulthookproxy.cpp:18
QMap
Definition
anutil.h:15
defaulthookproxy.h
LC::Util
Definition
icoreproxy.h:34
src
util
xpc
defaulthookproxy.cpp
Generated by
1.17.0