diff --git a/ChangeLog b/ChangeLog
index e543f7ebd..d686f24f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2004-03-29 Richard Frith-Macdonald \n"];
- [self incIndent];
+ if (!isBareStyle)
+ {
+ [buf appendString: indent];
+ [buf appendFormat: @"%@ Index\n", title];
+ [buf appendString: indent];
+ [buf appendString: @"
\n"];
+ }
}
else if ([dict count] > 0)
{
@@ -418,10 +444,16 @@ static NSMutableSet *textNodes = nil;
}
[buf appendString: indent];
- [buf appendFormat: @"%@\n", title];
+ if (!isBareStyle)
+ {
+ [buf appendFormat: @"%@\n", title];
+ }
[buf appendString: indent];
- [buf appendString: @"\n"];
+ [self incIndent];
+ }
a = [dict allKeys];
a = [a sortedArrayUsingSelector: @selector(compare:)];
@@ -342,14 +348,34 @@ static NSMutableSet *textNodes = nil;
}
[buf appendString: indent];
- [buf appendString: @"
\n"];
+ if (!isBareStyle)
+ {
+ [self decIndent];
+ [buf appendString: indent];
+ [buf appendString: @"
"];
+ }
+ [buf appendString: @"\n"];
}
- [self decIndent];
- [buf appendString: indent];
- [buf appendString: @"\n"];
- [self incIndent];
+ if (!isBareStyle) {
+ [buf appendString: @"
"];
+ }
+ [buf appendString: @"\n"];
}
}
@@ -526,6 +579,15 @@ static NSMutableSet *textNodes = nil;
[self decIndent];
[buf appendString: indent];
+
+ // special formatting for table-of-contents frames; ultimately
+ // this should be moved to stylesheet
+ if (isContentsDoc)
+ {
+ [buf appendString: indent];
+ [buf appendString: @"\n"];
+ }
+
[buf appendString: @"\n"];
}
else if ([name isEqual: @"br"] == YES)
@@ -966,6 +1028,8 @@ static NSMutableSet *textNodes = nil;
}
else if ([name isEqual: @"gsdoc"] == YES)
{
+ NSString *stylesheetURL = [prop objectForKey: @"stylesheeturl"];
+
base = [prop objectForKey: @"base"];
if (base == nil)
{
@@ -978,10 +1042,19 @@ static NSMutableSet *textNodes = nil;
prevFile = [prevFile stringByAppendingPathExtension: @"html"];
upFile = [prop objectForKey: @"up"];
upFile = [upFile stringByAppendingPathExtension: @"html"];
+
+ // special formatting for table-of-contents frames; ultimately
+ // this should be moved to stylesheet
+ isContentsDoc = ((stylesheetURL != nil) &&
+ ([stylesheetURL rangeOfString: @"gsdoc_contents"].length > 0)) ?
+ YES : NO;
+
[self outputNodeList: children to: buf];
}
else if ([name isEqual: @"head"] == YES)
{
+ NSString *headerTag;
+
[buf appendString: indent];
[buf appendString: @"\n"];
[self incIndent];
@@ -999,6 +1072,14 @@ static NSMutableSet *textNodes = nil;
[buf appendString: @"\n"];
[self incIndent];
+ // special formatting for table-of-contents frames; ultimately
+ // this should be moved to stylesheet
+ if (isContentsDoc)
+ {
+ [buf appendString: indent];
+ [buf appendString: @"\n"];
+ }
+
if (prevFile != nil)
{
[buf appendString: indent];
@@ -1014,13 +1095,24 @@ static NSMutableSet *textNodes = nil;
[buf appendString: indent];
[buf appendFormat: @"Next\n", nextFile];
}
- [buf appendString: indent];
- [buf appendString: @""];
+ [self incIndent];
+ }
+ [buf appendString: @"\n"];
a = [dict allKeys];
a = [a sortedArrayUsingSelector: @selector(compare:)];
@@ -457,22 +489,43 @@ static NSMutableSet *textNodes = nil;
}
[buf appendString: indent];
- [buf appendString: @"
\n"];
+ if (!isBareStyle) {
+ [self decIndent];
+ [buf appendString: indent];
+ [buf appendString: @"
"];
+ }
+ [buf appendString: @"\n"];
+
}
- [self decIndent];
- [buf appendString: indent];
- [buf appendString: @"
\n"];
+ if (prevFile != nil || upFile != nil || nextFile != nil)
+ {
+ [buf appendString: indent];
+ [buf appendString: @"
\n"];
+ }
[buf appendString: indent];
- [buf appendFormat: @"", base];
+ if (isContentsDoc)
+ {
+ headerTag = @"h2";
+ }
+ else
+ {
+ headerTag = @"h1";
+ }
+ [buf appendFormat: @"<%@>", headerTag, base];
[self outputText: [children firstChild] to: buf];
- [buf appendString: @"
\n"];
+ [buf appendFormat: @"%@>\n", headerTag];
children = [children nextElement];
if ([[children name] isEqual: @"author"] == YES)
@@ -1092,10 +1184,8 @@ static NSMutableSet *textNodes = nil;
if (desc != nil)
{
[self incIndent];
- while (desc != nil)
- {
- desc = [self outputBlock: desc to: buf inPara: NO];
- }
+ [self outputNode: desc to: buf];
+ desc = nil;
[self decIndent];
}
[buf appendString: indent];
@@ -1170,9 +1260,12 @@ static NSMutableSet *textNodes = nil;
{
NSString *scope = [prop objectForKey: @"scope"];
NSString *type = [prop objectForKey: @"type"];
+ NSString *target = [prop objectForKey: @"target"];
NSString *title = [type capitalizedString];
+ NSString *style = [prop objectForKey: @"style"];
- [self outputIndex: type scope: scope title: title to: buf];
+ [self outputIndex: type scope: scope title: title style: style
+ target: target to: buf ];
}
else if ([name isEqual: @"ivar"] == YES) // %phrase
{
@@ -1519,6 +1612,10 @@ static NSMutableSet *textNodes = nil;
NSString *c = [prop objectForKey: @"class"];
NSString *s;
+ // fill in default value
+ if ((type == nil) || [type isEqual: @""])
+ type = @"label";
+
if ([type isEqual: @"method"] || [type isEqual: @"ivariable"])
{
s = [self makeLink: r ofType: type inUnit: c isRef: YES];
@@ -1588,8 +1685,6 @@ static NSMutableSet *textNodes = nil;
else if ([name isEqual: @"EOEntity"] == YES
|| [name isEqual: @"EOModel"] == YES)
{
- NSString *tmp = [prop objectForKey: @"name"];
-
NSLog(@"Element '%@' not implemented", name); // FIXME
}
else if ([name isEqual: @"section"] == YES)
@@ -1722,7 +1817,12 @@ static NSMutableSet *textNodes = nil;
}
else if ([name isEqual: @"url"] == YES)
{
-NSLog(@"Element '%@' not implemented", name); // FIXME
+ // create an HREF as before but use the URL itself as marker text
+ [buf appendString: @""];
+ [buf appendString: [prop objectForKey: @"url"]];
+ [buf appendString: @""];
}
else if ([name isEqual: @"var"] == YES) // %phrase
{
@@ -1788,7 +1888,7 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
{
GSXMLNode *tmp;
/*
- * Try outputing as any of the list elements.
+ * Try outputting as any of the list elements.
*/
tmp = [self outputList: node to: buf];
if (tmp == node)
@@ -1900,6 +2000,7 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
else
{
NSLog(@"Non-block element '%@' in block ...", n);
+ NSLog(@"%@",node);
return nil;
}
}
@@ -2033,7 +2134,52 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
}
else if ([name isEqual: @"dictionary"] == YES)
{
-NSLog(@"Element '%@' not implemented", name); // FIXME
+ [buf appendString: indent];
+ [buf appendString: @"{\n"];
+ [self incIndent];
+ // all children should be dictionaryItems w/key and value attributes;
+ // if the value attribute is absent, the content is the value
+ for (; children != nil; children = [children nextElement])
+ {
+ GSXMLNode *dItem = children;
+ NSDictionary *dProp = [dItem attributes];
+ NSString *value = [dProp objectForKey: @"value"];
+ GSXMLNode *dChild;
+ if (![@"dictionaryItem" isEqualToString: [dItem name]])
+ {
+ continue;
+ }
+ [buf appendString: indent];
+ [buf appendString: @"
}\n"];
}
else
{
@@ -2183,6 +2329,8 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
[self outputIndex: @"method"
scope: @"global"
title: @"Method summary"
+ style: nil
+ target: nil
to: buf];
[buf appendString: indent];
[buf appendString: @"
\n"];
diff --git a/Tools/AGSIndex.m b/Tools/AGSIndex.m
index e7379818a..09c019579 100644
--- a/Tools/AGSIndex.m
+++ b/Tools/AGSIndex.m
@@ -156,27 +156,27 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
/**
* This class is used to build and manipulate a dictionary of
* cross-reference information.
- * The references are held in a tree consisting of dictionaries
- * with strings at the leaves -
- * 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
+ * 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
*/
@implementation AGSIndex
@@ -228,6 +228,14 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
NSString *name = [node name];
NSDictionary *prop = [node attributes];
+ // special case- if has an id of "_main" this gsdoc is from a tool
+ // file; add an entry to the index to indicate so
+ if (([name isEqual: @"chapter"] || [name isEqual: @"section"])
+ && [@"_main" isEqual: [prop objectForKey: @"id"]] == YES)
+ {
+ [self setGlobalRef: base type: @"tool"];
+ }
+
if ([name isEqual: @"category"] == YES)
{
newUnit = YES;
@@ -302,7 +310,6 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
else if ([name isEqual: @"entry"] || [name isEqual: @"label"])
{
NSMutableDictionary *all;
- NSMutableDictionary *byFile;
NSString *text;
NSString *val;
@@ -316,19 +323,12 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
[refs setObject: all forKey: name];
RELEASE(all);
}
- byFile = [all objectForKey: base];
- if (byFile == nil)
- {
- byFile = [[NSMutableDictionary alloc] initWithCapacity: 2];
- [all setObject: byFile forKey: base];
- RELEASE(byFile);
- }
val = [prop objectForKey: @"id"];
if (val == nil)
{
val = text;
}
- [byFile setObject: val forKey: @"text"];
+ [all setObject: base forKey: val];
}
else if ([name isEqual: @"method"] == YES)
{
@@ -408,6 +408,7 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
}
else if ([name isEqual: @"section"] == YES)
{
+ //FIXME- this info needs to be placed into the "label" refs somehow
sect++;
ssect = 0;
sssect = 0;
diff --git a/Tools/AGSOutput.m b/Tools/AGSOutput.m
index bea5abdf9..3e2e60d84 100644
--- a/Tools/AGSOutput.m
+++ b/Tools/AGSOutput.m
@@ -71,14 +71,14 @@ static BOOL snuggleStart(NSString *t)
* far too special purpose.
Here is the afterword for the class.
- *Ad here is some automated cross referencing ... + *
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)]. *
* * And finally, here is the actual class description ... outside the chapter. - * With a reference to foo() in it. + * With a reference to escapeType() in it. */ @implementation AGSOutput @@ -283,8 +283,8 @@ static BOOL snuggleStart(NSString *t) [str appendString: @"\n"]; [str appendString: @"\n"]; + [str appendString: @"\"-//GNUstep//DTD gsdoc 1.0.1//EN\" "]; + [str appendString: @"\"http://www.gnustep.org/gsdoc-1_0_1.xml\">\n"]; [str appendFormat: @"- The AGSParser class is designed to produce a property-list - which can be handled by AGSOutput ... one class is not much - use without the other. -
-- The autogsdoc tool is a command-line utility for parsing ObjectiveC - source code (header files and optionally source files) in order to - generate documentation covering the public interface of the various - classes, categories, and protocols in the source. + The autogsdoc tool is a command-line utility that helps developers + produce reference documentation for GNUstep APIs. It also enables + developers to write and maintain other documentation in XML and have it + converted to HTML. In detail, autogsdoc will:
+
- The simple way to use this is to run the command with one or more
+ synopsis: autogsdoc (options) (files)
+ (options) described below
+ (files) .h
, .m
, .gsdoc
, and/or .html
files, in any order.
+
+ The most common usage this is to run the command with one or more header file names as arguments ... the tool will automatically parse corresponding source files in the same directory as the headers (or the current directory, or the directory specified - using the DocumentationDirectory default), and produce gsdoc - and html files as output. + using the DocumentationDirectory default), and produce GSDoc + and HTML files as output. For best results this mode should be + run from the directory containing the source files.
- Even without any human assistance, this tool will produce skeleton
- documents listing the methods in the classes found in the source
- files, but more importantly it can take specially formatted comments
- from the source files and insert those comments into the gsdoc output.
+ GSDoc files may also be given directly in addition or by themselves, and
+ will be converted to HTML. See the
+
+ Finally, HTML files may be given on the command line. Cross-references + to other parts of code documentation found within them will be rewritten + based on what is found in the project currently. +
++ The source code parser will automatically produce GSDoc documents + listing the methods in the classes found in the source files, and it + will include text from specially formatted comments from the source + files.
Any comment beginning with slash and two asterisks rather than
- the common slash and single asterisk, is taken to be gsdoc markup, to
+ the common slash and single asterisk, is taken to be GSDoc markup, to
be use as the description of the class or method following it. This
comment text is reformatted and then inserted into the output.
- Where multiple comments are associatd with the same item, they are
+ Where multiple comments are associated with the same item, they are
joined together with a line break (<br />) between each if
necessary.
+ Options are described in the section + Arguments and Defaults below. +
There are some cases where special extra processing is performed, predominantly in the first comment found in the source file, - from which various chunks of gsdoc markup may be extracted and + from which various chunks of GSDoc markup may be extracted and placed into appropriate locations in the output document -
AutogsdocSource
: is found, the remainder
- of the line is taken as a source file name to be used instead of
- making the assumption that each .h file processed uses a .m file
- of the same name. You may supply multiple AutogsdocSource
:
- lines where a header file declares items which are defined in
- multiple source files.AutogsdocSource
: is found, the
+ remainder of the line is taken as a source file name to be used
+ instead of making the assumption that each .h file processed uses
+ a .m file of the same name. You may supply multiple
+ AutogsdocSource
: lines where a header file declares
+ items which are defined in multiple source files.DocumentationDirectory
default.
Author
: name <email-address>',
@@ -100,8 +139,8 @@
possibly containing an email element.
+ NBThe markup just described may be used within class, + category, or protocol documentation ... if so, it is extracted and + wrapped round the rest of the documentation for the class as the + class's chapter. The rest of the class documentation is normally + inserted at the end of the chapter, but may instead be substituted in + in place of the <unit /> pseudo-element within the + <chapter> element. +
[
NSObject-init]
,
+ [
NSObject-init]
,
will create a reference to the init method of NSObject (either the
class proper, or any of its categories), while
[
(NSCopying)-copyWithZone:]
, creates a
- reference to a method in the NSCopyIng protocol.
+ reference to a method in the NSCopying protocol.
- The tools accepts certain user defaults (which can of course be
- supplied as command-line arguments as usual) -
+ The tool accepts certain user defaults (which can of course be
+ supplied as command-line arguments by prepending '-' before the default
+ name and giving the value afterwards, as in -Clean YES
):
.gsdoc
files
+ that are passed in on the command line. Any path information given
+ for these files is removed and they are
+ searched for in DocumentationDirectory
(even though they
+ may not have been autogenerated).
Project
).
Foo
is found in the file Foo
, and the
path associated with that project index is /usr/doc/proj
,
Then generated html output may reference the class as being in
- /usr/doc/prj/Foo.html
+ /usr/doc/prj/Foo.html
. Note that a dictionary may be
+ given on the command line by using the standard PropertyList format
+ (not the XML format of OS X), using semicolons as line-separators, and
+ enclosing it in single quotes.
+ The autogsdoc tool internally makes use of the following four classes- +
+Converts a file encoded in a specified or default non-unicode encoding + * to unicode, or, if the file is already in unicode, converts it to a + * specified or default non-unicode encoding. The converted text is + * printed to standard out.
+ */ int main(int argc, char** argv, char **env) { diff --git a/Tools/defaults.m b/Tools/defaults.m index ba9f9e10f..e77606fe7 100644 --- a/Tools/defaults.m +++ b/Tools/defaults.m @@ -1,4 +1,4 @@ -/* This tool mimics the OPENSTEP command line tool for handling defaults. +/** This tool mimics the OPENSTEP command line tool for handling defaults. Copyright (C) 1997 Free Software Foundation, Inc. Written by: Richard Frith-MacdonaldThis tool mimics the OPENSTEP command line tool for handling defaults. + Please see the man page for more information. +
*/ int main(int argc, char** argv, char **env) { @@ -118,7 +121,7 @@ main(int argc, char** argv, char **env) " output some information about property lists\n\n"); printf( "defaults help\n" -" list options fo the defaults command.\n\n"); +" list options for the defaults command.\n\n"); [pool release]; exit(GSEXIT_SUCCESS); } @@ -673,7 +676,7 @@ main(int argc, char** argv, char **env) domain = [[defs persistentDomainForName: owner] mutableCopy]; if (domain == nil || [domain objectForKey: name] == nil) { - printf("dremove: couldn't remove %s owned by %s\n", + printf("defaults delete: couldn't remove %s owned by %s\n", [name cString], [owner cString]); } else diff --git a/Tools/gdnc.1 b/Tools/gdnc.1 index 2d5eec30a..35effbc58 100644 --- a/Tools/gdnc.1 +++ b/Tools/gdnc.1 @@ -19,7 +19,7 @@ Every user needs to have his own instance of running. While .B gdnc will be started automatically as soon as it is needed, -it is recommend to start +it is recommended to start .B gdnc in a personal login script like ~/.bashrc or ~/.cshrc. Alternatively you can launch gpbs when your windowing system or the diff --git a/Tools/gdnc.m b/Tools/gdnc.m index a546f111c..212a7473b 100644 --- a/Tools/gdnc.m +++ b/Tools/gdnc.m @@ -1,4 +1,4 @@ -/* Implementation of GNUstep Distributed Notification Center +/** Implementation of GNUstep Distributed Notification Center Copyright (C) 1998 Free Software Foundation, Inc. Written by: Richard Frith-MacdonaldThe gdnc daemon is used by GNUstep programs to send notifications and + messages to one another, in conjunction with the Base library + Notification-related classes.
+ +Every user needs to have his own instance of gdnc running. While gdnc + will be started automatically as soon as it is needed, it is recommended + to start gdnc in a personal login script like ~/.bashrc or ~/.cshrc. + Alternatively you can launch gpbs when your windowing system or the + window manager is started. For example, on systems with X11 you can + launch gdnc from your .xinitrc script or alternatively - if you are + running Window Maker - put it in Window Maker's autostart script. See + the GNUstep Build Guide for a sample startup script.
+ +Please see the man page for more information. +
*/ int main(int argc, char** argv, char** env) { diff --git a/Tools/gdomap.h b/Tools/gdomap.h index 89b82ba91..f25e2f2c4 100644 --- a/Tools/gdomap.h +++ b/Tools/gdomap.h @@ -1,4 +1,4 @@ -/* Include for communications with GNUstep Distributed Objects name server +/* Include for communications with GNUstep Distributed Objects name server. Copyright (C) 1996, 1997 Free Software Foundation, Inc. Written by: Richard Frith-Macdonald
- The GSDoc markup language is an XML language designed specifically
- for writing documentation for the
-
- This is also an example, as well as a test case, of the new - GNUstep documentation markup language (GSDoc). -
-- There are several reasons for producing the new markup - language - -
-- So, with only one markup language available that supported - Objective-C, and with XML software becoming available, the - decision was to take GDML and update it to be an XML - language, in the hope that this would - -
-
+ The GSDoc markup language is an XML language designed specifically
+ for writing documentation for the
+
+ This is also an example, as well as a test case, of the new + GNUstep documentation markup language (GSDoc). +
++ There are several reasons for producing the new markup + language - +
++ So, with only one markup language available that supported + Objective-C, and with XML software becoming available, the + decision was to take GDML and update it to be an XML + language, in the hope that this would - +
+
- The GSDoc markup language is defined by an SGML DTD, that specifies
- the tags that may be used in marking up a GSDoc document, and how
- and where those tags may be placed. Please see the DTD for a
- precise specification.
+ The GSDoc markup language is defined by an SGML DTD, that specifies
+ the tags that may be used in marking up a GSDoc document, and how
+ and where those tags may be placed. The reader is encouraged to
+ consult the DTD directly on any points that the present document leaves
+ unclear. The DTD is stored under
+ $GNUSTEP_ROOT/System/Library/DTDs
in a standard GNUstep
+ installation.
- The gsdoc DTD defines an XML language - that is, a markup language - that conforms to a specific subset of SGML features defined as XML. - The advantage of XML is that it provides most of the useful features - of SGML while being much more light-weight (easy to use) because - you can forget about the rest of SGML. - As XML looks set to become increasingly popular, we can hope that - documentation written with an XML language will be easily imported - into XML software tools as they become available, so we will not - (in the GNUstep project) need to devote a lot of time and effort - to maintaining documentation tools. + The gsdoc DTD defines an XML language - that is, a markup language + that conforms to a specific subset of SGML features defined as XML. + The advantage of XML is that it provides most of the useful features + of SGML while being much more light-weight (easy to use) because + you can forget about the rest of SGML. + As XML looks set to become increasingly popular, we can hope that + documentation written with an XML language will be easily imported + into XML software tools as they become available, so we will not + (in the GNUstep project) need to devote a lot of time and effort + to maintaining documentation tools.
-- A GSDoc document consists of a head and a - body wrapped inside the overall document - framework that looks like this - -
-+ A GSDoc document consists of a head and a + body wrapped inside the overall document + framework that looks like this - +
+- The above example shows a GSDoc document framework. - The first line specifies the XML version that the document - conforms to. - The second line specifies the version of GSDoc that the - document conforms to. - The third and final lines frame the main part of the document - and supply all the (optional) attributes of the gsdoc - element - -
-+ The above example shows a GSDoc document framework. + The first line specifies the XML version that the document + conforms to. + The second line specifies the version of GSDoc that the + document conforms to. + The third and final lines frame the main part of the document + and supply all the (optional) attributes of the gsdoc + element - +
+base
prev
next
up
- The document head contains information about the document as - a whole: its title, authors, version, modification date, - copyright, and perhaps an abstract of its contents. - The title and at least one author are the only parts of the - document head that must be present. -
-+ The document head contains information about the document as + a whole: its title, authors, version, modification date, + copyright, and perhaps an abstract of its contents. + The title is the only part of the document head that must be present, + although at least one author is strongly encouraged. +
+- The above example shows all the elements possible in a document head - -
-- The author of the document, also specifying an email address at - which the author may be reached, a URL for a web page giving - some information about the author, and an additional description - of the author. -
-- Of course, a document may have more than one author, in which - case you simply write multiple author elements. -
-+ The above example shows all the elements possible in a document head. Only title is required (author is strongly encouraged), but if present they must occur in the order shown - +
+
- The document body contains the main part of the document, it - consists of an optional front part (for contents pages, overview - etc), a sequence of any number of chapters, and an optional back - part (for indexes, appendices etc). Normally, each of these three - parts of the document would be expected to have their own separate - page numbering schemes. -
-+ The document body contains the main part of the document, it + consists of an optional front part (for contents pages, overview + etc), a sequence of any number of chapters, and an optional back + part (for indexes, appendices etc). Normally, each of these three + parts of the document would be expected to have their own separate + page numbering schemes. +
+- The above example shows all the elements possible in a document body - -
-- The contents element is used as a marker to specify - that an automatically generated contents page (listing the - chapters in the document) is to be inserted. -
-- After the front part of the document body comes a - mandatory sequence of one or more chapters. This is where - the main part of the document resides. - Each chapter consists of a - heading, any number - of blocks of information, and any number of sections. -
-- The index element is used as a marker to specify - that an automatically generated index is to be inserted. - The type attribute of the index specifies what sort - of item is to be in the index - the default type of label - causes an index of all label and entry - elements to be generated. -
-+ The above example shows all the elements possible at the top level in a document body - +
+<front>
+ The <contents>
subelement is used as a marker
+ to specify that an automatically generated contents page (listing
+ the chapters in the document) is to be inserted.
+
<chapter>
<back>
+ The <index>
element is used as a marker to
+ specify that an automatically generated index is to be inserted.
+ See below for details.
+
- Actually, there is no such thing as a block element, this - is just shorthand for refering to a group of elements that can be - used in similar ways. The block elements are - -
-+ The allowable elements in GSDoc documents are described below, broken + into sections by usage context. +
+ ++ Sectioning elements define hierarchical document structure. +
+
chapter
. It contains
+ sub-sections where a chapter would
+ contain sections.
+ section
.
subsection
.
- The br element is an empty element that always appears - as <br/> in the document. This element simply specifies - that a line-break should appear in the output text at this point. -
++ Block elements can occur at the top level of sections, + as well is in certain other contexts. The block elements are - +
+
<index>
tag is special in that it is
+ dynamically expanded during output based on information that has
+ been collated from reading in various documentation and source
+ files. The type
attribute of the index specifies
+ what sort of item is to be in the index - the default type of
+ label
causes an index of all label and
+ entry elements to be generated. Currently the allowable
+ types are: class
, category
,
+ protocol
, method
,
+ ivariable
, function
, type
,
+ macro
, variable
, constant
,
+ label
, title
, EOModel
+ (associated with the Enterprise Objects Framework, for interacting
+ with databases), EOEntity
. The default is
+ "label
".
+
+ The <index>
element also takes three optional
+ attributes -
+
scope
file
" scope), or for the whole of the current
+ project ("project
" scope), or for everything the
+ software can find ("global
" scope). In certain
+ contexts the specified scope is automatically overridden ... if
+ the document is processed in a standalone manner, the scope is
+ always "file
". For method or ivariable indexing,
+ if the index is inside a class, protocol, or category, only
+ indexes for that unit are generated.
+ style
normal
" style) or in a minimalist style suitable
+ for, e.g., a navigation bar ("bare
" style).
+ target
target
" attribute to the <a>
+ href="..."
element generated for a link. In most cases
+ this can safely be left out.
+ - This is the basic unit of the document - the main part of - a document body will contain at least - one chapter. - Each chapter consists of a heading, - zero or more blocks, - and zero or more sections. -
-- Each chapter in the document is automatically listed in the - documents contents page (if it has one). -
+
+ Text elements can occur within blocks and typically within
+ other block elements such as
+ example
as well. They carry
+ out various presentation-related purposed.
+ The text elements are -
+
+
+
- This is the main element for Objective-C code documentation. - The name attribute is required for this element - it is - the name of the class. The super attribute is normally - necessary to provide the name of the superclass. -
-- The elements in a class are - an optional - declared element, - zero or more conform element, - an optional description, - zero or more method elements, - and an optional standards element. -
+
+ List elements can occur within blocks and typically within
+ other block elements such as
+ example
as well. They support
+ presentation of various types of lists.
+ The list elements are -
+
<item>
tag.
<item>
tags).
<term>
and <desc>
tags.
+ <dictionaryItem>
tags each with
+ a required key
attribute and an optional
+ value
attribute. If this is excluded, the element
+ content, which may be any
+ block element (including
+ another <dictionary>
tag) is the value.
<question>
s and
+ <answer>
s.- This element contains simple text giving the name of a protocol - or interface to which a class conforms. -
++ Cross-reference elements can occur within blocks and + typically anywhere text elements can occur. They represent + references to other entities inside or outside the project being + documented. In output formats that support it, they are generally + transformed into hyperlinks. The cross-reference elements are - +
+
type
class
,
+ category
, protocol
, method
,
+ ivariable
, function
, type
,
+ macro
, variable
, constant
,
+ label
, EOModel
, EOEntity
.
+ If type
is not specified, "label
" is
+ assumed.id
label
+ references, this is the id
attribute of the label
+ being referenced.class
method
is being referenced,
+ the class
attribute should be specified as well, and
+ should contain the name of the class the method occurs in, in one
+ of the following formats: "classname", "classname(categoryname)",
+ or "(protocolname)".
<prjref>
tag may contain text content,
+ which appears in the output.
<A>
tag in HTML, except that the attribute
+ 'url
' is used for the URL rather than
+ 'href
'. Text contents are shown in the output to label
+ the hyperlink.
<uref>
except the URL itself is
+ automatically used as the hyperlink label (and so the tag itself does
+ not have text content).
mailto:
link.
id
, which may be used to
+ refer to the entry. (If it is absent any text content is taken to
+ be the id.)
id
, which may be used to
+ refer to the label. (If it is absent any text content is taken to
+ be the id.)- This element contains simple text giving the name of the header - file in which something is declared. -
++ Definition elements are specialized elements for software + documentation. They can occur in most places that block elements + can occur. They represent specific Objective-C elements, and are + formatted specially in output. In the majority of cases, you will + not need to write GSDoc using these elements, since they can be + autogenerated from Objective-C source files and special comments + within them. The definition elements are - +
+
name
attribute
+ is required for this element - it is the name of the class. The
+ super
attribute is normally necessary to provide the
+ name of the superclass.
+
+ The elements in a <class>
are - an optional
+ declared element,
+ zero or more conform elements,
+ an optional desc,
+ zero or more ivariable elements,
+ zero or more method elements,
+ and an optional standards element.
+
+ name
attribute providing the name of the category,
+ and a class
attribute naming the class the category
+ is associated with.
+
+ The elements in a <category>
are - an optional
+ declared element,
+ zero or more conform elements,
+ an optional desc,
+ zero or more method elements,
+ and an optional standards element.
+
+ name
attribute providing the name of the protocol.
+
+ The elements in a <protocol>
are - an optional
+ declared element,
+ zero or more conform elements,
+ an optional desc,
+ zero or more method elements,
+ and an optional standards element.
+
+ name
attribute providing the function's name and a
+ type
attribute providing the return type.
+
+ The elements in a <function>
are -
+ a series of zero or more arg elements,
+ followed by an optional arg element,
+ then an optional declared element,
+ an optional desc,
+ and an optional standards element.
+
name
attribute providing the macro's name.
+
+ The elements in a <macro>
are -
+ a series of zero or more arg elements,
+ followed by an optional arg element,
+ then an optional declared element,
+ an optional desc,
+ and an optional standards element.
+
name
attribute providing the macro's name.
+
+ The elements in a <macro>
are -
+ an optional declared element,
+ an optional desc,
+ and an optional standards element.
+
+ name
and type
attributes and a
+ value
attribute is optional. In addition, an
+ Objective-C role for the constant may be specified using the
+ role
attribute. Acceptable values for this attribute
+ are: "except
", "defaults
",
+ "notify
", or "key
".
+
+ The elements in a <constant>
are -
+ an optional declared element,
+ an optional desc,
+ and an optional standards element.
+
+ name
and type
attributes and a
+ value
attribute is optional.
+
+ The elements in a <variable>
are -
+ an optional declared element,
+ an optional desc,
+ and an optional standards element.
+
+ name
and type
attributes and a
+ validity
attribute optionally specifies the access
+ level for the variable (may be "public
",
+ "protected
", or "private
", the default
+ is "public
").
+
+ The elements in a <variable>
are -
+ an optional desc,
+ and an optional standards element.
+
+ <GNUstep/>
<OpenStep/>
<NotOpenStep/>
<MacOS-X/>
<NotMacOS-X/>
+
+ type
attribute describes the return type; an optional
+ factory
attribute ("yes
" or
+ "no
", defaults to "no
") specifies whether
+ this is a class or instance method. (Class methods are typically
+ only used for construction purposes in Objective-C.) An optional
+ init
attribute (also taking
+ "yes
" / "no
") specifies whether this is
+ the designated constructor. An optional override
+ attribute specifies whether this method should be overridden
+ (if "yes" enter "subclass
", if "no" enter
+ "never
").
+
+ The elements in a <method>
are -
+ the method's name (in a sel element), the
+ method's arguments (a sequence of arg then
+ sel,arg pairs, then an
+ optional vararg element),
+ followed by an optional desc,
+ zero or more ivariable elements,
+ zero or more method elements,
+ and an optional standards element.
+
type
+ attribute giving the argument's type.
+
- This element is used to contain descriptions of how software - functions. It may contain text, but may - also contain lists, - paragraphs, - examples and - embedded data. -
-- Each chapter, - section - sub-section, - or sub-sub-section - has a heading as the first thing in it. - These headings introduce the sections and are listed in the - contents page. -
-- The paragraph element simply contains text. - Most descriptive writing is inside paragraphs. -
-- The section element is just like a - chapter, except that it contains - sub-sections where a chapter would - contain sections. -
-
- The standards element contains any number of
- standard elements whioch specify what standards a particular
- piece of code does or does not conform to.
-
- The defined values are -
-
- The subsect element is just like a - section, except that it contains - sub-sub-sections where a section would - contain sub-sections. -
-- The subsubsect element is just like a - sub-section, except that it contains - only a heading and zero or more - blocks. -
-- This is not really an element, we simply talk about text where - we mean raw text and very simple markup such as - -
-This tool converts a binary serialised property list to a text + representation. +
*/ int main(int argc, char** argv, char **env) { diff --git a/Tools/plmerge.m b/Tools/plmerge.m index 882ac7450..953181039 100644 --- a/Tools/plmerge.m +++ b/Tools/plmerge.m @@ -1,4 +1,4 @@ -/* This tool merges text property lists into a single property list. +/** This tool merges text property lists into a single property list. Copyright (C) 2000 Free Software Foundation, Inc. Written by: Jonathan GapenThis tool merges text property lists into a single property list. +
*/ int main(int argc, char** argv, char **env) { diff --git a/Tools/plparse.m b/Tools/plparse.m index eb43874e9..b091060ec 100644 --- a/Tools/plparse.m +++ b/Tools/plparse.m @@ -1,4 +1,4 @@ -/* This tool checks that a file contains a valid text property-list +/** This tool checks that a file contains a valid text property-list. Copyright (C) 1999 Free Software Foundation, Inc. Written by: Richard Frith-Macdonald+ This tool checks that a file contains a valid text property-list. +
*/ int main(int argc, char** argv, char **env) { diff --git a/Tools/plser.m b/Tools/plser.m index 5a386b951..900185887 100644 --- a/Tools/plser.m +++ b/Tools/plser.m @@ -1,4 +1,4 @@ -/* This tool converts a text property list to a serialised representation. +/** This tool converts a text property list to a serialised representation. Copyright (C) 1999 Free Software Foundation, Inc. Written by: Richard Frith-MacdonaldThis tool converts a text property list to a binary serialised + representation. +
*/ int main(int argc, char** argv, char **env) { diff --git a/Tools/sfparse.m b/Tools/sfparse.m index 23daf38bd..62c76fd1d 100644 --- a/Tools/sfparse.m +++ b/Tools/sfparse.m @@ -1,4 +1,4 @@ -/* This tool checks that a file is a valid strings-file +/** This tool checks that a file is a valid strings-file Copyright (C) 1999 Free Software Foundation, Inc. Written by: Richard Frith-Macdonald
+ This tool checks that a file is a valid strings-file, and can also convert
+ files to Unicode or UTF-8. If given the '--unicode
' option
+ it converts an ASCII or UTF-8 file to unicode. If given the
+ '--utf8
' option is converts an ASCII or unicode file to UTF-8.
+
This tool error-checks and validates xml documents. The parse + is simply discarded after checking. +
*/ int main(int argc, char **argv, char **env) {