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
Availability: OpenStep

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;
Availability: OpenStep

Description forthcoming.

fitWords: from: to: maxSize: output: 

- (unsigned) fitWords: (NSArray*)a from: (unsigned)start to: (unsigned)end maxSize: (unsigned)limit output: (NSMutableString*)buf;
Availability: OpenStep

Description forthcoming.

informalProtocols 

- (NSArray*) informalProtocols;
Availability: OpenStep

Description forthcoming.

output: 

- (NSArray*) output: (NSMutableDictionary*)d;
Availability: OpenStep

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;
Availability: OpenStep


outputFunction: to: 

- (void) outputFunction: (NSMutableDictionary*)d to: (NSMutableString*)str;
Availability: OpenStep

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;
Availability: OpenStep

Output the gsdoc code for an instance variable.

outputMacro: to: 

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


outputMethod: to: for: 

- (void) outputMethod: (NSMutableDictionary*)d to: (NSMutableString*)str for: (NSString*)unit;
Availability: OpenStep

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;
Availability: OpenStep

Description forthcoming.

reformat: withIndent: to: 

- (unsigned) reformat: (NSString*)str withIndent: (unsigned)ind to: (NSMutableString*)buf;
Availability: OpenStep

Description forthcoming.

split: 

- (NSArray*) split: (NSString*)str;
Availability: OpenStep

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;
Availability: OpenStep

Description forthcoming.

identStart

@protected NSCharacterSet* identStart;
Availability: OpenStep

Description forthcoming.

identifier

@protected NSCharacterSet* identifier;
Availability: OpenStep

Description forthcoming.

info

@protected NSDictionary* info;
Availability: OpenStep

Description forthcoming.

informalProtocols

@protected NSMutableArray* informalProtocols;
Availability: OpenStep

Description forthcoming.

spacenl

@protected NSCharacterSet* spacenl;
Availability: OpenStep

Description forthcoming.

spaces

@protected NSCharacterSet* spaces;
Availability: OpenStep

Description forthcoming.

verbose

@protected BOOL verbose;
Availability: OpenStep

Description forthcoming.

warn

@protected BOOL warn;
Availability: OpenStep

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