Documentation tweaks

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22112 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2005-11-28 15:41:35 +00:00
parent c97daa51dd
commit 1bf4c4c303
32 changed files with 307 additions and 216 deletions

View file

@ -1,3 +1,38 @@
2005-11-28 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/Additions/GNUstepBase/GSConfig.h.in:
* Headers/Additions/GNUstepBase/GSXML.h:
* Headers/Foundation/NSCoder.h:
* Headers/Foundation/NSConnection.h:
* Headers/Foundation/NSFileManager.h:
* Headers/Foundation/NSKeyValueObserving.h:
* Headers/Foundation/NSObject.h:
* Headers/Foundation/NSPort.h:
* Headers/Foundation/NSPortCoder.h:
* Headers/Foundation/NSProxy.h:
* Headers/Foundation/NSString.h:
* Headers/Foundation/NSURL.h:
* Headers/Foundation/NSXMLParser.h:
* Source/NSArray.m:
* Source/NSAttributedString.m:
* Source/NSCoder.m:
* Source/NSConnection.m:
* Source/NSDictionary.m:
* Source/NSFileHandle.m:
* Source/NSFileManager.m:
* Source/NSKeyValueObserving.m:
* Source/NSKeyedArchiver.m:
* Source/NSKeyedUnarchiver.m:
* Source/NSObject.m:
* Source/NSPortCoder.m:
* Source/NSPortNameServer.m:
* Source/NSRunLoop.m:
* Source/NSString.m:
* Tools/AGSOutput.m:
* Tools/gdnc.m:
* Tools/gsdoc.gsdoc:
Documentation tweaks and minor simplificiations.
2005-11-28 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/AGSOutput.m:

View file

@ -189,5 +189,14 @@ typedef @GS_ADDR@ gsaddr;
#define UTF32Char uint32_t
#endif
/*
* Native character type for use in systemcalls etc.
*/
#if defined(__MINGW32__)
#define GSNativeChar unichar
#else
#define GSNativeChar char
#endif
#endif /* included_GSConfig_h */

View file

@ -233,24 +233,33 @@
- (void*) lib;
- (GSXMLParser*) parser;
/* callbacks ... */
/** <override-dummy /> */
- (void) attribute: (NSString*)name
value: (NSString*)value;
/** <override-dummy /> */
- (void) attributeDecl: (NSString*)nameElement
name: (NSString*)name
type: (int)type
typeDefValue: (int)defType
defaultValue: (NSString*)value;
/** <override-dummy /> */
- (void) characters: (NSString*)name;
/** <override-dummy /> */
- (void) cdataBlock: (NSData*)value;
/** <override-dummy /> */
- (void) comment: (NSString*) value;
/** <override-dummy /> */
- (void) elementDecl: (NSString*)name
type: (int)type;
/** <override-dummy /> */
- (void) endDocument;
/** <override-dummy /> */
- (void) endElement: (NSString*)elementName;
/** <override-dummy /> */
- (void) endElement: (NSString*)elementName
prefix: (NSString*)prefix
href: (NSString*)href;
/** <override-dummy /> */
- (void) entityDecl: (NSString*)name
type: (int)type
public: (NSString*)publicId
@ -269,11 +278,13 @@
lineNumber: (int)lineNumber;
- (void*) getEntity: (NSString*)name;
- (void*) getParameterEntity: (NSString*)name;
/** <override-dummy /> */
- (void) globalNamespace: (NSString*)name
href: (NSString*)href
prefix: (NSString*)prefix;
- (int) hasExternalSubset;
- (int) hasInternalSubset;
/** <override-dummy /> */
- (void) ignoreWhitespace: (NSString*)ch;
- (BOOL) internalSubset: (NSString*)name
externalID: (NSString*)externalID
@ -281,22 +292,30 @@
- (int) isStandalone;
- (NSString*) loadEntity: (NSString*)publicId
at: (NSString*)location;
/** <override-dummy /> */
- (void) namespaceDecl: (NSString*)name
href: (NSString*)href
prefix: (NSString*)prefix;
/** <override-dummy /> */
- (void) notationDecl: (NSString*)name
public: (NSString*)publicId
system: (NSString*)systemId;
/** <override-dummy /> */
- (void) processInstruction: (NSString*)targetName
data: (NSString*)PIdata;
/** <override-dummy /> */
- (void) reference: (NSString*)name;
/** <override-dummy /> */
- (void) startDocument;
/** <override-dummy /> */
- (void) startElement: (NSString*)elementName
attributes: (NSMutableDictionary*)elementAttributes;
/** <override-dummy /> */
- (void) startElement: (NSString*)elementName
prefix: (NSString*)prefix
href: (NSString*)href
attributes: (NSMutableDictionary*)elementAttributes;
/** <override-dummy /> */
- (void) unparsedEntityDecl: (NSString*)name
public: (NSString*)publicId
system: (NSString*)systemId
@ -630,17 +649,22 @@
- (void) timeout: (NSTimer*)t;
#ifdef GNUSTEP
/** Allows GSXMLRPC to act as a client of NSURLHandle. Internal use only. */
/** <override-dummy />
* Allows GSXMLRPC to act as a client of NSURLHandle. Internal use only. */
- (void) URLHandle: (NSURLHandle*)sender
resourceDataDidBecomeAvailable: (NSData*)newData;
/** Allows GSXMLRPC to act as a client of NSURLHandle. Internal use only. */
/** <override-dummy />
* Allows GSXMLRPC to act as a client of NSURLHandle. Internal use only. */
- (void) URLHandle: (NSURLHandle*)sender
resourceDidFailLoadingWithReason: (NSString*)reason;
/** Allows GSXMLRPC to act as a client of NSURLHandle. Internal use only. */
/** <override-dummy />
* Allows GSXMLRPC to act as a client of NSURLHandle. Internal use only. */
- (void) URLHandleResourceDidBeginLoading: (NSURLHandle*)sender;
/** Allows GSXMLRPC to act as a client of NSURLHandle. Internal use only. */
/** <override-dummy />
* Allows GSXMLRPC to act as a client of NSURLHandle. Internal use only. */
- (void) URLHandleResourceDidCancelLoading: (NSURLHandle*)sender;
/** Allows GSXMLRPC to act as a client of NSURLHandle. Internal use only. */
/** <override-dummy />
* Allows GSXMLRPC to act as a client of NSURLHandle. Internal use only. */
- (void) URLHandleResourceDidFinishLoading: (NSURLHandle*)sender;
#endif
@ -652,7 +676,8 @@
* by the -sendMethodCall:params:timeout: method.<br />
*/
@interface GSXMLRPC (Delegate)
/**
/** <override-dummy />
* Called by the sender when an XMLRPC method call completes (either success
* or failure).
* The delegate may then call the -result method to retrieve the result of

View file

@ -359,6 +359,7 @@
count: (unsigned)count
at: (void*)buf
withName: (id*)name;
/** <override-dummy /> decodes indentation */
- (void) decodeIndent;
- (void) decodeObjectAt: (id*)anObject
withName: (id*)name;
@ -372,6 +373,7 @@
count: (unsigned)count
at: (const void*)buf
withName: (id)name;
/** <override-dummy /> encodes indentation */
- (void) encodeIndent;
- (void) encodeObjectAt: (id*)anObject
withName: (id)name;

