My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
marshal.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #ifndef MARSHAL_H
17 #define MARSHAL_H
18 
19 #include <qlist.h>
20 #include <qfile.h>
21 #include "sortdict.h"
22 #include "store.h"
23 
24 class ArgumentList;
25 struct BaseInfo;
26 struct Grouping;
27 struct SectionInfo;
28 struct ListItemInfo;
29 class QCString;
30 class QGString;
31 class SectionDict;
32 class MemberSDict;
33 class GroupList;
34 class MemberList;
35 struct BodyInfo;
36 struct DocInfo;
37 struct BriefInfo;
38 class ExampleSDict;
39 class Entry;
40 
41 #define NULL_LIST 0xffffffff
42 
43 //----- marshaling function: datatype -> byte stream --------------------
44 
45 void marshalInt(StorageIntf *s,int v);
46 void marshalUInt(StorageIntf *s,uint v);
47 void marshalUInt64(StorageIntf *s,uint64 v);
48 void marshalBool(StorageIntf *s,bool b);
49 void marshalQCString(StorageIntf *s,const QCString &str);
50 void marshalQGString(StorageIntf *s,const QGString &str);
52 void marshalArgumentLists(StorageIntf *s,QList<ArgumentList> *argLists);
53 void marshalBaseInfoList(StorageIntf *s, QList<BaseInfo> *baseList);
54 void marshalGroupingList(StorageIntf *s, QList<Grouping> *groups);
55 void marshalSectionInfoList(StorageIntf *s, QList<SectionInfo> *anchors);
56 void marshalItemInfoList(StorageIntf *s, QList<ListItemInfo> *sli);
57 void marshalObjPointer(StorageIntf *s,void *obj);
58 void marshalSectionDict(StorageIntf *s,SectionDict *sections);
59 void marshalMemberSDict(StorageIntf *s,MemberSDict *memberSDict);
60 void marshalDocInfo(StorageIntf *s,DocInfo *docInfo);
61 void marshalBriefInfo(StorageIntf *s,BriefInfo *briefInfo);
62 void marshalBodyInfo(StorageIntf *s,BodyInfo *bodyInfo);
63 void marshalGroupList(StorageIntf *s,GroupList *groupList);
67 void marshalEntry(StorageIntf *s,Entry *e);
69 
70 //----- unmarshaling function: byte stream -> datatype ------------------
71 
73 uint unmarshalUInt(StorageIntf *s);
74 uint64 unmarshalUInt64(StorageIntf *s);
75 bool unmarshalBool(StorageIntf *s);
76 QCString unmarshalQCString(StorageIntf *s);
77 QGString unmarshalQGString(StorageIntf *s);
79 QList<ArgumentList> *unmarshalArgumentLists(StorageIntf *s);
80 QList<BaseInfo> * unmarshalBaseInfoList(StorageIntf *s);
81 QList<Grouping> * unmarshalGroupingList(StorageIntf *s);
82 QList<SectionInfo> * unmarshalSectionInfoList(StorageIntf *s);
83 QList<ListItemInfo> *unmarshalItemInfoList(StorageIntf *s);
96 
97 #endif