mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Improved autogsdoc to output symbols such as methods in their header declaration
order along the gsdoc files. Useful for third-party tools which want to generate final documentation from the GSDoc ouput and how the original headers were organized. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31777 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dfa04d7fb9
commit
2fb610f22b
4 changed files with 74 additions and 1 deletions
|
@ -140,6 +140,7 @@
|
|||
DESTROY(ifStack);
|
||||
DESTROY(declared);
|
||||
DESTROY(info);
|
||||
DESTROY(orderedSymbolDeclsByUnit);
|
||||
DESTROY(comment);
|
||||
DESTROY(identifier);
|
||||
DESTROY(identStart);
|
||||
|
@ -154,6 +155,23 @@
|
|||
return info;
|
||||
}
|
||||
|
||||
/** Returns the methods, functions and C data types in their header declaration
|
||||
order, by organizing them into arrays as described below.
|
||||
|
||||
Methods are grouped by class, category or protocol references. For example,
|
||||
valid keys could be <em>ClassName</em>, <em>ClassName(CategoryName)</em> and
|
||||
<em>(ProtocolName)</em>.
|
||||
|
||||
Functions and C data types are grouped by header file names. For example,
|
||||
<em>AGParser.h</em> would a valid key.
|
||||
|
||||
TODO: Collect functions and C data types. Only methods are currently included
|
||||
in the returned dictionary. */
|
||||
- (NSDictionary *) orderedSymbolDeclarationsByUnit
|
||||
{
|
||||
return orderedSymbolDeclsByUnit;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
NSMutableCharacterSet *m;
|
||||
|
@ -170,6 +188,7 @@
|
|||
identStart = RETAIN([NSCharacterSet characterSetWithCharactersInString:
|
||||
@"_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"]);
|
||||
info = [[NSMutableDictionary alloc] initWithCapacity: 6];
|
||||
orderedSymbolDeclsByUnit = [[NSMutableDictionary alloc] init];
|
||||
source = [NSMutableArray new];
|
||||
verbose = [[NSUserDefaults standardUserDefaults] boolForKey: @"Verbose"];
|
||||
warn = [[NSUserDefaults standardUserDefaults] boolForKey: @"Warn"];
|
||||
|
@ -2897,6 +2916,18 @@ fail:
|
|||
return nil;
|
||||
}
|
||||
|
||||
- (void) addOrderedSymbolDeclaration: (NSString *)aMethodOrFunc toUnit: (NSString *)aUnitName
|
||||
{
|
||||
NSMutableArray *orderedSymbolDecls = [orderedSymbolDeclsByUnit objectForKey: aUnitName];
|
||||
|
||||
if (orderedSymbolDecls == nil)
|
||||
{
|
||||
orderedSymbolDecls = [NSMutableArray array];
|
||||
[orderedSymbolDeclsByUnit setObject: orderedSymbolDecls forKey: aUnitName];
|
||||
}
|
||||
[orderedSymbolDecls addObject: aMethodOrFunc];
|
||||
}
|
||||
|
||||
- (NSMutableDictionary*) parseMethodsAreDeclarations: (BOOL)flag
|
||||
{
|
||||
NSMutableDictionary *methods;
|
||||
|
@ -2962,6 +2993,7 @@ fail:
|
|||
* Just record the method.
|
||||
*/
|
||||
[methods setObject: method forKey: token];
|
||||
[self addOrderedSymbolDeclaration: token toUnit: unitName];
|
||||
}
|
||||
else if ((exist = [methods objectForKey: token]) != nil)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue