Some documentation improvements

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6748 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-06-21 11:04:41 +00:00
parent e0fe6dddf7
commit 7fb5abafdb
8 changed files with 1045 additions and 120 deletions

View file

@ -1,6 +1,12 @@
2000-06-21 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSScanner.m: ([-scanHexInt:]) fixed to permit leading 0x or 0X
* Documentation/gsdoc/NSScanner.gsdoc: fleshed out
* Tools/Makefile.postamble: Added documentation target - build before
install
* Tools/gsdoc-0_6_6.dtd: New dtd under development - add java support
* Tools/gsdoc.m: Update to work with current dtd
* Tools/gsdoc.gsdoc: Add a little more text on document body structure.
2000-06-20 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.5//EN" "http://www.gnustep.org/gsdoc-0_6_5.xml">
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
<gsdoc base="NSScanner" prev="NSRunLoop.html" next="NSSerializer.html" up="Base.html">
<head>
<title>NSScanner</title>
@ -7,153 +7,309 @@
<email address="rfm@gnu.org"/>
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
</author>
<version>0.1</version>
<date>28 February, 2000</date>
<version>1.0</version>
<date>21 June, 2000</date>
</head>
<body>
<chapter>
<heading>NSScanner</heading>
<heading>The NSScanner class documentation</heading>
<class name="NSScanner" super="NSObject">
<declared>Foundation/NSScanner.h</declared>
<conform>NSCopying</conform>
<desc>
</desc>
<desc>
<p>
The NSScanner class cluster (currently a single class in GNUstep)
provides a mechanism to parse the contents of a string into number
and string values by making a sequence of scan operations to
step through the string retrieving successive items.
</p>
<p>
You can tell the scanner whether its scanning is supposed to be
case sensitive or not, and you can specify a set of characters
to be skipped before each scanning operation (by default,
whitespace and newlines).
</p>
</desc>
<method type="id" factory="yes">
<sel>localizedScannerWithString:</sel>
<arg type="NSString*">aString</arg>
<desc>
Returns an NSScanner instance set up to scan aString
(using initWithString:) and with a locale set the default locale
(using setLocale:).
</desc>
</method>
<method type="id" factory="yes">
<sel>scannerWithString:</sel>
<arg type="NSString*">aString</arg>
<desc>
Returns an NSScanner instance set up to scan aString
(using initWithString:) and with no locale set.
</desc>
</method>
<method type="BOOL">
<sel>caseSensitive</sel>
<desc>
If the scanner is set to be case-sensitive in its scanning of
the string (other than characters to be skipped), this method
returns YES, otherwise it returns NO.
<br/>
The default is for a scanner to <em>not</em> be case sensitive.
</desc>
</method>
<method type="NSCharacterSet*">
<sel>charactersToBeSkipped</sel>
<desc>
Returns a set of characters containing those characters that the
scanner ignores when starting any scan operation. Once a character
not in this set has been encountered during an operation, skipping
is finished, and any further characters from this set that are
found are scanned normally.
<br/>
The default for this is the whitespaceAndNewlineCharacterSet.
</desc>
</method>
<method type="id">
<sel>initWithString:</sel>
<arg type="NSString*">aString</arg>
<desc>
Initialises the scanner to scan aString. The GNUstep
implementation may make an internal copy of the original
string - so it is not safe to assume that if you modify a
mutable string that you initialised a scanner with, the changes
will be visible to the scanner.
<br/>
Returns the scanner object.
</desc>
</method>
<method type="BOOL">
<sel>isAtEnd</sel>
<desc>
Returns YES if there are no characters left to be scanned in the
string (or if all the characters that are left are in the set of
characters to be skipped). Returns NO otherwise.
</desc>
</method>
<method type="NSDictionary*">
<sel>locale</sel>
<desc>
Returns the locale set for the scanner, or nil if no locale has
been set. A scanner uses it's locale to alter the way it handles
scanning - it uses the NSDecimalSeparator value for scanning
numbers.
</desc>
</method>
<method type="BOOL">
<sel>scanCharactersFromSet:</sel>
<arg type="NSCharacterSet*">scanSet</arg>
<arg type="NSCharacterSet*">set</arg>
<sel>intoString:</sel>
<arg type="NSString**">stringValue</arg>
<desc>
After initial skipping (if any), this method scans any characters
from <em>set</em>, terminating when a character not in the set
is found.
Returns YES if any character is scanned, NO otherwise.
If <em>stringValue</em> is not null, any character scanned are
stored in a string returned in this value.
</desc>
</method>
<method type="BOOL">
<sel>scanDecimal:</sel>
<arg type="NSDecimal*">decimalValue</arg>
<desc>
Not implemented.
</desc>
<standards><MacOS-X/><NotOpenStep/></standards>
</method>
<method type="BOOL">
<sel>scanDouble:</sel>
<arg type="double*">doubleValue</arg>
<desc>
After initial skipping (if any), this method scans a double value,
placing it in <em>doubleValue</em> if that is not null.
Returns YES if anything is scanned, NO otherwise.
<br/>
On overflow, HUGE_VAL or -HUGE_VAL is put into <em>doubleValue</em>
<br/>
On underflow, 0.0 is put into <em>doubleValue</em>
<br/>
Scans past any excess digits
</desc>
</method>
<method type="BOOL">
<sel>scanFloat:</sel>
<arg type="float*">floatValue</arg>
<desc>
After initial skipping (if any), this method scans a float value,
placing it in <em>floatValue</em> if that is not null.
Returns YES if anything is scanned, NO otherwise.
<br/>
On overflow, HUGE_VAL or -HUGE_VAL is put into <em>floatValue</em>
<br/>
On underflow, 0.0 is put into <em>floatValue</em>
<br/>
Scans past any excess digits
</desc>
</method>
<method type="BOOL">
<sel>scanHexInt:</sel>
<arg type="unsigned int*">intValue</arg>
<desc>
After initial skipping (if any), this method scans a hexadecimal
integer value (optionally prefixed by "0x" or "0X"),
placing it in <em>intValue</em> if that is not null.
<br/>
Returns YES if anything is scanned, NO otherwise.
<br/>
On overflow, INT_MAX or INT_MIN is put into <em>intValue</em>
<br/>
Scans past any excess digits
</desc>
</method>
<method type="BOOL">
<sel>scanInt:</sel>
<arg type="int*">intValue</arg>
<desc>
After initial skipping (if any), this method scans a integer value,
placing it in <em>intValue</em> if that is not null.
<br/>
Returns YES if anything is scanned, NO otherwise.
<br/>
On overflow, INT_MAX or INT_MIN is put into <em>intValue</em>
<br/>
Scans past any excess digits
</desc>
</method>
<method type="unsigned int">
<sel>scanLocation</sel>
<desc>
Returns the current position that the scanner has reached in
scanning the string. This is the position at which the next scan
operation will begin.
</desc>
</method>
<method type="BOOL">
<sel>scanLongLong:</sel>
<arg type="longlong*">longLongValue</arg>
<desc>
After initial skipping (if any), this method scans a long
decimal integer value placing it in <em>longLongValue</em> if that
is not null.
<br/>
Returns YES if anything is scanned, NO otherwise.
<br/>
On overflow, LONG_LONG_MAX or LONG_LONG_MIN is put into
<em>longLongValue</em>
<br/>
Scans past any excess digits
</desc>
</method>
<method type="BOOL">
<sel>scanRadixUnsignedInt:</sel>
<arg type="unsigned int*">intValue</arg>
<desc>
After initial skipping (if any), this method scans an unsigned
integer value placing it in <em>intValue</em> if that is not null.
If the number begins with "0x" or "0X" it is treated as hexadecimal,
otherwise if the number begins with "0" it is treated as octal,
otherwise the number is treated as decimal.
<br/>
Returns YES if anything is scanned, NO otherwise.
<br/>
On overflow, INT_MAX or INT_MIN is put into <em>intValue</em>
<br/>
Scans past any excess digits
</desc>
<standards><GNUstep/><NotOpenStep/><NotMacOS-X/></standards>
</method>
<method type="BOOL">
<sel>scanString:</sel>
<arg type="NSString*">string</arg>
<arg type="NSString*">aString</arg>
<sel>intoString:</sel>
<arg type="NSString**">stringValue</arg>
<desc>
After initial skipping (if any), this method scans for
<em>aString</em> and places the string ound in <em>stringValue</em>
if that is not null.
<br/>
Returns YES if anything is scanned, NO otherwise.
</desc>
</method>
<method type="BOOL">
<sel>scanUpToCharactersFromSet:</sel>
<arg type="NSCharacterSet*">stopSet</arg>
<arg type="NSCharacterSet*">set</arg>
<sel>intoString:</sel>
<arg type="NSString**">stringValue</arg>
<desc>
After initial skipping (if any), this method scans characters until
it finds one in <em>set</em>. The scanned characters are placed in
<em>stringValue</em> if that is not null.
<br/>
Returns YES if anything is scanned, NO otherwise.
</desc>
</method>
<method type="BOOL">
<sel>scanUpToString:</sel>
<arg type="NSString*">stopString</arg>
<arg type="NSString*">aString</arg>
<sel>intoString:</sel>
<arg type="NSString**">stringValue</arg>
<desc>
After initial skipping (if any), this method scans characters until
it finds <em>aString</em>. The scanned characters are placed in
<em>stringValue</em> if that is not null. If <em>aString</em> is
not found, all the characters up to the end of the scanned string
will be returned.
<br/>
Returns YES if anything is scanned, NO otherwise.
</desc>
</method>
<method type="void">
<sel>setCaseSensitive:</sel>
<arg type="BOOL">flag</arg>
<desc>
Sets the case sensitivity of the scanner.
<br/>
Case sensitivity governs matrching of characters being scanned,
but does not effect the characters in the set to be skipped.
<br/>
The default is for a scanner to <em>not</em> be case sensitive.
</desc>
</method>
<method type="void">
<sel>setCharactersToBeSkipped:</sel>
<arg type="NSCharacterSet*">skipSet</arg>
<desc>
Sets the set of characters that the scanner will skip over at the
start of each scanning operation to be <em>skipSet</em>.
Skipping is performed by literal character matchins - the case
sensitivity of the scanner does not effect it.
If this is set to nil, no skipping is done.
<br/>
The default for this is the whitespaceAndNewlineCharacterSet.
</desc>
</method>
<method type="void">
<sel>setLocale:</sel>
<arg type="NSDictionary*">aLocale</arg>
<desc>
This method sets the locale used by the scanner to <em>aLocale</em>.
The locale may be set to nil.
</desc>
</method>
<method type="void">
<sel>setScanLocation:</sel>
<arg type="unsigned int">index</arg>
<desc>
This method sets the location in the scanned string at which the
next scan operation begins.
Raises an NSRangeException if index is beyond the end of the
scanned string.
</desc>
</method>
<method type="NSString*">
<sel>string</sel>
<desc>
Returns the string used by the scanner.
</desc>
</method>
</class>

