forked from tomaz/appledoc
/
XMLBasedOutputGenerator+IndexSubclassAPI.h
134 lines (108 loc) · 5.96 KB
/
XMLBasedOutputGenerator+IndexSubclassAPI.h
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
134
//
// XMLBasedOutputGenerator+IndexSubclassAPI.h
// appledoc
//
// Created by Tomaz Kragelj on 28.5.09.
// Copyright (C) 2009, Tomaz Kragelj. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "XMLBasedOutputGenerator.h"
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
/** Defines helper virtual methods for the @c XMLBasedOutputGenerator subclasses that help
index output generation.
*/
@interface XMLBasedOutputGenerator (IndexSubclassAPI)
//////////////////////////////////////////////////////////////////////////////////////////
/// @name Subclass index file header and footer handling
//////////////////////////////////////////////////////////////////////////////////////////
/** Appends any header text before the actual generation starts.
The message is sent from the @c XMLBasedOutputGenerator::outputDataForIndex() as the first
message. It gives subclasses a chance to append data to the output before the actual output
generation starts. After this message is sent, the rest of the messages are followed and as
the last one, @c appendIndexFooterToData:() is sent.
@param data The data to append to. This is guaranteed to be non @c mil.
@exception NSException Thrown if appending fails.
@see XMLBasedOutputGenerator::outputDataForIndex
@see appendIndexFooterToData:
*/
- (void) appendIndexHeaderToData:(NSMutableData*) data;
/** Appends any footer text after output generation ends.
The message is sent from the @c XMLBasedOutputGenerator::outputDataForIndex() as the last
message. It gives subclasses a chance to append data to the output after the rest of the
output is generated. This is ussually the place to "close" open tags or similar.
@param data The data to append to. This is guaranteed to be non @c mil.
@exception NSException Thrown if appending fails.
@see XMLBasedOutputGenerator::outputDataForIndex
@see appendIndexHeaderToData:
*/
- (void) appendIndexFooterToData:(NSMutableData*) data;
//////////////////////////////////////////////////////////////////////////////////////////
/// @name Subclass index group handling
//////////////////////////////////////////////////////////////////////////////////////////
/** Appends any index group header text before the actual group items generation starts.
The message is sent from the @c XMLBasedOutputGenerator::outputDataForIndex() just before
index group items are generated. It gives subclasses a chance to append data to the output
before the generation for group items starts. After this message is sent, at least one
@c appendIndexGroupItemToData:fromItem:index:type:() message is sent and then
@c appendIndexGroupFooterToData:type:() is sent at the end.
The type identifies the type of the index group and can be one of the following:
- @c kTKIndexGroupClasses: This group will append all classes.
- @c kTKIndexGroupProtocols: This group will append all protocols.
- @c kTKIndexGroupCategories: This group will append all categories.
@param data The data to append to. This is guaranteed to be non @c mil.
@param type The type of the index group.
@exception NSException Thrown if appending fails.
@see XMLBasedOutputGenerator::outputDataForIndex
@see appendIndexGroupItemToData:fromItem:index:type:
@see appendIndexGroupFooterToData:type:
*/
- (void) appendIndexGroupHeaderToData:(NSMutableData*) data
type:(int) type;
/** Appends any index group footer text after the group items generation ends.
The message is sent from the @c XMLBasedOutputGenerator::outputDataForIndex() as the last
group generation message. It gives subclasses a chance to append data to the output after the
generation for index group ends. This is ussually the place to "close" open tags or similar.
The type identifies the type of the index group and can be one of the following:
- @c kTKIndexGroupClasses: This group will append all classes.
- @c kTKIndexGroupProtocols: This group will append all protocols.
- @c kTKIndexGroupCategories: This group will append all categories.
@param data The data to append to. This is guaranteed to be non @c mil.
@param type The type of the index group.
@exception NSException Thrown if appending fails.
@see XMLBasedOutputGenerator::outputDataForIndex
@see appendIndexGroupHeaderToData:type:
@see appendIndexGroupItemToData:fromItem:index:type:
*/
- (void) appendIndexGroupFooterToData:(NSMutableData*) data
type:(int) type;
/** Appends the given index group item data.
This message is sent from @c XMLBasedOutputGenerator::outputDataForIndex() for each group
member. The subclass should append the data for the given item. The subclass can get more
information about the member by using the index member data methods from the
@c XMLBasedOutputGenerator(IndexParsingAPI) category.
The type identifies the type of the index group and can be one of the following:
- @c kTKIndexGroupClasses: This group will append all classes.
- @c kTKIndexGroupProtocols: This group will append all protocols.
- @c kTKIndexGroupCategories: This group will append all categories.
@param data The data to append to. This is guaranteed to be non @c mil.
@param item The data item describing the given member.
@param index Zero based index of the member within the group.
@param type The type of the index group.
@exception NSException Thrown if appending fails.
@see XMLBasedOutputGenerator::outputDataForIndex
@see appendIndexGroupHeaderToData:type:
@see appendIndexGroupFooterToData:type:
*/
- (void) appendIndexGroupItemToData:(NSMutableData*) data
fromItem:(id) item
index:(int) index
type:(int) type;
//////////////////////////////////////////////////////////////////////////////////////////
/// @name Properties
//////////////////////////////////////////////////////////////////////////////////////////
/** Returns current index output title. */
@property(readonly) NSString* indexTitle;
/** Returns current index cleaned XML document. */
@property(readonly) NSXMLDocument* indexMarkup;
@end