diff options
-rw-r--r-- | includes/isobuilder.h | 6 | ||||
-rw-r--r-- | lib/isobuilder.cpp | 29 |
2 files changed, 33 insertions, 2 deletions
diff --git a/includes/isobuilder.h b/includes/isobuilder.h index e0a8849..572c332 100644 --- a/includes/isobuilder.h +++ b/includes/isobuilder.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: isobuilder.h,v 1.3 2003-12-04 03:35:31 pixel Exp $ */ +/* $Id: isobuilder.h,v 1.4 2003-12-04 03:39:28 pixel Exp $ */ #ifndef __ISOBUILDER_H__
#define __ISOBUILDER_H__
@@ -57,6 +57,10 @@ class isobuilder : public Base { bool have_xa, xa_dir, xa_audio, xa_str, xa_xa, xa_form1;
int buildentry(Byte * buffer, int spaceleft, bool put_xa = true);
int mode;
+ DirTree * Father();
+ DirTree * Child();
+ DirTree * Brother();
+ DirTree * Find(const String &);
private:
DirTree * father, * child, * brother;
bool dir;
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);
|