MDL SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ifunction_call.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2022 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IFUNCTION_CALL_H
8 #define MI_NEURAYLIB_IFUNCTION_CALL_H
9 
10 #include <cstring>
11 
15 
16 namespace mi {
17 
18 namespace neuraylib {
19 
23 class IMdl_execution_context;
24 
32  MDL_REPAIR_OPTIONS_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only
33 };
34 
35 mi_static_assert( sizeof( Mdl_repair_options) == sizeof( Uint32));
36 
49 class IFunction_call : public
50  mi::base::Interface_declare<0x67b29f5f,0xdbc1,0x4300,0x94,0x53,0x3e,0x2d,0x28,0x29,0xc1,0xe9,
51  neuraylib::IScene_element>
52 {
53 public:
60  virtual const char* get_function_definition() const = 0;
61 
66  virtual const char* get_mdl_function_definition() const = 0;
67 
72  virtual bool is_material() const = 0;
73 
77  inline bool is_array_constructor() const
78  { return strcmp( get_mdl_function_definition(), "T[](...)") == 0; }
79 
81  virtual const IType* get_return_type() const = 0;
82 
84  virtual Size get_parameter_count() const = 0;
85 
90  virtual const char* get_parameter_name( Size index) const = 0;
91 
96  virtual Size get_parameter_index( const char* name) const = 0;
97 
99  virtual const IType_list* get_parameter_types() const = 0;
100 
102  virtual const IExpression_list* get_arguments() const = 0;
103 
127  virtual Sint32 set_arguments( const IExpression_list* arguments) = 0;
128 
150  virtual Sint32 set_argument( Size index, const IExpression* argument) = 0;
151 
173  virtual Sint32 set_argument( const char* name, const IExpression* argument) = 0;
174 
189  virtual Sint32 reset_argument( Size index) = 0;
190 
206  virtual Sint32 reset_argument( const char* name) = 0;
207 
215  virtual bool is_default() const = 0;
216 
229  virtual bool is_valid( IMdl_execution_context* context) const = 0;
230 
239  virtual Sint32 repair( Uint32 flags, IMdl_execution_context* context) = 0;
240 };
241  // end group mi_neuray_mdl_elements
243 
244 } // namespace neuraylib
245 
246 } // namespace mi
247 
248 #endif // MI_NEURAYLIB_IFUNCTION_CALL