File: document.h

package info (click to toggle)
robodoc 4.99.40-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,560 kB
  • ctags: 978
  • sloc: ansic: 14,067; sh: 3,711; perl: 155; makefile: 108
file content (133 lines) | stat: -rw-r--r-- 5,056 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#ifndef ROBODOC_DOCUMENT_H
#define ROBODOC_DOCUMENT_H
/* vi: spell ff=unix 
 */


/*
Copyright (C) 1994-2007  Frans Slothouber, Jacco van Weert, Petteri Kettunen,
Bernd Koesling, Thomas Aglassinger, Anthon Pang, Stefan Kost, David Druffner,
Sasha Vasko, Kai Hofmann, Thierry Pierron, Friedrich Haase, and Gergely Budai.

This file is part of ROBODoc

ROBODoc is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/


#include <stdio.h>
#include "robodoc.h"

/****s* Document/RB_Document
 * NAME
 *   RB_Document -- Information store.
 * FUNCTION
 *   A document is a collection of source files and documentation
 *   files.  Depending on the mode that is used there is either a
 *   single documentation file or there is one documentation file for
 *   each source file.  This mapping is stored in RB_Document.  For
 *   each source file there is an RB_Part. It points to the source
 *   file, the documentation file, and contains all the headers that
 *   were found in the source file.
 *
 * ATTRIBUTES
 *   * links    -- linked list of all links.
 *   * parts    -- linked list of all parts.
 *   * no_headers -- total number of headers
 *   * headers  -- array of pointers to all the headers.
 *   * srctree  -- the list of all sourcefiles in the srcroot.
 *   * doctype  -- the kind of documentation to be generated.
 *   * actions  -- what to de while analysing en generating.
 *   * srcroot  -- root dir for the sourcecode.
 *   * docroot  -- root dir for the documentation.
 *   * charset  -- the character set used for HTML and XML
 *               documentation.
 *   * first_section_level -- level of the first section, 
 *                            Defaults to 1 so the first section will
 *                            be 1.
 *                            If set to 2 the first section will be 1.1
 *   * extension -- the extension used for the documentation
 *                files.
 *   * css      -- the cascading style sheet to be used.
 *   * cur_part -- unused   TODO remove.
 * SOURCE
 */

struct RB_Document
{
    struct RB_Part     *cur_part;
    struct RB_Part     *parts;
    struct RB_link     *links;
    unsigned long       no_headers;
    struct RB_header  **headers;
    struct RB_Directory *srctree;
    T_RB_DocType        doctype;        /* HTML RTF etc */
    actions_t           actions;
    int                 first_section_level;  /* TODO document use of first_section_level in manual */
    long                debugmode;      /* TODO This should not be in document */
    char               *singledoc_name;
    struct RB_Path     *srcroot;        /* TODO Better make this a char* */
    struct RB_Path     *docroot;        /* TODO Better make this a char* */
    char               *charset;        /* HTML, XML? */
    char               *css;
    char               *extension;
    char               *compress;
    char               *section;
    /* Docbook specific */
    char               *doctype_name;    /* name part of the <!DOCTYPE> to be used with docbook output */
    char               *doctype_location;/* location part of the <!DOCTYPE> to be used with docbook output */
};

/*****/

void RB_Loop_Check( struct RB_Document *document );

struct RB_Document *RB_Get_RB_Document(
    void );
void                RB_Free_RB_Document(
    struct RB_Document *document );
void                RB_Document_Add_Part(
    struct RB_Document *document,
    struct RB_Part *part );
void                RB_Document_Dump(
    struct RB_Document *document );
void                RB_Document_Determine_DocFilePaths(
    struct RB_Document *document );
void                RB_Document_Determine_DocFileNames(
    struct RB_Document *document );
void                RB_Document_Create_DocFilePaths(
    struct RB_Document *document );
FILE               *RB_Open_SingleDocumentation(
    struct RB_Document *document );
void                RB_Document_Create_Parts(
    struct RB_Document *document );
void                RB_Document_Collect_Headers(
    struct RB_Document *document );
void                RB_Document_Link_Headers(
    struct RB_Document *document );
void                RB_Fill_Header_Filename(
    struct RB_Document *document );

struct RB_header   *RB_Document_Check_For_Duplicate(
    struct RB_Document *arg_document,
    struct RB_header *hdr );

void                RB_Document_Sort_Headers(
    struct RB_Document *document );

void                RB_Document_Split_Parts(
    struct RB_Document *document );

#endif /* ROBODOC_DOCUMENT_H */