My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
marshal.h File Reference
#include <qlist.h>
#include <qfile.h>
#include "sortdict.h"
#include "store.h"

Go to the source code of this file.

Macros

#define NULL_LIST   0xffffffff
 

Functions

void marshalInt (StorageIntf *s, int v)
 
void marshalUInt (StorageIntf *s, uint v)
 
void marshalUInt64 (StorageIntf *s, uint64 v)
 
void marshalBool (StorageIntf *s, bool b)
 
void marshalQCString (StorageIntf *s, const QCString &str)
 
void marshalQGString (StorageIntf *s, const QGString &str)
 
void marshalArgumentList (StorageIntf *s, ArgumentList *argList)
 
void marshalArgumentLists (StorageIntf *s, QList< ArgumentList > *argLists)
 
void marshalBaseInfoList (StorageIntf *s, QList< BaseInfo > *baseList)
 
void marshalGroupingList (StorageIntf *s, QList< Grouping > *groups)
 
void marshalSectionInfoList (StorageIntf *s, QList< SectionInfo > *anchors)
 
void marshalItemInfoList (StorageIntf *s, QList< ListItemInfo > *sli)
 
void marshalObjPointer (StorageIntf *s, void *obj)
 
void marshalSectionDict (StorageIntf *s, SectionDict *sections)
 
void marshalMemberSDict (StorageIntf *s, MemberSDict *memberSDict)
 
void marshalDocInfo (StorageIntf *s, DocInfo *docInfo)
 
void marshalBriefInfo (StorageIntf *s, BriefInfo *briefInfo)
 
void marshalBodyInfo (StorageIntf *s, BodyInfo *bodyInfo)
 
void marshalGroupList (StorageIntf *s, GroupList *groupList)
 
void marshalMemberList (StorageIntf *s, MemberList *ml)
 
void marshalExampleSDict (StorageIntf *s, ExampleSDict *ed)
 
void marshalMemberLists (StorageIntf *s, SDict< MemberList > *mls)
 
void marshalEntry (StorageIntf *s, Entry *e)
 
void marshalEntryTree (StorageIntf *s, Entry *e)
 
int unmarshalInt (StorageIntf *s)
 
uint unmarshalUInt (StorageIntf *s)
 
uint64 unmarshalUInt64 (StorageIntf *s)
 
bool unmarshalBool (StorageIntf *s)
 
QCString unmarshalQCString (StorageIntf *s)
 
QGString unmarshalQGString (StorageIntf *s)
 
ArgumentListunmarshalArgumentList (StorageIntf *s)
 
QList< ArgumentList > * unmarshalArgumentLists (StorageIntf *s)
 
QList< BaseInfo > * unmarshalBaseInfoList (StorageIntf *s)
 
QList< Grouping > * unmarshalGroupingList (StorageIntf *s)
 
QList< SectionInfo > * unmarshalSectionInfoList (StorageIntf *s)
 
QList< ListItemInfo > * unmarshalItemInfoList (StorageIntf *s)
 
void * unmarshalObjPointer (StorageIntf *s)
 
SectionDictunmarshalSectionDict (StorageIntf *s)
 
MemberSDictunmarshalMemberSDict (StorageIntf *s)
 
DocInfounmarshalDocInfo (StorageIntf *s)
 
BriefInfounmarshalBriefInfo (StorageIntf *s)
 
BodyInfounmarshalBodyInfo (StorageIntf *s)
 
GroupListunmarshalGroupList (StorageIntf *s)
 
MemberListunmarshalMemberList (StorageIntf *s)
 
ExampleSDictunmarshalExampleSDict (StorageIntf *s)
 
SDict< MemberList > * unmarshalMemberLists (StorageIntf *s)
 
EntryunmarshalEntry (StorageIntf *s)
 
EntryunmarshalEntryTree (StorageIntf *s)
 

Macro Definition Documentation

#define NULL_LIST   0xffffffff

Function Documentation

void marshalArgumentList ( StorageIntf s,
ArgumentList argList 
)

Definition at line 62 of file marshal.cpp.

References ArgumentList::marshal().

Referenced by marshalArgumentLists(), and marshalEntry().

{
}
void marshalArgumentLists ( StorageIntf s,
QList< ArgumentList > *  argLists 
)

Definition at line 67 of file marshal.cpp.

References marshalArgumentList(), marshalUInt(), and NULL_LIST.

Referenced by marshalEntry().

{
if (argLists==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,argLists->count());
QListIterator<ArgumentList> ali(*argLists);
for (ali.toFirst();(al=ali.current());++ali)
{
}
}
}
void marshalBaseInfoList ( StorageIntf s,
QList< BaseInfo > *  baseList 
)

Definition at line 85 of file marshal.cpp.

References marshalInt(), marshalQCString(), marshalUInt(), BaseInfo::name, NULL_LIST, BaseInfo::prot, and BaseInfo::virt.

Referenced by marshalEntry().

{
if (baseList==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,baseList->count());
QListIterator<BaseInfo> bli(*baseList);
BaseInfo *bi;
for (bli.toFirst();(bi=bli.current());++bli)
{
marshalInt(s,(int)bi->prot);
marshalInt(s,(int)bi->virt);
}
}
}
void marshalBodyInfo ( StorageIntf s,
BodyInfo bodyInfo 
)

Definition at line 247 of file marshal.cpp.

References BodyInfo::endLine, BodyInfo::fileDef, marshalInt(), marshalObjPointer(), marshalUInt(), NULL_LIST, and BodyInfo::startLine.

{
if (bodyInfo==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,1);
marshalInt(s,bodyInfo->startLine);
marshalInt(s,bodyInfo->endLine);
marshalObjPointer(s,bodyInfo->fileDef);
}
}
void marshalBool ( StorageIntf s,
bool  b 
)

Definition at line 42 of file marshal.cpp.

References StorageIntf::write().

Referenced by MemberList::marshal(), MemberGroup::marshal(), ArgumentList::marshal(), and marshalEntry().

{
char c = b;
s->write(&c,sizeof(char));
}
void marshalBriefInfo ( StorageIntf s,
BriefInfo briefInfo 
)

Definition at line 231 of file marshal.cpp.

References BriefInfo::doc, BriefInfo::file, BriefInfo::line, marshalInt(), marshalQCString(), marshalUInt(), NULL_LIST, and BriefInfo::tooltip.

{
if (briefInfo==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,1);
marshalQCString(s,briefInfo->doc);
marshalQCString(s,briefInfo->tooltip);
marshalInt(s,briefInfo->line);
marshalQCString(s,briefInfo->file);
}
}
void marshalDocInfo ( StorageIntf s,
DocInfo docInfo 
)

Definition at line 216 of file marshal.cpp.

References DocInfo::doc, DocInfo::file, DocInfo::line, marshalInt(), marshalQCString(), marshalUInt(), and NULL_LIST.

{
if (docInfo==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,1);
marshalQCString(s,docInfo->doc);
marshalInt(s,docInfo->line);
marshalQCString(s,docInfo->file);
}
}
void marshalEntry ( StorageIntf s,
Entry e 
)

Definition at line 347 of file marshal.cpp.

References Entry::anchors, Entry::argList, Entry::args, Entry::artificial, Entry::bitfields, Entry::bodyLine, Entry::brief, Entry::briefFile, Entry::briefLine, Entry::callerGraph, Entry::callGraph, Entry::doc, Entry::docFile, Entry::docLine, Entry::endBodyLine, Entry::exception, Entry::explicitExternal, Entry::extends, Entry::fileName, Entry::groupDocType, Entry::groups, HEADER, Entry::hidden, Entry::id, Entry::inbodyDocs, Entry::inbodyFile, Entry::inbodyLine, Entry::includeFile, Entry::includeName, Entry::initializer, Entry::initLines, Entry::inside, Entry::lang, marshalArgumentList(), marshalArgumentLists(), marshalBaseInfoList(), marshalBool(), marshalGroupingList(), marshalInt(), marshalItemInfoList(), marshalQCString(), marshalQGString(), marshalSectionInfoList(), marshalUInt(), marshalUInt64(), Entry::mGrpId, Entry::mtype, Entry::name, Entry::program, Entry::protection, Entry::proto, Entry::read, Entry::relates, Entry::relatesType, Entry::section, Entry::sli, Entry::spec, Entry::startLine, Entry::stat, Entry::subGrouping, Entry::tArgLists, Entry::type, Entry::typeConstr, Entry::virt, and Entry::write.