View file

@ -304,35 +304,6 @@ GS_EXPORT NSString* const NSConnectionProxyCount; /* Objects received */
sender: (NSConnection*)parent;
@end
/**
* This informal protocol allows an object to control the details of how an
* object is sent over the wire in distributed objects Port communications.
*/
@interface NSObject (NSPortCoder)
/**
* Must return the class that will be created on the remote side
* of the connection. If the class to be created is not the same
* as that of the object returned by replacementObjectForPortCoder:
* then the class must be capable of recognising the object it
* actually gets in its initWithCoder: method.
* The default operation is to return NSDistantObject unless the
* object is being sent bycopy, in which case the objects actual
* class is returned. To force bycopy operation the object should
* return its own class.
*/
- (Class) classForPortCoder;
/**
* This message is sent to an object about to be encoded for sending
* over the wire. The default action is to return an NSDistantObject
* which is a local proxy for the object unless the object is being
* sent bycopy, in which case the actual object is returned.
* To force bycopy, an object should return itself.
*/
- (id) replacementObjectForPortCoder: (NSPortCoder*)aCoder;
@end
/*
* NSRunLoop mode, NSNotification name and NSException strings.
*/

View file

@ -217,7 +217,6 @@
- (BOOL) fileExistsAtPath: (NSString*)path isDirectory: (BOOL*)isDirectory;
- (NSDictionary*) fileSystemAttributesAtPath: (NSString*)path;
#if defined(__MINGW32__)
/**
* Convert from OpenStep internal string format to a string in
* the local filesystem format, suitable for passing to system functions.<br />
@ -229,21 +228,7 @@
* work with unicode strings.<br />
* Raises an exception if the character conversion is not possible.
*/
- (const unichar*) fileSystemRepresentationWithPath: (NSString*)path;
#else
/**
* Convert from OpenStep internal string format to a string in
* the local filesystem format, suitable for passing to system functions.<br />
* Converts the standard path separator ('/') and path extension ('.')
* characters to the local representation if necessary.<br />
* This representation may vary between filesystems.<br />
* On mingw32 systems, the filesystem representation is 16-bit unicode and is
* expected to be used in conjunction with the variants of system calls which
* work with unicode strings.<br />
* Raises an exception if the character conversion is not possible.
*/
- (const char*) fileSystemRepresentationWithPath: (NSString*)path;
#endif
- (const GSNativeChar*) fileSystemRepresentationWithPath: (NSString*)path;
- (BOOL) isExecutableFileAtPath: (NSString*)path;
- (BOOL) isDeletableFileAtPath: (NSString*)path;
@ -259,7 +244,6 @@
- (BOOL) removeFileAtPath: (NSString*)path
handler: (id)handler;
#if defined(__MINGW32__)
/**
* Convert to OpenStep internal string format from a string in
* the local filesystem format, as returned by system functions.<br />
@ -272,24 +256,8 @@
* is expected to have come from the variant of a system call which works
* with unicode strings.
*/
- (NSString*) stringWithFileSystemRepresentation: (const unichar*)string
- (NSString*) stringWithFileSystemRepresentation: (const GSNativeChar*)string
length: (unsigned int)len;
#else
/**
* Convert to OpenStep internal string format from a string in
* the local filesystem format, as returned by system functions.<br />
* This representation may vary between filesystems.<br />
* The GNUstep version of this method currently does not bother to change
* any path separator and extension characters to the standard values
* ('/' and '.' respectively) as the path handling methods of [NSString]
* should be able to handle native format strings.<br />
* On mingw32 systems, the filesystem representation is 16-bit unicode and
* is expected to have come from the variant of a system call which works
* with unicode strings.
*/
- (NSString*) stringWithFileSystemRepresentation: (const char*)string
length: (unsigned int)len;
#endif
- (NSArray*) subpathsAtPath: (NSString*)path;

