LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
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 {
14  : Name2NewVal_ { std::move (map) }
15  {
16  }
17 
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:49
LC::Util::DefaultHookProxy::SetReturnValue
void SetReturnValue(const QVariant &) override
Reimplemented from IHookProxy::SetReturnValue().
Definition: defaulthookproxy.cpp:39
LC::Util
Definition: icoreproxy.h:33
defaulthookproxy.h
LC::Util::DefaultHookProxy::CancelDefault
void CancelDefault() override
Reimplemented from IHookProxy::CancelDefault().
Definition: defaulthookproxy.cpp:24
LC::Util::DefaultHookProxy::GetValue
QVariant GetValue(const QByteArray &) const override
Reimplemented from IHookProxy::GetValue().
Definition: defaulthookproxy.cpp:44
LC::Util::DefaultHookProxy::GetReturnValue
const QVariant & GetReturnValue() const override
Reimplemented from IHookProxy::GetReturnValue().
Definition: defaulthookproxy.cpp:34
LC::Util::DefaultHookProxy::IsCancelled
bool IsCancelled() const
Returns whether the default implementation is canceled.
Definition: defaulthookproxy.cpp:29
LC::Util::DefaultHookProxy::DefaultHookProxy
DefaultHookProxy()=default
Creates a new hook proxy.
QMap< QByteArray, QVariant >