From 64493583f2155b575493995de63072885db8aaba Mon Sep 17 00:00:00 2001 From: kohait Date: Thu, 4 Nov 2010 10:46:54 +0000 Subject: [PATCH] bazaar: Tree: Moveable and Iteration git-svn-id: svn://ultimatepp.org/upp/trunk@2833 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/Tree/Tree.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bazaar/Tree/Tree.h b/bazaar/Tree/Tree.h index 5ca901616..575956183 100644 --- a/bazaar/Tree/Tree.h +++ b/bazaar/Tree/Tree.h @@ -6,7 +6,7 @@ using namespace Upp; template class Tree - : protected Array + : protected Array, Moveable > { protected: typedef Array B; @@ -63,6 +63,10 @@ public: T *PopDetach() { T * t = B::PopDetach(); Unlink(*t); return t; } + using B::Begin; + using B::End; + using B::GetIter; + void Swap(Tree& b) { B::Swap(b); for(int i = 0; i < B::GetCount(); i++) Link(B::operator[](i)); for(int i = 0; i < b.GetCount(); i++) b.Link(b[i]); } Tree& operator<<(const T& x) { Add(x); return *this; }