Referenced by marshalEntryTree(), and EntryNav::saveEntry().

{
marshalInt(s,(int)e->protection);
marshalInt(s,(int)e->mtype);
marshalInt(s,(int)e->virt);
marshalInt(s,(int)e->lang);
}
void marshalEntryTree ( StorageIntf s,
Entry e 
)

Definition at line 404 of file marshal.cpp.

References Entry::children(), marshalEntry(), marshalEntryTree(), and marshalUInt().

Referenced by marshalEntryTree().

{
marshalUInt(s,e->children()->count());
QListIterator<Entry> eli(*e->children());
Entry *child;
for (eli.toFirst();(child=eli.current());++eli)
{
marshalEntryTree(s,child);
}
}
void marshalExampleSDict ( StorageIntf s,
ExampleSDict ed 
)

Definition at line 303 of file marshal.cpp.

References Example::anchor, SDict< T >::count(), Example::file, marshalQCString(), marshalUInt(), Example::name, and NULL_LIST.

{
if (ed==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,ed->count());
//printf(" marshalMemberSDict: items=%d\n",memberSDict->count());
Example *e;
for (edi.toFirst();(e=edi.current());++edi)
{
//printf(" marshalMemberSDict: %d: key=%s value=%p\n",count,mdi.currentKey().data(),md);
marshalQCString(s,edi.currentKey());
}
}
}
void marshalGroupingList ( StorageIntf s,
QList< Grouping > *  groups 
)

Definition at line 105 of file marshal.cpp.

References Grouping::groupname, marshalInt(), marshalQCString(), marshalUInt(), NULL_LIST, and Grouping::pri.

Referenced by marshalEntry().

{
if (groups==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,groups->count());
QListIterator<Grouping> gli(*groups);
for (gli.toFirst();(g=gli.current());++gli)
{
marshalInt(s,(int)g->pri);
}
}
}
void marshalGroupList ( StorageIntf s,
GroupList groupList 
)

Definition at line 262 of file marshal.cpp.

References marshalObjPointer(), marshalUInt(), and NULL_LIST.

{
if (groupList==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,groupList->count());
QListIterator<GroupDef> gli(*groupList);
GroupDef *gd=0;
for (gli.toFirst();(gd=gli.current());++gli)
{
}
}
}
void marshalInt ( StorageIntf s,
int  v 
)

Definition at line 16 of file marshal.cpp.

References StorageIntf::write().

Referenced by MemberList::marshal(), MemberGroup::marshal(), marshalBaseInfoList(), marshalBodyInfo(), marshalBriefInfo(), marshalDocInfo(), marshalEntry(), marshalGroupingList(), marshalItemInfoList(), and marshalSectionInfoList().

{
uchar b[4];
b[0]=((uint)v)>>24;
b[1]=(((uint)v)>>16)&0xff;
b[2]=(((uint)v)>>8)&0xff;
b[3]=v&0xff;
s->write((const char *)b,4);
}
void marshalItemInfoList ( StorageIntf s,
QList< ListItemInfo > *  sli 
)

Definition at line 148 of file marshal.cpp.

References ListItemInfo::itemId, marshalInt(), marshalQCString(), marshalUInt(), NULL_LIST, and ListItemInfo::type.

Referenced by MemberGroup::marshal(), and marshalEntry().

