-
Notifications
You must be signed in to change notification settings - Fork 2
/
DocDeclarationReorderer.h
55 lines (44 loc) · 1.74 KB
/
DocDeclarationReorderer.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
/**
<abstract>A DocPageWeaver decorator which can be used to reorder
GSDoc symbols declarations, in order to match the source header.</abstract>
Copyright (C) 2010 Quentin Mathe
Author: Quentin Mathe <[email protected]>
Date: December 2010
License: Modified BSD (see COPYING)
*/
#import <Foundation/Foundation.h>
#import <EtoileFoundation/EtoileFoundation.h>
#import "DocPageWeaver.h"
/** @group GSDoc Parsing
DocPageWeaver uses this class internally.
See -initWithWeaver:orderedSymbols:. */
@interface DocDeclarationReorderer : NSObject <DocWeaving>
{
@private
id <DocWeaving> weaver;
NSDictionary *orderedSymbols;
/* The accumulated doc elements by nesting level.
Four key kinds are possible:
- "root"
- class symbol (a key per class)
- protocol symbol (a key per protocol)
- category symbol (a key per category)
Each key is bound to a doc element array.
Root can contain DocFunction, DocMacro and DocCDataType.
Other key kinds can contains DocMethod elements only. */
NSMutableDictionary *accumulatedDocElements;
NSString *currentConstructName;
}
/** <init />
Initializes and returns a new reorderer that can receive parsed symbols through
DocWeaving protocol it implements, and emit reordered symbols by invoking
DocWeaving methods on the weaver.
The weaver argument should be a DocPageWeaver object.<br />
The parser calling DocWeaving methods on a DocDeclarationReorderer object
should be a GSDocParser.<br />
The returned object reorders the symbols to match their ordering in the given
property list, whose structure must match <em>OrderedSymbolDeclarations.plist</em>
output by autogsdoc. */
- (id) initWithWeaver: (id <DocWeaving>)aWeaver
orderedSymbols: (NSDictionary *)symbolArraysByKind;
@end