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

richard@brainstorm.co.uk
Generated at 2025-12-02 21:52:00 +0000
2001 Free Software Foundation, Inc.
Software documentation for the AGSIndex class
AGSIndex.h
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
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
Description forthcoming.
addInformalProtocols:
protocolNames
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.
authors
Description forthcoming.
find:
key
Looks for a string as a key or value in the index, and returns the paths to any occurrences found. Returns `nil` if the string is not found.
globalRef:
ref
type:
type
Description forthcoming.
makeRefs:
node
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:
more
override:
flag
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:
aUnit
Description forthcoming.
outputsForHeader:
h
Return a list of output files for the header
refs
Description forthcoming.
setDirectory:
path
Description forthcoming.
setEmail:
address
forAuthor:
name
Set up an array of email addresses for author.
setGlobalRef:
ref
type:
type
Description forthcoming.
setOutputs:
a
forHeader:
h
Set up an array listing the output files for a particular header.
setRelationship:
r
from:
from
to:
to
Description forthcoming.
setSources:
a
forHeader:
h
Set up an array listing the source files for a particular header.
setUnitRef:
ref
type:
type
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:
h
Return a list of source files for the header.
unitRef:
ref
type:
type
Return a dictionary containing info on all the units containing the specified method or instance variable.
unitRef:
ref
type:
type
unit:
u
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.