Fix for UBSan build
[platform/upstream/doxygen.git] / src / marshal.h
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2012 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 marshalBool(StorageIntf *s,bool b);
48 void marshalQCString(StorageIntf *s,const QCString &str);
49 void marshalQGString(StorageIntf *s,const QGString &str);
50 void marshalArgumentList(StorageIntf *s,ArgumentList *argList);
51 void marshalArgumentLists(StorageIntf *s,QList<ArgumentList> *argLists);
52 void marshalBaseInfoList(StorageIntf *s, QList<BaseInfo> *baseList);
53 void marshalGroupingList(StorageIntf *s, QList<Grouping> *groups);
54 void marshalSectionInfoList(StorageIntf *s, QList<SectionInfo> *anchors);
55 void marshalItemInfoList(StorageIntf *s, QList<ListItemInfo> *sli);
56 void marshalObjPointer(StorageIntf *s,void *obj);
57 void marshalSectionDict(StorageIntf *s,SectionDict *sections);
58 void marshalMemberSDict(StorageIntf *s,MemberSDict *memberSDict);
59 void marshalDocInfo(StorageIntf *s,DocInfo *docInfo);
60 void marshalBriefInfo(StorageIntf *s,BriefInfo *briefInfo);
61 void marshalBodyInfo(StorageIntf *s,BodyInfo *bodyInfo);
62 void marshalGroupList(StorageIntf *s,GroupList *groupList);
63 void marshalMemberList(StorageIntf *s,MemberList *ml);
64 void marshalExampleSDict(StorageIntf *s,ExampleSDict *ed);
65 void marshalMemberLists(StorageIntf *s,SDict<MemberList> *mls);
66 void marshalEntry(StorageIntf *s,Entry *e);
67 void marshalEntryTree(StorageIntf *s,Entry *e);
68
69 //----- unmarshaling function: byte stream -> datatype ------------------
70
71 int                  unmarshalInt(StorageIntf *s);
72 uint                 unmarshalUInt(StorageIntf *s);
73 bool                 unmarshalBool(StorageIntf *s);
74 QCString             unmarshalQCString(StorageIntf *s);
75 QGString             unmarshalQGString(StorageIntf *s);
76 ArgumentList *       unmarshalArgumentList(StorageIntf *s);
77 QList<ArgumentList> *unmarshalArgumentLists(StorageIntf *s);
78 QList<BaseInfo> *    unmarshalBaseInfoList(StorageIntf *s);
79 QList<Grouping> *    unmarshalGroupingList(StorageIntf *s);
80 QList<SectionInfo> * unmarshalSectionInfoList(StorageIntf *s);
81 QList<ListItemInfo> *unmarshalItemInfoList(StorageIntf *s);
82 void *               unmarshalObjPointer(StorageIntf *s);
83 SectionDict *        unmarshalSectionDict(StorageIntf *s);
84 MemberSDict *        unmarshalMemberSDict(StorageIntf *s);
85 DocInfo *            unmarshalDocInfo(StorageIntf *s);
86 BriefInfo *          unmarshalBriefInfo(StorageIntf *s);
87 BodyInfo *           unmarshalBodyInfo(StorageIntf *s);
88 GroupList *          unmarshalGroupList(StorageIntf *s);
89 MemberList *         unmarshalMemberList(StorageIntf *s);
90 ExampleSDict *       unmarshalExampleSDict(StorageIntf *s);
91 SDict<MemberList> *  unmarshalMemberLists(StorageIntf *s);
92 Entry *              unmarshalEntry(StorageIntf *s);
93 Entry *              unmarshalEntryTree(StorageIntf *s);
94
95 #endif