summaryrefslogtreecommitdiffstats
path: root/src/filedef.h
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-08-08 12:54:22 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-08-08 12:54:22 (GMT)
commitd09056a74447fe1c841ffd469986afdffd99765b (patch)
tree7c2d3f65b509d762729291b5341f0751138192fd /src/filedef.h
parent8c1096fc0147c36d3e026ec093b2c5f9158ae01d (diff)
downloadDoxygen-d09056a74447fe1c841ffd469986afdffd99765b.zip
Doxygen-d09056a74447fe1c841ffd469986afdffd99765b.tar.gz
Doxygen-d09056a74447fe1c841ffd469986afdffd99765b.tar.bz2
Release-1.3.3-20030808
Diffstat (limited to 'src/filedef.h')
-rw-r--r--src/filedef.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/filedef.h b/src/filedef.h
index 13b3b2c..d0e7c02 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -241,4 +241,51 @@ class OutputNameDict : public QDict<FileList>
~OutputNameDict() {}
};
+class Directory;
+
+class DirEntry
+{
+ public:
+ enum EntryKind { Dir, File };
+ DirEntry::DirEntry(DirEntry *parent,FileDef *fd)
+ : m_parent(parent), m_kind(File), m_fd(fd), m_isLast(FALSE) { }
+ DirEntry::DirEntry(DirEntry *parent)
+ : m_parent(parent), m_kind(Dir), m_fd(0), m_isLast(FALSE) { }
+ virtual ~DirEntry() { }
+ EntryKind kind() const { return m_kind; }
+ FileDef *file() const { return m_fd; }
+ bool isLast() const { return m_isLast; }
+ void setLast(bool b) { m_isLast=b; }
+ DirEntry *parent() const { return m_parent; }
+
+ protected:
+ DirEntry *m_parent;
+ private:
+ EntryKind m_kind;
+ FileDef *m_fd;
+ int num;
+ bool m_isLast;
+};
+
+class Directory : public DirEntry
+{
+ public:
+ Directory(Directory *parent,const QCString &name)
+ : DirEntry(parent), m_name(name)
+ { m_children.setAutoDelete(TRUE); }
+ virtual ~Directory() {}
+ void addChild(DirEntry *d) { m_children.append(d); d->setLast(TRUE); }
+ QList<DirEntry> &children() { return m_children; }
+ void rename(const QCString &name) { m_name=name; }
+ void reParent(Directory *parent) { m_parent=parent; }
+ QCString name() const { return m_name; }
+
+ private:
+ QCString m_name;
+ QList<DirEntry> m_children;
+};
+
+void generateFileTree(QTextStream &t);
+
#endif
+