Imported Robodoc.
[robodoc.git] / Source / part.h
1 #ifndef ROBODOC_PART_H
2 #define ROBODOC_PART_H
3 /*
4 Copyright (C) 1994-2007  Frans Slothouber, Jacco van Weert, Petteri Kettunen,
5 Bernd Koesling, Thomas Aglassinger, Anthon Pang, Stefan Kost, David Druffner,
6 Sasha Vasko, Kai Hofmann, Thierry Pierron, Friedrich Haase, and Gergely Budai.
7
8 This file is part of ROBODoc
9
10 ROBODoc is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
23 */
24
25
26 #include <stdio.h>
27
28 /****s* Part/RB_Part
29  * NAME
30  *   RB_Part -- a part of the total documentation
31  * FUNCTION
32  *   RB_Parts are stored in RB_Document.  For each source file there
33  *   is an RB_Part. It points to the source file, the documentation
34  *   file, and contains all the headers that were found in the source
35  *   file.
36  * ATTRIBUTES
37  *   o next                   -- pointer to the next part
38  *                             (to form a linked list).
39  *   o filename               -- Information over the path to the
40  *                             sourcefile and the correcsponding 
41  *                             documentation file.
42  *   o headers                -- All the headers that were
43  *                             found in the sourcefile.
44  *   o last_header            -- pointer to the last element in the
45  *                             list of headers.
46  *                             This is used to make it possible
47  *                             to add the the heades in the 
48  *                             same order as they were found in
49  *                             the source file.
50  *****
51  */
52
53 struct RB_Part
54 {
55     struct RB_Part     *next;
56     struct RB_Filename *filename;
57     struct RB_header   *headers;
58     struct RB_header   *last_header;
59 };
60
61
62 struct RB_Part     *RB_Get_RB_Part(
63     void );
64 void                RB_Free_RB_Part(
65     struct RB_Part *part );
66 FILE               *RB_Open_Documentation(
67     struct RB_Part *part );
68 FILE               *RB_Open_Source(
69     struct RB_Part *part );
70
71 void                RB_Part_Add_Header(
72     struct RB_Part *part,
73     struct RB_header *header );
74 void                RB_Part_Add_Source(
75     struct RB_Part *part,
76     struct RB_Filename *sourcefilename );
77 void                RB_Part_Add_Doc(
78     struct RB_Part *part,
79     struct RB_Filename *docfilename );
80 void                RB_Part_Dump(
81     struct RB_Part *part );
82 struct RB_Filename *RB_Part_Get_Source(
83     struct RB_Part *part );
84
85 #endif /* ROBODOC_PART_H */