aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/pointerholder.h
blob: b777ffe7c23d2554bd39a37a8a2db62f10d0aa41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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 POINTERHOLDER_H
#define POINTERHOLDER_H

#include "libsamplemacros.h"

class PointerHolder
{
public:
    explicit PointerHolder(void *ptr) : m_pointer(ptr) {}
    ~PointerHolder() = default;

    inline void *pointer() const { return m_pointer; }

private:
    void *m_pointer;
};

#endif // POINTERHOLDER_H