summaryrefslogtreecommitdiffstats
path: root/raul
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-27 19:20:53 +0000
committerDavid Robillard <d@drobilla.net>2012-04-27 19:20:53 +0000
commit1b29f20d73d839c324cf4ce2df61d2e857617383 (patch)
tree53e5d53faac6de9c2e77104131a5dd43a4d99cb8 /raul
parent62c10d2abae74e8c45b4ddb182757e934618dd72 (diff)
downloadraul-1b29f20d73d839c324cf4ce2df61d2e857617383.tar.gz
raul-1b29f20d73d839c324cf4ce2df61d2e857617383.tar.bz2
raul-1b29f20d73d839c324cf4ce2df61d2e857617383.zip
Implement connecting via atom interface.
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4285 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul')
-rw-r--r--raul/Path.hpp3
-rw-r--r--raul/URI.hpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/raul/Path.hpp b/raul/Path.hpp
index 91122c6..a00740a 100644
--- a/raul/Path.hpp
+++ b/raul/Path.hpp
@@ -134,6 +134,9 @@ public:
Path operator+(const Path& p) const { return child(p); }
+ /** Return the lowest common ancestor of a and b. */
+ static Path lca(const Path& a, const Path& b);
+
/** Return the symbol of this path (everything after the last '/').
* This is e.g. the "method name" for OSC paths, the filename
* for filesystem paths, etc.
diff --git a/raul/URI.hpp b/raul/URI.hpp
index 90d285c..6a6b532 100644
--- a/raul/URI.hpp
+++ b/raul/URI.hpp
@@ -90,6 +90,8 @@ public:
inline bool operator==(const URI& uri) const { return _str == uri._str; }
inline bool operator!=(const URI& uri) const { return _str != uri._str; }
+ inline char operator[](int i) const { return _str[i]; }
+
inline size_t length() const { return str().length(); }
inline size_t find(const std::string& s) const { return str().find(s); }
inline size_t find_last_of(char c) const { return str().find_last_of(c); }