View file

@ -144,24 +144,36 @@ GS_EXPORT NSString *const NSKeyValueChangeOldKey;
*/
@interface NSObject (NSKeyValueObserverNotification)
/** <override-dummy />
*/
- (void) didChangeValueForKey: (NSString*)aKey;
/** <override-dummy />
*/
- (void) didChange: (NSKeyValueChange)changeKind
valuesAtIndexes: (NSIndexSet*)indexes
forKey: (NSString*)aKey;
/** <override-dummy />
*/
- (void) willChangeValueForKey: (NSString*)aKey;
/** <override-dummy />
*/
- (void) willChange: (NSKeyValueChange)changeKind
valuesAtIndexes: (NSIndexSet*)indexes
forKey: (NSString*)aKey;
#if OS_API_VERSION(100400,GS_API_LATEST)
/** <override-dummy />
*/
- (void) didChangeValueForKey: (NSString*)aKey
withSetMutation: (NSKeyValueSetMutationKind)mutationKind
usingObjects: (NSSet*)objects;
/** <override-dummy />
*/
- (void) willChangeValueForKey: (NSString*)aKey
withSetMutation: (NSKeyValueSetMutationKind)mutationKind
usingObjects: (NSSet*)objects;

View file

@ -262,7 +262,6 @@
- (Class) class;
- (Class) classForArchiver;
- (Class) classForCoder;
- (Class) classForPortCoder;
- (BOOL) conformsToProtocol: (Protocol*)aProtocol;
- (id) copy;
- (void) dealloc;
@ -287,7 +286,6 @@
- (void) release;
- (id) replacementObjectForArchiver: (NSArchiver*)anArchiver;
- (id) replacementObjectForCoder: (NSCoder*)anEncoder;
- (id) replacementObjectForPortCoder: (NSPortCoder*)aCoder;
- (BOOL) respondsToSelector: (SEL)aSelector;
- (id) retain;
- (unsigned) retainCount;

View file

@ -48,7 +48,7 @@
@class NSHost;
@interface NSObject(NSPortDelegateMethods)
/**
/** <override-dummy />
* Subclasses of NSPort send this message to their delegate on receipt
* of a port message.
*/

View file

@ -143,6 +143,35 @@
@end
/**
* This informal protocol allows an object to control the details of how an
* object is sent over the wire in distributed objects Port communications.
*/
@interface NSObject (NSPortCoder)
/**
* Must return the class that will be created on the remote side
* of the connection. If the class to be created is not the same
* as that of the object returned by replacementObjectForPortCoder:
* then the class must be capable of recognising the object it
* actually gets in its initWithCoder: method.
* The default operation is to return NSDistantObject unless the
* object is being sent bycopy, in which case the objects actual
* class is returned. To force bycopy operation the object should
* return its own class.
*/
- (Class) classForPortCoder;
/**
* This message is sent to an object about to be encoded for sending
* over the wire. The default action is to return an NSDistantObject
* which is a local proxy for the object unless the object is being
* sent bycopy, in which case the actual object is returned.
* To force bycopy, an object should return itself.
*/
- (id) replacementObjectForPortCoder: (NSPortCoder*)aCoder;
@end
@interface NSPortCoder (Private)
- (NSMutableArray*) _components;
@end

View file

@ -41,7 +41,11 @@
+ (NSString*) description;
+ (BOOL) isKindOfClass: (Class)aClass;
+ (BOOL) isMemberOfClass: (Class)aClass;
/** <override-dummy />
*/
+ (void) load;
/** <override-dummy />
*/
+ (void) release;
+ (BOOL) respondsToSelector: (SEL)aSelector;
+ (id) retain;

View file

