Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
plugin.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2020 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #include <mi/base/types.h>
9 
10 #ifndef MI_BASE_PLUGIN_H
11 #define MI_BASE_PLUGIN_H
12 
13 namespace mi {
14 
15 namespace base {
16 
27 class Plugin
34 {
35 public:
36  // The currently used plugin system version.
37  static const Sint32 s_version = 3;
38 
46  virtual Sint32 get_plugin_system_version() const { return s_version; }
47 
49  virtual const char* get_name() const = 0;
50 
54  virtual const char* get_type() const = 0;
55 
57  virtual Sint32 get_version() const { return 1; }
58 
60  virtual const char* get_compiler() const { return "unknown"; }
61 
67  virtual void release() = 0;
68 
78  virtual const char* get_string_property(
79  Sint32 index,
80  const char** value) { (void) index; (void) value; return 0; }
81 
82 };
83 
89 class IPlugin_descriptor : public
90  mi::base::Interface_declare<0x1708ae5a,0xa49e,0x43c4,0xa3,0x94,0x00,0x38,0x4c,0x59,0xe8,0x67>
91 {
92 public:
99  virtual base::Plugin* get_plugin() const = 0;
100 
104  virtual const char* get_plugin_library_path() const = 0;
105 };
106 
115 #ifndef MI_FOR_DOXYGEN_ONLY
116 typedef Plugin* Plugin_factory (unsigned int /*index*/, void* /*context*/);
117 #else
118 typedef Plugin* Plugin_factory (unsigned int index, void* context);
119 #endif
120  // end group mi_base_plugin
122 
123 } // namespace base
124 
125 } // namespace mi
126 
127 #endif // MI_BASE_PLUGIN_H