aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/valueandvirtual.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/tests/libsample/valueandvirtual.h')
-rw-r--r--sources/shiboken6/tests/libsample/valueandvirtual.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsample/valueandvirtual.h b/sources/shiboken6/tests/libsample/valueandvirtual.h
new file mode 100644
index 000000000..799e11e40
--- /dev/null
+++ b/sources/shiboken6/tests/libsample/valueandvirtual.h
@@ -0,0 +1,25 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#ifndef VALUEANDVIRTUAL_H
+#define VALUEANDVIRTUAL_H
+
+#include "libsamplemacros.h"
+
+class ValueAndVirtual
+{
+public:
+ LIBMINIMAL_DEFAULT_COPY_MOVE(ValueAndVirtual)
+
+ explicit ValueAndVirtual(int id) noexcept : m_id(id) {}
+ virtual ~ValueAndVirtual() = default;
+
+ bool operator()(int id, int id2) { return id == id2; }
+
+ inline int id() const { return m_id; }
+
+private:
+ int m_id;
+};
+
+#endif // VALUEANDVIRTUAL_H