@ -333,7 +333,6 @@ enum {
matchesIntoArray: (NSArray**)outputArray
filterTypes: (NSArray*)filterTypes;
#if defined(__MINGW32__)
/**
* Converts the receiver to a C string path expressed in the character
* encoding appropriate for the local host file system. This string will be
@ -345,23 +344,8 @@ enum {
* This method uses [NSFileManager-fileSystemRepresentationWithPath:] to
* perform the conversion.
*/
- (const unichar*) fileSystemRepresentation;
#else
/**
* Converts the receiver to a C string path expressed in the character
* encoding appropriate for the local host file system. This string will be
* automatically freed soon after it is returned, so copy it if you need it
* for long.<br />
* NB. On mingw32 systems the filesystem representation of a path is a 16-bit
* unicode character string, so you should only pass the value returned by
* this method to functions expecting wide characters.<br />
* This method uses [NSFileManager-fileSystemRepresentationWithPath:] to
* perform the conversion.
*/
- (const char*) fileSystemRepresentation;
#endif
- (const GSNativeChar*) fileSystemRepresentation;
#if defined(__MINGW32__)
/**
* Converts the receiver to a C string path using the character encoding
* appropriate to the local file system. This string will be stored
@ -374,24 +358,8 @@ enum {
* This method uses [NSFileManager-fileSystemRepresentationWithPath:] to
* perform the conversion.
*/
- (BOOL) getFileSystemRepresentation: (unichar*)buffer
- (BOOL) getFileSystemRepresentation: (GSNativeChar*)buffer
maxLength: (unsigned int)size;
#else
/**
* Converts the receiver to a C string path using the character encoding
* appropriate to the local file system. This string will be stored
* into buffer if it is shorter (number of characters) than size,
* otherwise NO is returned.<br />
* NB. On mingw32 systems the filesystem representation of a path is a 16-bit
* unicode character string, so the buffer you pass to this method must be
* twice as many bytes as the size (number of characters) you expect to
* receive.<br />
* This method uses [NSFileManager-fileSystemRepresentationWithPath:] to
* perform the conversion.
*/
- (BOOL) getFileSystemRepresentation: (char*)buffer
maxLength: (unsigned int)size;
#endif
/**
* Returns a string containing the last path component of the receiver.<br />

View file

@ -86,25 +86,25 @@ GS_EXPORT NSString* const NSURLFileScheme;
@interface NSObject (NSURLClient)
/**
/** <override-dummy />
* Some data has become available. Note that this does not mean that all data
* has become available, only that a chunk of data has arrived.
*/
- (void) URL: (NSURL*)sender
resourceDataDidBecomeAvailable: (NSData*)newBytes;
/**
/** <override-dummy />
* Loading of resource data is complete.
*/
- (void) URLResourceDidFinishLoading: (NSURL*)sender;
/**
/** <override-dummy />
* Loading of resource data was cancelled by programmatic request
* (not an error).
*/
- (void) URLResourceDidCancelLoading: (NSURL*)sender;
/**
/** <override-dummy />
* Loading of resource data has failed, for given human-readable reason.
*/
- (void) URL: (NSURL*)sender

View file

@ -174,19 +174,25 @@ GS_EXPORT NSString* const NSXMLParserErrorDomain;
*/
@interface NSObject (NSXMLParserDelegateEventAdditions)
/** <override-dummy />
*/
- (NSData*) parser: (NSXMLParser*)aParser
resolveExternalEntityName: (NSString*)aName
systemID: (NSString*)aSystemID;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
didEndElement: (NSString*)anElementName
namespaceURI: (NSString*)aNamespaceURI
qualifiedName: (NSString*)aQualifierName;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
didEndMappingPrefix: (NSString*)aPrefix;
/**
/** <override-dummy />
* Called when the start of an element is encountered in the document,
* this provides the name of the element, a dictionary containing the
* attributes (if any) and (where namespaces are used) the namespace
@ -198,68 +204,96 @@ GS_EXPORT NSString* const NSXMLParserErrorDomain;
qualifiedName: (NSString*)aQualifierName
attributes: (NSDictionary*)anAttributeDict;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
didStartMappingPrefix: (NSString*)aPrefix
toURI: (NSString*)aNamespaceURI;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundAttributeDeclarationWithName: (NSString*)anAttributeName
forElement: (NSString*)anElementName
type: (NSString*)aType
defaultValue: (NSString*)aDefaultValue;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundCDATA: (NSData*)aBlock;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundCharacters: (NSString*)aString;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundComment: (NSString*)aComment;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundElementDeclarationWithName: (NSString*)anElementName
model: (NSString*)aModel;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundExternalEntityDeclarationWithName: (NSString*)aName
publicID: (NSString*)aPublicID
systemID: (NSString*)aSystemID;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundIgnorableWhitespace: (NSString*)aWhitespaceString;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundInternalEntityDeclarationWithName: (NSString*)aName
value: (NSString*)aValue;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundNotationDeclarationWithName: (NSString*)aName
publicID: (NSString*)aPublicID
systemID: (NSString*)aSystemID;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundProcessingInstructionWithTarget: (NSString*)aTarget
data: (NSString*)aData;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
foundUnparsedEntityDeclarationWithName: (NSString*)aName
publicID: (NSString*)aPublicID
systemID: (NSString*)aSystemID
notationName: (NSString*)aNotationName;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
parseErrorOccurred: (NSError*)anError;
/** <override-dummy />
*/
- (void) parser: (NSXMLParser*)aParser
validationErrorOccurred: (NSError*)anError;
/**
/** <override-dummy />
* Called when parsing ends.
*/
- (void) parserDidEndDocument: (NSXMLParser*)aParser;
/**
/** <override-dummy />
* Called when parsing begins.
*/
- (void) parserDidStartDocument: (NSXMLParser*)aParser;

View file

@ -227,7 +227,7 @@ static SEL rlSel;
/**
* Returns an autoreleased array from the contents of aURL. The new array is
* created using +allocWithZone: and initialised using the
* created using [NSObject+allocWithZone:] and initialised using the
* -initWithContentsOfURL: method. See the documentation for those
* methods for more detail.
*/
@ -341,7 +341,7 @@ static SEL rlSel;
/**
* Returns YES if anObject belongs to self. No otherwise.<br />
* The -isEqual: method of anObject is used to test for equality.
* The [NSObject-isEqual:] method of anObject is used to test for equality.
*/
- (BOOL) containsObject: (id)anObject
{
@ -495,7 +495,7 @@ static SEL rlSel;
/**
* Returns the index of the first object found in the receiver
* which is equal to anObject (using anObject's -isEqual: method).
* which is equal to anObject (using anObject's [NSObject-isEqual:] method).
* Returns NSNotFound on failure.
*/
- (unsigned) indexOfObject: (id)anObject
@ -518,7 +518,7 @@ static SEL rlSel;
/**
* Returns the index of the first object found in aRange of receiver
* which is equal to anObject (using anObject's -isEqual: method).
* which is equal to anObject (using anObject's [NSObject-isEqual:] method).
* Returns NSNotFound on failure.
*/
- (unsigned) indexOfObject: (id)anObject inRange: (NSRange)aRange
@ -1511,7 +1511,7 @@ compare(id elem1, id elem2, void* context)
}
/**
* Removes all occurrences of anObject (found by the -isEqual: method
* Removes all occurrences of anObject (found by the [NSObject-isEqual:] method
* of anObject) aRange in the receiver.
*/
- (void) removeObject: (id)anObject inRange: (NSRange)aRange
@ -1611,8 +1611,8 @@ compare(id elem1, id elem2, void* context)
}
/**
* Removes all occurrences of anObject (found by anObject's -isEqual: method)
* from the receiver.
* Removes all occurrences of anObject (found by anObject's
* [NSObject-isEqual:] method) from the receiver.
*/
- (void) removeObject: (id)anObject
{
@ -1766,7 +1766,7 @@ compare(id elem1, id elem2, void* context)
/**
* Removes from the receiver, all the objects present in otherArray,
* as determined by using the -isEqual: method.
* as determined by using the [NSObject-isEqual:] method.
*/
- (void) removeObjectsInArray: (NSArray*)otherArray
{

View file

@ -923,7 +923,7 @@ static Class GSMutableAttributedStringClass;
[self endEditing];
}
/**
/** <override-subclass />
* Replaces substring; replacement is granted attributes equal to those of
* the first character of the portion replaced.
*/
@ -942,21 +942,18 @@ static Class GSMutableAttributedStringClass;
withAttributedString: attributedString];
}
//Grouping changes
/**
/** <override-dummy />
* Call before executing a collection of changes, for optimization.
*/
- (void) beginEditing
{
//Overridden by subclasses
}
/**
/** <override-dummy />
* Call after executing a collection of changes, for optimization.
*/
- (void) endEditing
{
//Overridden by subclasses
}
@end //NSMutableAttributedString

