diff options
Diffstat (limited to 'src/marshal.cpp')
-rw-r--r-- | src/marshal.cpp | 66 |
1 files changed, 61 insertions, 5 deletions
diff --git a/src/marshal.cpp b/src/marshal.cpp index af14978..c68718a 100644 --- a/src/marshal.cpp +++ b/src/marshal.cpp @@ -10,6 +10,7 @@ #include "groupdef.h" #include "example.h" #include "arguments.h" +#include "doxygen.h" #define HEADER ('D'<<24)+('O'<<16)+('X'<<8)+'!' @@ -142,6 +143,7 @@ void marshalSectionInfoList(StorageIntf *s, QList<SectionInfo> *anchors) marshalInt(s,si->lineNr); marshalInt(s,si->level); } + anchors->clear(); } } @@ -344,6 +346,15 @@ void marshalMemberLists(StorageIntf *s,SDict<MemberList> *mls) } } +void marshalLocalToc(StorageIntf *s,const LocalToc <) +{ + marshalInt(s,lt.mask()); + marshalInt(s,lt.htmlLevel()); + marshalInt(s,lt.latexLevel()); + marshalInt(s,lt.xmlLevel()); + marshalInt(s,lt.docbookLevel()); +} + void marshalEntry(StorageIntf *s,Entry *e) { marshalUInt(s,HEADER); @@ -355,11 +366,14 @@ void marshalEntry(StorageIntf *s,Entry *e) marshalUInt64(s,e->spec); marshalInt(s,e->initLines); marshalBool(s,e->stat); + marshalLocalToc(s,e->localToc); marshalBool(s,e->explicitExternal); marshalBool(s,e->proto); marshalBool(s,e->subGrouping); marshalBool(s,e->callGraph); marshalBool(s,e->callerGraph); + marshalBool(s,e->referencedByRelation); + marshalBool(s,e->referencesRelation); marshalInt(s,(int)e->virt); marshalQCString(s,e->args); marshalQCString(s,e->bitfields); @@ -399,6 +413,7 @@ void marshalEntry(StorageIntf *s,Entry *e) marshalBool(s,e->artificial); marshalInt(s,(int)e->groupDocType); marshalQCString(s,e->id); + marshalQCString(s,e->metaData); } void marshalEntryTree(StorageIntf *s,Entry *e) @@ -537,11 +552,10 @@ QList<SectionInfo> *unmarshalSectionInfoList(StorageIntf *s) uint i; uint count = unmarshalUInt(s); if (count==NULL_LIST) return 0; // null list - QList<SectionInfo> *result = new QList<SectionInfo>; - result->setAutoDelete(TRUE); + QList<SectionInfo> *anchors = new QList<SectionInfo>; assert(count<1000000); for (i=0;i<count;i++) - { + { QCString label = unmarshalQCString(s); QCString title = unmarshalQCString(s); QCString ref = unmarshalQCString(s); @@ -549,9 +563,20 @@ QList<SectionInfo> *unmarshalSectionInfoList(StorageIntf *s) QCString fileName = unmarshalQCString(s); int lineNr = unmarshalInt(s); int level = unmarshalInt(s); - result->append(new SectionInfo(fileName,lineNr,label,title,type,level,ref)); + SectionInfo *si = Doxygen::sectionDict->find(label); + if (si==0) // This should actually never be true since all anchors should be in sectionDict. + // Could still optimize the marshaling routine by only storing label. + { + SectionInfo *si = new SectionInfo(fileName,lineNr,label,title,type,level,ref); + anchors->append(si); + Doxygen::sectionDict->append(label,si); // this dict owns the anchor objects + } + else + { + anchors->append(si); + } } - return result; + return anchors; } QList<ListItemInfo> *unmarshalItemInfoList(StorageIntf *s) @@ -724,6 +749,33 @@ SDict<MemberList> *unmarshalMemberLists(StorageIntf *s) return result; } +LocalToc unmarshalLocalToc(StorageIntf *s) +{ + LocalToc result; + int mask = unmarshalInt(s); + int htmlLevel = unmarshalInt(s); + int latexLevel = unmarshalInt(s); + int xmlLevel = unmarshalInt(s); + int docbookLevel = unmarshalInt(s); + if ((mask & (1<<LocalToc::Html))!=0) + { + result.enableHtml(htmlLevel); + } + if ((mask & (1<<LocalToc::Latex))!=0) + { + result.enableLatex(latexLevel); + } + if ((mask & (1<<LocalToc::Xml))!=0) + { + result.enableXml(xmlLevel); + } + if ((mask & (1<<LocalToc::Docbook))!=0) + { + result.enableDocbook(docbookLevel); + } + return result; +} + Entry * unmarshalEntry(StorageIntf *s) { Entry *e = new Entry; @@ -737,11 +789,14 @@ Entry * unmarshalEntry(StorageIntf *s) e->spec = unmarshalUInt64(s); e->initLines = unmarshalInt(s); e->stat = unmarshalBool(s); + e->localToc = unmarshalLocalToc(s); e->explicitExternal = unmarshalBool(s); e->proto = unmarshalBool(s); e->subGrouping = unmarshalBool(s); e->callGraph = unmarshalBool(s); e->callerGraph = unmarshalBool(s); + e->referencedByRelation = unmarshalBool(s); + e->referencesRelation = unmarshalBool(s); e->virt = (Specifier)unmarshalInt(s); e->args = unmarshalQCString(s); e->bitfields = unmarshalQCString(s); @@ -785,6 +840,7 @@ Entry * unmarshalEntry(StorageIntf *s) e->artificial = unmarshalBool(s); e->groupDocType = (Entry::GroupDocType)unmarshalInt(s); e->id = unmarshalQCString(s); + e->metaData = unmarshalQCString(s); return e; } |