neuray API Programmer's Manual

plugin.h File Reference

Description

Base class for all plugins.

Code Example

plugin.h

‎/***************************************************************************************************
 * Copyright 2023 NVIDIA Corporation. All rights reserved.
 **************************************************************************************************/

#include <mi/base/types.h>
#include <mi/base/interface_declare.h>

#ifndef MI_BASE_PLUGIN_H
#define MI_BASE_PLUGIN_H

namespace mi {

namespace base {







class Plugin
{
public:
    // The currently used plugin system version.
    static const Sint32 s_version = 3;

    virtual Sint32 
               get_plugin_system_version() const { return s_version; }

    virtual const char* get_name() const = 0;

    virtual const char* get_type() const = 0;

    virtual Sint32 
               get_version() const { return 1; }

    virtual const char* get_compiler() const { return "unknown"; }

    virtual void release() = 0;

    virtual const char* get_string_property(
        Sint32 index,
        const char** value) { (void) index; (void) value; return 0; }

};

class IPlugin_descriptor : public
    mi::base::Interface_declare<0x1708ae5a,0xa49e,0x43c4,0xa3,0x94,0x00,0x38,0x4c,0x59,0xe8,0x67>
{
public:
    virtual base::Plugin* get_plugin() const = 0;

    virtual const char* get_plugin_library_path() const = 0;
};

#ifndef MI_FOR_DOXYGEN_ONLY
typedef Plugin* Plugin_factory (unsigned int /*index*/, void* /*context*/);
#else
typedef Plugin* Plugin_factory (unsigned int index, void* context);
#endif
 // end group mi_base_plugin

} // namespace base

} // namespace mi

#endif // MI_BASE_PLUGIN_H

Namespaces

namespace 
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
namespace 
Namespace for the Base API. More...

Classes

class 
Represents a plugin. More...
class 
The abstract base class for plugins. More...

Typedefs

typedef Plugin *  
Typedef for the initializer function to be provided by every plugin. More...