mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
vastly improved auto generation of documentation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11456 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cba9edb901
commit
4c5a1105f2
10 changed files with 1055 additions and 321 deletions
|
@ -119,10 +119,9 @@ loadEntityFunction(const char *url, const char *eid, xmlParserCtxtPtr *ctxt);
|
|||
|
||||
@implementation GSXMLDocument : NSObject
|
||||
|
||||
+ (void) initialize
|
||||
+ (GSXMLDocument*) documentFrom: (void*)data
|
||||
{
|
||||
if (cacheDone == NO)
|
||||
setupCache();
|
||||
return AUTORELEASE([[self alloc] initFrom: data]);
|
||||
}
|
||||
|
||||
+ (GSXMLDocument*) documentWithVersion: (NSString*)version
|
||||
|
@ -130,25 +129,31 @@ loadEntityFunction(const char *url, const char *eid, xmlParserCtxtPtr *ctxt);
|
|||
return AUTORELEASE([[self alloc] initWithVersion: version]);
|
||||
}
|
||||
|
||||
- (id) initWithVersion: (NSString*)version
|
||||
+ (void) initialize
|
||||
{
|
||||
void *data = xmlNewDoc([version cString]);
|
||||
|
||||
if (data == 0)
|
||||
{
|
||||
NSLog(@"Can't create GSXMLDocument object");
|
||||
DESTROY(self);
|
||||
}
|
||||
else if ((self = [self initFrom: data]) != nil)
|
||||
{
|
||||
native = YES;
|
||||
}
|
||||
return self;
|
||||
if (cacheDone == NO)
|
||||
setupCache();
|
||||
}
|
||||
|
||||
+ (GSXMLDocument*) documentFrom: (void*)data
|
||||
- (id) copyWithZone: (NSZone*)z
|
||||
{
|
||||
return AUTORELEASE([[self alloc] initFrom: data]);
|
||||
return RETAIN(self);
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
if ((native) && lib != NULL)
|
||||
{
|
||||
xmlFreeDoc(lib);
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
NSLog(@"GSXMLDocument: calling -init is not legal");
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id) initFrom: (void*)data
|
||||
|
@ -173,11 +178,20 @@ loadEntityFunction(const char *url, const char *eid, xmlParserCtxtPtr *ctxt);
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
- (id) initWithVersion: (NSString*)version
|
||||
{
|
||||
NSLog(@"GSXMLDocument: calling -init is not legal");
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
void *data = xmlNewDoc([version cString]);
|
||||
|
||||
if (data == 0)
|
||||
{
|
||||
NSLog(@"Can't create GSXMLDocument object");
|
||||
DESTROY(self);
|
||||
}
|
||||
else if ((self = [self initFrom: data]) != nil)
|
||||
{
|
||||
native = YES;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (GSXMLNode*) root
|
||||
|
@ -204,15 +218,6 @@ loadEntityFunction(const char *url, const char *eid, xmlParserCtxtPtr *ctxt);
|
|||
return [NSString_class stringWithCString: ((xmlDocPtr)(lib))->encoding];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
if ((native) && lib != NULL)
|
||||
{
|
||||
xmlFreeDoc(lib);
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void*) lib
|
||||
{
|
||||
return lib;
|
||||
|
@ -316,6 +321,11 @@ static NSMapTable *nsNames = 0;
|
|||
prefix: prefix]);
|
||||
}
|
||||
|
||||
- (id) copyWithZone: (NSZone*)z
|
||||
{
|
||||
return RETAIN(self);
|
||||
}
|
||||
|
||||
- (id) initWithNode: (GSXMLNode*)node
|
||||
href: (NSString*)href
|
||||
prefix: (NSString*)prefix
|
||||
|
@ -540,6 +550,11 @@ static NSMapTable *nodeNames = 0;
|
|||
return AUTORELEASE([[self alloc] initWithNamespace: ns name: name]);
|
||||
}
|
||||
|
||||
- (id) copyWithZone: (NSZone*)z
|
||||
{
|
||||
return RETAIN(self);
|
||||
}
|
||||
|
||||
- (id) initWithNamespace: (GSXMLNamespace*) ns name: (NSString*) name
|
||||
{
|
||||
self = [super init];
|
||||
|
@ -828,7 +843,7 @@ static NSMapTable *nodeNames = 0;
|
|||
|
||||
/*
|
||||
*
|
||||
* GSXMLAttribure
|
||||
* GSXMLAttribute
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -892,6 +907,11 @@ static NSMapTable *attrNames = 0;
|
|||
return desc;
|
||||
}
|
||||
|
||||
- (id) copyWithZone: (NSZone*)z
|
||||
{
|
||||
return RETAIN(self);
|
||||
}
|
||||
|
||||
- (int) type
|
||||
{
|
||||
return (int)((xmlAttrPtr)(lib))->atype;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue