From 47fb95d6086c2c67086316a25b4c0858783d3c2b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 Jul 2007 11:29:31 +0000 Subject: Added PathTable, simple pretty wrapper around Table which provides super fast "find all descendants". I couldn't deal with the 'one big table' or 'parents own/lookup children' decision, so I came up with this thing instead. It's pretty cool I guess. git-svn-id: http://svn.drobilla.net/lad/raul@635 a436a847-0d15-0410-975c-d299462d15a1 --- raul/Table.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'raul/Table.hpp') diff --git a/raul/Table.hpp b/raul/Table.hpp index d30b23e..e4d4fa5 100644 --- a/raul/Table.hpp +++ b/raul/Table.hpp @@ -75,12 +75,16 @@ public: void erase(const K& key); void erase(iterator i); - void erase(iterator begin, iterator end); - void erase(size_t begin, size_t end); + void erase(iterator start, iterator end); + void erase(size_t start, size_t end); const_iterator find(const K& key) const; iterator find(const K& key); + const_iterator find_range_end(const_iterator left, bool (*comp)(const K&,const K&)) const; + const_iterator find_in_range(const K& key, const_iterator start, const_iterator end, + bool (*comp)(const K&,const K&)) const; + T& operator[](const K& key); const_iterator begin() const { return const_iterator(*this, 0); } -- cgit v1.2.1