diff options
author | David Robillard <d@drobilla.net> | 2017-02-15 22:41:18 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-02-15 23:26:02 +0100 |
commit | 2ba09e4b41b01cbd8f8756eb0e3b7e33136e06b3 (patch) | |
tree | 3033cd084a43a9dd904b96c7efaea2ff30a8502f /ingen/Node.hpp | |
parent | 4a7ebef865e91e6df521d61f55c5baa709e7776f (diff) | |
download | ingen-2ba09e4b41b01cbd8f8756eb0e3b7e33136e06b3.tar.gz ingen-2ba09e4b41b01cbd8f8756eb0e3b7e33136e06b3.tar.bz2 ingen-2ba09e4b41b01cbd8f8756eb0e3b7e33136e06b3.zip |
Move static path stuff to its own header
Diffstat (limited to 'ingen/Node.hpp')
-rw-r--r-- | ingen/Node.hpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/ingen/Node.hpp b/ingen/Node.hpp index 72c0b3cb..a585d03a 100644 --- a/ingen/Node.hpp +++ b/ingen/Node.hpp @@ -19,6 +19,7 @@ #include "ingen/Resource.hpp" #include "ingen/ingen.h" +#include "ingen/paths.hpp" #include "ingen/types.hpp" #include "lilv/lilv.h" #include "raul/Path.hpp" @@ -84,27 +85,6 @@ public: return Raul::URI(uri() + '/'); } - static Raul::URI main_uri() { return Raul::URI("ingen:/main"); } - - static bool uri_is_path(const Raul::URI& uri) { - const size_t root_len = main_uri().length(); - if (uri == main_uri()) { - return true; - } else { - return uri.substr(0, root_len + 1) == main_uri() + "/"; - } - } - - static Raul::Path uri_to_path(const Raul::URI& uri) { - return (uri == main_uri()) - ? Raul::Path("/") - : Raul::Path(uri.substr(main_uri().length())); - } - - static Raul::URI path_to_uri(const Raul::Path& path) { - return Raul::URI(main_uri() + path.c_str()); - } - protected: friend class Store; virtual void set_path(const Raul::Path& p) = 0; |