aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/valueandvirtual.h
blob: 799e11e400eabe58087a613c76fb9e66d2e6cc33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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