neuray API Programmer's Manual

plugin.h File Reference

Description

Base class for all plugins.

Code Example

plugin.h

‎//*****************************************************************************
// Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
//*****************************************************************************
//*****************************************************************************

#include <mi/base/types.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; }

};

#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 
The abstract base class for plugins. More...

Typedefs

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