summaryrefslogtreecommitdiffstats
path: root/src/entry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entry.cpp')
-rw-r--r--src/entry.cpp286
1 files changed, 147 insertions, 139 deletions
diff --git a/src/entry.cpp b/src/entry.cpp
index ca831c8..77830c0 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -23,6 +23,145 @@
#include "section.h"
#include "doxygen.h"
+//------------------------------------------------------------------
+
+#define HEADER ('D'<<24)+('O'<<16)+('X'<<8)+'!'
+
+#if 0
+static bool saveEntry(Entry *e,StorageIntf *f)
+{
+ marshalUInt(f,HEADER);
+ marshalInt(f,(int)e->protection);
+ marshalInt(f,(int)e->mtype);
+ marshalInt(f,e->spec);
+ marshalInt(f,e->initLines);
+ marshalBool(f,e->stat);
+ marshalBool(f,e->explicitExternal);
+ marshalBool(f,e->proto);
+ marshalBool(f,e->subGrouping);
+ marshalBool(f,e->callGraph);
+ marshalBool(f,e->callerGraph);
+ marshalInt(f,(int)e->virt);
+ marshalQCString(f,e->args);
+ marshalQCString(f,e->bitfields);
+ marshalArgumentList(f,e->argList);
+ marshalArgumentLists(f,e->tArgLists);
+ marshalQGString(f,e->program);
+ marshalQGString(f,e->initializer);
+ marshalQCString(f,e->includeFile);
+ marshalQCString(f,e->includeName);
+ marshalQCString(f,e->doc);
+ marshalInt(f,e->docLine);
+ marshalQCString(f,e->docFile);
+ marshalQCString(f,e->brief);
+ marshalInt(f,e->briefLine);
+ marshalQCString(f,e->briefFile);
+ marshalQCString(f,e->inbodyDocs);
+ marshalInt(f,e->inbodyLine);
+ marshalQCString(f,e->inbodyFile);
+ marshalQCString(f,e->relates);
+ marshalBool(f,e->relatesDup);
+ marshalQCString(f,e->read);
+ marshalQCString(f,e->write);
+ marshalQCString(f,e->inside);
+ marshalQCString(f,e->exception);
+ marshalInt(f,e->bodyLine);
+ marshalInt(f,e->endBodyLine);
+ marshalInt(f,e->mGrpId);
+ marshalBaseInfoList(f,e->extends);
+ marshalGroupingList(f,e->groups);
+ marshalSectionInfoList(f,e->anchors);
+ marshalQCString(f,e->fileName);
+ marshalInt(f,e->startLine);
+ marshalItemInfoList(f,e->sli);
+ marshalBool(f,e->objc);
+ marshalBool(f,e->hidden);
+ marshalInt(f,(int)e->groupDocType);
+ return TRUE;
+}
+
+static bool loadEntry(Entry *e,StorageIntf *f)
+{
+ uint header=unmarshalUInt(f);
+ if (header!=HEADER)
+ {
+ printf("Internal error: Invalid header %x for entry in storage file %s\n",
+ header,Doxygen::entryDBFileName.data());
+ exit(1);
+ }
+ e->protection = (Protection)unmarshalInt(f);
+ e->mtype = (MethodTypes)unmarshalInt(f);
+ e->spec = unmarshalInt(f);
+ e->initLines = unmarshalInt(f);
+ e->stat = unmarshalBool(f);
+ e->explicitExternal = unmarshalBool(f);
+ e->proto = unmarshalBool(f);
+ e->subGrouping = unmarshalBool(f);
+ e->callGraph = unmarshalBool(f);
+ e->callerGraph = unmarshalBool(f);
+ e->virt = (Specifier)unmarshalInt(f);
+ e->args = unmarshalQCString(f);
+ e->bitfields = unmarshalQCString(f);
+ delete e->argList;
+ e->argList = unmarshalArgumentList(f);
+ e->tArgLists = unmarshalArgumentLists(f);
+ e->program = unmarshalQGString(f);
+ e->initializer = unmarshalQGString(f);
+ e->includeFile = unmarshalQCString(f);
+ e->includeName = unmarshalQCString(f);
+ e->doc = unmarshalQCString(f);
+ e->docLine = unmarshalInt(f);
+ e->docFile = unmarshalQCString(f);
+ e->brief = unmarshalQCString(f);
+ e->briefLine = unmarshalInt(f);
+ e->briefFile = unmarshalQCString(f);
+ e->inbodyDocs = unmarshalQCString(f);
+ e->inbodyLine = unmarshalInt(f);
+ e->inbodyFile = unmarshalQCString(f);
+ e->relates = unmarshalQCString(f);
+ e->relatesDup = unmarshalBool(f);
+ e->read = unmarshalQCString(f);
+ e->write = unmarshalQCString(f);
+ e->inside = unmarshalQCString(f);
+ e->exception = unmarshalQCString(f);
+ e->bodyLine = unmarshalInt(f);
+ e->endBodyLine = unmarshalInt(f);
+ e->mGrpId = unmarshalInt(f);
+ delete e->extends;
+ e->extends = unmarshalBaseInfoList(f);
+ delete e->groups;
+ e->groups = unmarshalGroupingList(f);
+ delete e->anchors;
+ e->anchors = unmarshalSectionInfoList(f);
+ e->fileName = unmarshalQCString(f);
+ e->startLine = unmarshalInt(f);
+ e->sli = unmarshalItemInfoList(f);
+ e->objc = unmarshalBool(f);
+ e->hidden = unmarshalBool(f);
+ e->groupDocType = (Entry::GroupDocType)unmarshalInt(f);
+ return TRUE;
+}
+#endif
+
+//------------------------------------------------------------------
+
+/*! the argument list is documented if one of its
+ * arguments is documented
+ */
+bool ArgumentList::hasDocumentation() const
+{
+ bool hasDocs=FALSE;
+ ArgumentListIterator ali(*this);
+ Argument *a;
+ for (ali.toFirst();!hasDocs && (a=ali.current());++ali)
+ {
+ hasDocs = hasDocs || a->hasDocumentation();
+ }
+ return hasDocs;
+}
+
+//------------------------------------------------------------------
+
int Entry::num=0;
Entry::Entry()
@@ -303,24 +442,6 @@ void Entry::createNavigationIndex(EntryNav *rootNav,FileStorage *storage,FileDef
}
}
-
-
-
-/*! the argument list is documented if one of its
- * arguments is documented
- */
-bool ArgumentList::hasDocumentation() const
-{
- bool hasDocs=FALSE;
- ArgumentListIterator ali(*this);
- Argument *a;
- for (ali.toFirst();!hasDocs && (a=ali.current());++ali)
- {
- hasDocs = hasDocs || a->hasDocumentation();
- }
- return hasDocs;
-}
-
void Entry::addSpecialListItem(const char *listName,int itemId)
{
if (sli==0)
@@ -336,121 +457,6 @@ void Entry::addSpecialListItem(const char *listName,int itemId)
//------------------------------------------------------------------
-#define HEADER ('D'<<24)+('O'<<16)+('X'<<8)+'!'
-
-static bool saveEntry(Entry *e,FileStorage *f)
-{
- marshalUInt(f,HEADER);
- marshalInt(f,(int)e->protection);
- marshalInt(f,(int)e->mtype);
- marshalInt(f,e->spec);
- marshalInt(f,e->initLines);
- marshalBool(f,e->stat);
- marshalBool(f,e->explicitExternal);
- marshalBool(f,e->proto);
- marshalBool(f,e->subGrouping);
- marshalBool(f,e->callGraph);
- marshalBool(f,e->callerGraph);
- marshalInt(f,(int)e->virt);
- marshalQCString(f,e->args);
- marshalQCString(f,e->bitfields);
- marshalArgumentList(f,e->argList);
- marshalArgumentLists(f,e->tArgLists);
- marshalQGString(f,e->program);
- marshalQGString(f,e->initializer);
- marshalQCString(f,e->includeFile);
- marshalQCString(f,e->includeName);
- marshalQCString(f,e->doc);
- marshalInt(f,e->docLine);
- marshalQCString(f,e->docFile);
- marshalQCString(f,e->brief);
- marshalInt(f,e->briefLine);
- marshalQCString(f,e->briefFile);
- marshalQCString(f,e->inbodyDocs);
- marshalInt(f,e->inbodyLine);
- marshalQCString(f,e->inbodyFile);
- marshalQCString(f,e->relates);
- marshalBool(f,e->relatesDup);
- marshalQCString(f,e->read);
- marshalQCString(f,e->write);
- marshalQCString(f,e->inside);
- marshalQCString(f,e->exception);
- marshalInt(f,e->bodyLine);
- marshalInt(f,e->endBodyLine);
- marshalInt(f,e->mGrpId);
- marshalBaseInfoList(f,e->extends);
- marshalGroupingList(f,e->groups);
- marshalSectionInfoList(f,e->anchors);
- marshalQCString(f,e->fileName);
- marshalInt(f,e->startLine);
- marshalItemInfoList(f,e->sli);
- marshalBool(f,e->objc);
- marshalBool(f,e->hidden);
- marshalInt(f,(int)e->groupDocType);
- return TRUE;
-}
-
-static bool loadEntry(Entry *e,FileStorage *f)
-{
- uint header=unmarshalUInt(f);
- if (header!=HEADER)
- {
- printf("Internal error: Invalid header %x for entry in storage file %s\n",
- header,Doxygen::entryDBFileName.data());
- exit(1);
- }
- e->protection = (Protection)unmarshalInt(f);
- e->mtype = (MethodTypes)unmarshalInt(f);
- e->spec = unmarshalInt(f);
- e->initLines = unmarshalInt(f);
- e->stat = unmarshalBool(f);
- e->explicitExternal = unmarshalBool(f);
- e->proto = unmarshalBool(f);
- e->subGrouping = unmarshalBool(f);
- e->callGraph = unmarshalBool(f);
- e->callerGraph = unmarshalBool(f);
- e->virt = (Specifier)unmarshalInt(f);
- e->args = unmarshalQCString(f);
- e->bitfields = unmarshalQCString(f);
- delete e->argList;
- e->argList = unmarshalArgumentList(f);
- e->tArgLists = unmarshalArgumentLists(f);
- e->program = unmarshalQGString(f);
- e->initializer = unmarshalQGString(f);
- e->includeFile = unmarshalQCString(f);
- e->includeName = unmarshalQCString(f);
- e->doc = unmarshalQCString(f);
- e->docLine = unmarshalInt(f);
- e->docFile = unmarshalQCString(f);
- e->brief = unmarshalQCString(f);
- e->briefLine = unmarshalInt(f);
- e->briefFile = unmarshalQCString(f);
- e->inbodyDocs = unmarshalQCString(f);
- e->inbodyLine = unmarshalInt(f);
- e->inbodyFile = unmarshalQCString(f);
- e->relates = unmarshalQCString(f);
- e->relatesDup = unmarshalBool(f);
- e->read = unmarshalQCString(f);
- e->write = unmarshalQCString(f);
- e->inside = unmarshalQCString(f);
- e->exception = unmarshalQCString(f);
- e->bodyLine = unmarshalInt(f);
- e->endBodyLine = unmarshalInt(f);
- e->mGrpId = unmarshalInt(f);
- delete e->extends;
- e->extends = unmarshalBaseInfoList(f);
- delete e->groups;
- e->groups = unmarshalGroupingList(f);
- delete e->anchors;
- e->anchors = unmarshalSectionInfoList(f);
- e->fileName = unmarshalQCString(f);
- e->startLine = unmarshalInt(f);
- e->sli = unmarshalItemInfoList(f);
- e->objc = unmarshalBool(f);
- e->hidden = unmarshalBool(f);
- e->groupDocType = (Entry::GroupDocType)unmarshalInt(f);
- return TRUE;
-}
EntryNav::EntryNav(EntryNav *parent, Entry *e)
: m_parent(parent), m_subList(0), m_section(e->section), m_type(e->type),
@@ -507,11 +513,7 @@ bool EntryNav::loadEntry(FileStorage *storage)
return FALSE;
}
//delete m_info;
- if (m_info==0) m_info = new Entry;
//printf("EntryNav::loadEntry: new entry %p: %s\n",m_info,m_name.data());
- m_info->name = m_name;
- m_info->type = m_type;
- m_info->section = m_section;
//m_info->tagInfo = m_tagInfo;
//if (m_parent)
//{
@@ -524,14 +526,20 @@ bool EntryNav::loadEntry(FileStorage *storage)
//printf("seek failed!\n");
return FALSE;
}
- return ::loadEntry(m_info,storage);
+ if (m_info) delete m_info;
+ m_info = unmarshalEntry(storage);
+ m_info->name = m_name;
+ m_info->type = m_type;
+ m_info->section = m_section;
+ return TRUE;
}
bool EntryNav::saveEntry(Entry *e,FileStorage *storage)
{
m_offset = storage->pos();
//printf("EntryNav::saveEntry offset=%llx\n",m_offset);
- return ::saveEntry(e,storage);
+ marshalEntry(storage,e);
+ return TRUE;
}
void EntryNav::releaseEntry()