aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/objecttypeholder.h
blob: 190664608f0398e8aae64bf78f058ab1d3d08021 (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
26
27
28
29
// 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 OBJECTTYPEHOLDER_H
#define OBJECTTYPEHOLDER_H

#include "libsamplemacros.h"
#include "objecttype.h"
#include "str.h"

class LIBSAMPLE_API ObjectTypeHolder
{
public:
    LIBMINIMAL_DISABLE_COPY_MOVE(ObjectTypeHolder)

    explicit ObjectTypeHolder(const char *objectName);
    explicit ObjectTypeHolder(const ObjectType *object) noexcept;
    virtual ~ObjectTypeHolder();

    const ObjectType *getObjectType() const { return m_objectType; }

    virtual Str passObjectTypeAsReference(const ObjectType &objectType);
    Str callPassObjectTypeAsReference();

private:
   const ObjectType *m_objectType;
};

#endif // OBJECTTYPEHOLDER_H