iplugin_api.h File Reference
Description
API component provided to plugins.
Code Example
iplugin_api.h
//*****************************************************************************
// Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
//*****************************************************************************
//*****************************************************************************
#ifndef MI_NEURAYLIB_IPLUGIN_API_H
#define MI_NEURAYLIB_IPLUGIN_API_H
#include <mi/base/interface_declare.h>
namespace mi {
namespace base { class ILogger; }
namespace neuraylib {
class IPlugin_api : public
mi::base::Interface_declare<0xf237d52c,0xf146,0x40e4,0xb0,0x35,0x99,0xcb,0xc9,0x77,0x64,0x6e>
{
public:
virtual Uint32
get_interface_version() const = 0;
virtual const char* get_version() const = 0;
virtual base::IInterface* get_api_component( const base::Uuid& uuid) const = 0;
template<class T>
T* get_api_component() const
{
base::IInterface* ptr_iinterface = get_api_component( typename T::IID());
if ( !ptr_iinterface)
return 0;
T* ptr_T = static_cast<T*>( ptr_iinterface->get_interface( typename T::IID()));
ptr_iinterface->release();
return ptr_T;
}
virtual Sint32
register_api_component(
const base::Uuid& uuid, base::IInterface* api_component) = 0;
template<class T>
Sint32
register_api_component( T* api_component)
{
return register_api_component( typename T::IID(), api_component);
}
virtual Sint32
unregister_api_component( const base::Uuid& uuid) = 0;
template<class T>
Sint32
unregister_api_component()
{
return unregister_api_component( typename T::IID());
}
};
// end group mi_neuray_plugins
} // namespace neuraylib
} // namespace mi
#endif // MI_NEURAYLIB_IPLUGIN_API_H
Namespaces
- namespace
- Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
- namespace
- Namespace for the Base API. More...
- namespace
- Namespace for the neuray API. More...
Classes
- class
- This abstract interface gives access to the neuray API to plugins. More...