Material Definition Language 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 2020 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 class IFunction_call : public
33  mi::base::Interface_declare<0x67b29f5f,0xdbc1,0x4300,0x94,0x53,0x3e,0x2d,0x28,0x29,0xc1,0xe9,
34  neuraylib::IScene_element>
35 {
36 public:
43  virtual const char* get_function_definition() const = 0;
44 
49  virtual const char* get_mdl_function_definition() const = 0;
50 
54  inline bool is_array_constructor() const
55  { return strcmp( get_mdl_function_definition(), "T[](...)") == 0; }
56 
58  virtual const IType* get_return_type() const = 0;
59 
61  virtual Size get_parameter_count() const = 0;
62 
67  virtual const char* get_parameter_name( Size index) const = 0;
68 
73  virtual Size get_parameter_index( const char* name) const = 0;
74 
76  virtual const IType_list* get_parameter_types() const = 0;
77 
79  virtual const IExpression_list* get_arguments() const = 0;
80 
104  virtual Sint32 set_arguments( const IExpression_list* arguments) = 0;
105 
127  virtual Sint32 set_argument( Size index, const IExpression* argument) = 0;
128 
150  virtual Sint32 set_argument( const char* name, const IExpression* argument) = 0;
151 
159  virtual bool is_default() const = 0;
160 
172  virtual bool is_valid(IMdl_execution_context* context) const = 0;
173 
182  virtual Sint32 repair(
183  Uint32 flags,
184  IMdl_execution_context* context) = 0;
185 };
186  // end group mi_neuray_mdl_elements
188 
189 } // namespace neuraylib
190 
191 } // namespace mi
192 
193 #endif // MI_NEURAYLIB_IFUNCTION_CALL