aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/base/TMethodJob.h
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
commitbeb08eb751fa8e1f72042f263316ab5e5ddb596d (patch)
tree3b00df983527648bdae610ac7b88cb639b1f1828 /src/lib/base/TMethodJob.h
parentfbc30002ab3438356c0476e70c4577a0310d52c0 (diff)
New upstream version 2.4.0+dfsg.upstream/2.4.0+dfsgupstream
Diffstat (limited to 'src/lib/base/TMethodJob.h')
-rw-r--r--src/lib/base/TMethodJob.h68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/lib/base/TMethodJob.h b/src/lib/base/TMethodJob.h
deleted file mode 100644
index ec88f05..0000000
--- a/src/lib/base/TMethodJob.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * barrier -- mouse and keyboard sharing utility
- * Copyright (C) 2012-2016 Symless Ltd.
- * Copyright (C) 2002 Chris Schoeneman
- *
- * This package is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * found in the file LICENSE that should have accompanied this file.
- *
- * This package is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "IJob.h"
-
-//! Use a function as a job
-/*!
-A job class that invokes a member function.
-*/
-template <class T>
-class TMethodJob : public IJob {
-public:
- //! run() invokes \c object->method(arg)
- TMethodJob(T* object, void (T::*method)(void*), void* arg = NULL);
- virtual ~TMethodJob();
-
- // IJob overrides
- virtual void run();
-
-private:
- T* m_object;
- void (T::*m_method)(void*);
- void* m_arg;
-};
-
-template <class T>
-inline
-TMethodJob<T>::TMethodJob(T* object, void (T::*method)(void*), void* arg) :
- m_object(object),
- m_method(method),
- m_arg(arg)
-{
- // do nothing
-}
-
-template <class T>
-inline
-TMethodJob<T>::~TMethodJob()
-{
- // do nothing
-}
-
-template <class T>
-inline
-void
-TMethodJob<T>::run()
-{
- if (m_object != NULL) {
- (m_object->*m_method)(m_arg);
- }
-}