diff options
author | David Robillard <d@drobilla.net> | 2018-01-21 00:41:34 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-01-21 00:56:50 +0100 |
commit | 44f7ad5222d824d81dc743045d5887418847e74e (patch) | |
tree | 1b41535ac00b8b225a25dba2873b064cb074bfa9 /src/server/PortType.hpp | |
parent | 90fca083052880479ad90d870e556f0648e32106 (diff) | |
download | ingen-44f7ad5222d824d81dc743045d5887418847e74e.tar.gz ingen-44f7ad5222d824d81dc743045d5887418847e74e.tar.bz2 ingen-44f7ad5222d824d81dc743045d5887418847e74e.zip |
Add URI class and remove use of Raul::URI
Diffstat (limited to 'src/server/PortType.hpp')
-rw-r--r-- | src/server/PortType.hpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/server/PortType.hpp b/src/server/PortType.hpp index be0426b0..0b62c5ab 100644 --- a/src/server/PortType.hpp +++ b/src/server/PortType.hpp @@ -19,8 +19,6 @@ #include <cassert> -#include "raul/URI.hpp" - #include "lv2/lv2plug.in/ns/ext/atom/atom.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" @@ -42,7 +40,7 @@ public: ATOM = 4 }; - explicit PortType(const Raul::URI& uri) + explicit PortType(const URI& uri) : _id(UNKNOWN) { if (uri == type_uri(AUDIO)) { @@ -58,8 +56,8 @@ public: PortType(ID id) : _id(id) {} - inline const Raul::URI& uri() const { return type_uri(_id); } - inline ID id() const { return _id; } + inline const URI& uri() const { return type_uri(_id); } + inline ID id() const { return _id; } inline bool operator==(const ID& id) const { return (_id == id); } inline bool operator!=(const ID& id) const { return (_id != id); } @@ -73,14 +71,14 @@ public: inline bool is_atom() { return _id == ATOM; } private: - static inline const Raul::URI& type_uri(unsigned id_num) { + static inline const URI& type_uri(unsigned id_num) { assert(id_num <= ATOM); - static const Raul::URI uris[] = { - Raul::URI("http://www.w3.org/2002/07/owl#Nothing"), - Raul::URI(LV2_CORE__AudioPort), - Raul::URI(LV2_CORE__ControlPort), - Raul::URI(LV2_CORE__CVPort), - Raul::URI(LV2_ATOM__AtomPort) + static const URI uris[] = { + URI("http://www.w3.org/2002/07/owl#Nothing"), + URI(LV2_CORE__AudioPort), + URI(LV2_CORE__ControlPort), + URI(LV2_CORE__CVPort), + URI(LV2_ATOM__AtomPort) }; return uris[id_num]; } |