mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +00:00
Documentation improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6249 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0fab02ec02
commit
1e09eb8b04
3 changed files with 70 additions and 20 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Fri Mar 10 10:45:00 2000 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
|
* GSDoc/gsdoc-0_6_5.dtd: Altered to add standard conformance to
|
||||||
|
individual methods and to make standards rigorous.
|
||||||
|
* GSDoc/gsdoc.m: Updated for changes to dtd.
|
||||||
|
|
||||||
Thu Mar 09 18:07:00 2000 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
Thu Mar 09 18:07:00 2000 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
* Source/NSAttributedString.m: Varius bugfixes.
|
* Source/NSAttributedString.m: Varius bugfixes.
|
||||||
|
|
|
@ -189,6 +189,17 @@
|
||||||
id CDATA #REQUIRED
|
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. *****-->
|
<!--***** Argument elements. *****-->
|
||||||
|
|
||||||
|
@ -214,7 +225,7 @@
|
||||||
superclass.
|
superclass.
|
||||||
If factory not set, instance method
|
If factory not set, instance method
|
||||||
-->
|
-->
|
||||||
<!ELEMENT method (((sel, arg?), (sel, arg)*, vararg?), desc?)>
|
<!ELEMENT method (((sel, arg?), (sel, arg)*, vararg?), desc?, standards?)>
|
||||||
<!ATTLIST method
|
<!ATTLIST method
|
||||||
type CDATA #IMPLIED
|
type CDATA #IMPLIED
|
||||||
factory %boolean; "no"
|
factory %boolean; "no"
|
||||||
|
@ -226,14 +237,11 @@
|
||||||
|
|
||||||
<!--***** Elements for definitions of classes, functions, etc. *****-->
|
<!--***** Elements for definitions of classes, functions, etc. *****-->
|
||||||
|
|
||||||
<!-- A standard that something is compliant with. -->
|
|
||||||
<!ELEMENT standard (%text;)*>
|
|
||||||
|
|
||||||
<!-- Show what header file something lives in. -->
|
<!-- Show what header file something lives in. -->
|
||||||
<!ELEMENT declared (#PCDATA)*>
|
<!ELEMENT declared (#PCDATA)*>
|
||||||
|
|
||||||
<!-- A macro definition. -->
|
<!-- A macro definition. -->
|
||||||
<!ELEMENT macro ((arg*, vararg?), declared?, desc?, standard*)>
|
<!ELEMENT macro ((arg*, vararg?), declared?, desc?, standards?)>
|
||||||
<!ATTLIST macro
|
<!ATTLIST macro
|
||||||
id CDATA #IMPLIED
|
id CDATA #IMPLIED
|
||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
|
@ -242,7 +250,7 @@
|
||||||
<!ELEMENT typespec (#PCDATA)*>
|
<!ELEMENT typespec (#PCDATA)*>
|
||||||
|
|
||||||
<!-- A type definition. -->
|
<!-- A type definition. -->
|
||||||
<!ELEMENT type (typespec, declared?, desc?, standard*)>
|
<!ELEMENT type (typespec, declared?, desc?, standards?)>
|
||||||
<!ATTLIST type
|
<!ATTLIST type
|
||||||
id CDATA #IMPLIED
|
id CDATA #IMPLIED
|
||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
|
@ -251,7 +259,7 @@
|
||||||
<!-- Variable definition.
|
<!-- Variable definition.
|
||||||
VALUE may be set for a constant or a default value
|
VALUE may be set for a constant or a default value
|
||||||
-->
|
-->
|
||||||
<!ELEMENT variable (declared?, desc?, standard*)>
|
<!ELEMENT variable (declared?, desc?, standards?)>
|
||||||
<!ATTLIST variable
|
<!ATTLIST variable
|
||||||
id CDATA #IMPLIED
|
id CDATA #IMPLIED
|
||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
|
@ -261,7 +269,7 @@
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- A function definition. -->
|
<!-- A function definition. -->
|
||||||
<!ELEMENT function ((arg*, vararg?), declared?, desc?, standard*)>
|
<!ELEMENT function ((arg*, vararg?), declared?, desc?, standards?)>
|
||||||
<!ATTLIST function
|
<!ATTLIST function
|
||||||
id CDATA #IMPLIED
|
id CDATA #IMPLIED
|
||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
|
@ -269,14 +277,14 @@
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- Protocol definition. -->
|
<!-- Protocol definition. -->
|
||||||
<!ELEMENT protocol (declared?, desc?, method*, standard*)>
|
<!ELEMENT protocol (declared?, desc?, method*, standards?)>
|
||||||
<!ATTLIST protocol
|
<!ATTLIST protocol
|
||||||
id CDATA #IMPLIED
|
id CDATA #IMPLIED
|
||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- Category definition. -->
|
<!-- Category definition. -->
|
||||||
<!ELEMENT category (declared?, desc?, method*, standard*)>
|
<!ELEMENT category (declared?, desc?, method*, standards?)>
|
||||||
<!ATTLIST category
|
<!ATTLIST category
|
||||||
id CDATA #IMPLIED
|
id CDATA #IMPLIED
|
||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
|
@ -286,7 +294,7 @@
|
||||||
<!-- Show a protocol a class conforms to. -->
|
<!-- Show a protocol a class conforms to. -->
|
||||||
<!ELEMENT conform (#PCDATA)*>
|
<!ELEMENT conform (#PCDATA)*>
|
||||||
|
|
||||||
<!ELEMENT class (declared?, conform*, desc?, method*, standard*)>
|
<!ELEMENT class (declared?, conform*, desc?, method*, standards?)>
|
||||||
<!ATTLIST class
|
<!ATTLIST class
|
||||||
id CDATA #IMPLIED
|
id CDATA #IMPLIED
|
||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
|
|
|
@ -248,6 +248,7 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
||||||
- (NSString*) parseList: (xmlNodePtr)node;
|
- (NSString*) parseList: (xmlNodePtr)node;
|
||||||
- (NSString*) parseMacro: (xmlNodePtr)node;
|
- (NSString*) parseMacro: (xmlNodePtr)node;
|
||||||
- (NSString*) parseMethod: (xmlNodePtr)node;
|
- (NSString*) parseMethod: (xmlNodePtr)node;
|
||||||
|
- (NSArray*) parseStandards: (xmlNodePtr)node;
|
||||||
- (NSString*) parseText: (xmlNodePtr)node;
|
- (NSString*) parseText: (xmlNodePtr)node;
|
||||||
- (void) setEntry: (NSString*)entry
|
- (void) setEntry: (NSString*)entry
|
||||||
withRef: (NSString*)ref
|
withRef: (NSString*)ref
|
||||||
|
@ -1732,6 +1733,7 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
||||||
NSMutableString *lText = [NSMutableString string];
|
NSMutableString *lText = [NSMutableString string];
|
||||||
NSMutableString *sText = [NSMutableString string];
|
NSMutableString *sText = [NSMutableString string];
|
||||||
NSString *desc = nil;
|
NSString *desc = nil;
|
||||||
|
NSArray *standards = nil;
|
||||||
|
|
||||||
if (ref == nil)
|
if (ref == nil)
|
||||||
{
|
{
|
||||||
|
@ -1788,18 +1790,16 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
||||||
break; /* Just a selector */
|
break; /* Just a selector */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (node != 0 && strcmp(node->name, "desc") == 0)
|
||||||
|
{
|
||||||
|
desc = [self parseDesc: node];
|
||||||
|
node = node->next;
|
||||||
|
}
|
||||||
if (node != 0)
|
if (node != 0)
|
||||||
{
|
{
|
||||||
if (strcmp(node->name, "desc") == 0)
|
standards = [self parseStandards: node];
|
||||||
{
|
|
||||||
desc = [self parseDesc: node];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NSLog(@"Unexpected node in method definition - %s", node->name);
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (factory)
|
if (factory)
|
||||||
{
|
{
|
||||||
NSString *s = [@"+" stringByAppendingString: sText];
|
NSString *s = [@"+" stringByAppendingString: sText];
|
||||||
|
@ -1826,6 +1826,18 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
||||||
[text appendString: @"Your subclass must <em>not</em> override this "
|
[text appendString: @"Your subclass must <em>not</em> override this "
|
||||||
@"method.<br>\r\n"];
|
@"method.<br>\r\n"];
|
||||||
}
|
}
|
||||||
|
if ([standards count] > 0)
|
||||||
|
{
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
|
[text appendString: @"Standards:"];
|
||||||
|
for (i = 0; i < [standards count]; i++)
|
||||||
|
{
|
||||||
|
[text appendString: @" "];
|
||||||
|
[text appendString: [standards objectAtIndex: i]];
|
||||||
|
}
|
||||||
|
[text appendString: @"<br>\r\n"];
|
||||||
|
}
|
||||||
|
|
||||||
if (desc != nil)
|
if (desc != nil)
|
||||||
{
|
{
|
||||||
|
@ -1836,6 +1848,30 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSArray*) parseStandards: (xmlNodePtr)node
|
||||||
|
{
|
||||||
|
if (node != 0)
|
||||||
|
{
|
||||||
|
if (strcmp(node->name, "standards") == 0)
|
||||||
|
{
|
||||||
|
NSMutableArray *a = [NSMutableArray array];
|
||||||
|
|
||||||
|
node = node->childs;
|
||||||
|
while (node != 0 && node->name != 0)
|
||||||
|
{
|
||||||
|
[a addObject: [NSString stringWithCString: node->name]];
|
||||||
|
node = node->next;
|
||||||
|
}
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSLog(@"Unexpected node in method definition - %s", node->name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString*) parseText: (xmlNodePtr)node
|
- (NSString*) parseText: (xmlNodePtr)node
|
||||||
{
|
{
|
||||||
NSMutableString *text = [NSMutableString string];
|
NSMutableString *text = [NSMutableString string];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue