Up

AGSOutput... a class to output gsdoc source

Authors

Richard Frith-Macdonald (richard@brainstorm.co.uk)

Copyright: (C) 2001 Free Software Foundation, Inc.

The AGSOutput class

This is a really great class... but it's not really reusable since it's far too special purpose.

AGSOutput : NSObject

Declared in:
AGSOutput.h
And finally, here is the actual class description... outside the chapter. This is the class description for AGSOutput, including some sample uses of GSDoc, such as cross-references (see NSString ). Functions, like escapeType() , are automatically referenced (if they are found).

Instance Variables

Method summary

checkComment: unit: info: 

- (NSString*) checkComment: (NSString*)comment unit: (NSString*)unit info: (NSMutableDictionary*)d;
Description forthcoming.

fitWords: from: to: maxSize: output: 

- (unsigned) fitWords: (NSArray*)a from: (unsigned)start to: (unsigned)end maxSize: (unsigned)limit output: (NSMutableString*)buf;
Description forthcoming.

informalProtocols 

- (NSArray*) informalProtocols;
Description forthcoming.

output: 

- (NSArray*) output: (NSMutableDictionary*)d;
Return an array containing the names of any files modified as a result of outputing the specified data structure.

outputDecl: kind: to: 

- (void) outputDecl: (NSMutableDictionary*)d kind: (NSString*)kind to: (NSMutableString*)str;

outputFunction: to: 

- (void) outputFunction: (NSMutableDictionary*)d to: (NSMutableString*)str;
Uses -split: and -reformat:withIndent:to: .
Place the names of function arguments in a temporary array 'args' so that they will be highlighted if they appear in the function description.

outputInstanceVariable: to: for: 

- (void) outputInstanceVariable: (NSMutableDictionary*)d to: (NSMutableString*)str for: (NSString*)unit;
Output the gsdoc code for an instance variable.

outputMacro: to: 

- (void) outputMacro: (NSMutableDictionary*)d to: (NSMutableString*)str;

outputMethod: to: for: 

- (void) outputMethod: (NSMutableDictionary*)d to: (NSMutableString*)str for: (NSString*)unit;
Uses -split: and -reformat:withIndent:to: . Also has fun with YES, NO, and nil.
Check special markup which should be removed from the text actually placed in the gsdoc method documentation... the special markup is included in the gsdoc markup differently.

outputUnit: to: 

- (void) outputUnit: (NSMutableDictionary*)d to: (NSMutableString*)str;
Description forthcoming.

reformat: withIndent: to: 

- (unsigned) reformat: (NSString*)str withIndent: (unsigned)ind to: (NSMutableString*)buf;
Description forthcoming.

split: 

- (NSArray*) split: (NSString*)str;
Split comment text into an array of words (to be reformatted) and insert markup for cross referencing and highlighting.
Phase 1... we take the supplied string and check for white space. Any white space sequence is deleted and treated as a word separator except within xml element markup. The format of element start and end marks is tidied for consistency. The resulting data is made into an array of strings, each containing either an element start or end tag, or one of the whitespace separated words. What about str?



Instance Variables for AGSOutput Class

args

@protected NSArray* args;
Description forthcoming.

identStart

@protected NSCharacterSet* identStart;
Description forthcoming.

identifier

@protected NSCharacterSet* identifier;
Description forthcoming.

info

@protected NSDictionary* info;
Description forthcoming.

informalProtocols

@protected NSMutableArray* informalProtocols;
Description forthcoming.

spacenl

@protected NSCharacterSet* spacenl;
Description forthcoming.

spaces

@protected NSCharacterSet* spaces;
Description forthcoming.

verbose

@protected BOOL verbose;
Description forthcoming.

warn

@protected BOOL warn;
Description forthcoming.




Here is the afterword for the class.

And here is some automated cross referencing... A method in a protocol: <NSCopying>-copyWithZone: , a class: NSString , a protocol: <NSCopying> , and a category: NSRunLoop(GNUstepExtensions) .


Up