NVIDIA Iray: Base API Home  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 1986, 2016 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 
28 class Plugin
35 {
36 public:
37  // The currently used plugin system version.
38  static const Sint32 s_version = 3;
39 
47  virtual Sint32 get_plugin_system_version() const { return s_version; }
48 
50  virtual const char* get_name() const = 0;
51 
55  virtual const char* get_type() const = 0;
56 
58  virtual Sint32 get_version() const { return 1; }
59 
61  virtual const char* get_compiler() const { return "unknown"; }
62 
68  virtual void release() = 0;
69 
79  virtual const char* get_string_property(
80  Sint32 index,
81  const char** value) { (void) index; (void) value; return 0; }
82 
83 };
84 
93 #ifndef MI_FOR_DOXYGEN_ONLY
94 typedef Plugin* Plugin_factory (unsigned int /*index*/, void* /*context*/);
95 #else
96 typedef Plugin* Plugin_factory (unsigned int index, void* context);
97 #endif
98  // end group mi_base_plugin
100 
101 } // namespace base
102 
103 } // namespace mi
104 
105 #endif // MI_BASE_PLUGIN_H