From d843ef0f88d02f685db90b957545b237218a0bcb Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 4 Dec 2003 03:39:28 +0000 Subject: Added DirTree browsing --- lib/isobuilder.cpp | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/isobuilder.cpp b/lib/isobuilder.cpp index e0433e0..cee2b93 100644 --- a/lib/isobuilder.cpp +++ b/lib/isobuilder.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: isobuilder.cpp,v 1.3 2003-12-04 03:35:31 pixel Exp $ */ +/* $Id: isobuilder.cpp,v 1.4 2003-12-04 03:39:28 pixel Exp $ */ #include "isobuilder.h" @@ -380,6 +380,33 @@ int isobuilder::DirTree::numerate(int n) { return n; } +isobuilder::DirTree * isobuilder::DirTree::Father() { + return father; +} + +isobuilder::DirTree * isobuilder::DirTree::Brother() { + return brother; +} + +isobuilder::DirTree * isobuilder::DirTree::Child() { + return child; +} + +isobuilder::DirTree * isobuilder::DirTree::Find(const String & _name) { + DirTree * p = 0; + + if (name == _name) + return this; + + if (brother) + p = brother->Find(_name); + + if (!p && child) + return child->Find(_name); + + return p; +} + isobuilder::isobuilder(Handle * _w, int _mode) : w(_w), sector(0), nsectors(0), basics(false), dmode(_mode) { Byte sect[2352]; memset(sect, 0, 2352); -- cgit v1.2.3