Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

dirtree.h

Go to the documentation of this file.
00001 #ifndef __DIRTREE_H
00002 #define __DIRTREE_H
00003 
00004 #include "../drawing/drawableobject.h"
00005 #include "../positions/positiondir.h"
00006 #include "filetree.h"
00007 
00008 #ifndef __FILETREE_H
00009 class FileTree;
00010 #endif
00011 
00013 
00018 class DirTree : public DrawableObject
00019 {
00020 public:
00021         // functions
00022         // constructors/destructors
00023         DirTree();
00024         DirTree(char *name, char *loc, char *fullName, DirTree *theParent);
00025         //DirTree(char *dir, RenderEngine *engine, DirTree *theParent = 0);
00026         ~DirTree();
00027 
00028         void updatePositions();
00029         void updatePositionRelations();
00030 
00031         // get/set functions
00032         int setDirName(char *name); //
00033         int setDirLocation(char *loc); //
00034         char* getDirName(); //
00035         char* getDirLocation(); //
00036         virtual PositionDir* getPosition(); //
00037 
00038         DirTree** getChildren(); //
00039         int getNumChildren(); //
00040         FileTree** getFiles();
00041         int getNumFiles();
00042 
00043         // printing functions for debug
00044 
00045         int printTree();
00046         int printTreeRecursive();
00047         int printTreeCoords();
00048         int printTreeCoordsRecursive();
00049 
00050         // draw functions
00051         virtual void matrixOps(void *);
00052         virtual void draw(void*);
00053 
00054         // tree manipulation functions
00055         int addChild(DirTree *child, int connectionType); //
00056         int removeChild(DirTree *child); //
00057         int setParent(DirTree *parent);
00058         DirTree* getParent();
00059 
00060         // file manipulation
00061         int addFile(FileTree *file);
00062         int removeFile(FileTree *file);
00063 
00064 private:
00065 
00066         // data
00067         DirTree *parent;
00068         DirTree **children;
00069         int *childConnectionType;
00070         int numChildren;
00071         FileTree **filesContained;
00072         int numFiles;
00073 
00074         char *dirName;
00075         char *dirLocation;
00076         char *dirFullName;
00077 
00078         // positioning data
00079         PositionDir *thePosition;
00080 
00081 };
00082 
00083 enum
00084 {
00085         Directory = 0,
00086         SymLink = 1
00087 };
00088 
00089 #endif

Generated on Sat Aug 28 10:33:23 2004 by doxygen 1.3.6