vamp-sdk/PluginBase.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _VAMP_SDK_PLUGIN_BASE_H_
00038 #define _VAMP_SDK_PLUGIN_BASE_H_
00039
00040 #include <string>
00041 #include <vector>
00042
00043 #include "plugguard.h"
00044 _VAMP_SDK_PLUGSPACE_BEGIN(PluginBase.h)
00045
00046 namespace Vamp {
00047
00060 class PluginBase
00061 {
00062 public:
00063 virtual ~PluginBase() { }
00064
00068 virtual unsigned int getVampApiVersion() const { return 2; }
00069
00083 virtual std::string getIdentifier() const = 0;
00084
00093 virtual std::string getName() const = 0;
00094
00103 virtual std::string getDescription() const = 0;
00104
00111 virtual std::string getMaker() const = 0;
00112
00118 virtual std::string getCopyright() const = 0;
00119
00123 virtual int getPluginVersion() const = 0;
00124
00125
00126 struct ParameterDescriptor
00127 {
00133 std::string identifier;
00134
00138 std::string name;
00139
00144 std::string description;
00145
00149 std::string unit;
00150
00154 float minValue;
00155
00159 float maxValue;
00160
00167 float defaultValue;
00168
00173 bool isQuantized;
00174
00180 float quantizeStep;
00181
00193 std::vector<std::string> valueNames;
00194
00195 ParameterDescriptor() :
00196 minValue(0), maxValue(0), defaultValue(0), isQuantized(false) { }
00197 };
00198
00199 typedef std::vector<ParameterDescriptor> ParameterList;
00200
00204 virtual ParameterList getParameterDescriptors() const {
00205 return ParameterList();
00206 }
00207
00212 virtual float getParameter(std::string) const { return 0.0; }
00213
00218 virtual void setParameter(std::string, float) { }
00219
00220
00221 typedef std::vector<std::string> ProgramList;
00222
00233 virtual ProgramList getPrograms() const { return ProgramList(); }
00234
00238 virtual std::string getCurrentProgram() const { return ""; }
00239
00244 virtual void selectProgram(std::string) { }
00245
00251 virtual std::string getType() const = 0;
00252 };
00253
00254 }
00255
00256 _VAMP_SDK_PLUGSPACE_END(PluginBase.h)
00257
00258 #endif