comparison bits/PluginHandleMapper.h @ 57:7aec704705c7

Make the output ID mapper stuff safer by using shared_ptr
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 19 Sep 2016 14:43:32 +0100
parents f4244a2d55ac
children 8a4bcb3dc3a6
comparison
equal deleted inserted replaced
56:815e94fedc1c 57:7aec704705c7
33 */ 33 */
34 34
35 #ifndef VAMPIPE_PLUGIN_HANDLE_MAPPER_H 35 #ifndef VAMPIPE_PLUGIN_HANDLE_MAPPER_H
36 #define VAMPIPE_PLUGIN_HANDLE_MAPPER_H 36 #define VAMPIPE_PLUGIN_HANDLE_MAPPER_H
37 37
38 #include "PluginOutputIdMapper.h"
39
38 #include <vamp-hostsdk/Plugin.h> 40 #include <vamp-hostsdk/Plugin.h>
39 41 #include <memory>
40 #include "PluginOutputIdMapper.h"
41 42
42 namespace vampipe { 43 namespace vampipe {
43 44
44 class PluginHandleMapper 45 class PluginHandleMapper
45 { 46 {
56 }; 57 };
57 58
58 virtual Handle pluginToHandle(Vamp::Plugin *) const = 0; // may throw NotFound 59 virtual Handle pluginToHandle(Vamp::Plugin *) const = 0; // may throw NotFound
59 virtual Vamp::Plugin *handleToPlugin(Handle) const = 0; // may throw NotFound 60 virtual Vamp::Plugin *handleToPlugin(Handle) const = 0; // may throw NotFound
60 61
61 virtual const PluginOutputIdMapper &pluginToOutputIdMapper(Vamp::Plugin *p) const = 0; // may throw NotFound 62 virtual const std::shared_ptr<PluginOutputIdMapper> pluginToOutputIdMapper
62 virtual const PluginOutputIdMapper &handleToOutputIdMapper(Handle h) const = 0; // may throw NotFound 63 (Vamp::Plugin *p) const = 0; // may throw NotFound
64
65 virtual const std::shared_ptr<PluginOutputIdMapper> handleToOutputIdMapper
66 (Handle h) const = 0; // may throw NotFound
63 }; 67 };
64 68
65 } 69 }
66 70
67 #endif 71 #endif