blob: 7b712fe35e5234906f20af3dd28660acbbb583e5 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef SMARTPOINTERTYPEENTRY_H
#define SMARTPOINTERTYPEENTRY_H
#include "complextypeentry.h"
class SmartPointerTypeEntryPrivate;
struct SmartPointerInstantiation
{
QString name; // user defined name
TypeEntryCPtr typeEntry;
};
class SmartPointerTypeEntry : public ComplexTypeEntry
{
public:
using Instantiations = QList<SmartPointerInstantiation>;
explicit SmartPointerTypeEntry(const QString &entryName,
const QString &getterName,
TypeSystem::SmartPointerType type,
const QString &refCountMethodName,
const QVersionNumber &vr,
const TypeEntryCPtr &parent);
TypeSystem::SmartPointerType smartPointerType() const;
QString getter() const;
QString refCountMethodName() const;
QString valueCheckMethod() const;
void setValueCheckMethod(const QString &);
QString nullCheckMethod() const;
void setNullCheckMethod(const QString &);
QString resetMethod() const;
void setResetMethod(const QString &);
TypeEntry *clone() const override;
const Instantiations &instantiations() const;
void setInstantiations(const Instantiations &i);
bool matchesInstantiation(const TypeEntryCPtr &e) const;
QString getTargetName(const AbstractMetaType &metaType) const;
#ifndef QT_NO_DEBUG_STREAM
void formatDebug(QDebug &d) const override;
#endif
protected:
SmartPointerTypeEntry(SmartPointerTypeEntryPrivate *d);
};
#endif // SMARTPOINTERTYPEENTRY_H
|