{
if (sli==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,sli->count());
QListIterator<ListItemInfo> liii(*sli);
for (liii.toFirst();(lii=liii.current());++liii)
{
marshalInt(s,lii->itemId);
}
}
}
void marshalMemberList ( StorageIntf s,
MemberList ml 
)

Definition at line 280 of file marshal.cpp.

References MemberList::count(), MemberList::marshal(), marshalObjPointer(), marshalUInt(), and NULL_LIST.

Referenced by MemberGroup::marshal().

{
if (ml==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,ml->count());
MemberDef *md;
uint count=0;
for (mli.toFirst();(md=mli.current());++mli)
{
count++;
}
assert(count==ml->count());
ml->marshal(s);
}
}
void marshalMemberLists ( StorageIntf s,
SDict< MemberList > *  mls 
)

Definition at line 326 of file marshal.cpp.

References SDict< T >::count(), marshalObjPointer(), marshalQCString(), marshalUInt(), and NULL_LIST.

{
if (mls==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,mls->count());
//printf(" marshalMemberSDict: items=%d\n",memberSDict->count());
for (mli.toFirst();(ml=mli.current());++mli)
{
//printf(" marshalMemberSDict: %d: key=%s value=%p\n",count,mdi.currentKey().data(),md);
marshalQCString(s,mli.currentKey());
marshalObjPointer(s,ml); // assume we are not owner of the list
}
}
}
void marshalMemberSDict ( StorageIntf s,
MemberSDict memberSDict 
)

Definition at line 192 of file marshal.cpp.

References SDict< T >::count(), marshalObjPointer(), marshalQCString(), marshalUInt(), and NULL_LIST.

{
if (memberSDict==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,memberSDict->count());
//printf(" marshalMemberSDict: items=%d\n",memberSDict->count());
SDict<MemberDef>::IteratorDict mdi(*memberSDict);
MemberDef *md;
int count=0;
for (mdi.toFirst();(md=mdi.current());++mdi)
{
//printf(" marshalMemberSDict: %d: key=%s value=%p\n",count,mdi.currentKey().data(),md);
marshalQCString(s,mdi.currentKey());
count++;
}
assert(count==memberSDict->count());
}
}
void marshalObjPointer ( StorageIntf s,
void *  obj 
)

Definition at line 167 of file marshal.cpp.

References StorageIntf::write().

Referenced by MemberGroup::marshal(), marshalBodyInfo(), marshalGroupList(), marshalMemberList(), marshalMemberLists(), marshalMemberSDict(), and marshalSectionDict().

{
char *b = (char *)&obj;
s->write(b,sizeof(void *));
}
void marshalQCString ( StorageIntf s,
const QCString &  str 
)
void marshalQGString ( StorageIntf s,
const QGString &  str 
)

Definition at line 55 of file marshal.cpp.

References marshalUInt(), and StorageIntf::write().

Referenced by marshalEntry().

{
uint l=str.length();
if (l>0) s->write(str.data(),l);
}
void marshalSectionDict ( StorageIntf s,
SectionDict sections 
)

Definition at line 173 of file marshal.cpp.

References SDict< T >::count(), marshalObjPointer(), marshalQCString(), marshalUInt(), and NULL_LIST.

{
if (sections==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,sections->count());
for (sli.toFirst();(si=sli.current());++sli)
{
marshalQCString(s,sli.currentKey());
}
}
}
void marshalSectionInfoList ( StorageIntf s,
QList< SectionInfo > *  anchors 
)

Definition at line 124 of file marshal.cpp.

References SectionInfo::fileName, SectionInfo::label, SectionInfo::level, SectionInfo::lineNr, marshalInt(), marshalQCString(), marshalUInt(), NULL_LIST, SectionInfo::ref, SectionInfo::title, and SectionInfo::type.

Referenced by marshalEntry().

