NVIDIA Iray API
Home
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 1986, 2016 NVIDIA Corporation. All rights reserved.
3
//*****************************************************************************
6
//*****************************************************************************
7
8
#ifndef MI_NEURAYLIB_IPLUGIN_API_H
9
#define MI_NEURAYLIB_IPLUGIN_API_H
10
11
#include <
mi/base/interface_declare.h
>
12
13
namespace
mi {
14
15
namespace
base {
class
ILogger; }
16
17
namespace
neuraylib {
18
23
class
IPlugin_api :
public
27
mi::base::Interface_declare
<0xf237d52c,0xf146,0x40e4,0xb0,0x35,0x99,0xcb,0xc9,0x77,0x64,0x6e>
28
{
29
public
:
33
virtual
Uint32
get_interface_version
()
const
= 0;
34
39
virtual
const
char
*
get_version
()
const
= 0;
40
51
virtual
base::IInterface*
get_api_component
(
const
base::Uuid& uuid)
const
= 0;
52
65
template
<
class
T>
66
T*
get_api_component
()
const
67
{
68
base::IInterface
* ptr_iinterface =
get_api_component
(
typename
T::IID());
69
if
( !ptr_iinterface)
70
return
0;
71
T* ptr_T =
static_cast<
T*
>
( ptr_iinterface->
get_interface
(
typename
T::IID()));
72
ptr_iinterface->
release
();
73
return
ptr_T;
74
}
75
89
virtual
Sint32
register_api_component
(
90
const
base::Uuid
& uuid,
base::IInterface
* api_component) = 0;
91
106
template
<
class
T>
107
Sint32
register_api_component
( T* api_component)
108
{
109
return
register_api_component
(
typename
T::IID(), api_component);
110
}
111
120
virtual
Sint32
unregister_api_component
(
const
base::Uuid
& uuid) = 0;
121
133
template
<
class
T>
134
Sint32
unregister_api_component
()
135
{
136
return
unregister_api_component
(
typename
T::IID());
137
}
138
};
139
// end group mi_neuray_plugins
141
142
}
// namespace neuraylib
143
144
}
// namespace mi
145
146
#endif // MI_NEURAYLIB_IPLUGIN_API_H
mi
neuraylib
iplugin_api.h
Generated on Fri Mar 4 2016 19:53:39. Build 250909.11169, Doxygen 1.8.4