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
iplugin_api.h
Go to the documentation of this file.
1
/***************************************************************************************************
2
* Copyright 2022 NVIDIA Corporation. All rights reserved.
3
**************************************************************************************************/
6
7
#ifndef MI_NEURAYLIB_IPLUGIN_API_H
8
#define MI_NEURAYLIB_IPLUGIN_API_H
9
10
#include <
mi/base/interface_declare.h
>
11
12
namespace
mi {
13
14
namespace
base {
class
ILogger; }
15
16
namespace
neuraylib {
17
22
class
IPlugin_api :
public
26
mi::base::Interface_declare
<0xf237d52c,0xf146,0x40e4,0xb0,0x35,0x99,0xcb,0xc9,0x77,0x64,0x6e>
27
{
28
public
:
32
virtual
Uint32
get_interface_version
()
const
= 0;
33
38
virtual
const
char
*
get_version
()
const
= 0;
39
50
virtual
base::IInterface*
get_api_component
(
const
base::Uuid& uuid)
const
= 0;
51
64
template
<
class
T>
65
T*
get_api_component
()
const
66
{
67
base::IInterface
* ptr_iinterface =
get_api_component
(
typename
T::IID());
68
if
( !ptr_iinterface)
69
return
0;
70
T* ptr_T =
static_cast<
T*
>
( ptr_iinterface->
get_interface
(
typename
T::IID()));
71
ptr_iinterface->
release
();
72
return
ptr_T;
73
}
74
88
virtual
Sint32
register_api_component
(
89
const
base::Uuid
& uuid,
base::IInterface
* api_component) = 0;
90
105
template
<
class
T>
106
Sint32
register_api_component
( T* api_component)
107
{
108
return
register_api_component
(
typename
T::IID(), api_component);
109
}
110
119
virtual
Sint32
unregister_api_component
(
const
base::Uuid
& uuid) = 0;
120
132
template
<
class
T>
133
Sint32
unregister_api_component
()
134
{
135
return
unregister_api_component
(
typename
T::IID());
136
}
137
};
138
// end group mi_neuray_plugins
140
141
}
// namespace neuraylib
142
143
}
// namespace mi
144
145
#endif // MI_NEURAYLIB_IPLUGIN_API_H
5 April 2022, 20:40, rev.358266
© 2022 NVIDIA Corporation.
All rights reserved.