comparison vamp-sdk/PluginAdapter.h @ 53:74822738965b

* Some doc updates
author cannam
date Wed, 21 Mar 2007 14:15:25 +0000
parents be8fdfe25693
children 6683f99107cf
comparison
equal deleted inserted replaced
52:d3995d2b5e08 53:74822738965b
43 43
44 #include <map> 44 #include <map>
45 45
46 namespace Vamp { 46 namespace Vamp {
47 47
48 /**
49 * PluginAdapter and PluginAdapterBase provide a wrapper class that a
50 * plugin library can use to make its C++ Vamp::Plugin objects
51 * available through the Vamp C API.
52 *
53 * Almost all Vamp plugin libraries will want to make use of this. To
54 * do so, all they need to do is declare a PluginAdapter<T> for each
55 * plugin class T in their library. It's very simple, and you need to
56 * know absolutely nothing about how it works in order to use it.
57 * Just cut and paste from an existing plugin's discovery function.
58 * @see vampGetPluginDescriptor
59 */
60
48 class PluginAdapterBase 61 class PluginAdapterBase
49 { 62 {
50 public: 63 public:
51 virtual ~PluginAdapterBase(); 64 virtual ~PluginAdapterBase();
65
66 /**
67 * Return a VampPluginDescriptor describing the plugin that is
68 * wrapped by this adapter.
69 */
52 const VampPluginDescriptor *getDescriptor(); 70 const VampPluginDescriptor *getDescriptor();
53 71
54 protected: 72 protected:
55 PluginAdapterBase(); 73 PluginAdapterBase();
56 74
124 void resizeFS(Plugin *plugin, int n); 142 void resizeFS(Plugin *plugin, int n);
125 void resizeFL(Plugin *plugin, int n, size_t sz); 143 void resizeFL(Plugin *plugin, int n, size_t sz);
126 void resizeFV(Plugin *plugin, int n, int j, size_t sz); 144 void resizeFV(Plugin *plugin, int n, int j, size_t sz);
127 }; 145 };
128 146
147 /**
148 * PluginAdapter turns a PluginAdapterBase into a specific wrapper for
149 * a particular plugin implementation.
150 *
151 * See PluginAdapterBase.
152 */
153
129 template <typename P> 154 template <typename P>
130 class PluginAdapter : public PluginAdapterBase 155 class PluginAdapter : public PluginAdapterBase
131 { 156 {
132 public: 157 public:
133 PluginAdapter() : PluginAdapterBase() { } 158 PluginAdapter() : PluginAdapterBase() { }