MDL SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
imdl_module_builder.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2022 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IMDL_MODULE_BUILDER_H
8 #define MI_NEURAYLIB_IMDL_MODULE_BUILDER_H
9 
11 #include <mi/neuraylib/itype.h>
12 
13 namespace mi {
14 
15 class IArray;
16 
17 namespace neuraylib {
18 
19 class IAnnotation_block;
20 class IAnnotation_list;
21 class IExpression;
22 class IExpression_list;
23 class IMdl_execution_context;
24 
29 class IMdl_module_builder: public
33  base::Interface_declare<0x2357f2f8,0x4428,0x47e5,0xaa,0x92,0x97,0x98,0x25,0x5d,0x26,0x57>
34 {
35 public:
54  virtual Sint32 add_variant(
55  const char* name,
56  const char* prototype_name,
57  const IExpression_list* defaults,
58  const IAnnotation_block* annotations,
59  const IAnnotation_block* return_annotations,
60  bool is_exported,
61  IMdl_execution_context* context) = 0;
62 
83  virtual Sint32 add_function(
84  const char* name,
85  const IExpression* body,
86  const IType_list* parameters,
87  const IExpression_list* defaults,
88  const IAnnotation_list* parameter_annotations,
89  const IAnnotation_block* annotations,
90  const IAnnotation_block* return_annotations,
91  bool is_exported,
92  IType::Modifier frequency_qualifier,
93  IMdl_execution_context* context) = 0;
94 
108  virtual Sint32 add_annotation(
109  const char* name,
110  const IType_list* parameters,
111  const IExpression_list* defaults,
112  const IAnnotation_list* parameter_annotations,
113  const IAnnotation_block* annotations,
114  bool is_exported,
115  IMdl_execution_context* context) = 0;
116 
131  virtual Sint32 add_enum_type(
132  const char* name,
133  const IExpression_list* enumerators,
134  const IAnnotation_list* enumerator_annotations,
135  const IAnnotation_block* annotations,
136  bool is_exported,
137  IMdl_execution_context* context) = 0;
138 
155  virtual Sint32 add_struct_type(
156  const char* name,
157  const IType_list* fields,
158  const IExpression_list* field_defaults,
159  const IAnnotation_list* field_annotations,
160  const IAnnotation_block* annotations,
161  bool is_exported,
162  IMdl_execution_context* context) = 0;
163 
174  virtual Sint32 add_constant(
175  const char* name,
176  const IExpression* expr,
177  const IAnnotation_block* annotations,
178  bool is_exported,
179  IMdl_execution_context* context) = 0;
180 
188  const IAnnotation_block* annotations,
189  IMdl_execution_context* context) = 0;
190 
200  virtual Sint32 remove_entity(
201  const char* name,
202  Size index,
203  IMdl_execution_context* context) = 0;
204 
206  virtual Sint32 clear_module( IMdl_execution_context* context) = 0;
207 
218  virtual const IArray* analyze_uniform(
219  const IExpression* root_expr,
220  bool root_expr_uniform,
221  IMdl_execution_context* context) = 0;
222 };
223  // end group mi_neuray_mdl_misc
225 
226 } // namespace neuraylib
227 
228 } // namespace mi
229 
230 #endif // MI_NEURAYLIB_IMDL_MODULE_BUILDER_H