diff bits/PluginOutputIdMapper.h @ 65:2d866edd79d5

Merge from noexcept branch
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 23 Sep 2016 14:23:10 +0100
parents 8a4bcb3dc3a6
children
line wrap: on
line diff
--- a/bits/PluginOutputIdMapper.h	Fri Sep 23 14:20:29 2016 +0100
+++ b/bits/PluginOutputIdMapper.h	Fri Sep 23 14:23:10 2016 +0100
@@ -42,14 +42,23 @@
 
 namespace vampipe {
 
-//!!! doc interface
 class PluginOutputIdMapper
 {
 public:
     virtual ~PluginOutputIdMapper() { }
-    
-    virtual int idToIndex(std::string outputId) const = 0;
-    virtual std::string indexToId(int index) const = 0;
+
+    /**
+     * Return the index of the given output id in the plugin. The
+     * first output has index 0. If the given output id is unknown,
+     * return -1.
+     */
+    virtual int idToIndex(std::string outputId) const noexcept = 0;
+
+    /**
+     * Return the id of the output with the given index in the
+     * plugin. If the index is out of range, return the empty string.
+     */
+    virtual std::string indexToId(int index) const noexcept = 0;
 };
 
 }