View file

@ -425,6 +425,8 @@
[self decodeArrayOfObjCType: type count: count at: buf];
}
/** <override-dummy />
*/
- (void) decodeIndent
{
}
@ -466,6 +468,8 @@
[self encodeArrayOfObjCType: type count: count at: buf];
}
/** <override-dummy />
*/
- (void) encodeIndent
{
}

View file

@ -380,7 +380,6 @@ static NSLock *cached_proxies_gate = nil;
* Use [NSSocketPortNameServer+sharedInstance]
* for connections to remote hosts.
* </p>
* </p>
* <p>
* If <em>host</em> is <code>nil</code> or an empty string,
* the host is taken to be the local machine.

View file

@ -1024,7 +1024,7 @@ compareIt(id o1, id o2, void* context)
* according to the locale, and indented according to level.<br />
* Unless locale is nil, a level of zero indents items by four spaces,
* while a level of one indents them by a tab.<br />
* If the keys in the dictionary respond to -compare:, the items are
* If the keys in the dictionary respond to [NSObject-compare:], the items are
* listed by key in ascending order. If not, the order in which the
* items are listed is undefined.
*/

View file

@ -726,30 +726,36 @@ NSString * const NSFileHandleOperationException
return NSFileHandle_ssl_class;
}
/**
* Establishes an SSL connection from the system that the handle is talking to.
/** <override-dummy />
* Establishes an SSL connection from the system that the handle
* is talking to.<br />
* This is implented by an SSL handling subclass.<br />
* The default implementation just returns NO.
*/
- (BOOL) sslAccept
{
return NO;
}
/**
* Establishes an SSL connection to the system that the handle is talking to.
/** <override-dummy />
* Establishes an SSL connection to the system that the handle
* is talking to.<br />
* This is implented by an SSL handling subclass.<br />
* The default implementation just returns NO.
*/
- (BOOL) sslConnect
{
return NO;
}
/**
/** <override-dummy />
* Shuts down the SSL connection to the system that the handle is talking to.
*/
- (void) sslDisconnect
{
}
/**
/** <override-dummy />
* Sets the certificate to be used to identify this process to the server
* at the opposite end of the network connection.
*/

View file

