Up

AGSIndex... a class to create references for a gsdoc file

Authors

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

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

Software documentation for the AGSIndex class

AGSIndex : NSObject

Declared in:
AGSIndex.h
Availability: OpenStep

This class is used to build and manipulate a dictionary of cross-reference information.
The references are held in a nested dictionary with strings at the leaves (persisted to 'projectName'.igsdoc) -
method : method-name - {class-name file-name}
method : method-name - {protocol-name file-name}
ivariable : variable-name - {class-name file-name}
class : class-name - file-name
category : category-name - file-name
protocol : protocol-name - file-name
function : function-name - file-name
type : type-name - file-name
constant : constant-name - file-name
variable : variable-name - file-name
entry : entry-name - {file-name ref}
label : label-name - {file-name ref}
contents : ref - text
super : class-name - superclass-name
categories : class-name - {category-name file-name}
unitmethods : unit-name - method-name
classvars : class-name - variables-name
title : file-name - text
source : file-name - array-of-source-files

Instance Variables

Method summary

addInformalProtocols: 

- (void) addInformalProtocols: (NSArray*)protocolNames;
Availability: OpenStep

Informal protocols are not explicitly marked in source, but are inferred to be those categories of NSObject that receive no implementation. AGSOutput finds and accumulates them; autogsdoc passes them here, where each entry is found in the 'category' section of our refs and copied over to the protocol section.

globalRef: type: 

- (NSString*) globalRef: (NSString*)ref type: (NSString*)type;
Availability: OpenStep

Description forthcoming.

makeRefs: 

- (void) makeRefs: (GSXMLNode*)node;
Availability: OpenStep

Given the root node of a gsdoc document, we traverse the tree looking for interesting nodes, and recording their names in a dictionary of references.

mergeRefs: override: 

- (void) mergeRefs: (NSDictionary*)more override: (BOOL)flag;
Availability: OpenStep

Merge a dictionary containing references into the current index. The flag may be used to specify that references being merged in should override any pre-existing values.

methodsInUnit: 

- (NSArray*) methodsInUnit: (NSString*)aUnit;
Availability: OpenStep

Description forthcoming.

outputsForHeader: 

- (NSMutableArray*) outputsForHeader: (NSString*)h;
Availability: OpenStep

Return a list of output files for the header

refs 

- (NSMutableDictionary*) refs;
Availability: OpenStep

Description forthcoming.

setDirectory: 

- (void) setDirectory: (NSString*)path;
Availability: OpenStep

Description forthcoming.

setGlobalRef: type: 

- (void) setGlobalRef: (NSString*)ref type: (NSString*)type;
Availability: OpenStep

Description forthcoming.

setOutputs: forHeader: 

- (void) setOutputs: (NSArray*)a forHeader: (NSString*)h;
Availability: OpenStep

Set up an array listing the output files for a particular header.

setRelationship: from: to: 

- (void) setRelationship: (NSString*)r from: (NSString*)from to: (NSString*)to;
Availability: OpenStep

Description forthcoming.

setSources: forHeader: 

- (void) setSources: (NSArray*)a forHeader: (NSString*)h;
Availability: OpenStep

Set up an array listing the source files for a particular header.

setUnitRef: type: 

- (void) setUnitRef: (NSString*)ref type: (NSString*)type;
Availability: OpenStep

Set up a reference for something inside a unit (class, category or protocol) We store 'method' and 'ivariable' by ref then unit (class), but we store 'unitmethods' * and 'classvars' by unit then ref.

sourcesForHeader: 

- (NSMutableArray*) sourcesForHeader: (NSString*)h;
Availability: OpenStep

Return a list of source files for the header.

unitRef: type: 

- (NSDictionary*) unitRef: (NSString*)ref type: (NSString*)type;
Availability: OpenStep

Return a dictionary containing info on all the units containing the specified method or instance variable.

unitRef: type: unit: 

- (NSString*) unitRef: (NSString*)ref type: (NSString*)type unit: (NSString**)u;
Availability: OpenStep

Return the name of the file containing the ref and return the unit name in which it was found. If not found, return nil for both.
If ref does not occur in the index, this method returns nil.
If the method was given no unit to look in, then it will succeed and return a value if (and only if) the required reference is defined only in one unit (excluding protocols). In the case where it is in two units (one of them a protocol) the class is taken in preference to the protocol.
If ref exists in the unit specified, the method will succeed and return the name of the file in which the reference is located.
If the unit that the method has been asked to look in is a protocol which is not found, the lookup must fail.
Try all superclasses in turn.



Instance Variables for AGSIndex Class

base

@protected NSString* base;
Availability: OpenStep

Description forthcoming.

category

@protected NSString* category;
Availability: OpenStep

Description forthcoming.

chap

@protected unsigned int chap;
Availability: OpenStep

Description forthcoming.

classname

@protected NSString* classname;
Availability: OpenStep

Description forthcoming.

refs

@protected NSMutableDictionary* refs;
Availability: OpenStep

Description forthcoming.

sect

@protected unsigned int sect;
Availability: OpenStep

Description forthcoming.

ssect

@protected unsigned int ssect;
Availability: OpenStep

Description forthcoming.

sssect

@protected unsigned int sssect;
Availability: OpenStep

Description forthcoming.

unit

@protected NSString* unit;
Availability: OpenStep

Description forthcoming.





Up