1 #ifndef ROBODOC_DOCUMENT_H
2 #define ROBODOC_DOCUMENT_H
5 Copyright (C) 1994-2007 Frans Slothouber, Jacco van Weert, Petteri Kettunen,
6 Bernd Koesling, Thomas Aglassinger, Anthon Pang, Stefan Kost, David Druffner,
7 Sasha Vasko, Kai Hofmann, Thierry Pierron, Friedrich Haase, and Gergely Budai.
9 This file is part of ROBODoc
11 ROBODoc is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
30 /****s* Document/RB_Document
32 * RB_Document -- Information store.
34 * A document is a collection of source files and documentation
35 * files. Depending on the mode that is used there is either a
36 * single documentation file or there is one documentation file for
37 * each source file. This mapping is stored in RB_Document. For
38 * each source file there is an RB_Part. It points to the source
39 * file, the documentation file, and contains all the headers that
40 * were found in the source file.
43 * * links -- linked list of all links.
44 * * parts -- linked list of all parts.
45 * * no_headers -- total number of headers
46 * * headers -- array of pointers to all the headers.
47 * * srctree -- the list of all sourcefiles in the srcroot.
48 * * doctype -- the kind of documentation to be generated.
49 * * actions -- what to de while analysing en generating.
50 * * srcroot -- root dir for the sourcecode.
51 * * docroot -- root dir for the documentation.
52 * * charset -- the character set used for HTML and XML
54 * * first_section_level -- level of the first section,
55 * Defaults to 1 so the first section will
57 * If set to 2 the first section will be 1.1
58 * * extension -- the extension used for the documentation
60 * * css -- the cascading style sheet to be used.
61 * * cur_part -- unused TODO remove.
67 struct RB_Part *cur_part;
68 struct RB_Part *parts;
69 struct RB_link *links;
70 unsigned long no_headers;
71 struct RB_header **headers;
72 struct RB_Directory *srctree;
73 T_RB_DocType doctype; /* HTML RTF etc */
75 int first_section_level; /* TODO document use of first_section_level in manual */
76 long debugmode; /* TODO This should not be in document */
78 struct RB_Path *srcroot; /* TODO Better make this a char* */
79 struct RB_Path *docroot; /* TODO Better make this a char* */
80 char *charset; /* HTML, XML? */
85 /* Docbook specific */
86 char *doctype_name; /* name part of the <!DOCTYPE> to be used with docbook output */
87 char *doctype_location;/* location part of the <!DOCTYPE> to be used with docbook output */
92 struct RB_Document *RB_Get_RB_Document(
94 void RB_Free_RB_Document(
95 struct RB_Document *document );
96 void RB_Document_Add_Part(
97 struct RB_Document *document,
98 struct RB_Part *part );
99 void RB_Document_Dump(
100 struct RB_Document *document );
101 void RB_Document_Determine_DocFilePaths(
102 struct RB_Document *document );
103 void RB_Document_Determine_DocFileNames(
104 struct RB_Document *document );
105 void RB_Document_Create_DocFilePaths(
106 struct RB_Document *document );
107 FILE *RB_Open_SingleDocumentation(
108 struct RB_Document *document );
109 void RB_Document_Create_Parts(
110 struct RB_Document *document );
111 void RB_Document_Collect_Headers(
112 struct RB_Document *document );
113 void RB_Document_Link_Headers(
114 struct RB_Document *document );
115 void RB_Fill_Header_Filename(
116 struct RB_Document *document );
118 struct RB_header *RB_Document_Check_For_Duplicate(
119 struct RB_Document *arg_document,
120 struct RB_header *hdr );
122 void RB_Document_Sort_Headers(
123 struct RB_Document *document );
125 void RB_Document_Split_Parts(
126 struct RB_Document *document );
128 #endif /* ROBODOC_DOCUMENT_H */