summaryrefslogtreecommitdiffstats
path: root/src/marshal.h
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2006-09-10 20:49:41 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2006-09-10 20:49:41 (GMT)
commitc844985adde0459f1f01ed00d0a289591fbcd2af (patch)
treefe67587a09765b41e54254d65f53b6c9352816e9 /src/marshal.h
parentcde82403ec8974fb86de34828b41bf9547587b6e (diff)
downloadDoxygen-c844985adde0459f1f01ed00d0a289591fbcd2af.zip
Doxygen-c844985adde0459f1f01ed00d0a289591fbcd2af.tar.gz
Doxygen-c844985adde0459f1f01ed00d0a289591fbcd2af.tar.bz2
Release-1.4.7-20060910
Diffstat (limited to 'src/marshal.h')
-rw-r--r--src/marshal.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/marshal.h b/src/marshal.h
new file mode 100644
index 0000000..dd751fa
--- /dev/null
+++ b/src/marshal.h
@@ -0,0 +1,81 @@
+#ifndef MARSHAL_H
+#define MARSHAL_H
+
+#include <qlist.h>
+#include <qfile.h>
+#include "sortdict.h"
+#include "store.h"
+
+class ArgumentList;
+class BaseInfo;
+class Grouping;
+class SectionInfo;
+class ListItemInfo;
+class QCString;
+class QGString;
+class SectionDict;
+class MemberSDict;
+class GroupList;
+class BodyInfo;
+class DocInfo;
+class MemberList;
+class ExampleSDict;
+
+#define NULL_LIST 0xffffffff
+
+class FileStorage : public QFile, public StorageIntf
+{
+ public:
+ FileStorage() : QFile() {}
+ FileStorage( const QString &name) : QFile(name) {}
+ int read(char *buf,uint size) { return QFile::readBlock(buf,size); }
+ int write(const char *buf,uint size) { return QFile::writeBlock(buf,size); }
+};
+
+//----- marshaling function: datatype -> byte stream --------------------
+
+void marshalInt(StorageIntf *s,int v);
+void marshalUInt(StorageIntf *s,uint 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 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);
+
+//----- unmarshaling function: byte stream -> datatype ------------------
+
+int unmarshalInt(StorageIntf *s);
+uint unmarshalUInt(StorageIntf *s);
+bool unmarshalBool(StorageIntf *s);
+QCString unmarshalQCString(StorageIntf *s);
+QGString unmarshalQGString(StorageIntf *s);
+ArgumentList * unmarshalArgumentList(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);
+SectionDict * unmarshalSectionDict(StorageIntf *s);
+MemberSDict * unmarshalMemberSDict(StorageIntf *s);
+DocInfo * unmarshalDocInfo(StorageIntf *s);
+BodyInfo * unmarshalBodyInfo(StorageIntf *s);
+GroupList * unmarshalGroupList(StorageIntf *s);
+MemberList * unmarshalMemberList(StorageIntf *s);
+ExampleSDict * unmarshalExampleSDict(StorageIntf *s);
+SDict<MemberList> * unmarshalMemberLists(StorageIntf *s);
+
+#endif