1 | // Copyright (C) 2021 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef QSSG_GLSLTYPE_H |
5 | #define QSSG_GLSLTYPE_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/glsl_p.h> |
19 | #include <QString> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | namespace GLSL { |
24 | |
25 | class Q_QUICK3DGLSLPARSER_EXPORT Type |
26 | { |
27 | public: |
28 | virtual ~Type(); |
29 | |
30 | virtual QString toString() const = 0; |
31 | |
32 | virtual const UndefinedType *asUndefinedType() const { return nullptr; } |
33 | virtual const VoidType *asVoidType() const { return nullptr; } |
34 | virtual const BoolType *asBoolType() const { return nullptr; } |
35 | virtual const IntType *asIntType() const { return nullptr; } |
36 | virtual const UIntType *asUIntType() const { return nullptr; } |
37 | virtual const FloatType *asFloatType() const { return nullptr; } |
38 | virtual const DoubleType *asDoubleType() const { return nullptr; } |
39 | virtual const ScalarType *asScalarType() const { return nullptr; } |
40 | virtual const IndexType *asIndexType() const { return nullptr; } |
41 | virtual const VectorType *asVectorType() const { return nullptr; } |
42 | virtual const MatrixType *asMatrixType() const { return nullptr; } |
43 | virtual const ArrayType *asArrayType() const { return nullptr; } |
44 | virtual const SamplerType *asSamplerType() const { return nullptr; } |
45 | virtual const OverloadSet *asOverloadSetType() const { return nullptr; } |
46 | |
47 | virtual const Struct *asStructType() const { return nullptr; } |
48 | virtual const Function *asFunctionType() const { return nullptr; } |
49 | |
50 | virtual bool isEqualTo(const Type *other) const = 0; |
51 | virtual bool isLessThan(const Type *other) const = 0; |
52 | }; |
53 | |
54 | } // namespace GLSL |
55 | |
56 | QT_END_NAMESPACE |
57 | |
58 | #endif // QSSG_GLSLTYPE_H |
59 | |