@ -348,7 +348,7 @@ static NSStringEncoding defaultEncoding;
*/
- (BOOL) changeCurrentDirectoryPath: (NSString*)path
{
const _CHAR *lpath = (_CCP)[self fileSystemRepresentationWithPath: path];
const _CHAR *lpath = [self fileSystemRepresentationWithPath: path];
#if defined(__MINGW32__)
return SetCurrentDirectoryW(lpath) == TRUE ? YES : NO;
#else
@ -374,7 +374,7 @@ static NSStringEncoding defaultEncoding;
{
return YES;
}
lpath = (_CCP)[defaultManager fileSystemRepresentationWithPath: path];
lpath = [defaultManager fileSystemRepresentationWithPath: path];
#ifndef __MINGW32__
num = [attributes fileOwnerAccountID];
@ -658,7 +658,7 @@ static NSStringEncoding defaultEncoding;
{
const _CHAR *lpath;
lpath = (_CCP)[self fileSystemRepresentationWithPath: completePath];
lpath = [self fileSystemRepresentationWithPath: completePath];
if (CreateDirectoryW(lpath, 0) == FALSE)
{
return NO;
@ -780,7 +780,7 @@ static NSStringEncoding defaultEncoding;
attributes: (NSDictionary*)attributes
{
#if defined(__MINGW32__)
const _CHAR *lpath = (_CCP)[self fileSystemRepresentationWithPath: path];
const _CHAR *lpath = [self fileSystemRepresentationWithPath: path];
HANDLE fh;
DWORD written = 0;
DWORD len = [contents length];
@ -1012,8 +1012,8 @@ static NSStringEncoding defaultEncoding;
const _CHAR *sourcePath;
const _CHAR *destPath;
sourcePath = (_CCP)[self fileSystemRepresentationWithPath: source];
destPath = (_CCP)[self fileSystemRepresentationWithPath: destination];
sourcePath = [self fileSystemRepresentationWithPath: source];
destPath = [self fileSystemRepresentationWithPath: destination];
if ([self fileExistsAtPath: destination] == YES)
{
@ -1204,7 +1204,7 @@ static NSStringEncoding defaultEncoding;
[self _sendToHandler: handler willProcessPath: path];
lpath = (_CCP)[self fileSystemRepresentationWithPath: path];
lpath = [self fileSystemRepresentationWithPath: path];
if (lpath == 0 || *lpath == 0)
{
return NO;
@ -1279,7 +1279,7 @@ static NSStringEncoding defaultEncoding;
}
}
if (_RMDIR((_CCP)[self fileSystemRepresentationWithPath: path]) < 0)
if (_RMDIR([self fileSystemRepresentationWithPath: path]) < 0)
{
return [self _proceedAccordingToHandler: handler
forError: [NSString stringWithCString: GSLastErrorStr (errno)]
@ -1308,7 +1308,7 @@ static NSStringEncoding defaultEncoding;
*/
- (BOOL) fileExistsAtPath: (NSString*)path isDirectory: (BOOL*)isDirectory
{
const _CHAR *lpath = (_CCP)[self fileSystemRepresentationWithPath: path];
const _CHAR *lpath = [self fileSystemRepresentationWithPath: path];
if (isDirectory != 0)
{
@ -1367,7 +1367,7 @@ static NSStringEncoding defaultEncoding;
*/
- (BOOL) isReadableFileAtPath: (NSString*)path
{
const _CHAR* lpath = (_CCP)[self fileSystemRepresentationWithPath: path];
const _CHAR* lpath = [self fileSystemRepresentationWithPath: path];
if (lpath == 0 || *lpath == _NUL)
{
@ -1403,7 +1403,7 @@ static NSStringEncoding defaultEncoding;
*/
- (BOOL) isWritableFileAtPath: (NSString*)path
{
const _CHAR* lpath = (_CCP)[self fileSystemRepresentationWithPath: path];
const _CHAR* lpath = [self fileSystemRepresentationWithPath: path];
if (lpath == 0 || *lpath == _NUL)
{
@ -1444,7 +1444,7 @@ static NSStringEncoding defaultEncoding;
*/
- (BOOL) isExecutableFileAtPath: (NSString*)path
{
const _CHAR* lpath = (_CCP)[self fileSystemRepresentationWithPath: path];
const _CHAR* lpath = [self fileSystemRepresentationWithPath: path];
if (lpath == 0 || *lpath == _NUL)
{
@ -1490,7 +1490,7 @@ static NSStringEncoding defaultEncoding;
*/
- (BOOL) isDeletableFileAtPath: (NSString*)path
{
const _CHAR* lpath = (_CCP)[self fileSystemRepresentationWithPath: path];
const _CHAR* lpath = [self fileSystemRepresentationWithPath: path];
if (lpath == 0 || *lpath == _NUL)
{
@ -1607,7 +1607,7 @@ static NSStringEncoding defaultEncoding;
NSDictionary *d;
d = [GSAttrDictionary attributesAt:
(_CCP)[self fileSystemRepresentationWithPath: path] traverseLink: flag];
[self fileSystemRepresentationWithPath: path] traverseLink: flag];
return d;
}
@ -1641,7 +1641,7 @@ static NSStringEncoding defaultEncoding;
};
DWORD SectorsPerCluster, BytesPerSector, NumberFreeClusters;
DWORD TotalNumberClusters;
const _CHAR *lpath = (_CCP)[self fileSystemRepresentationWithPath: path];
const _CHAR *lpath = [self fileSystemRepresentationWithPath: path];
if (!GetDiskFreeSpaceW(lpath, &SectorsPerCluster,
&BytesPerSector, &NumberFreeClusters, &TotalNumberClusters))
@ -1872,8 +1872,8 @@ static NSStringEncoding defaultEncoding;
#endif
}
#if defined(__MINGW__)
- (const unichar*) fileSystemRepresentationWithPath: (NSString*)path
#if defined(__MINGW32__)
- (const GSNativeChar*) fileSystemRepresentationWithPath: (NSString*)path
{
NSRange r;
@ -1882,19 +1882,21 @@ static NSStringEncoding defaultEncoding;
{
path = [path stringByReplacingString: @"/" withString: @"\\"];
}
return (const unichar*)[path cStringUsingEncoding: NSUnicodeStringEncoding];
return
(const GSNativeChar*)[path cStringUsingEncoding: NSUnicodeStringEncoding];
}
- (NSString*) stringWithFileSystemRepresentation: (const unichar*)string
- (NSString*) stringWithFileSystemRepresentation: (const GSNativeChar*)string
length: (unsigned int)len
{
return [NSString stringWithCharacters: string length: len];
}
#else
- (const char*) fileSystemRepresentationWithPath: (NSString*)path
- (const GSNativeChar*) fileSystemRepresentationWithPath: (NSString*)path
{
return [path cStringUsingEncoding: defaultEncoding];
return
(const GSNativeChar*)[path cStringUsingEncoding: defaultEncoding];
}
- (NSString*) stringWithFileSystemRepresentation: (const char*)string
- (NSString*) stringWithFileSystemRepresentation: (const GSNativeChar*)string
length: (unsigned int)len
{
return AUTORELEASE([[NSString allocWithZone: NSDefaultMallocZone()]
@ -1992,7 +1994,7 @@ inline void gsedRelease(GSEnumeratedDirectory X)
_topPath = [[NSString alloc] initWithString: path];
localPath = (_CCP)[_mgr fileSystemRepresentationWithPath: path];
localPath = [_mgr fileSystemRepresentationWithPath: path];
dir_pointer = _OPENDIR(localPath);
if (dir_pointer)
{
@ -2148,7 +2150,7 @@ inline void gsedRelease(GSEnumeratedDirectory X)
#endif
#endif
{
if (_STAT((_CCP)[_mgr fileSystemRepresentationWithPath:
if (_STAT([_mgr fileSystemRepresentationWithPath:
_currentFilePath], &statbuf) != 0)
{
break;
@ -2159,7 +2161,7 @@ inline void gsedRelease(GSEnumeratedDirectory X)
_DIR* dir_pointer;
dir_pointer
= _OPENDIR((_CCP)[_mgr fileSystemRepresentationWithPath:
= _OPENDIR([_mgr fileSystemRepresentationWithPath:
_currentFilePath]);
if (dir_pointer)
{
@ -2376,8 +2378,8 @@ inline void gsedRelease(GSEnumeratedDirectory X)
handler: (id)handler
{
#if defined(__MINGW32__)
if (CopyFileW((_CCP)[self fileSystemRepresentationWithPath: source],
(_CCP)[self fileSystemRepresentationWithPath: destination], NO))
if (CopyFileW([self fileSystemRepresentationWithPath: source],
[self fileSystemRepresentationWithPath: destination], NO))
{
return YES;
}

View file

@ -767,11 +767,15 @@ static Class classForInstance(id o)
@implementation NSObject (NSKeyValueObserving)
/**
* NOT IMPLEMENTED
*/
- (void) observeValueForKeyPath: (NSString*)aPath
ofObject: (id)anObject
change: (NSDictionary*)aChange
context: (void*)aContext
{
return;
}
@end

View file

@ -821,19 +821,29 @@ static NSDictionary *makeReference(unsigned ref)
@end
@implementation NSObject (NSKeyedArchiverDelegate)
/** <override-dummy />
*/
- (void) archiver: (NSKeyedArchiver*)anArchiver didEncodeObject: (id)anObject
{
}
/** <override-dummy />
*/
- (id) archiver: (NSKeyedArchiver*)anArchiver willEncodeObject: (id)anObject
{
return anObject;
}
/** <override-dummy />
*/
- (void) archiverDidFinish: (NSKeyedArchiver*)anArchiver
{
}
/** <override-dummy />
*/
- (void) archiverWillFinish: (NSKeyedArchiver*)anArchiver
{
}
/** <override-dummy />
*/
- (void) archiver: (NSKeyedArchiver*)anArchiver
willReplaceObject: (id)anObject
withObject: (id)newObject

View file

@ -796,23 +796,33 @@ static NSMapTable globalClassMap = 0;
@end
@implementation NSObject (NSKeyedUnarchiverDelegate)
/** <override-dummy />
*/
- (Class) unarchiver: (NSKeyedUnarchiver*)anUnarchiver
cannotDecodeObjectOfClassName: (NSString*)aName
originalClasses: (NSArray*)classNames
{
return nil;
}
/** <override-dummy />
*/
- (id) unarchiver: (NSKeyedUnarchiver*)anUnarchiver
didDecodeObject: (id)anObject
{
return anObject;
}
/** <override-dummy />
*/
- (void) unarchiverDidFinish: (NSKeyedUnarchiver*)anUnarchiver
{
}
/** <override-dummy />
*/
- (void) unarchiverWillFinish: (NSKeyedUnarchiver*)anUnarchiver
{
}
/** <override-dummy />
*/
- (void) unarchiver: (NSKeyedUnarchiver*)anUnarchiver
willReplaceObject: (id)anObject
withObject: (id)newObject

View file

@ -1571,17 +1571,8 @@ GSDescriptionForClassMethod(pcl self, SEL aSel)
return [self class];
}
/**
* Override to substitute class when an instance is being serialized by an
* [NSPortCoder]. Default implementation returns -classForCoder .
*/
- (Class) classForPortCoder
{
return [self classForCoder];
}
// FIXME - should this be added (as in OS X) now that we have NSKeyedArchiver?
// - (id) replacedmentObjectForKeyedArchiver: (NSKeyedArchiver *)keyedArchiver
// - (id) replacementObjectForKeyedArchiver: (NSKeyedArchiver *)keyedArchiver
// {
// return [self replacementObjectForCoder: (NSArchiver *)keyedArchiver];
// }
@ -1606,41 +1597,6 @@ GSDescriptionForClassMethod(pcl self, SEL aSel)
return self;
}
/**
* Returns the actual object to be encoded for sending over the
* network on a Distributed Objects connection.<br />
* The default implementation returns self if the receiver is being
* sent <em>bycopy</em> and returns a proxy otherwise.<br />
* Subclasses may override this method to change this behavior,
* eg. to ensure that they are always copied.
*/
- (id) replacementObjectForPortCoder: (NSPortCoder*)aCoder
{
static Class proxyClass = 0;
static IMP proxyImp = 0;
if (proxyImp == 0)
{
proxyClass = [NSDistantObject class];
/*
* use get_imp() because NSDistantObject doesn't implement
* methodForSelector:
*/
proxyImp = get_imp(GSObjCClass((id)proxyClass),
@selector(proxyWithLocal:connection:));
}
if ([aCoder isBycopy])
{
return self;
}
else
{
return (*proxyImp)(proxyClass, @selector(proxyWithLocal:connection:),
self, [aCoder connection]);
}
}
/* NSObject protocol */

View file

@ -1960,3 +1960,50 @@ static IMP _xRefImp; /* Serialize a crossref. */
@end
@implementation NSObject (NSPortCoder)
/**
* Override to substitute class when an instance is being serialized by an
* [NSPortCoder]. Default implementation returns -classForCoder .
*/
- (Class) classForPortCoder
{
return [self classForCoder];
}
/**
* Returns the actual object to be encoded for sending over the
* network on a Distributed Objects connection.<br />
* The default implementation returns self if the receiver is being
* sent <em>bycopy</em> and returns a proxy otherwise.<br />
* Subclasses may override this method to change this behavior,
* eg. to ensure that they are always copied.
*/
- (id) replacementObjectForPortCoder: (NSPortCoder*)aCoder
{
static Class proxyClass = 0;
static IMP proxyImp = 0;
if (proxyImp == 0)
{
proxyClass = [NSDistantObject class];
/*
* use get_imp() because NSDistantObject doesn't implement
* methodForSelector:
*/
proxyImp = get_imp(GSObjCClass((id)proxyClass),
@selector(proxyWithLocal:connection:));
}
if ([aCoder isBycopy])
{
return self;
}
else
{
return (*proxyImp)(proxyClass, @selector(proxyWithLocal:connection:),
self, [aCoder connection]);
}
}
@end

View file

@ -63,7 +63,7 @@
* </p>
* This default behavior may be altered by setting the
* <code>NSPortIsMessagePort</code> user default to NO, in which case
* an [NSSocketPortNaemServer] will be used as the default system name server
* an [NSSocketPortNameServer] will be used as the default system name server
* and you will have to use [NSMessagePortNameServer+sharedInstance]
* for host-local, private connections.
*/

View file

@ -1269,7 +1269,7 @@ extern IMP wRetImp;
*/
- (void) configureAsServer
{
/* Nothing to do here */
return; /* Nothing to do here */
}
/**

View file

@ -3470,7 +3470,7 @@ handle_printf_atsign (FILE *stream,
static NSFileManager *fm = nil;
#if defined(__MINGW32__)
- (const unichar*) fileSystemRepresentation
- (const GSNativeChar*) fileSystemRepresentation
{
if (fm == nil)
{
@ -3479,7 +3479,7 @@ static NSFileManager *fm = nil;
return [fm fileSystemRepresentationWithPath: self];
}
- (BOOL) getFileSystemRepresentation: (unichar*)buffer
- (BOOL) getFileSystemRepresentation: (GSNativeChar*)buffer
maxLength: (unsigned int)size
{
const unichar *ptr;
@ -3511,7 +3511,7 @@ static NSFileManager *fm = nil;
return YES;
}
#else
- (const char*) fileSystemRepresentation
- (const GSNativeChar*) fileSystemRepresentation
{
if (fm == nil)
{
@ -3520,7 +3520,7 @@ static NSFileManager *fm = nil;
return [fm fileSystemRepresentationWithPath: self];
}
- (BOOL) getFileSystemRepresentation: (char*)buffer
- (BOOL) getFileSystemRepresentation: (GSNativeChar*)buffer
maxLength: (unsigned int)size
{
const char* ptr;

View file

@ -95,7 +95,7 @@ static BOOL snuggleStart(NSString *t)
- (NSString*) checkComment: (NSString*)comment
unit: (NSString*)unit
info: (NSDictionary*)d
info: (NSMutableDictionary*)d
{
NSString *empty = [d objectForKey: @"Empty"];
BOOL hadComment = ([comment length] == 0 ? NO : YES);

View file

@ -168,6 +168,7 @@ ihandler(int sig)
selector: (NSString*)aSelector
to: (unsigned long)observer
{
return;
}
@end

View file

@ -796,7 +796,7 @@ notice and this notice are preserved.
If it <em>must</em> be overridden enter "<code>subclass</code>",
if it must <em>not</em> be overridden enter <code>never</code>",
if it is an empty/dummy implementation which is intended to be
overridden enter <code>dummy</ecode>, otherwise (for most methods
overridden enter <code>dummy</code>, otherwise (for most methods
which may be but are not particularly designed to be overridden)
leave this attribute unset.
<p>