{
if (anchors==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
}
else
{
marshalUInt(s,anchors->count());
QListIterator<SectionInfo> sli(*anchors);
for (sli.toFirst();(si=sli.current());++sli)
{
marshalInt(s,(int)si->type);
marshalInt(s,si->level);
}
}
}
void marshalUInt ( StorageIntf s,
uint  v 
)
void marshalUInt64 ( StorageIntf s,
uint64  v 
)

Definition at line 36 of file marshal.cpp.

References marshalUInt().

Referenced by marshalEntry().

{
marshalUInt(s, uint(v>>32));
marshalUInt(s, uint(v&0xFFFFFFFF));
}
ArgumentList* unmarshalArgumentList ( StorageIntf s)

Definition at line 479 of file marshal.cpp.

References ArgumentList::unmarshal().

Referenced by unmarshalArgumentLists(), and unmarshalEntry().

{
}
QList<ArgumentList>* unmarshalArgumentLists ( StorageIntf s)

Definition at line 484 of file marshal.cpp.

References NULL_LIST, unmarshalArgumentList(), and unmarshalUInt().

Referenced by unmarshalEntry().

{
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0; // null list
QList<ArgumentList> *result = new QList<ArgumentList>;
result->setAutoDelete(TRUE);
assert(count<1000000);
//printf("unmarshalArgumentLists: %d\n",count);
for (i=0;i<count;i++)
{
result->append(unmarshalArgumentList(s));
}
return result;
}
QList<BaseInfo>* unmarshalBaseInfoList ( StorageIntf s)

Definition at line 500 of file marshal.cpp.

References NULL_LIST, unmarshalInt(), unmarshalQCString(), and unmarshalUInt().

Referenced by unmarshalEntry().

{
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0; // null list
QList<BaseInfo> *result = new QList<BaseInfo>;
result->setAutoDelete(TRUE);
assert(count<1000000);
for (i=0;i<count;i++)
{
QCString name = unmarshalQCString(s);
result->append(new BaseInfo(name,prot,virt));
}
return result;
}
BodyInfo* unmarshalBodyInfo ( StorageIntf s)

Definition at line 650 of file marshal.cpp.

References BodyInfo::endLine, BodyInfo::fileDef, NULL_LIST, BodyInfo::startLine, unmarshalInt(), unmarshalObjPointer(), and unmarshalUInt().

{
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0;
BodyInfo *result = new BodyInfo;
result->startLine = unmarshalInt(s);
result->endLine = unmarshalInt(s);
return result;
}
bool unmarshalBool ( StorageIntf s)

Definition at line 443 of file marshal.cpp.

References StorageIntf::read().

Referenced by MemberList::unmarshal(), MemberGroup::unmarshal(), ArgumentList::unmarshal(), and unmarshalEntry().

{
char result;
s->read(&result,sizeof(result));
//printf("unmarshalBool: %x offset=%llx\n",result,f.pos());
return result;
}
BriefInfo* unmarshalBriefInfo ( StorageIntf s)

Definition at line 638 of file marshal.cpp.

References BriefInfo::doc, BriefInfo::file, BriefInfo::line, NULL_LIST, BriefInfo::tooltip, unmarshalInt(), unmarshalQCString(), and unmarshalUInt().

{
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0;
BriefInfo *result = new BriefInfo;
result->doc = unmarshalQCString(s);
result->tooltip = unmarshalQCString(s);
result->line = unmarshalInt(s);
result->file = unmarshalQCString(s);
return result;
}
DocInfo* unmarshalDocInfo ( StorageIntf s)

Definition at line 627 of file marshal.cpp.

References DocInfo::doc, DocInfo::file, DocInfo::line, NULL_LIST, unmarshalInt(), unmarshalQCString(), and unmarshalUInt().

{
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0;
DocInfo *result = new DocInfo;
result->doc = unmarshalQCString(s);
result->line = unmarshalInt(s);
result->file = unmarshalQCString(s);
return result;
}
Entry* unmarshalEntry ( StorageIntf s)

Definition at line 727 of file marshal.cpp.

References Entry::anchors, Entry::argList, Entry::args, Entry::artificial, Entry::bitfields, Entry::bodyLine, Entry::brief, Entry::briefFile, Entry::briefLine, Entry::callerGraph, Entry::callGraph, Entry::doc, Entry::docFile, Entry::docLine, Entry::endBodyLine, Entry::exception, Entry::explicitExternal, Entry::extends, Entry::fileName, Entry::groupDocType, Entry::groups, HEADER, Entry::hidden, Entry::id, Entry::inbodyDocs, Entry::inbodyFile, Entry::inbodyLine, Entry::includeFile, Entry::includeName, Entry::initializer, Entry::initLines, Entry::inside, Entry::lang, Entry::mGrpId, Entry::mtype, Entry::name, Entry::program, Entry::protection, Entry::proto, Entry::read, Entry::relates, Entry::relatesType, Entry::section, Entry::sli, Entry::spec, Entry::startLine, Entry::stat, Entry::subGrouping, Entry::tArgLists, Entry::type, Entry::typeConstr, unmarshalArgumentList(), unmarshalArgumentLists(), unmarshalBaseInfoList(), unmarshalBool(), unmarshalGroupingList(), unmarshalInt(), unmarshalItemInfoList(), unmarshalQCString(), unmarshalQGString(), unmarshalSectionInfoList(), unmarshalUInt(), unmarshalUInt64(), Entry::virt, and Entry::write.

Referenced by EntryNav::loadEntry(), and unmarshalEntryTree().

{
Entry *e = new Entry;
uint header=unmarshalUInt(s);
ASSERT(header==HEADER);
delete e->argList;
delete e->extends;
delete e->groups;
delete e->anchors;
return e;
}
Entry* unmarshalEntryTree ( StorageIntf s)

Definition at line 791 of file marshal.cpp.

References Entry::addSubEntry(), unmarshalEntry(), unmarshalEntryTree(), and unmarshalUInt().

Referenced by unmarshalEntryTree().

{
uint count = unmarshalUInt(s);
uint i;
for (i=0;i<count;i++)
{
}
return e;
}
ExampleSDict* unmarshalExampleSDict ( StorageIntf s)

Definition at line 692 of file marshal.cpp.

References Example::anchor, Example::file, SDict< T >::inSort(), Example::name, NULL_LIST, unmarshalQCString(), and unmarshalUInt().

{
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0;
ExampleSDict *result = new ExampleSDict;
assert(count<1000000);
for (i=0;i<count;i++)
{
QCString key = unmarshalQCString(s);
Example *e = new Example;
result->inSort(key,e);
}
return result;
}
QList<Grouping>* unmarshalGroupingList ( StorageIntf s)

Definition at line 518 of file marshal.cpp.

References NULL_LIST, unmarshalInt(), unmarshalQCString(), and unmarshalUInt().

Referenced by unmarshalEntry().

{
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0; // null list
QList<Grouping> *result = new QList<Grouping>;
result->setAutoDelete(TRUE);
assert(count<1000000);
for (i=0;i<count;i++)
{
QCString name = unmarshalQCString(s);
result->append(new Grouping(name,prio));
}
return result;
}
GroupList* unmarshalGroupList ( StorageIntf s)

Definition at line 661 of file marshal.cpp.

References NULL_LIST, unmarshalObjPointer(), and unmarshalUInt().

{
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0; // null list
assert(count<1000000);
GroupList *result = new GroupList;
for (i=0;i<count;i++)
{
result->append(gd);
}
return result;
}
int unmarshalInt ( StorageIntf s)

Definition at line 418 of file marshal.cpp.

References StorageIntf::read().

Referenced by MemberList::unmarshal(), MemberGroup::unmarshal(), unmarshalBaseInfoList(), unmarshalBodyInfo(), unmarshalBriefInfo(), unmarshalDocInfo(), unmarshalEntry(), unmarshalGroupingList(), unmarshalItemInfoList(), and unmarshalSectionInfoList().

{
uchar b[4];
s->read((char *)b,4);
int result=(int)((((uint)b[0])<<24)+((uint)b[1]<<16)+((uint)b[2]<<8)+(uint)b[3]);
//printf("unmarshalInt: %x %x %x %x: %x offset=%llx\n",b[0],b[1],b[2],b[3],result,f.pos());
return result;
}
QList<ListItemInfo>* unmarshalItemInfoList ( StorageIntf s)

Definition at line 557 of file marshal.cpp.

References ListItemInfo::itemId, NULL_LIST, ListItemInfo::type, unmarshalInt(), unmarshalQCString(), and unmarshalUInt().

Referenced by MemberGroup::unmarshal(), and unmarshalEntry().

{
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0; // null list
QList<ListItemInfo> *result = new QList<ListItemInfo>;
result->setAutoDelete(TRUE);
assert(count<1000000);
for (i=0;i<count;i++)
{
lii->itemId = unmarshalInt(s);
result->append(lii);
}
return result;
}
MemberList* unmarshalMemberList ( StorageIntf s)

Definition at line 676 of file marshal.cpp.

References MemberList::append(), NULL_LIST, MemberList::unmarshal(), unmarshalObjPointer(), and unmarshalUInt().

Referenced by MemberGroup::unmarshal().

{
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0;
MemberList *result = new MemberList;
assert(count<1000000);
for (i=0;i<count;i++)
{
result->append(md);
}
result->unmarshal(s);
return result;
}
SDict<MemberList>* unmarshalMemberLists ( StorageIntf s)

Definition at line 711 of file marshal.cpp.

References SDict< T >::append(), NULL_LIST, unmarshalObjPointer(), unmarshalQCString(), and unmarshalUInt().

{
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0;
assert(count<1000000);
for (i=0;i<count;i++)
{
QCString key = unmarshalQCString(s);
result->append(key,ml);
}
return result;
}
MemberSDict* unmarshalMemberSDict ( StorageIntf s)

Definition at line 600 of file marshal.cpp.

References SDict< T >::append(), NULL_LIST, unmarshalObjPointer(), unmarshalQCString(), and unmarshalUInt().

{
uint i;
uint count = unmarshalUInt(s);
//printf("--- unmarshalMemberSDict count=%d\n",count);
if (count==NULL_LIST)
{
//printf("--- end unmarshalMemberSDict\n");
return 0; // null list
}
MemberSDict *result = new MemberSDict;
assert(count<1000000);
//printf("Reading %d key-value pairs\n",count);
for (i=0;i<count;i++)
{
//printf(" unmarshaling pair %d\n",i);
QCString key = unmarshalQCString(s);
//printf(" unmarshaling key %s\n",key.data());
//printf(" unmarshalMemberSDict i=%d key=%s md=%p\n",i,key.data(),md);
result->append(key,md);
}
//printf("--- end unmarshalMemberSDict\n");
return result;
}
void* unmarshalObjPointer ( StorageIntf s)

Definition at line 575 of file marshal.cpp.

References StorageIntf::read().

Referenced by MemberGroup::unmarshal(), unmarshalBodyInfo(), unmarshalGroupList(), unmarshalMemberList(), unmarshalMemberLists(), unmarshalMemberSDict(), and unmarshalSectionDict().

{
void *result;
s->read((char *)&result,sizeof(void*));
return result;
}
QCString unmarshalQCString ( StorageIntf s)

Definition at line 451 of file marshal.cpp.

References StorageIntf::read(), and unmarshalUInt().

Referenced by MemberGroup::unmarshal(), ArgumentList::unmarshal(), unmarshalBaseInfoList(), unmarshalBriefInfo(), unmarshalDocInfo(), unmarshalEntry(), unmarshalExampleSDict(), unmarshalGroupingList(), unmarshalItemInfoList(), unmarshalMemberLists(), unmarshalMemberSDict(), unmarshalSectionDict(), and unmarshalSectionInfoList().

