MaterialX 1.38.2
OslSyntax.h
Go to the documentation of this file.
1//
2// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
3// All rights reserved. See LICENSE.txt for license.
4//
5
6#ifndef MATERIALX_OSLSYNTAX_H
7#define MATERIALX_OSLSYNTAX_H
8
11
13
15
16namespace MaterialX
17{
18
21class MX_GENOSL_API OslSyntax : public Syntax
22{
23public:
24 OslSyntax();
25
26 static SyntaxPtr create() { return std::make_shared<OslSyntax>(); }
27
28 const string& getOutputQualifier() const override;
29 const string& getConstantQualifier() const override { return EMPTY_STRING; };
30 const string& getSourceFileExtension() const override { return SOURCE_FILE_EXTENSION; };
31
32 static const string OUTPUT_QUALIFIER;
33 static const string SOURCE_FILE_EXTENSION;
34 static const StringVec VECTOR_MEMBERS;
35 static const StringVec VECTOR2_MEMBERS;
36 static const StringVec VECTOR4_MEMBERS;
37 static const StringVec COLOR4_MEMBERS;
38};
39
40} // namespace MaterialX
41
42#endif
vector< string > StringVec
A vector of strings.
Definition: Library.h:56
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:22
const string & getConstantQualifier() const override
Get the qualifier used when declaring constant variables.
Definition: OslSyntax.h:29
const string & getSourceFileExtension() const override
Return the file extension used for source code files in this language.
Definition: OslSyntax.h:30
Base class for syntax objects used by shader generators to emit code with correct syntax for each lan...
Definition: Syntax.h:40