Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 135 lines (123 sloc) 6.934 kB
36775ab @tomaz Added initial project files.
authored
1 //
2 // DoxygenConverter.h
f8a573c @tomaz Updated project name to appledoc.
authored
3 // appledoc
36775ab @tomaz Added initial project files.
authored
4 //
5 // Created by Tomaz Kragelj on 11.4.09.
6 // Copyright 2009 Tomaz Kragelj. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
3a46c43 @tomaz Refactored output generation by moving all specifics to OutputGenerat…
authored
10 #import "Constants.h"
36775ab @tomaz Added initial project files.
authored
11
12 @class CommandLineParser;
13
14 //////////////////////////////////////////////////////////////////////////////////////////
15 //////////////////////////////////////////////////////////////////////////////////////////
16 /** The doxygen output converter class.
17
2677c27 @tomaz Removed all unicode characters inserted by the doxygen custom user sc…
authored
18 This class handles the doxygen xml output files and converts them to DocSet. The
36775ab @tomaz Added initial project files.
authored
19 conversion happens through several steps:
20 - If @c Doxyfile doesn't exist or doxygen configuration file is not passed over via
21 the command line parameters, the default file is created using the doxygen itself,
22 then the configuration file options are set so that correct output is used.
23 - Doxygen is started with the configuration file which results in xml files being
24 created at the desired output path.
25 - The generated xml files are parsed and converted to clean versions which are used
26 for creating the rest of the documentation. All index xml files are created as well.
27 - All references in the cleaned xml files are checked so that they point to the
28 correct files and members.
29 - Optionally, all cleaned xml files are converted to xhtml.
30 - Optionally, the DocSet bundle is created.
31 - All temporary files are optionally removed.
32
33 The convertion takes several steps. In the first steps the objects database is generated
34 which is used in later steps to get and handle the list of documented objects. The database
35 is a standard @c NSDictionary of the following layout:
36 - @c "Index" key: contains a @c NSXMLDocument with clean index XML.
5424781 @tomaz Implemented clean XML objects hierarchy creation.
authored
37 - @c "Hierarchy" key: contains a @c NSXMLDocument with clean hierarchy XML.
38 - @c "Hierarchies" key: contains a @c NSMutableDictionary with classes hierarchy tree.
39 - @c "<ObjectName>" key: contains a @c NSMutableDictionary describing the object:
e6cf82b @tomaz Added support for browsing documentation set class hierarchy within t…
authored
40 - @c "ObjectName" key: contains the object name. This is the same name as used
41 for the key in the parent dictionary. It still serves a purpose for the
42 non-documented objects which are part of the hierarchy - for there we can't
43 use the @c "ObjectData" key since we have no entry...
5424781 @tomaz Implemented clean XML objects hierarchy creation.
authored
44 - @c "ObjectData" key: contains a pointer to the object's data under the main
e6cf82b @tomaz Added support for browsing documentation set class hierarchy within t…
authored
45 @c "Objects" key list. Note that this is @c nil if the object is not
46 documented.
5424781 @tomaz Implemented clean XML objects hierarchy creation.
authored
47 - @c "Children" key: contains a @c NSMutableDictionary with all children of
e6cf82b @tomaz Added support for browsing documentation set class hierarchy within t…
authored
48 this object. If the object doesn't have any children, empty dictionary is
49 used. The dictionary has the same structure as the main @c "Hierarchies"
5424781 @tomaz Implemented clean XML objects hierarchy creation.
authored
50 dictionary:
51 - @c "<ObjectName>"...
52 - ...
53 - @c "<ObjectName>"...
54 - ...
36775ab @tomaz Added initial project files.
authored
55 - @c "Objects" key: contains a @c NSMutableDictionary with object descriptions. This
56 is usefull for enumerating over all documented objects:
57 - @c "<ObjectName>" key: contains a @c NSMutableDictionary with object data:
58 - @c "ObjectName" key: an @c NSString with the object name (this is the same
59 name as used for the key in the root dictionary).
60 - @c "ObjectKind" key: an @c NSString which has the value @c "class" if the
61 object is a class, @c "category" if the object is category and @c "protocol"
62 if the object is a protocol.
58558b1 @tomaz Implemented optional category documentation merging to the extended c…
authored
63 - @c "ObjectClass key: an @c NSString which contains the name of the class to
64 which the object "belongs". At the moment this is only used for categories
65 to map to the class that the category extends. This is key is missing for
66 other objects. Note that the key is also missing for categories which
67 "parent" class cannot be determined (not likely, but be prepared just in
68 case).
36775ab @tomaz Added initial project files.
authored
69 - @c "CleanedMarkup" key: contains an @c NSXMLDocument with clean XML. This
70 document is updated through different steps and always contains the last
71 object data.
87213dd @tomaz All member links now use the correct prefix (- or +).
authored
72 - @c "Members" key: contains a @c NSMutableDictionary with the descriptions
73 of all object members. This is mainly used for nicer links generation. The
74 keys for the dictionary are simply method names:
75 - @c "<MethodName>" key: contains a @c NSMutableDictionary with member
76 description:
77 - @c "Name" key: a @c NSString with the member name (this is the same
78 name as the key in the parent dictionary).
79 - @c "Prefix" key: a @c NSString with the prefix to be used before the
80 name in order to get the selector name.
81 - @c "Selector" key: a @c NSString with the correctly formatted member
82 selector that can be used directly when creating member link names
83 within the same object (inter object links cannot use this because
84 their template might include prefix at arbitrary place).
5424781 @tomaz Implemented clean XML objects hierarchy creation.
authored
85 - @c "<MethodName>"...
86 - ...
87 - @c "Parent" key: A @c NSString containing the name of the object parent.
88 This is only used for classes and is left out for other objects.
36775ab @tomaz Added initial project files.
authored
89 - @c "RelativeDirectory" key: this @c NSString describes the sub directory
90 under which the object will be stored relative to the index file. At the
91 moment this value depends on the object type and can be @c "Classes",
92 @c "Categories" or @c "Protocols".
93 - @c "RelativePath" key: this @c NSString describes the relative path including
94 the file name to the index file. This path starts with the value of the
95 @c RelativeDirectory key to which the object file name is added.
96 - @c "DoxygenMarkupFilename" key: contains an @c NSString that specifies the
97 original name of the XML generated by the doxygen.
98 - @c "<ObjectName>"...
99 - ...
100 - @c "Directories" key: contains a @c NSMutableDictionary which resembles the file
101 structure under which the objects are stored. This is usefull for enumerating over
102 the documented objects by their relative directory under which they will be saved:
103 - @c "<DirectoryName>" key: contains a @c NSMutableArray with the list of all
104 objects for this directory. The objects stored in the array are simply pointers
105 to the main @c "Objects" instances.
106 - @c "<DirectoryName>"...
107 - ...
108
3a46c43 @tomaz Refactored output generation by moving all specifics to OutputGenerat…
authored
109 Note that this class relies on @c CommandLineParser to determine the exact conversion
110 work flow and common, application-wide parameters. Internally the class delegates
111 all output generation to top level @c OutputProcessing conformers which in turn manage
112 all their dependent generators.
113
114 This class doesn't perform any actual output generation. Instead it delegates it to the
115 concrete @c OutputGenerator instances.
36775ab @tomaz Added initial project files.
authored
116 */
117 @interface DoxygenConverter : NSObject
118 {
119 CommandLineParser* cmd;
120 NSMutableDictionary* database;
3a46c43 @tomaz Refactored output generation by moving all specifics to OutputGenerat…
authored
121 NSMutableArray* topLevelGenerators;
36775ab @tomaz Added initial project files.
authored
122 }
123
124 //////////////////////////////////////////////////////////////////////////////////////////
125 /// @name Converting handling
126 //////////////////////////////////////////////////////////////////////////////////////////
127
2677c27 @tomaz Removed all unicode characters inserted by the doxygen custom user sc…
authored
128 /** Converts the doxygen generated file into the desired output.
36775ab @tomaz Added initial project files.
authored
129
130 @exception NSException Thrown if conversion fails.
131 */
132 - (void) convert;
133
134 @end
Something went wrong with that request. Please try again.