summaryrefslogtreecommitdiffstats
path: root/src/filedef.h
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-08-24 20:00:14 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-08-24 20:00:14 (GMT)
commit4b77f4fc83a7954a741c1b35ec50e918a2786559 (patch)
treeacf5ce8ed64ee56e5f7eec664f2f00260d068e9c /src/filedef.h
parentbb18b811e8f1a4a939eadf28d12bc5f99dd74b82 (diff)
downloadDoxygen-4b77f4fc83a7954a741c1b35ec50e918a2786559.zip
Doxygen-4b77f4fc83a7954a741c1b35ec50e918a2786559.tar.gz
Doxygen-4b77f4fc83a7954a741c1b35ec50e918a2786559.tar.bz2
Release-1.3.8-20040824
Diffstat (limited to 'src/filedef.h')
-rw-r--r--src/filedef.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/filedef.h b/src/filedef.h
index c96f321..bceb878 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -38,6 +38,7 @@ class NamespaceDef;
class NamespaceSDict;
class MemberGroupSDict;
class PackageDef;
+class DirDef;
struct IncludeInfo
{
@@ -133,6 +134,9 @@ class FileDef : public Definition
void setPackageDef(PackageDef *pd) { package=pd; }
PackageDef *packageDef() const { return package; }
+ void setDirDef(DirDef *dd) { dir=dd; }
+ DirDef *getDirDef() const { return dir; }
+
void addUsingDirective(NamespaceDef *nd);
NamespaceSDict *getUsedNamespaces() const { return usingDirList; }
void addUsingDeclaration(Definition *def);
@@ -201,8 +205,8 @@ class FileDef : public Definition
QIntDict<MemberDef> *srcMemberDict;
bool isSource;
-
PackageDef *package;
+ DirDef *dir;
};
@@ -250,18 +254,23 @@ class DirEntry
public:
enum EntryKind { Dir, File };
DirEntry(DirEntry *parent,FileDef *fd)
- : m_parent(parent), m_kind(File), m_fd(fd), m_isLast(FALSE) { }
- DirEntry(DirEntry *parent)
- : m_parent(parent), m_kind(Dir), m_fd(0), m_isLast(FALSE) { }
+ : m_parent(parent), m_name(fd->name()), m_kind(File), m_fd(fd),
+ m_isLast(FALSE) { }
+ DirEntry(DirEntry *parent,QCString name)
+ : m_parent(parent), m_name(name), 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; }
+ QCString name() const { return m_name; }
+ QCString path() const { return parent() ? parent()->path()+"/"+name() : name(); }
protected:
DirEntry *m_parent;
+ QCString m_name;
private:
EntryKind m_kind;
FileDef *m_fd;
@@ -273,17 +282,15 @@ class Directory : public DirEntry
{
public:
Directory(Directory *parent,const QCString &name)
- : DirEntry(parent), m_name(name)
+ : DirEntry(parent,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;
};