View file

@ -11,9 +11,9 @@
<dt><a href="http://www.gnustep.org/developers/whoiswho.html">Richard Frith-Macdonald</a>
<dd>
</dl>
<p>Version: 0.1</p>
<p>Date: 28 February, 2000</p>
<h2><a name="cont-0">NSScanner</a></h2>
<p>Version: 1.0</p>
<p>Date: 21 June, 2000</p>
<h2><a name="cont-0">The NSScanner class documentation</a></h2>
<h2><a name="NSScanner">NSScanner</a></h2>
<p><b>Declared in:</b> Foundation/NSScanner.h</p>
<p><b>Inherits from:</b> NSObject</p>
@ -21,7 +21,23 @@
</p>
<hr>
<p>
The NSScanner class cluster (currently a single class in GNUstep)
provides a mechanism to parse the contents of a string into number
and string values by making a sequence of scan operations to
step through the string retrieving successive items.
</p>
<p>
You can tell the scanner whether its scanning is supposed to be
case sensitive or not, and you can specify a set of characters
to be skipped before each scanning operation (by default,
whitespace and newlines).
</p>
<ul>
<li><a href="NSScanner.html#method-0">+localizedScannerWithString:</a>
<li><a href="NSScanner.html#method-1">+scannerWithString:</a>
@ -38,129 +54,271 @@
<li><a href="NSScanner.html#method-12">-scanInt:</a>
<li><a href="NSScanner.html#method-13">-scanLocation</a>
<li><a href="NSScanner.html#method-14">-scanLongLong:</a>
<li><a href="NSScanner.html#method-15">-scanString:intoString:</a>
<li><a href="NSScanner.html#method-16">-scanUpToCharactersFromSet:intoString:</a>
<li><a href="NSScanner.html#method-17">-scanUpToString:</a>
<li><a href="NSScanner.html#method-18">-setCaseSensitive:</a>
<li><a href="NSScanner.html#method-19">-setCharactersToBeSkipped:</a>
<li><a href="NSScanner.html#method-20">-setLocale:</a>
<li><a href="NSScanner.html#method-21">-setScanLocation:</a>
<li><a href="NSScanner.html#method-22">-string</a>
<li><a href="NSScanner.html#method-15">-scanRadixUnsignedInt:</a>
<li><a href="NSScanner.html#method-16">-scanString:intoString:</a>
<li><a href="NSScanner.html#method-17">-scanUpToCharactersFromSet:intoString:</a>
<li><a href="NSScanner.html#method-18">-scanUpToString:intoString:</a>
<li><a href="NSScanner.html#method-19">-setCaseSensitive:</a>
<li><a href="NSScanner.html#method-20">-setCharactersToBeSkipped:</a>
<li><a href="NSScanner.html#method-21">-setLocale:</a>
<li><a href="NSScanner.html#method-22">-setScanLocation:</a>
<li><a href="NSScanner.html#method-23">-string</a>
</ul>
<hr>
<h2><a name="method-0">localizedScannerWithString:</a></h2>
+ (id) <b>localizedScannerWithString:</b> (NSString*)aString<br>
+ (id) <b>localizedScannerWithString:</b> (NSString*)aString;<br>
Returns an NSScanner instance set up to scan aString
(using initWithString:) and with a locale set the default locale
(using setLocale:).
<hr>
<h2><a name="method-1">scannerWithString:</a></h2>
+ (id) <b>scannerWithString:</b> (NSString*)aString<br>
+ (id) <b>scannerWithString:</b> (NSString*)aString;<br>
Returns an NSScanner instance set up to scan aString
(using initWithString:) and with no locale set.
<hr>
<h2><a name="method-2">caseSensitive</a></h2>
- (BOOL) <b>caseSensitive</b><br>
- (BOOL) <b>caseSensitive</b>;<br>
If the scanner is set to be case-sensitive in its scanning of
the string (other than characters to be skipped), this method
returns YES, otherwise it returns NO.
<br>
The default is for a scanner to <em>not</em> be case sensitive.
<hr>
<h2><a name="method-3">charactersToBeSkipped</a></h2>
- (NSCharacterSet*) <b>charactersToBeSkipped</b><br>
- (NSCharacterSet*) <b>charactersToBeSkipped</b>;<br>
Returns a set of characters containing those characters that the
scanner ignores when starting any scan operation. Once a character
not in this set has been encountered during an operation, skipping
is finished, and any further characters from this set that are
found are scanned normally.
<br>
The default for this is the whitespaceAndNewlineCharacterSet.
<hr>
<h2><a name="method-4">initWithString:</a></h2>
- (id) <b>initWithString:</b> (NSString*)aString<br>
- (id) <b>initWithString:</b> (NSString*)aString;<br>
Initialises the scanner to scan aString. The GNUstep
implementation may make an internal copy of the original
string - so it is not safe to assume that if you modify a
mutable string that you initialised a scanner with, the changes
will be visible to the scanner.
<br>
Returns the scanner object.
<hr>
<h2><a name="method-5">isAtEnd</a></h2>
- (BOOL) <b>isAtEnd</b><br>
- (BOOL) <b>isAtEnd</b>;<br>
Returns YES if there are no characters left to be scanned in the
string (or if all the characters that are left are in the set of
characters to be skipped). Returns NO otherwise.
<hr>
<h2><a name="method-6">locale</a></h2>
- (NSDictionary*) <b>locale</b><br>
- (NSDictionary*) <b>locale</b>;<br>
Returns the locale set for the scanner, or nil if no locale has
been set. A scanner uses it's locale to alter the way it handles
scanning - it uses the NSDecimalSeparator value for scanning
numbers.
<hr>
<h2><a name="method-7">scanCharactersFromSet:intoString:</a></h2>
- (BOOL) <b>scanCharactersFromSet:</b> (NSCharacterSet*)scanSet <b>intoString:</b> (NSString**)stringValue<br>
- (BOOL) <b>scanCharactersFromSet:</b> (NSCharacterSet*)set <b>intoString:</b> (NSString**)stringValue;<br>
After initial skipping (if any), this method scans any characters
from <em>set</em>, terminating when a character not in the set
is found.
Returns YES if any character is scanned, NO otherwise.
If <em>stringValue</em> is not null, any character scanned are
stored in a string returned in this value.
<hr>
<h2><a name="method-8">scanDecimal:</a></h2>
- (BOOL) <b>scanDecimal:</b> (NSDecimal*)decimalValue<br>
- (BOOL) <b>scanDecimal:</b> (NSDecimal*)decimalValue;<br>
Standards: MacOS-X NotOpenStep<br>
Not implemented.
<hr>
<h2><a name="method-9">scanDouble:</a></h2>
- (BOOL) <b>scanDouble:</b> (double*)doubleValue<br>
- (BOOL) <b>scanDouble:</b> (double*)doubleValue;<br>
After initial skipping (if any), this method scans a double value,
placing it in <em>doubleValue</em> if that is not null.
Returns YES if anything is scanned, NO otherwise.
<br>
On overflow, HUGE_VAL or -HUGE_VAL is put into <em>doubleValue</em>
<br>
On underflow, 0.0 is put into <em>doubleValue</em>
<br>
Scans past any excess digits
<hr>
<h2><a name="method-10">scanFloat:</a></h2>
- (BOOL) <b>scanFloat:</b> (float*)floatValue<br>
- (BOOL) <b>scanFloat:</b> (float*)floatValue;<br>
After initial skipping (if any), this method scans a float value,
placing it in <em>floatValue</em> if that is not null.
Returns YES if anything is scanned, NO otherwise.
<br>
On overflow, HUGE_VAL or -HUGE_VAL is put into <em>floatValue</em>
<br>
On underflow, 0.0 is put into <em>floatValue</em>
<br>
Scans past any excess digits
<hr>
<h2><a name="method-11">scanHexInt:</a></h2>
- (BOOL) <b>scanHexInt:</b> (unsigned int*)intValue<br>
- (BOOL) <b>scanHexInt:</b> (unsigned int*)intValue;<br>
After initial skipping (if any), this method scans a hexadecimal
integer value (optionally prefixed by "0x" or "0X"),
placing it in <em>intValue</em> if that is not null.
<br>
Returns YES if anything is scanned, NO otherwise.
<br>
On overflow, INT_MAX or INT_MIN is put into <em>intValue</em>
<br>
Scans past any excess digits
<hr>
<h2><a name="method-12">scanInt:</a></h2>
- (BOOL) <b>scanInt:</b> (int*)intValue<br>
- (BOOL) <b>scanInt:</b> (int*)intValue;<br>
After initial skipping (if any), this method scans a integer value,
placing it in <em>intValue</em> if that is not null.
<br>
Returns YES if anything is scanned, NO otherwise.
<br>
On overflow, INT_MAX or INT_MIN is put into <em>intValue</em>
<br>
Scans past any excess digits
<hr>
<h2><a name="method-13">scanLocation</a></h2>
- (unsigned int) <b>scanLocation</b><br>
- (unsigned int) <b>scanLocation</b>;<br>
Returns the current position that the scanner has reached in
scanning the string. This is the position at which the next scan
operation will begin.
<hr>
<h2><a name="method-14">scanLongLong:</a></h2>
- (BOOL) <b>scanLongLong:</b> (longlong*)longLongValue<br>
- (BOOL) <b>scanLongLong:</b> (longlong*)longLongValue;<br>
After initial skipping (if any), this method scans a long
decimal integer value placing it in <em>longLongValue</em> if that
is not null.
<br>
Returns YES if anything is scanned, NO otherwise.
<br>
On overflow, LONG_LONG_MAX or LONG_LONG_MIN is put into
<em>longLongValue</em>
<br>
Scans past any excess digits
<hr>
<h2><a name="method-15">scanString:intoString:</a></h2>
- (BOOL) <b>scanString:</b> (NSString*)string <b>intoString:</b> (NSString**)stringValue<br>
<h2><a name="method-15">scanRadixUnsignedInt:</a></h2>
- (BOOL) <b>scanRadixUnsignedInt:</b> (unsigned int*)intValue;<br>
Standards: GNUstep NotOpenStep NotMacOS-X<br>
After initial skipping (if any), this method scans an unsigned
integer value placing it in <em>intValue</em> if that is not null.
If the number begins with "0x" or "0X" it is treated as hexadecimal,
otherwise if the number begins with "0" it is treated as octal,
otherwise the number is treated as decimal.
<br>
Returns YES if anything is scanned, NO otherwise.
<br>
On overflow, INT_MAX or INT_MIN is put into <em>intValue</em>
<br>
Scans past any excess digits
<hr>
<h2><a name="method-16">scanUpToCharactersFromSet:intoString:</a></h2>
- (BOOL) <b>scanUpToCharactersFromSet:</b> (NSCharacterSet*)stopSet <b>intoString:</b> (NSString**)stringValue<br>
<h2><a name="method-16">scanString:intoString:</a></h2>
- (BOOL) <b>scanString:</b> (NSString*)aString <b>intoString:</b> (NSString**)stringValue;<br>
After initial skipping (if any), this method scans for
<em>aString</em> and places the string ound in <em>stringValue</em>
if that is not null.
<br>
Returns YES if anything is scanned, NO otherwise.
<hr>
<h2><a name="method-17">scanUpToString:</a></h2>
- (BOOL) <b>scanUpToString:</b> (NSString*)stopString<br>
<h2><a name="method-17">scanUpToCharactersFromSet:intoString:</a></h2>
- (BOOL) <b>scanUpToCharactersFromSet:</b> (NSCharacterSet*)set <b>intoString:</b> (NSString**)stringValue;<br>
After initial skipping (if any), this method scans characters until
it finds one in <em>set</em>. The scanned characters are placed in
<em>stringValue</em> if that is not null.
<br>
Returns YES if anything is scanned, NO otherwise.
<hr>
<h2><a name="method-18">setCaseSensitive:</a></h2>
- (void) <b>setCaseSensitive:</b> (BOOL)flag<br>
<h2><a name="method-18">scanUpToString:intoString:</a></h2>
- (BOOL) <b>scanUpToString:</b> (NSString*)aString <b>intoString:</b> (NSString**)stringValue;<br>
After initial skipping (if any), this method scans characters until
it finds <em>aString</em>. The scanned characters are placed in
<em>stringValue</em> if that is not null. If <em>aString</em> is
not found, all the characters up to the end of the scanned string
will be returned.
<br>
Returns YES if anything is scanned, NO otherwise.
<hr>
<h2><a name="method-19">setCharactersToBeSkipped:</a></h2>
- (void) <b>setCharactersToBeSkipped:</b> (NSCharacterSet*)skipSet<br>
<h2><a name="method-19">setCaseSensitive:</a></h2>
- (void) <b>setCaseSensitive:</b> (BOOL)flag;<br>
Sets the case sensitivity of the scanner.
<br>
Case sensitivity governs matrching of characters being scanned,
but does not effect the characters in the set to be skipped.
<br>
The default is for a scanner to <em>not</em> be case sensitive.
<hr>
<h2><a name="method-20">setLocale:</a></h2>
- (void) <b>setLocale:</b> (NSDictionary*)aLocale<br>
<h2><a name="method-20">setCharactersToBeSkipped:</a></h2>
- (void) <b>setCharactersToBeSkipped:</b> (NSCharacterSet*)skipSet;<br>
Sets the set of characters that the scanner will skip over at the
start of each scanning operation to be <em>skipSet</em>.
Skipping is performed by literal character matchins - the case
sensitivity of the scanner does not effect it.
If this is set to nil, no skipping is done.
<br>
The default for this is the whitespaceAndNewlineCharacterSet.
<hr>
<h2><a name="method-21">setScanLocation:</a></h2>
- (void) <b>setScanLocation:</b> (unsigned int)index<br>
<h2><a name="method-21">setLocale:</a></h2>
- (void) <b>setLocale:</b> (NSDictionary*)aLocale;<br>
This method sets the locale used by the scanner to <em>aLocale</em>.
The locale may be set to nil.
<hr>
<h2><a name="method-22">string</a></h2>
- (NSString*) <b>string</b><br>
<h2><a name="method-22">setScanLocation:</a></h2>
- (void) <b>setScanLocation:</b> (unsigned int)index;<br>
This method sets the location in the scanned string at which the
next scan operation begins.
Raises an NSRangeException if index is beyond the end of the
scanned string.
<hr>
<h2><a name="method-23">string</a></h2>
- (NSString*) <b>string</b>;<br>
Returns the string used by the scanner.
<hr>
</body>