{
uint len = unmarshalUInt(s);
//printf("unmarshalQCString: len=%d offset=%llx\n",len,f.pos());
QCString result(len+1);
result.at(len)='\0';
if (len>0)
{
s->read(result.rawData(),len);
}
//printf("unmarshalQCString: result=%s\n",result.data());
return result;
}
QGString unmarshalQGString ( StorageIntf s)

Definition at line 465 of file marshal.cpp.

References StorageIntf::read(), and unmarshalUInt().

Referenced by unmarshalEntry().

{
uint len = unmarshalUInt(s);
//printf("unmarshalQCString: len=%d offset=%llx\n",len,f.pos());
QGString result(len+1);
result.at(len)='\0';
if (len>0)
{
s->read(result.data(),len);
}
//printf("unmarshalQCString: result=%s\n",result.data());
return result;
}
SectionDict* unmarshalSectionDict ( StorageIntf s)

Definition at line 582 of file marshal.cpp.

References SDict< T >::append(), NULL_LIST, unmarshalObjPointer(), unmarshalQCString(), and unmarshalUInt().

{
uint i;
uint count = unmarshalUInt(s);
//printf("unmarshalSectionDict count=%d\n",count);
if (count==NULL_LIST) return 0; // null list
SectionDict *result = new SectionDict(17);
assert(count<1000000);
for (i=0;i<count;i++)
{
QCString key = unmarshalQCString(s);
//printf(" unmarshalSectionDict i=%d key=%s si=%s\n",count,key.data(),si->label.data());
result->append(key,si);
}
return result;
}
QList<SectionInfo>* unmarshalSectionInfoList ( StorageIntf s)

Definition at line 535 of file marshal.cpp.

References NULL_LIST, unmarshalInt(), unmarshalQCString(), and unmarshalUInt().

Referenced by unmarshalEntry().

{
uint i;
uint count = unmarshalUInt(s);
if (count==NULL_LIST) return 0; // null list
QList<SectionInfo> *result = new QList<SectionInfo>;
result->setAutoDelete(TRUE);
assert(count<1000000);
for (i=0;i<count;i++)
{
QCString label = unmarshalQCString(s);
QCString title = unmarshalQCString(s);
QCString ref = unmarshalQCString(s);
QCString fileName = unmarshalQCString(s);
int lineNr = unmarshalInt(s);
int level = unmarshalInt(s);
result->append(new SectionInfo(fileName,lineNr,label,title,type,level,ref));
}
return result;
}
uint unmarshalUInt ( StorageIntf s)

Definition at line 427 of file marshal.cpp.

References StorageIntf::read().

Referenced by MemberList::unmarshal(), ArgumentList::unmarshal(), unmarshalArgumentLists(), unmarshalBaseInfoList(), unmarshalBodyInfo(), unmarshalBriefInfo(), unmarshalDocInfo(), unmarshalEntry(), unmarshalEntryTree(), unmarshalExampleSDict(), unmarshalGroupingList(), unmarshalGroupList(), unmarshalItemInfoList(), unmarshalMemberList(), unmarshalMemberLists(), unmarshalMemberSDict(), unmarshalQCString(), unmarshalQGString(), unmarshalSectionDict(), unmarshalSectionInfoList(), and unmarshalUInt64().

{
uchar b[4];
s->read((char *)b,4);
uint result=(((uint)b[0])<<24)+((uint)b[1]<<16)+((uint)b[2]<<8)+(uint)b[3];
//printf("unmarshalUInt: %x %x %x %x: %x offset=%llx\n",b[0],b[1],b[2],b[3],result,f.pos());
return result;
}
uint64 unmarshalUInt64 ( StorageIntf s)

Definition at line 436 of file marshal.cpp.

References unmarshalUInt().

Referenced by unmarshalEntry().

{
uint64 result=uint64(unmarshalUInt(s))<<32;
result|=unmarshalUInt(s);
return result;
}