MDL SDK API
Up
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
imdl_execution_context.h
Go to the documentation of this file.
1
/***************************************************************************************************
2
* Copyright 2022 NVIDIA Corporation. All rights reserved.
3
**************************************************************************************************/
6
7
#ifndef MI_NEURAYLIB_IMDL_EXECUTION_CONTEXT_H
8
#define MI_NEURAYLIB_IMDL_EXECUTION_CONTEXT_H
9
10
#include <
mi/base/interface_declare.h
>
11
#include <
mi/base/enums.h
>
12
#include <
mi/base/handle.h
>
13
14
namespace
mi {
15
16
namespace
neuraylib {
17
18
23
class
IMessage:
public
25
base::Interface_declare<0x51965a01,0xcd3f,0x41fc,0xb1,0x8b,0x8,0x1c,0x7b,0x4b,0xba,0xb2>
26
{
27
public
:
28
32
enum
Kind
{
33
35
MSG_COMILER_CORE
,
37
MSG_COMILER_BACKEND
,
39
MSG_COMPILER_DAG
,
41
MSG_COMPILER_ARCHIVE_TOOL
,
43
MSG_IMP_EXP
,
45
MSG_INTEGRATION
,
47
MSG_UNCATEGORIZED
,
48
// Undocumented, for alignment only.
49
MSG_FORCE_32_BIT = 0xffffffffU
50
};
51
53
virtual
Kind
get_kind
()
const
= 0;
54
56
virtual
base::Message_severity
get_severity
()
const
= 0;
57
59
virtual
const
char
*
get_string
()
const
= 0;
60
62
virtual
Sint32
get_code
()
const
= 0;
63
67
virtual
Size
get_notes_count
()
const
= 0;
68
70
virtual
const
IMessage
*
get_note
(
Size
index)
const
= 0;
71
};
72
120
class
IMdl_execution_context
:
public
121
base::Interface_declare
<0x28eb1f99,0x138f,0x4fa2,0xb5,0x39,0x17,0xb4,0xae,0xfb,0x1b,0xca>
122
{
123
public
:
124
126
127
129
virtual
Size
get_messages_count
()
const
= 0;
130
132
virtual
Size
get_error_messages_count
()
const
= 0;
133
135
virtual
const
IMessage
*
get_message
(
Size
index)
const
= 0;
136
138
virtual
const
IMessage
*
get_error_message
(
Size
index)
const
= 0;
139
141
virtual
void
clear_messages
() = 0;
142
144
virtual
void
add_message
(
145
IMessage::Kind
kind,
146
base::Message_severity
severity,
147
Sint32
code,
148
const
char
* message) = 0;
149
151
153
155
virtual
Size
get_option_count
()
const
= 0;
156
158
virtual
const
char
*
get_option_name
(
Size
index)
const
= 0;
159
161
virtual
const
char
*
get_option_type
(
const
char
* name)
const
= 0;
162
171
virtual
Sint32
get_option
(
const
char
* name,
const
char
*& value)
const
= 0;
172
181
virtual
Sint32
get_option
(
const
char
* name,
Sint32
& value)
const
= 0;
182
191
virtual
Sint32
get_option
(
const
char
* name,
Float32
& value)
const
= 0;
192
201
virtual
Sint32
get_option
(
const
char
* name,
bool
& value)
const
= 0;
202
211
virtual
Sint32
get_option
(
const
char
* name,
const
base::IInterface
** value)
const
= 0;
212
221
template
<
typename
T>
222
const
T*
get_option
(
const
char
* name,
Sint32
& return_code)
223
{
224
const
base::IInterface
* pointer = 0;
225
return_code =
get_option
( name, &pointer);
226
if
( return_code != 0 || !pointer)
227
return
0;
228
229
base::Handle<const base::IInterface>
handle( pointer);
230
const
T* pointer_T = pointer->
get_interface
<T>();
231
if
( !pointer_T) {
232
return_code = -2;
233
return
0;
234
}
235
236
return
pointer_T;
237
}
238
247
virtual
Sint32
set_option
(
const
char
* name,
const
char
* value) = 0;
248
257
virtual
Sint32
set_option
(
const
char
* name,
Sint32
value) = 0;
258
267
virtual
Sint32
set_option
(
const
char
* name,
Float32
value) = 0;
268
278
virtual
Sint32
set_option
(
const
char
* name,
bool
value) = 0;
279
289
virtual
Sint32
set_option
(
const
char
* name,
const
base::IInterface
* value) = 0;
290
292
};
293
294
// end group mi_neuray_mdl_misc
296
297
}
// namespace neuraylib
298
}
// namespace mi
299
300
#endif // MI_NEURAYLIB_IMDL_EXECUTION_CONTEXT_H
5 April 2022, 20:40, rev.358266
© 2022 NVIDIA Corporation.
All rights reserved.