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
glslsymbol_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// Qt-Security score:significant reason:default
4
5
6#ifndef QSSG_GLSLSYMBOL_H
7#define QSSG_GLSLSYMBOL_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtQuick3DGlslParser/private/glsl_p.h>
21#include <QString>
22
23QT_BEGIN_NAMESPACE
24
25namespace GLSL {
26
27class Symbol;
28class Scope;
29
30class Q_QUICK3DGLSLPARSER_EXPORT Symbol
31{
32public:
33 Symbol(Scope *scope = nullptr);
34 virtual ~Symbol();
35
36 Scope *scope() const;
37 void setScope(Scope *scope);
38
39 QString name() const;
40 void setName(const QString &name);
41
42 virtual Scope *asScope() { return nullptr; }
43 virtual Struct *asStruct() { return nullptr; }
44 virtual Function *asFunction() { return nullptr; }
45 virtual Argument *asArgument() { return nullptr; }
46 virtual Block *asBlock() { return nullptr; }
47 virtual Variable *asVariable() { return nullptr; }
48 virtual OverloadSet *asOverloadSet() { return nullptr; }
49 virtual Namespace *asNamespace() { return nullptr; }
50
51 virtual const Type *type() const = 0;
52
53private:
56};
57
58class Q_QUICK3DGLSLPARSER_EXPORT Scope: public Symbol
59{
60public:
61 Scope(Scope *sscope = nullptr);
62
63 Symbol *lookup(const QString &name) const;
64
65 virtual QList<Symbol *> members() const;
66 virtual void add(Symbol *symbol) = 0;
67 virtual Symbol *find(const QString &name) const = 0;
68
69 Scope *asScope() override { return this; }
70};
71
72} // namespace GLSL
73
74QT_END_NAMESPACE
75
76#endif // QSSG_GLSLSYMBOL_H
Combined button and popup list for selecting options.