View file

@ -32,7 +32,7 @@ include ../config.mak
# DTDs to install
dtddir = $(GNUSTEP_RESOURCES)/DTDs
DTD_FILES = gsdoc-0_6_5.dtd
DTD_FILES = gsdoc-0_6_5.dtd gsdoc-0_6_6.dtd
# The application to be compiled
TOOL_NAME = gdnc gsdoc defaults plmerge \

View file

@ -15,7 +15,7 @@
# after-all::
# Things to do before installing
# before-install::
before-install:: documentation
# Things to do after installing
after-install::
@ -78,3 +78,6 @@ copy-dist: $(DIST_FILES)
cp $$f ../snap/Tools ; \
done
documentation: $(GNUSTEP_OBJ_DIR)/gsdoc
$(GNUSTEP_OBJ_DIR)/gsdoc gsdoc

447
Tools/gsdoc-0_6_6.dtd Normal file
View file

@ -0,0 +1,447 @@
<!--
XML Document Type Definition for GNUstep Documentation Markup
Language (gsdoc).
Written by Richard Frith-Macdonald
Based on GDML by 1997 Yoo C. Chung
This is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
This document is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General
Public License along with this software; if not, write to the
Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
02139, USA.
-->
<!--
gsdoc is an XML language - Typical usage:
<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN"
"http://www.gnustep.org/gsdoc.xml">
<gsdoc base="myDocName">
</gsdoc>
-->
<!--***** Character entities. *****-->
<!-- General purpose characters for gsdoc. -->
<!ENTITY copy "&#38;copy;"> <!-- copyright symbol -->
<!ENTITY tm "&#38;trade;"> <!-- trademark symbol -->
<!ENTITY dots "&#38;dots;"> <!-- ellipsis (...) -->
<!ENTITY nbsp "&#38;nbsp;"> <!-- non breakable space -->
<!ENTITY amp "&#38;#38;"> <!-- ampersand -->
<!ENTITY apos "&#39;"> <!-- apos -->
<!ENTITY quot "&#34;"> <!-- quotation mark (") -->
<!ENTITY lt "&#38;#60;"> <!-- lesser than symbol -->
<!ENTITY gt "&#62;"> <!-- greater than symbol -->
<!--***** Entity declarations. *****-->
<!-- Boolean values for attributes -->
<!ENTITY % boolean "(yes|no)">
<!-- Entity for phrase elements. -->
<!ENTITY % phrase "var | em | code | strong | file | site">
<!-- Entity for cross references. -->
<!ENTITY % xref "ref | uref | url | email">
<!-- Entity for anchors. -->
<!ENTITY % anchor "label | entry">
<!-- Entity for text level elements. -->
<!ENTITY % text "#PCDATA | %xref; | %anchor; | %phrase; | footnote | br">
<!-- Entity for definition elements. -->
<!ENTITY % def "class|jclass|category|protocol|function|macro|type|variable">
<!-- Entity for list elements. -->
<!ENTITY % list "list | enum | deflist | qalist">
<!-- Entity for block elements like paragraphs. -->
<!ENTITY % block "%def; | %list; | p | example | embed">
<!--**********-->
<!-- Used for describing something. -->
<!ELEMENT desc (%text; | %list; | p | example | embed)*>
<!-- A footnote. -->
<!ELEMENT footnote (%text;)*>
<!--***** Phrase elements. *****-->
<!-- The content is a metasyntactic variable name. -->
<!ELEMENT var (%text;)*>
<!-- Emphasize the content. -->
<!ELEMENT em (%text;)*>
<!-- The content is too important that simple emphasizing isn't
enough. -->
<!ELEMENT strong (%text;)*>
<!-- The content is either a name for code (e.g. class names), or a
relatively short code fragment. -->
<!ELEMENT code (%text;)*>
<!-- The content is a file name. -->
<!ELEMENT file (#PCDATA)*>
<!-- The content is a fully qualified domain name on the Internet. -->
<!ELEMENT site (#PCDATA)*>
<!--***** List elements. *****-->
<!-- An item in a list. -->
<!ELEMENT item (%text; | %block;)*>
<!-- An enumerated list. -->
<!ELEMENT enum (item+)>
<!-- A ordinary, unnumbered list. -->
<!ELEMENT list (item+)>
<!-- A term to defined in a definition list. -->
<!ELEMENT term (%text;)*>
<!-- A definition list. -->
<!ELEMENT deflist (term, desc)+>
<!-- A question for a question and answer list. -->
<!ELEMENT question (%text;)*>
<!-- An answer for a question and answer list. -->
<!ELEMENT answer (%block;)*>
<!-- A question and answer list. -->
<!ELEMENT qalist (question, answer)+>
<!--**********-->
<!--***** Cross references. *****-->
<!-- A reference.
ID of the reference.
TYPE of reference, if implied, a reference to a label.
CLASS specific class for a method
-->
<!ELEMENT ref (%text;)*>
<!ATTLIST ref
id CDATA #REQUIRED
type (class|protocol|method|function|type|macro|variable|label) "label"
class CDATA #IMPLIED
>
<!-- An e-mail address. -->
<!ELEMENT email (%text;)*>
<!ATTLIST email
address CDATA #IMPLIED
>
<!-- A URL. -->
<!ELEMENT url EMPTY>
<!ATTLIST url
url CDATA #IMPLIED
>
<!-- A reference to a URL.
The text contained appears in the output.
-->
<!ELEMENT uref (%text;)*>
<!ATTLIST uref
url CDATA #REQUIRED
>
<!--***** Anchors. *****-->
<!-- An anchor for a general reference.
The text contained appears in the ouput.
-->
<!ELEMENT label (%text;)*>
<!ATTLIST label
id CDATA #REQUIRED
>
<!-- An entry for the general index.
The text that is contained appears in the index, and never in
the text itself.
-->
<!ELEMENT entry (%text;)*>
<!ATTLIST entry
id CDATA #REQUIRED
>
<!-- Entity for standard elements. -->
<!ELEMENT GNUstep EMPTY>
<!ELEMENT OpenStep EMPTY>
<!ELEMENT NotOpenStep EMPTY>
<!ELEMENT MacOS-X EMPTY>
<!ELEMENT NotMacOS-X EMPTY>
<!-- A standard that something is or isn't compliant with. -->
<!ENTITY % standard "GNUstep | OpenStep | NotOpenStep | MacOS-X | NotMacOS-X">
<!ELEMENT standards (%standard;)*>
<!--***** Argument elements. *****-->
<!-- An argument. -->
<!ELEMENT arg (#PCDATA)*>
<!ATTLIST arg
type CDATA #IMPLIED
>
<!-- Denotes that the rest of the arguments is a variable list,
like in printf().
-->
<!ELEMENT vararg EMPTY>
<!--***** Method elements. *****-->
<!-- A component for a method selector. -->
<!ELEMENT sel (#PCDATA)*>
<!-- A method. If there is no DESC, it is understood that the element
is used to override some information from the same method in the
superclass.
If factory not set, instance method
-->
<!ELEMENT method (((sel, arg?), (sel, arg)*, vararg?), desc?, standards?)>
<!ATTLIST method
type CDATA #IMPLIED
factory %boolean; "no"
init %boolean; "no"
override (subclass|never) #IMPLIED
>
<!-- A java method definition. -->
<!ELEMENT jmethod ((arg*, vararg?), declared?, desc?, standards?)>
<!ATTLIST jmethod
name CDATA #REQUIRED
type CDATA #IMPLIED
factory %boolean; "no"
init %boolean; "no"
override (subclass|never) #IMPLIED
>
<!--***** Elements for definitions of classes, functions, etc. *****-->
<!-- Show what header file something lives in. -->
<!ELEMENT declared (#PCDATA)*>
<!-- A macro definition. -->
<!ELEMENT macro ((arg*, vararg?), declared?, desc?, standards?)>
<!ATTLIST macro
id CDATA #IMPLIED
name CDATA #REQUIRED
>
<!ELEMENT typespec (#PCDATA)*>
<!-- A type definition. -->
<!ELEMENT type (typespec, declared?, desc?, standards?)>
<!ATTLIST type
id CDATA #IMPLIED
name CDATA #REQUIRED
>
<!-- Variable definition.
VALUE may be set for a constant or a default value
-->
<!ELEMENT variable (declared?, desc?, standards?)>
<!ATTLIST variable
id CDATA #IMPLIED
name CDATA #REQUIRED
type CDATA #REQUIRED
value CDATA #IMPLIED
role (except|defaults|notify|key) #IMPLIED
>
<!-- A function definition. -->
<!ELEMENT function ((arg*, vararg?), declared?, desc?, standards?)>
<!ATTLIST function
id CDATA #IMPLIED
name CDATA #REQUIRED
type CDATA #REQUIRED
>
<!-- Protocol definition. -->
<!ELEMENT protocol (declared?, desc?, method*, standards?)>
<!ATTLIST protocol
id CDATA #IMPLIED
name CDATA #REQUIRED
>
<!-- Category definition. -->
<!ELEMENT category (declared?, desc?, method*, standards?)>
<!ATTLIST category
id CDATA #IMPLIED
name CDATA #REQUIRED
class CDATA #REQUIRED
>
<!-- Show a protocol a class conforms to. -->
<!ELEMENT conform (#PCDATA)*>
<!ELEMENT class (declared?, conform*, desc?, method*, standards?)>
<!ATTLIST class
id CDATA #IMPLIED
name CDATA #REQUIRED
super CDATA #IMPLIED
>
<!ELEMENT jclass (declared?, conform*, desc?, jmethod*, standards?)>
<!ATTLIST jclass
id CDATA #IMPLIED
name CDATA #REQUIRED
super CDATA #IMPLIED
>
<!--***** Elements for ordinary block level elements. *****-->
<!-- A line break. -->
<!ELEMENT br EMPTY>
<!-- A paragraph. -->
<!ELEMENT p (%text;)*>
<!-- An example. -->
<!ELEMENT example (#PCDATA)*>
<!ATTLIST example
id CDATA #IMPLIED
caption CDATA #IMPLIED
>
<!-- An embedded object. If it is of a type that the SGML processor
cannot handle, then use the content, which is ignored otherwise.
refer - method of referring to object (default is file)
src - the reference to the object
type - Internet media type of the objec
title - optional title describing object
-->
<!ELEMENT embed (%block;)*>
<!ATTLIST embed
id CDATA #IMPLIED
refer (file|url) #IMPLIED
src CDATA #REQUIRED
type CDATA #IMPLIED
title CDATA #IMPLIED
>
<!--***** Elements for document structure such as chapters. *****-->
<!-- A heading for chapters, sections, ... -->
<!ELEMENT heading (%text;)*>
<!-- A subsubsection. -->
<!ELEMENT subsubsect (heading, (%block;)*)>
<!ATTLIST subsubsect
id CDATA #IMPLIED
>
<!-- A subsection. -->
<!ELEMENT subsect (heading, (%block;)*, subsubsect*)>
<!ATTLIST subsect
id CDATA #IMPLIED
>
<!-- A section. -->
<!ELEMENT section (heading, (%block;)*, subsect*)>
<!ATTLIST section
id CDATA #IMPLIED
>
<!-- A chapter. -->
<!ELEMENT chapter (heading, (%block;)*, section*)>
<!ATTLIST chapter
id CDATA #IMPLIED
>
<!--***** Elements that make searching for things easier. *****-->
<!-- Table of contents. -->
<!ELEMENT contents EMPTY>
<!-- Index -->
<!ELEMENT index EMPTY>
<!ATTLIST index
type (class|protocol|method|function|type|macro|variable|label) "label"
>
<!--***** Elements that describe the document itself. *****-->
<!-- Copyright of the document. -->
<!ELEMENT copy (%text;)*>
<!-- An abstract. -->
<!ELEMENT abstract (%text;)*>
<!-- The version of the document. -->
<!ELEMENT version (%text;)*>
<!-- The date the document was written. -->
<!ELEMENT date (%text;)*>
<!-- An author. -->
<!ELEMENT author (email?, url?, desc?)>
<!ATTLIST author
name CDATA #REQUIRED
>
<!-- The title of the document. -->
<!ELEMENT title (%text;)*>
<!--***** The topmost structures for the document body. *****-->
<!-- Unnumbered parts appearing in the front, such as a preface. -->
<!ELEMENT front (contents?, chapter*)>
<!-- Unnumbered parts appearing in the back, such as an afterword or
indices.
-->
<!ELEMENT back (chapter*, index?)>
<!--***** The topmost structures for the document. *****-->
<!-- The head containing general information about the document. -->
<!ELEMENT head (title, author+, version?, date?, abstract?, copy?)>
<!-- The main part of the document. -->
<!ELEMENT body (front?, chapter+, back?)>
<!--**********-->
<!-- The entire document. -->
<!ELEMENT gsdoc (head, body)>
<!ATTLIST gsdoc
base CDATA #IMPLIED
next CDATA #IMPLIED
prev CDATA #IMPLIED
up CDATA #IMPLIED
>

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.5//EN" "http://www.gnustep.org/gsdoc-0_6_5.xml">
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
<gsdoc base="gsdoc">
<head>
<title>GNUstep Documentation XML markup language (GSDoc)</title>
@ -10,8 +10,8 @@
A person who has devotes far too much time to GNUstep development.
</desc>
</author>
<version>0.1</version>
<date>4 march, 2000</date>
<version>0.2</version>
<date>21 June, 2000</date>
<abstract>
This documents the GNUstep Documentation markup language and tools
</abstract>
@ -118,8 +118,8 @@
</p>
<example>
&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.5//EN" "http://www.gnustep.org/gsdoc-0_6_5.xml"&gt;
&lt;gsdoc base="MyDoc" prev="First.html" next="Last.html" up="Overview.html"&gt;
&lt;!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml"&gt;
&lt;gsdoc base="MyDoc" prev="First" next="Last" up="Overview"&gt;
&lt;head&gt;
... your document head here
&lt;/head&gt;
@ -184,22 +184,22 @@
document head that must be present.
</p>
<example>
&lt;head&gt;
&lt;title&gt;GNUstep Documentation XML markup language (GSDoc)&lt;/title&gt;
&lt;author name="Richard Frith-Macdonald"&gt;
&lt;email address="rfm@gnu.org"/&gt;
&lt;url url="http://www.gnustep.org/developers/whoiswho.html"/&gt;
&lt;desc&gt;
A person who has devotes far too much time to GNUstep development.
&lt;/desc&gt;
&lt;/author&gt;
&lt;version&gt;0.1&lt;/version&gt;
&lt;date&gt;4 march, 2000&lt;/date&gt;
&lt;abstract&gt;
This documents the GNUstep Documentation markup language and tools
&lt;/abstract&gt;
&lt;copy&gt;Free Software Foundation, Inc.&lt;/copy&gt;
&lt;/head&gt;
&lt;head&gt;
&lt;title&gt;GNUstep Documentation XML markup language (GSDoc)&lt;/title&gt;
&lt;author name="Richard Frith-Macdonald"&gt;
&lt;email address="rfm@gnu.org"/&gt;
&lt;url url="http://www.gnustep.org/developers/whoiswho.html"/&gt;
&lt;desc&gt;
A person who has devotes far too much time to GNUstep development.
&lt;/desc&gt;
&lt;/author&gt;
&lt;version&gt;0.1&lt;/version&gt;
&lt;date&gt;4 march, 2000&lt;/date&gt;
&lt;abstract&gt;
This documents the GNUstep Documentation markup language and tools
&lt;/abstract&gt;
&lt;copy&gt;Free Software Foundation, Inc.&lt;/copy&gt;
&lt;/head&gt;
</example>
<p>
The above example shows all the elements possible in a document head -
@ -250,6 +250,63 @@
parts of the document would be expected to have their own separate
page numbering schemes.
</p>
<example>
&lt;body&gt;
&lt;front&gt;
&lt;contents/&gt;
&lt;chapter&gt;
&lt;heading&gt;Preface&lt;/heading&gt;
&lt;p&gt;
Here is an introductory chapter for a dummy document.
&lt;/p&gt;
&lt;/chapter&gt;
&lt;/front&gt;
&lt;chapter&gt;
&lt;heading&gt;Main text&lt;/heading&gt;
&lt;p&gt;
Here is the main text of a chapter in the document.
&lt;/p&gt;
&lt;/chapter&gt;
&lt;back&gt;
&lt;chapter&gt;
&lt;heading&gt;Afterword&lt;/heading&gt;
&lt;p&gt;
Adn after the main part of the doucment we can have some other stuff.
&lt;/p&gt;
&lt;/chapter&gt;
&lt;index type="class"/&gt;
&lt;/back&gt;
&lt;/body&gt;
</example>
<p>
The above example shows all the elements possible in a document body -
</p>
<deflist>
<term><label id="title">front</label></term>
<desc>
This is an optional part of the document that can come before the
main text. Typically, this could be used to contain an automatically
generated contents page and possibly an introduction.
When output is generated in book form, this part of the document
would probably have a different page numbering scheme from the
main part.
</desc>
<term><label id="chapter">chapter</label></term>
<desc>
<p>
After the <em>front</em> part of the document body comes a
mandatory sequence of one or more chapters. This is where
the main part of the document resides.
</p>
</desc>
<term><label id="back">back</label></term>
<desc>
After the chapters making up the main part of the body of the
document is an optional <em>back</em> part which may contain
chapters (such as appendices) possibly followed by an automatically
generated index.
</desc>
</deflist>
</section>
</chapter>

View file

@ -505,6 +505,7 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
}
if (strcmp(node->name, "class") == 0
|| strcmp(node->name, "jclass") == 0
|| strcmp(node->name, "category") == 0
|| strcmp(node->name, "protocol") == 0
|| strcmp(node->name, "function") == 0
@ -772,7 +773,8 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
{
NSMutableString *text = [NSMutableString string];
if (strcmp(node->name, "class") == 0)
if ((strcmp(node->name, "class") == 0)
|| (strcmp(node->name, "jclass") == 0))
{
NSString *className = [self getProp: "name" fromNode: node];
NSString *superName = [self getProp: "super" fromNode: node];
@ -819,7 +821,8 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
desc = [self parseDesc: node];
node = node->next;
}
while (node != 0 && strcmp(node->name, "method") == 0)
while (node != 0 && ((strcmp(node->name, "method") == 0)
|| (strcmp(node->name, "jmethod") == 0)))
{
NSString *s = [self parseMethod: node];
@ -1315,7 +1318,15 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
}
else
{
xmlNodePtr old = node;
[text appendString: [self parseText: node end: &node]];
/*
* If we found text, the node will have been advanced, but if
* it failed we need to advance ourselves.
*/
if (node == old)
node = node->next;
continue;
}
@ -1502,11 +1513,26 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
[text appendString: @"</head>\r\n"];
[text appendString: @"<body>\r\n"];
if (prevName != nil)
[text appendFormat: @"<a href=\"%@\">[Previous]</a>\n", prevName];
{
if ([[prevName pathExtension] isEqual: @"html"] == YES)
[text appendFormat: @"<a href=\"%@\">[Previous]</a>\n", prevName];
else
[text appendFormat: @"<a href=\"%@.html\">[Previous]</a>\n", prevName];
}
if (upName != nil)
[text appendFormat: @"<a href=\"%@\">[Up]</a>\n", upName];
{
if ([[upName pathExtension] isEqual: @"html"] == YES)
[text appendFormat: @"<a href=\"%@\">[Up]</a>\n", upName];
else
[text appendFormat: @"<a href=\"%@.html\">[Up]</a>\n", upName];
}
if (nextName != nil)
[text appendFormat: @"<a href=\"%@\">[Next]</a>\n", nextName];
{
if ([[nextName pathExtension] isEqual: @"html"] == YES)
[text appendFormat: @"<a href=\"%@\">[Next]</a>\n", nextName];
else
[text appendFormat: @"<a href=\"%@.html\">[Next]</a>\n", nextName];
}
[text appendFormat: @"<h1>%@</h1>\r\n", title];
@ -1783,11 +1809,11 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
NSString *ref = [self getProp: "id" fromNode: node];
NSString *type = [self getProp: "type" fromNode: node];
NSString *over = [self getProp: "override" fromNode: node];
// NSString *role = [self getProp: "role" fromNode: node];
BOOL factory = [[self getProp: "factory" fromNode: node] boolValue];
BOOL desInit = [[self getProp: "init" fromNode: node] boolValue];
NSMutableString *lText = [NSMutableString string];
NSMutableString *sText = [NSMutableString string];
BOOL isJava = (strcmp(node->name, "jmethod") == 0);
NSString *desc = nil;
NSArray *standards = nil;
@ -1796,56 +1822,117 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
ref = [NSString stringWithFormat: @"method-%u",
labelIndex++];
}
if (factory)
if (isJava)
{
[lText appendString: @"+ ("];
}
else
{
[lText appendString: @"- ("];
}
if (type == nil)
type = @"id";
[lText appendString: type];
[lText appendString: @")"];
NSMutableString *decl = [NSMutableString string];
NSMutableString *args = [NSMutableString stringWithString: @"("];
NSString *name = [self getProp: "name" fromNode: node];
node = node->children;
while (node != 0 && strcmp(node->name, "sel") == 0)
{
NSString *sel = [self parseText: node->children];
if (factory)
{
[decl appendString: @"static "];
}
if (type == nil)
type = @"Object";
[decl appendString: type];
[decl appendString: @" "];
if (sel == nil) return nil;
[sText appendString: sel];
[lText appendFormat: @" <b>%@</b>", sel];
node = node->next;
if (node != 0 && strcmp(node->name, "arg") == 0)
node = node->children;
while (node != 0 && strcmp(node->name, "arg") == 0)
{
NSString *arg = [self parseText: node->children];
NSString *typ = [self getProp: "type" fromNode: node];
if (arg == nil) return nil;
if (arg == nil) break;
if ([args length] > 1)
{
[args appendString: @", "];
}
if (typ != nil)
{
[lText appendFormat: @" (%@)%@", typ, arg];
[args appendString: typ];
[args appendString: @" "];
}
[args appendString: arg];
node = node->next;
}
if (node != 0 && strcmp(node->name, "vararg") == 0)
{
if ([args length] > 1)
{
[args appendString: @", ..."];
}
else
{
[lText appendString: @" "];
[lText appendString: arg];
[args appendString: @"..."];
}
node = node->next;
if (node != 0 && strcmp(node->name, "vararg") == 0)
{
[lText appendString: @", ..."];
node = node->next;
break;
}
}
[args appendString: @")"];
[lText appendString: decl];
[lText appendString: @"<b>"];
[lText appendString: name];
[lText appendString: @"</b>"];
[lText appendString: args];
[sText appendString: decl];
[sText appendString: name];
[sText appendString: args];
}
else
{
if (factory)
{
[lText appendString: @"+ ("];
}
else
{
break; /* Just a selector */
[lText appendString: @"- ("];
}
if (type == nil)
type = @"id";
[lText appendString: type];
[lText appendString: @")"];
node = node->children;
while (node != 0 && strcmp(node->name, "sel") == 0)
{
NSString *sel = [self parseText: node->children];
if (sel == nil) return nil;
[sText appendString: sel];
[lText appendFormat: @" <b>%@</b>", sel];
node = node->next;
if (node != 0 && strcmp(node->name, "arg") == 0)
{
NSString *arg = [self parseText: node->children];
NSString *typ = [self getProp: "type" fromNode: node];
if (arg == nil) return nil;
if (typ != nil)
{
[lText appendFormat: @" (%@)%@", typ, arg];
}
else
{
[lText appendString: @" "];
[lText appendString: arg];
}
node = node->next;
if (node != 0 && strcmp(node->name, "vararg") == 0)
{
[lText appendString: @", ..."];
node = node->next;
break;
}
}
else
{
break; /* Just a selector */
}
}
}
if (node != 0 && strcmp(node->name, "desc") == 0)
{
desc = [self parseDesc: node];
@ -1856,22 +1943,29 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
standards = [self parseStandards: node];
}
if (factory)
if (isJava)
{
NSString *s = [@"+" stringByAppendingString: sText];
[self setEntry: s withRef: ref inIndexOfType: @"method"];
[self setEntry: sText withRef: ref inIndexOfType: @"method"];
}
else
{
NSString *s = [@"-" stringByAppendingString: sText];
[self setEntry: s withRef: ref inIndexOfType: @"method"];
if (factory)
{
NSString *s = [@"+" stringByAppendingString: sText];
[self setEntry: s withRef: ref inIndexOfType: @"method"];
}
else
{
NSString *s = [@"-" stringByAppendingString: sText];
[self setEntry: s withRef: ref inIndexOfType: @"method"];
}
}
[text appendFormat: @"<h2><a name=\"%@\">%@</a></h2>\r\n", ref, sText];
if (desInit)
{
[text appendString: @"<b>This is the designated initialiser</b><br>\r\n"];
}
[text appendFormat: @"%@<br>\r\n", lText];
[text appendFormat: @"%@;<br>\r\n", lText];
if ([over isEqual: @"subclass"])
{
[text appendString: @"Your subclass <em>must</em> override this "
@ -1946,7 +2040,11 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
break;
case XML_ELEMENT_NODE:
if (strcmp(node->name, "code") == 0
if (strcmp(node->name, "br") == 0)
{
[text appendString: @"<br>"];
}
else if (strcmp(node->name, "code") == 0
|| strcmp(node->name, "em") == 0
|| strcmp(node->name, "file") == 0
|| strcmp(node->name, "site") == 0