HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
9 /// @file
10 /// OSL syntax class
11 
12 #include <MaterialXGenOsl/Export.h>
13 
15 
17 
18 /// @class OslSyntax
19 /// Syntax class for OSL (Open Shading Language)
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 
40 
41 #endif
#define MATERIALX_NAMESPACE_BEGIN
Definition: Generated.h:25
vector< string > StringVec
A vector of strings.
Definition: Library.h:57
MATERIALX_NAMESPACE_BEGIN MX_CORE_API const string EMPTY_STRING
shared_ptr< Syntax > SyntaxPtr
Shared pointer to a Syntax.
Definition: Syntax.h:26
virtual const string & getOutputQualifier() const
Definition: Syntax.h:122
static const StringVec VECTOR_MEMBERS
Definition: OslSyntax.h:33
#define MX_GENOSL_API
Definition: Export.h:18
static const string SOURCE_FILE_EXTENSION
Definition: OslSyntax.h:32
const string & getConstantQualifier() const override
Definition: OslSyntax.h:28
static SyntaxPtr create()
Definition: OslSyntax.h:25
static const StringVec COLOR4_MEMBERS
Definition: OslSyntax.h:36
static const StringVec VECTOR4_MEMBERS
Definition: OslSyntax.h:35
virtual const string & getSourceFileExtension() const =0
Return the file extension used for source code files in this language.
#define MATERIALX_NAMESPACE_END
Definition: Generated.h:26
Definition: Syntax.h:39
static const StringVec VECTOR2_MEMBERS
Definition: OslSyntax.h:34