NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
plugin.h
Go to the documentation of this file.
1 //*****************************************************************************
2 // Copyright 1986, 2014 NVIDIA Corporation. All rights reserved.
3 //*****************************************************************************
7 //*****************************************************************************
8 
9 #include <mi/base/types.h>
10 
11 #ifndef MI_BASE_PLUGIN_H
12 #define MI_BASE_PLUGIN_H
13 
14 namespace mi {
15 
16 namespace base {
17 
29 class Plugin
36 {
37 public:
38  // The currently used plugin system version.
39  static const Sint32 s_version = 3;
40 
48  virtual Sint32 get_plugin_system_version() const { return s_version; }
49 
53  virtual const char* get_name() const = 0;
54 
60  virtual const char* get_type() const = 0;
61 
65  virtual Sint32 get_version() const;
66 
70  virtual const char* get_compiler() const;
71 
73  virtual void release() = 0;
74 
82  virtual const char* get_string_property(
83  Sint32 index, // the index to query
84  const char** value) { (void) index; (void) value; return 0; } // the value or 0
85 
86 };
87 
89 inline Sint32 Plugin::get_version() const
90 {
91  return 1;
92 }
93 
95 inline const char* Plugin::get_compiler() const
96 {
97  return "unknown";
98 }
99 
108 #ifndef MI_FOR_DOXYGEN_ONLY
109 typedef Plugin* Plugin_factory (unsigned int /*index*/, void* /*context*/);
110 #else
111 typedef Plugin* Plugin_factory (unsigned int index, void* context);
112 #endif
113  // end group mi_base_plugin
115 
116 } // namespace base
117 
118 } // namespace mi
119 
120 #endif // MI_BASE_PLUGIN_H