mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
1bbcde7f50
commit
15b6c784cd
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>
|
||||
|
||||
* Source/NSAttributedString.m: Varius bugfixes.
|
||||
|
|
|
@ -189,6 +189,17 @@
|
|||
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. *****-->
|
||||
|
||||
|
@ -214,7 +225,7 @@
|
|||
superclass.
|
||||
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
|
||||
type CDATA #IMPLIED
|
||||
factory %boolean; "no"
|
||||
|
@ -226,14 +237,11 @@
|
|||
|
||||
<!--***** Elements for definitions of classes, functions, etc. *****-->
|
||||
|
||||
<!-- A standard that something is compliant with. -->
|
||||
<!ELEMENT standard (%text;)*>
|
||||
|
||||
<!-- Show what header file something lives in. -->
|
||||
<!ELEMENT declared (#PCDATA)*>
|
||||
|
||||
<!-- A macro definition. -->
|
||||
<!ELEMENT macro ((arg*, vararg?), declared?, desc?, standard*)>
|
||||
<!ELEMENT macro ((arg*, vararg?), declared?, desc?, standards?)>
|
||||
<!ATTLIST macro
|
||||
id CDATA #IMPLIED
|
||||
name CDATA #REQUIRED
|
||||
|
@ -242,7 +250,7 @@
|
|||
<!ELEMENT typespec (#PCDATA)*>
|
||||
|
||||
<!-- A type definition. -->
|
||||
<!ELEMENT type (typespec, declared?, desc?, standard*)>
|
||||
<!ELEMENT type (typespec, declared?, desc?, standards?)>
|
||||
<!ATTLIST type
|
||||
id CDATA #IMPLIED
|
||||
name CDATA #REQUIRED
|
||||
|
@ -251,7 +259,7 @@
|
|||
<!-- Variable definition.
|
||||
VALUE may be set for a constant or a default value
|
||||
-->
|
||||
<!ELEMENT variable (declared?, desc?, standard*)>
|
||||
<!ELEMENT variable (declared?, desc?, standards?)>
|
||||
<!ATTLIST variable
|
||||
id CDATA #IMPLIED
|
||||
name CDATA #REQUIRED
|
||||
|
@ -261,7 +269,7 @@
|
|||
>
|
||||
|
||||
<!-- A function definition. -->
|
||||
<!ELEMENT function ((arg*, vararg?), declared?, desc?, standard*)>
|
||||
<!ELEMENT function ((arg*, vararg?), declared?, desc?, standards?)>
|
||||
<!ATTLIST function
|
||||
id CDATA #IMPLIED
|
||||
name CDATA #REQUIRED
|
||||
|
@ -269,14 +277,14 @@
|
|||
>
|
||||
|
||||
<!-- Protocol definition. -->
|
||||
<!ELEMENT protocol (declared?, desc?, method*, standard*)>
|
||||
<!ELEMENT protocol (declared?, desc?, method*, standards?)>
|
||||
<!ATTLIST protocol
|
||||
id CDATA #IMPLIED
|
||||
name CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!-- Category definition. -->
|
||||
<!ELEMENT category (declared?, desc?, method*, standard*)>
|
||||
<!ELEMENT category (declared?, desc?, method*, standards?)>
|
||||
<!ATTLIST category
|
||||
id CDATA #IMPLIED
|
||||
name CDATA #REQUIRED
|
||||
|
@ -286,7 +294,7 @@
|
|||
<!-- Show a protocol a class conforms to. -->
|
||||
<!ELEMENT conform (#PCDATA)*>
|
||||
|
||||
<!ELEMENT class (declared?, conform*, desc?, method*, standard*)>
|
||||
<!ELEMENT class (declared?, conform*, desc?, method*, standards?)>
|
||||
<!ATTLIST class
|
||||
id CDATA #IMPLIED
|
||||
name CDATA #REQUIRED
|
||||
|
|
|
@ -248,6 +248,7 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
|||
- (NSString*) parseList: (xmlNodePtr)node;
|
||||
- (NSString*) parseMacro: (xmlNodePtr)node;
|
||||
- (NSString*) parseMethod: (xmlNodePtr)node;
|
||||
- (NSArray*) parseStandards: (xmlNodePtr)node;
|
||||
- (NSString*) parseText: (xmlNodePtr)node;
|
||||
- (void) setEntry: (NSString*)entry
|
||||
withRef: (NSString*)ref
|
||||
|
@ -1732,6 +1733,7 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
|||
NSMutableString *lText = [NSMutableString string];
|
||||
NSMutableString *sText = [NSMutableString string];
|
||||
NSString *desc = nil;
|
||||
NSArray *standards = nil;
|
||||
|
||||
if (ref == nil)
|
||||
{
|
||||
|
@ -1788,18 +1790,16 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
|||
break; /* Just a selector */
|
||||
}
|
||||
}
|
||||
if (node != 0 && strcmp(node->name, "desc") == 0)
|
||||
{
|
||||
desc = [self parseDesc: node];
|
||||
node = node->next;
|
||||
}
|
||||
if (node != 0)
|
||||
{
|
||||
if (strcmp(node->name, "desc") == 0)
|
||||
{
|
||||
desc = [self parseDesc: node];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Unexpected node in method definition - %s", node->name);
|
||||
return nil;
|
||||
}
|
||||
standards = [self parseStandards: node];
|
||||
}
|
||||
|
||||
if (factory)
|
||||
{
|
||||
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 "
|
||||
@"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)
|
||||
{
|
||||
|
@ -1836,6 +1848,30 @@ loader(const char *url, const char* eid, xmlParserCtxtPtr *ctxt)
|
|||
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
|
||||
{
|
||||
NSMutableString *text = [NSMutableString string];
|
||||
|
|
Loading…
Reference in a new issue