00001 #ifndef __FILETREE_H 00002 #define __FILETREE_H 00003 00004 #ifndef __DIRTREE_H 00005 class DirTree; 00006 #endif 00007 00008 #include "../drawing/drawingutils.h" 00009 #include "../drawing/drawableobject.h" 00010 #include "../positions/positionfile.h" 00011 00013 00018 class FileTree : public DrawableObject 00019 { 00020 public: 00021 // functions 00022 // contructor/destructors 00023 FileTree(); 00024 FileTree(char *name, char *loc, DirTree *pDir); 00025 ~FileTree(); 00026 00027 // get/set functions 00028 int setFileInfo(char *fullFileNameAndPath); 00029 int setFileType(int type); 00030 int setFileName(char *name); 00031 int setFileLocation(char *dir); 00032 int setPosition(int *pos); 00033 int getFileType(); 00034 char* getFileName(); 00035 char* getFileLocation(); 00036 DirTree* getParentDir(); 00037 virtual PositionFile* getPosition(); 00038 int getNumChildren(); 00039 int getNumParents(); 00040 FileTree** getParents(); 00041 00042 // drawing functions 00043 virtual void matrixOps(void *); 00044 virtual void draw(void*); 00045 00046 // tree manipulation functions 00047 int addChild(FileTree *child, int connectionType); 00048 int removeChild(FileTree *child); 00049 int addParent(FileTree *parent, int connectionType); 00050 int removeParent(FileTree *parent); 00051 00052 private: 00053 // tree connection data 00054 FileTree **parents; 00055 int *parentConnectionType; 00056 int numParents; 00057 FileTree **children; 00058 int *childConnectionType; 00059 int numChildren; 00060 00061 // file information 00062 int fileType; 00063 char *fileName; 00064 char *fileLocation; 00065 00066 //link to directory 00067 DirTree *parentDir; 00068 00069 PositionFile *thePosition; 00070 }; 00071 00072 enum 00073 { 00074 Nothing = 0, 00075 Include = 1, 00076 ExternVar = 2 00077 00078 }; 00079 00080 enum 00081 { 00082 CppSource, 00083 CSource, 00084 Header, 00085 00086 OtherFiles 00087 }; 00088 00089 00090 #endif
1.3.6