MaterialX 1.38.10
Loading...
Searching...
No Matches
OslSyntax.h
Go to the documentation of this file.
1//
2// Copyright Contributors to the MaterialX Project
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#ifndef MATERIALX_OSLSYNTAX_H
7#define MATERIALX_OSLSYNTAX_H
8
11
13
15
16MATERIALX_NAMESPACE_BEGIN
17
20class MX_GENOSL_API OslSyntax : public Syntax
21{
22 public:
23 OslSyntax();
24
25 static SyntaxPtr create() { return std::make_shared<OslSyntax>(); }
26
27 const string& getOutputQualifier() const override;
28 const string& getConstantQualifier() const override { return EMPTY_STRING; };
29 const string& getSourceFileExtension() const override { return SOURCE_FILE_EXTENSION; };
30
31 static const string OUTPUT_QUALIFIER;
32 static const string SOURCE_FILE_EXTENSION;
33 static const StringVec VECTOR_MEMBERS;
34 static const StringVec VECTOR2_MEMBERS;
35 static const StringVec VECTOR4_MEMBERS;
36 static const StringVec COLOR4_MEMBERS;
37};
38
39MATERIALX_NAMESPACE_END
40
41#endif
vector< string > StringVec
A vector of strings.
Definition: Library.h:57
Macros for declaring imported and exported symbols.
Base class for syntax handling for shader generators.
shared_ptr< Syntax > SyntaxPtr
Shared pointer to a Syntax.
Definition: Syntax.h:26
Syntax class for OSL (Open Shading Language)
Definition: OslSyntax.h:21
const string & getConstantQualifier() const override
Get the qualifier used when declaring constant variables.
Definition: OslSyntax.h:28
const string & getSourceFileExtension() const override
Return the file extension used for source code files in this language.
Definition: OslSyntax.h:29
Base class for syntax objects used by shader generators to emit code with correct syntax for each lan...
Definition: Syntax.h:40
virtual const string & getOutputQualifier() const
Returns a type qualifier to be used when declaring types for output variables.
Definition: Syntax.h:122