Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
glslsymbols_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QSSG_GLSLSYMBOLS_H
5#define QSSG_GLSLSYMBOLS_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick3DGlslParser/private/glsltype_p.h>
19#include <QtQuick3DGlslParser/private/glslsymbol_p.h>
20#include <QVector>
21#include <QString>
22#include <QHash>
23
25
26namespace GLSL {
27
28class Q_QUICK3DGLSLPARSER_EXPORT Argument: public Symbol
29{
30public:
32
33 const Type *type() const override;
34 void setType(const Type *type);
35
36 Argument *asArgument() override { return this; }
37
38private:
39 const Type *_type;
40};
41
42class Q_QUICK3DGLSLPARSER_EXPORT Variable: public Symbol
43{
44public:
46
47 const Type *type() const override;
48 void setType(const Type *type);
49
50 int qualifiers() const { return _qualifiers; }
52
53 Variable *asVariable() override { return this; }
54
55private:
56 const Type *_type;
57 int _qualifiers;
58};
59
60class Q_QUICK3DGLSLPARSER_EXPORT Block: public Scope
61{
62public:
63 Block(Scope *enclosingScope = nullptr);
64
65 QList<Symbol *> members() const override;
67
68 Block *asBlock() override { return this; }
69
70 const Type *type() const override;
71 Symbol *find(const QString &name) const override;
72
73private:
75};
76
77class Q_QUICK3DGLSLPARSER_EXPORT Namespace: public Scope
78{
79public:
80 Namespace();
82
84
85 Namespace *asNamespace() override { return this; }
86
87 QList<Symbol *> members() const override;
88 const Type *type() const override;
89 Symbol *find(const QString &name) const override;
90
91private:
94};
95
96} // namespace GLSL
97
98QT_END_NAMESPACE
99
100#endif // QSSG_GLSLSYMBOLS_H
const Type * intern(const Type &ty)
bool operator()(const Type &value, const Type &other) const